Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 03-28-2015, 05:06 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

I've written small tutorials for NPC list iterations in the entity list:

http://wiki.eqemulator.org/p?Entity_...ow_to_Use_Them

Anytime you are using $client or $npc, those are IMPLIED entity objects.

You can create your own entity objects by fetching them selectively in your code.

Code:
$some_boss = $entity_list->GetNPCByNPCTypeID(40005); # Example
$some_boss->Say("hi");
You would use that same object in the distance check
Code:
 if(plugin::CheckDistBetween2Ents($npc, $some_boss, 50)){
If you want to find all NPC's say within 50 units of the NPC you are triggering the code on, you would do something like this:

Code:
my @nlist = $entity_list->GetNPCList(); #::: Use Entity List Object to get this
foreach my $n (@nlist){ #::: Iterate through each NPC in the @nlist array
	if(plugin::CheckDistBetween2Ents($npc, $n, 50)){
		$n->Shout("Hi I am an NPC that is within your distance check");
	}
}
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 06:08 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