Go Back   EQEmulator Home > EQEmulator Forums > Support > Spell Support

Spell Support Broken Spells? Want them Fixed? Request it here.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-04-2019, 08:53 AM
strugglegenerator's Avatar
strugglegenerator
Hill Giant
 
Join Date: May 2012
Location: Minnesota
Posts: 231
Default Pet Death Upon Zoning

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();
}
}
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 08:21 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3