View Single Post
  #12  
Old 02-22-2010, 07:40 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

ChaosSlayer,

If you want to set certain NPCs to use certain weapon models and certain attack messages and animations, you can now just set them in the 2 new fields I added to the npc_types table. By default, the new fields are set to 28, which is hand to hand (punching), but you can change those to other skill IDs to use as long as you have a weapon model set for the npc already.

If you want to set the attack message/animations via quests after the NPC is already spawned, you can do it using the new quest objects I added in. I am probably going to make a plugin just for setting a specific weapon model that will automatically set the animation and message to match it.

Taurinus/Akkadius,

Thanks for the heads-up on the compile error. It worked fine for me in Linux, and I didn't bother trying it in Windows. At least it shouldn't be too hard to correct it.

For the piercing animations, I assume you mean there is no difference between the 1 handed and the 2 handed versions of piercing? That is because there is no actual 2 handed piercing skill, they both use the same skill. So, unless I make up a non-existent skill for 2 handed piercing, I can't easily make 2 handed piercing animations show properly. Or, is there some other alternate 1 handed piercing animations you are referring to? As far as the animations go, it should be working the same as using an item with that same skill type, other than for the 2 handed pierce ones.

Either way, at least the majority of the work is done to get this new feature working. Any adjustments can be added later if needed. I may check with KLS and see what she thinks about adding in a skill type of 100 (skill types only go to 76 currently on Live I believe) or something to use for 2 handed piercing.

For reference, here are the new quest objects I added last night:

$npc->GetPrimSkill() - Gets the NPCs primary weapon skill type as it is currently set
$npc->GetSecSkill() - Gets the NPCs secondary weapon skill type as it is currently set
$npc->SetPrimSkill(skill_type) - Sets the NPCs Primary slot skill to use for Animations and Hit Messages
$npc->SetSecSkill(skill_type) - Sets the NPCs Secondary slot skill to use for Animations and Hit Messages

When you get or set them, just know that it always uses the numeric value for the skill ID (not the skill name). Note that the changes these commands make are only temporary and do not update what is set in the database for the NPC.

Here is a list of the numeric values for the skills you can set with these commands:

0 1H Blunt
1 1H Slashing
2 2H Blunt
3 2H Slashing
7 Archery
28 Hand To Hand
36 Piercing
51 Throwing
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 02-22-2010 at 07:50 PM..
Reply With Quote