View Single Post
  #21  
Old 08-12-2017, 04:32 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

This isn't the best, but it'll do what you want it to do I believe. When the player zones in the script checks if NPC ID # is spawned. If it is a timer for 30 seconds is set on the player. When the timer expires, the client is moved to the NPC's current co-ordinates.

Code:
sub EVENT_ENTERZONE {
    if ($entity_list->GetNPCByNPCTypeID(#)) {
        quest::settimer("Summon", 30);
    }
}

sub EVENT_TIMER {
    if ($timer eq "Summon") {
        if ($entity_list->GetNPCByNPCTypeID(#)) {
            $client->MovePC($zoneid, $entity_list->GetNPCByNPCTypeID(#)->GetX(), $entity_list->GetNPCByNPCTypeID(#)->GetY(), $entity_list->GetNPCByNPCTypeID(#)->GetZ(), $entity_list->GetNPCByNPCTypeID(#)->GetHeading());
        }
        quest::stoptimer("Summon");
    }
}
Reply With Quote