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 03-16-2013, 04:05 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default max PC on hatelist?

Im trying to make a mob that has a max of 6 people allowed on his hate list and anyone that tries to assist over that gets ported.

I guess i need the line check for the hate list part of it.
Reply With Quote
  #2  
Old 03-16-2013, 05:05 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

look at using

sub EVENT_HATE_LIST

and

$npc->GetHateList()
Reply With Quote
  #3  
Old 03-16-2013, 08:48 PM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default

Thanks, I got that part im just curious as to how you get it to remove PC 7+?
Reply With Quote
  #4  
Old 03-16-2013, 08:52 PM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default

Maybe an if statement that checks if the hatelist is over six, and if it is, it randomly selects a player and ports it away?
Reply With Quote
  #5  
Old 03-16-2013, 08:54 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

Walk the hate list and after you get to 6 add each new client to an array. When you are done walking the hate list, then walk you temp array and gmmove them all
Reply With Quote
  #6  
Old 03-17-2013, 02:31 AM
Kayen
Developer
 
Join Date: Mar 2009
Location: -
Posts: 228
Default

Code:
my $count = 0;
my @hatelist = $npc->GetHateList(); 
			
foreach $ent (@hatelist)
{
	my $h_ent = $ent->GetEnt();
	$count++;
					
        if ($h_ent)
	{
		if ($count >= 7)
                {
                    $npc->GMMove(whatever)
                }
	}
        	
}
Reply With Quote
  #7  
Old 03-17-2013, 03:58 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

thinking about this some more, I would not just walk the hate list as pets will be there too.
walk the list each time the event hits. and check if it is a client. if so add it to a list of names in an array declared at spawn.

once that array is up to 6, if GetName or GetOwner is not one of the 6 names then port them.

depending on how you want to handle a fail, you can reset the 6 names to nothing when the mob leaves combat. or set a time to reset the names if you are going to give them a chance to regroup before anyone else can do anything.

if you have any kind of massive damage ability with a range greater than the aggro range, you may want to rethink a few other things as people could easily do something like a mana burn or crit big damage spell or something in a large 1 shot blast. it will still do the damage and then add the person to the hate list which would then port them. but the damage would already be done.
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 08:13 PM.


 

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