PDA

View Full Version : [HELP] If Item, Cast Spell


Kenster
17.10.2005, 02:17
Well, I am just about done Seven signs, only one thing I do not have as of yet. Which is the NPC in town. What I wish to do, is basically like this :

When the townNPC basically "agros" it checks to see what player has item, and if so, cast spell "XYZ" on them.

Any help, or suggestions, would be appreciated.

RmzVoid
17.10.2005, 08:19
You want to ban cheaters from town? ))

EventHandler SEE_CREATURE(creature)
{
if ( InMyTerritory(creature) && OwnItemCount(creature,@some_item)>0 )
AddUseSkillDesire(creature, @s_some_spell, @ST_ATTACK, @AMT_STAND, 1000000);
}

basically so...

Kenster
17.10.2005, 16:58
I spent all my time studying the AI.obj, So I presume, there is another way to write the AI and compile it into Ai.obj code?

serjr
17.10.2005, 18:30
use nasc compiler, can be found in l2 tools