Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Quests

Archive::Quests Archive area for Quests's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-13-2004, 10:51 PM
KhaN's Avatar
KhaN
Dragon
 
Join Date: Mar 2004
Location: France, Bordeaux.
Posts: 677
Default Function - Checking faction name ?

Im starting to write quests (Thx smogo for all your tutorials btw), I was wondering if a function exist or a way to do PERL quest that will check value of player faction.
Example : "Faction is ally, NPC will speak with him" ?
__________________

Reply With Quote
  #2  
Old 04-13-2004, 11:24 PM
Monrezz's Avatar
Monrezz
Dragon
 
Join Date: Mar 2003
Location: #loc
Posts: 745
Default

There's the $faction variable, it returns a number corresponding to the current faction level. See the sticky on Perl Quest guide at the top.
__________________

kRPG Profile
Reply With Quote
  #3  
Old 04-13-2004, 11:42 PM
KhaN's Avatar
KhaN
Dragon
 
Join Date: Mar 2004
Location: France, Bordeaux.
Posts: 677
Default

Ah yes, thanks Monrezz like always.
Look like i have skipped the identifier part.
__________________

Reply With Quote
  #4  
Old 04-13-2004, 11:47 PM
Monrezz's Avatar
Monrezz
Dragon
 
Join Date: Mar 2003
Location: #loc
Posts: 745
Default

It is mainly used for if statements, so you can check the player has a high enough faction before the quest continues:

Code:
sub EVENT_SAY
{
  if(($text =~ /Hail/i) && ($faction >= 3))
    {
      quest::say("Do you think I ave time to talk to people like you?.");
    }

  elsif(($text =~ /Hail/i) && ($faction < 3))
    {
      quest::say("Greetings, $name.");
    }
}
__________________

kRPG Profile
Reply With Quote
Reply


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:56 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3