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 10-06-2012, 08:43 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

I'm being lazy with this by pasting a few year old example from one of my archives:

Reference the yellow text below pertaining to grabbing an entity based on it's NPC Type ID. You could do this from NPC B and check the distance between it and NPC A inside of a timer loop. Right now it is checking for x and y being within 50 units of each other, you can manipulate this example to your liking.

You may have to do this a bit different if you have several NPC's in the zone with the same type ID, you would have to iterate through an array to do the checking, I don't know your exact scenario.

Code:
sub EVENT_SAY{
	if($text=~/hail/i){
		plugin::UpdateTaskActivity("group", 157, 6, 1);
		my $Akkazia = $entity_list->GetNPCByNPCTypeID(3034686);
		my $AkkaziaX = $Akkazia->GetX();
		my $AkkaziaY = $Akkazia->GetY();
		my $AkkaziaZ = $Akkazia->GetZ();
		my $myX = $npc->GetX();
		my $myY = $npc->GetY();
		my $myZ = $npc->GetZ();
		if (abs($AkkaziaX - $myX) < 50 && abs($AkkaziaY - $myY) < 50 && !$Found) {
			plugin::ClientSay("You found my darling Akkazia! Thank you $name, you have made me so happy!");
			plugin::UpdateTaskActivity("group", 157, 7, 1);
			plugin::DoAnim("plead");
			quest::signalwith(3034686, 1);
			$Found = 1;
		}
		elsif($Found == 1){
			plugin::ClientSay("You found my darling Akkazia! Thank you $name, you have made me so happy!");
			plugin::DoAnim("plead");
		}
		else{
			plugin::ClientSay("Please find my baby! I haven't been able to find her!");
			plugin::DoAnim("plead");
		}
	}
}
Reply With Quote
 


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 01:18 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