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
  #1  
Old 10-28-2012, 07:48 AM
rixcraven
Sarnak
 
Join Date: Nov 2008
Location: UK
Posts: 57
Default Checking player faction Needing guidance please

I've got this code, and it waits til a Player enters the zone..
what I want it to do, is check the players faction against its own, and then either attack, or not, if the players faction is ok.
But I got a bit stuck on getting the faction of the player.. any help would be appreciated!!..

sub EVENT_SPAWN
{
my $x;
my $y;
my $z;
my $h;
my $timerinterval=int(rand(10)+1);

$x = $npc->GetX();
$y = $npc->GetY();
$z = $npc->GetZ();
$h = $npc->GetHeading();

quest::settimer("tmr",$timerinterval);
quest::shout("timer set to: $timerinterval");
quest::set_proximity( $x-280,$x+280,$y-280,$y+280,$z-280,$z+280);
}

sub EVENT_ENTER
{
$npc->SetFollowID($client->GetID());
if $faction ($client) >= 6)) ;
quest::shout2("Hey $name, Going to hunt you down..make you pay, There is a Bounty on your head");
elsif
quest::shout2("$name, I 'aint looking fer you today.. move along");
}

# WhenCobra Is Given 200pp he depops

sub EVENT_ITEM
{




}


# When the timer Is up Cobra taunts the target


sub EVENT_TIMER
{

my $say1 = "My clients are paying good money to have you dead, $name";
my $say2 = "Is that the best you can do, $class???";
my $say3 = "Go ahead, RUN... make my Day.";
my $say4 = "DIE FOR ME";
my $say5 = "When you die, I am going to take your head back to my clients.";
my $say6 = "A poor excuse for a $class.. ";
my $say7 = "I have slain greater than you, $class.. you are just one more to me";
my $say8 = "For 100pp, I might just let you go";
my $say9 = "This will teach others not to fool with MY clients";
my $say10 = "RUN, $class, like the scum you are!";
my $say11 = "Drop your weapon, and I'll make it quick for you";
my $say12 = "For 200pp I could perhaps not kill you";

if ($timer eq "tmr")
{
quest::stoptimer("tmr");
$talk=int(rand(12)+1);
if ($talk eq 1) { quest::say("$say1"); }
if ($talk eq 2) { quest::say("$say2"); }
if ($talk eq 3) { quest::say("$say3"); }
if ($talk eq 4) { quest::say("$say4"); }
if ($talk eq 5) { quest::say("$say5"); }
if ($talk eq 6) { quest::say("$say6"); }
if ($talk eq 7) { quest::say("$say7"); }
if ($talk eq { quest::say("$say8"); }
if ($talk eq 9) { quest::say("$say9"); }
if ($talk eq 10) { quest::say("$say10"); }
if ($talk eq 11) { quest::say("$say11"); }
if ($talk eq 12) { quest::say("$say11"); }

my $timerinterval=int(rand(40)+10); #10-50 sec
quest::settimer("tmr",$timerinterval);
#quest::say("timer set to: $timerinterval");

}

}

sub EVENT_SAY
{

}
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 05:37 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