I almost got something working, the problem I am having is getting the casting mob to recognize the target mob's Entity ID.
Unless I am doing something wrong the following lines do not reveal a mob's Entity ID by type, target, or name:
PHP Code:
$entity_list->GetMobByNpcTypeID(get_id);
$entity_list->GetMobID(id);
$entity_list->GetMob(name);
I've got the NPC casting on itself and I can get the mob to recognize its own Entity ID, I just can't get an Entity ID from some other mob or transfer that variable to another mob's script.
PHP Code:
sub EVENT_SPAWN {
$npc->GetID(); #returns this mob's Entity ID
quest::settimer(1,10);
}
sub EVENT_TIMER {
if ($timer == 1) {
$npc->CastSpell(2110,$mobid); #casts skin like wood on this NPC
}
}