Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 04-28-2013, 09:41 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Figured out a work around... not sure how efficient this is yet. But it works!

Checks for an Item on the player ... So if they are holding X item the swarm pet will buff itself with a nice buff!

So I guess you could make multiple different ranks of an item that make swarm pets more and more powerful.. heh

Code:
sub EVENT_SPAWN {
        quest::settimer("Buffs", 1);
}

sub EVENT_TIMER {
		my $petitem = 1733;
		my $petbuff = 27424;
		#Hostile Target of the Swarm PET!
        $KillTarg = $npc->GetTarget();
		
        if($KillTarg <= 0)
        {
			#Return if we have no target
                return;
        }
		#Grabbing all clients
		my @clientlist = $entity_list->GetClientList();
		foreach $ent (@clientlist)
		{
		my $ClientName = $ent->GetName();
		my $PlayerENT = $ent;
		my @hatelist = $KillTarg->GetHateList();    #Compare clients to those on the Hatelist of the Target
			foreach $ent (@hatelist)
			{
				my $h_ent = $ent->GetEnt();
				my $h_ent_name = $h_ent->GetName();
				if ($ClientName eq $h_ent_name)
				{
					if(plugin::check_hasitem($PlayerENT, $petitem))  #Check the clients on the hatelist for Worn Pet Buff item
					{
					my $myid = $npc->GetID();
					$npc->CastSpell($petbuff, $myid);
					quest::stoptimer("Buffs");
					return;  #Turn this on if you want it to stop after it finds ONE client with the item
					}
				}
			}
		}
}
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 10:34 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3