View Single Post
  #3  
Old 10-11-2018, 08:21 PM
greyfox8888
Fire Beetle
 
Join Date: Feb 2009
Location: eq
Posts: 5
Default

Thanks so much! That did the trick. I completely missed the plugins:

plugin::CheckDist(entity, distance);
plugin::CheckDistBetween2Ents(entity1, entity2, distance);

The code for the spawned adds now works as intended:

Code:
sub EVENT_AGGRO {
   quest::shout("$name!!!");    #Shouts the name of the player that better start running
   quest::settimer("distance", 1);
}

sub EVENT_TIMER {

   if ($timer eq "distance") {

     my $target = $npc->GetTarget();

     if(plugin::CheckDist($target, 21)) {
          $npc->SpellFinished(732, $target,0); #cast Ice Comet on target if it is within 21 units of distance
          quest::depop();
     } 
   }
}
Reply With Quote