Log in

View Full Version : npcspecialattks semi-working?


Hateborne
03-24-2011, 01:37 AM
Sorry to bother you gents again, but npcspecialattks doesn't seem to be working fully (or I'm using it incorrectly).

I am trying to create a caster npc that (stay with me, this gets crazy) actually casts instead of punching for 5-6 damage.

Magical Attack = m
Ranged Attack = Y

I tried both and neither seemed to have any effect. The npc continued to smack me and has yet to cast the first spell.

I've repopped the zone a few times, restarted the server a few times, and still I stand with a wizard npc punching me.


Any pointers?

-Hate


P.S. - Yes I set the npc to class wizard(12) and yes I set it's npc_spells_id to wizard(2).

trevius
03-24-2011, 02:41 AM
All special attacks work fine as far as I know. I think you are just not understanding what those special attacks do.

Magical Attack - Makes an NPCs melee attacks magical, so they can hit stuff that is "Immune to non-magical damage". This would probably mostly be used for pets so they can hit stuff like skeletons that require a magic weapon.
Ranged Attack - This is for making ranger type NPCs that attack with arrows, not for casters.

To make a casting NPC, you would just set it as you already have with class and spell set. They should periodically cast spells based on their spell set settings.

To make an NPC that only casts and never melees would be a bit more complicated, but it can be done with some innovative scripting or some source code edits.

Jaekob
03-24-2011, 06:28 AM
Ranged attacks will work but NPC must be at range. This is best handled by setting run speed to 0 and keeping the NPC away from the target PC.

Hateborne
03-24-2011, 04:15 PM
Trevius, ever the badass, thank you!
Jaekob, thank you for your input also.

I was beginning to wonder if I had misinterpreted the meaning of the npcspecialattks column, but I had no example to base such thoughts.

Ok, I will have to essentially just use perl to build the attack script.

My next question is, what is the $mob->CastSpell slot arguement?
ex: $mob->CastSpell(1234, 5678, >THIS<, 5, -1)


-Hate