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 11-27-2010, 02:33 PM
Bdiddy
Sarnak
 
Join Date: Sep 2010
Posts: 77
Default NPC HP Lock

Not sure if this is the right forum or not, please move if not.
On an NPC I've made I want to have it's HP lock at 50% and have 5-10 adds spawn at that 50%. I do not want the HP to unlock until the adds are dead. I still want the NPC to have agro and attacking while the HP is locked though. Then at 25% I want just the adds to pop but not HP lock. Any idea on how to do this?
Reply With Quote
  #2  
Old 11-27-2010, 04:26 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

Quote:
Originally Posted by Bdiddy View Post
Not sure if this is the right forum or not, please move if not.
On an NPC I've made I want to have it's HP lock at 50% and have 5-10 adds spawn at that 50%. I do not want the HP to unlock until the adds are dead. I still want the NPC to have agro and attacking while the HP is locked though. Then at 25% I want just the adds to pop but not HP lock. Any idea on how to do this?
You would have to simulate it using a timer. I believe I made a plugin for it, I will post something later.
Reply With Quote
  #3  
Old 11-27-2010, 08:34 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

I had a few events which locked HP at certain stages, when adds were involved I would use a foreach loop(assume 121212 for your add NPCTypeID that you want the HP to lock when they spawn):

Code:
sub EVENT_COMBAT
{
	if($combat_state == 1) {
		quest::setnexthpevent(50);
	}
}

sub EVENT_HP
{
	if($hpevent == 50) {
		quest:settimer("hplock", 6);
		##Spawn mobs here
		quest::setnexthpevent(25);
	}
	elsif ($hpevent == 25) {
		##Spawn mobs here
	}
}

sub EVENT_TIMER
{
	if($timer eq "hplock") {
		my @npcsInZone = $entity_list->GetNPCList();
		my $stopTimer = 0;
		## Search through all npcs in zone
		foreach $npcs(@npcsInZone) {
			## If we find an add, then set HP to 50%
			if($npcs->GetNPCTypeID() == 121212) {
				$mob->SetHP($mob->GetMaxHP() / 2);
				$stopTimer = 1;
			}
		}
		if($stopTimer == 0) {
			quest:stoptimer("hplock");
		}
	}
}
** I havent wrote a perl script in a few months so I make no claims this doesnt contain a few syntax errors **
Reply With Quote
  #4  
Old 11-29-2010, 09:52 AM
nenelan
Hill Giant
 
Join Date: Feb 2008
Posts: 116
Default

I personally like using
Code:
$npc->NPCSpecialAttacks(parse, permtag);
fABDINCMU will give it immune to fleeing, immune to Melee,magic,fear,root,stuns,charms,mezzes and slows. Just remember if you still want it to summon, Enrage, Rampage, Flurry, Triple and Quad, you still have to add those in too even when you make it invulnerable. To remove it, just do the line again after it receives 5 signals from the trash mobs on their death and carry on (do the same line, removing the fAB and whatever other Immunes you want).

Hope this helped.
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 09:53 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3