I want pets to die when the player zones. I know I can achieve this by putting a script on every pet NPC in the game, but before I go doing that, I'm curious if there is a simple on/off switch somewhere in the database. I can't find it anywhere.
Please advise! =)
**SOLVED**
I added this .pl script in my global_player.pl file and it worked like a charm:
Code:
sub EVENT_ZONE {
#:: Match if a player has a pet when exiting a zone
if ($client->GetPetID()) {
#:: Get the pet's ID and kill it
$PetID = $entity_list->GetMobByID($client->GetPetID());
$PetID->Kill();
}
}
sub EVENT_ENTERZONE {
#:: Match if a player has a pet when entering a zone
if ($client->GetPetID()) {
#:: Get the pet's ID and kill it
$PetID = $entity_list->GetMobByID($client->GetPetID());
$PetID->Kill();
}
}