Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 10-19-2015, 10:49 AM
jpyou127's Avatar
jpyou127
Discordant
 
Join Date: Nov 2005
Posts: 270
Default Perl Script Question

How do I do an or statement here:

if($wp eq 55) {
quest::SetRunning(1);
}


My attempt:
if($wp eq 55) or ($wp eq 117) {
quest::SetRunning(1);
}


Celestial
Reply With Quote
  #2  
Old 10-19-2015, 10:55 AM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

When comparing numbers make sure to use ==
When comparing strings is when you use eq

When doing an OR its ||

Code:
if($wp == 55 || $wp == 117) {
quest::SetRunning(1);
}
Reply With Quote
  #3  
Old 10-19-2015, 11:01 AM
jpyou127's Avatar
jpyou127
Discordant
 
Join Date: Nov 2005
Posts: 270
Default

Thank you sir! Slowly learning a little Perl =)


Celestial
Reply With Quote
  #4  
Old 10-19-2015, 11:33 AM
jpyou127's Avatar
jpyou127
Discordant
 
Join Date: Nov 2005
Posts: 270
Default

One more question. Would I call AddEXP() as a quest function:

quest::AddEXP(500);


Celestial
Reply With Quote
  #5  
Old 10-19-2015, 12:21 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

Are you using he WIKI?

It really helps for referencing things for people that are learning.

http://wiki.eqemulator.org/p?Ultimat...rence&frm=Main


quest::exp(amount);

or

$client->AddEXP(add_exp, conlevel, resexp);
Reply With Quote
  #6  
Old 10-19-2015, 03:32 PM
jpyou127's Avatar
jpyou127
Discordant
 
Join Date: Nov 2005
Posts: 270
Default

I was using the wiki, but I was not sure in this case to use quest or $client.

I am just learning to script. I appreciate the help!


Celestial
Reply With Quote
  #7  
Old 10-20-2015, 07:38 PM
Kayen
Developer
 
Join Date: Mar 2009
Location: -
Posts: 228
Default

A lot of quest:: functions are redundant with the $client ect point functions.
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 12:56 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3