View Single Post
  #3  
Old 04-13-2011, 12:07 AM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

First off, that way of displaying your script makes its really hard to debug. Im not sure if you are worried about somebody stealing your script or something but its not conducive to helping those you want help from.

One issue I see is that the mobs ID is not its NPCTypeID. The ID given is unique to that session and is usually not very large. If you want to get an NPC by its TypeID then you need to use GetNPCList() and check with $ent->GetNPCTypeID().

However, I assume this is a secondary NPC(otherwise you would just use $npc->GetID() right?). Since this is not the npc you want casting the spell, you can still simulate that by using $entity_list->GetNPCByID(999173)->CastSpell(xxx);
Reply With Quote