View Single Post
  #6  
Old 04-04-2011, 10:14 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default

Yeah, I wouldn't do it that way. I would use a timer. Something like this:

Code:
sub EVENT_ENTERZONE {
  my $pet_id = $client->GetPetID();
  if ($pet_id) {
    quest::settimer($pet_id, 3);
  }
}

sub EVENT_TIMER {
  quest::stoptimer($timer);
  $pet = $entity_list->GetNPCByID($timer);
  $pet->Depop();
}
And if lag seems to still make it not catch the pet, move the entire function underneath the timer.
Reply With Quote