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-30-2012, 10:19 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Yeah, EVENT_TIMER does not pass the client information, because it doesn't know which client it should be passing to the timer. You would probably just want to get the NPC's target, check if it is a client, and if so, get the faction value for that client with the faction ID that the NPC uses. The script below should work for what you are wanting to do. You will need to put the NPC's faction ID where it says "faction_id" so it knows which faction it is looking up the value for against the client.

Code:
my $target_faction = 999999; # Random high number that is > 6
my $target = $npc->GetTarget();
if ($target && $target->IsClient())
{
	$target_faction = $target->GetCharacterFactionLevel(faction_id);	# Set "faction_id" to the NPC's faction id
}
I haven't tested that script, but it should work for getting the faction in the timer as you are trying to do. You would then check if $target_faction is <= 6 or whatever.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
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 11:36 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