Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 04-21-2013, 08:28 AM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default Aggro Zone Quest

I was fairly bored and wanted a better way to aggro an entire zone if a player skips to the last boss of X zone.


Code:
sub EVENT_COMBAT
{
	if ($combat_state == 1)
	{
		AGGRO_ZONE();
		quest::shout("You aggroed the zone!"); #Random text
	}
	
	if ($combat_state == 0)
	{
		#Only turn this on if you use the GMMOVE 
		#quest::repopzone();
	}
}


sub AGGRO_ZONE 
{
#NPCIDs go in this skiplist that you DO NOT want to be aggroed!
my @skiplist = qw(
425022
1356
);
 if ($client)
		{
			my @trash = $entity_list->GetNPCList();
			foreach $ent (@trash)
			{
				my $trashaggro = $ent->CastToNPC();
				my $trashnpctype = $trashaggro->GetNPCTypeID();
					if ( grep { $_ eq $trashnpctype } @skiplist )
					{
					#DO NOTHING
					}
					else
					{
					#Only Turn this on if players are EXPLOITING with pets
					#$trashaggro->GMMove($x, $y, $z, 0);
					#Adding All Aggro onto the PET which will transfer to player
					$trashaggro->AddToHateList($client, 1);
					}
			}
		}
		else
		{
		my $hate_target = $npc->GetHateTop();
		my $hate_pet = $hate_target->CastToMob();
		my @trash = $entity_list->GetNPCList();
			foreach $ent (@trash)
			{
				my $trashaggro = $ent->CastToNPC();
				my $trashnpctype = $trashaggro->GetNPCTypeID();
					if ( grep { $_ eq $trashnpctype } @skiplist )
					{
					#DO NOTHING
					}
					else
					{
					#Only Turn this on if players are EXPLOITING with pets
					#$trashaggro->GMMove($x, $y, $z, 0);
					#Adding All Aggro onto the PET which will transfer to player
					$trashaggro->AddToHateList($hate_pet, 1);
					}
			}
		}
}

To use this in zones where you don't want certain NPCs to aggro you can add them to the skiplist Inside the AGGRO_ZONE sub! Just the NPC ID in non quoted format.

In its current form it will only Aggro everything to you or your pet.
Reply With Quote
  #2  
Old 04-21-2013, 06:38 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

#Adding All Aggro onto the PET which will transfer to player

At the top should read...

#Adding All Aggro onto the Client --- copy paste error ftl


Doesn't change how it works... just a Side note as to what it is doing.



The bottom one that reads the same string of text is correct in what it is doing.
Reply With Quote
Reply


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 04:46 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