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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 04-09-2020, 11:18 PM
WarAngel's Avatar
WarAngel
Sarnak
 
Join Date: Oct 2017
Location: Washington State
Posts: 54
Default The second script/plugin...

Code:
#Usage: plugin::wa_KillMode();




sub wa_KillMode
{
	quest::debug("Killmode begin for " . $npc->GetName() . "");
    my @npc_list = $entity_list->GetNPCList();
    foreach $npc_ent (@npc_list)
	{
		#quest::debug("Killmode begin for " . $npc->GetName() . ""); #This debug will repeat for each NPC in the GetNPCList()
		next if $npc_ent->GetLevel() > 2; # Enemy level parameters
		next if $npc_ent->GetID() == $npc->GetID(); #Lets not kill ourself
		next if $npc_ent->GetOwnerID(); #skip pets
		next if ($npc_ent->GetSpecialAbility(19) || $npc_ent->GetSpecialAbility(20) || $npc_ent->GetSpecialAbility(24) || $npc_ent->GetSpecialAbility(35)); #Immune to melee / magic / aggro / noharm SKIP
		next if $npc_ent->GetBodyType() == 11; #skip untargetable NPCs
		next if $npc_ent->IsEngaged(); # Is target in combat?
		next if $npc_ent->CalculateDistance($x, $y, $z) > 250; #skip mobs over 250 Distance
		#quest::shout("I am coming for you, " . $npc_ent->GetCleanName() . "!");
		quest::SetRunning(1);
		$npc->AddToHateList($npc_ent, 1); #We now HATE HIM!
		last; #we found a valid target jump out of the loop
    }
}

return 1;	#This line is required at the end of every plugin file in order to use it
Reply With Quote
 

Tags
plugin, quests, script


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:40 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