View Full Version : Perl Script Question
jpyou127
10-19-2015, 10:49 AM
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
NatedogEZ
10-19-2015, 10:55 AM
When comparing numbers make sure to use ==
When comparing strings is when you use eq
When doing an OR its ||
if($wp == 55 || $wp == 117) {
quest::SetRunning(1);
}
jpyou127
10-19-2015, 11:01 AM
Thank you sir! Slowly learning a little Perl =)
Celestial
jpyou127
10-19-2015, 11:33 AM
One more question. Would I call AddEXP() as a quest function:
quest::AddEXP(500);
Celestial
NatedogEZ
10-19-2015, 12:21 PM
Are you using he WIKI?
It really helps for referencing things for people that are learning.
http://wiki.eqemulator.org/p?Ultimate_Perl_Reference&frm=Main
quest::exp(amount);
or
$client->AddEXP(add_exp, conlevel, resexp);
jpyou127
10-19-2015, 03:32 PM
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
Kayen
10-20-2015, 07:38 PM
A lot of quest:: functions are redundant with the $client ect point functions.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.