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 02-18-2015, 05:45 PM
Greyhelm's Avatar
Greyhelm
Sarnak
 
Join Date: Jul 2009
Location: East Coast
Posts: 35
Default Making an NPC and Client stop attacking

I have a problem in a script,

Code:
sub EVENT_SPAWN{
  quest::emote("text");
  quest::setnexthpevent(45);
  }
sub EVENT_SAY{
  if($text=~/text/i){
    quest::say("respone");
    }
}
sub EVENT_HP{
  if($hpevent <=45){
    $npc->SetBodyType(11); #make untargettable to stop client attack
    $npc->WipeHateList(); #remove hatelist 
    $npc->DisableMelee(1); #ensure npc cannot attack further
    quest::emote("mob gives up");
    quest::say("this line links to EVENT_SAY text");
    $npc->SetBodyType (3); #To be able to target again for quest say
    $npc->WipeHateList(); #ensure hatelist wiped to enable dialogue
    }
}
The npc stops attacking and client stops attacking, but if I do #hatelist on npc it shows client is still on hatelist though damage is low and hate is low. Example -name: Greyhelm, damage:301, hate:16
When I had to do 20,120 damage just to get the npc to 45% to trigger HP_Event. Any thoughts or did I miss something in my script?

If event is triggered and client is say triple attacking would that cause this?
Reply With Quote
  #2  
Old 02-19-2015, 09:02 AM
Maceblade
Hill Giant
 
Join Date: Jun 2010
Posts: 231
Default

Quote:
if ($hpevent <= 45) {
quest::emote("shakes with laughter and says, 'You are much stronger than I thought. I give up.");
quest::modifynpcstat("special_attacks",ABfHG);
quest::settimer(1,60);
$npc->WipeHateList();
}
This will keep it targetable just sets it immune. This is what I used for one of my bosses but I removed a bunch of stuff.
Reply With Quote
  #3  
Old 02-19-2015, 12:44 PM
Greyhelm's Avatar
Greyhelm
Sarnak
 
Join Date: Jul 2009
Location: East Coast
Posts: 35
Default

That worked like a charm.. I tried that before but now I see I was trying $npc->modifynpcstats not quest::modifynpcstats... Thanks!
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:22 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