Ok I finally got it. A bizaare method but it works. I am sending the NPC's Entity ID as a signal to the other mob.
Code:
#this npc has an ID of 2900000
#this NPC will be casted on by another NPC with an ID 2900001
sub EVENT_AGGRO {
$myeid = $npc->GetID(); #get this npc's Entity_ID
quest::spawn2(2900001,0,0,22,16,0,166); #spawn the casting NPC #change the loc
quest::settimer("signal",5); #give time for spawning
}
sub EVENT_TIMER {
if ($timer eq "signal") {
quest::signalwith(2900001,$myeid,0); #send Enity_ID as a signal to casting NPC
quest::stoptimer("signal");
}
}
Code:
#this npc has an ID of 2900001
#this npc will cast on NPC with an ID of 2900000
sub EVENT_SPAWN {
quest::settimer(1,15); #time before I start casting
}
sub EVENT_SIGNAL {
if ($signal => 1) {
$eid = $signal; #transfering the signal number for use in CastSpell
}
}
sub EVENT_TIMER {
if ($timer == 1) {
$npc->CastSpell(13,$eid); #casts a reapeating complete heal on the other NPC
}
}