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 06-26-2015, 12:37 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Heres an example of a quest where the mob just runs around killing stuff :p

Code:
sub EVENT_SPAWN {
	quest::settimer("fuck_shit_up", 5);
}

sub EVENT_TIMER {
	if($timer eq "fuck_shit_up" && !$npc->IsEngaged()) {
		KillMode();
	}
}

sub KillMode {
    my @npc_list = $entity_list->GetNPCList();
    foreach $npc_ent (@npc_list) {
		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->CalculateDistance($x, $y, $z) > 1000; #skip mobs over 1000 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
    }
}
Reply With Quote
Reply

Thread Tools
Display Modes

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