qglobal issues
sub EVENT_SAY {
my $journey = quest::saylink("journey", 0, "journey"); if($text=~/hail/i){ $client->Message(10, "Grizzly Adams says, 'Hello there $name. I am the recruiter of all the new soldiers in the Qeynos Militia. Would you like to begin your $journey?'"); } elsif($text=~/journey/i){ { quest::summonitem(1078); quest::setglobal("NoteToSun",1,5,"F"); $client->Message(10, "Grizzly Adams says, 'Welcome to the Militia, $name. You will report to Tzu with this note, and he will take it from there. Good luck.'"); } } elsif($text=~/journey/i && !defined $qglobals{NoteToSun}); { $client->Message(10, "Grizzly Adams says, 'I have already recruited you'"); } } } ------------------ What is wrong with the qglobal? I just can't seem to get it to work! Can anyone explain it further? |
A. Use the code tags when posting codes. It preserves formatting and makes it a hell of a lot easier to read.
B. Double check to make sure that your mob has qglobals enabled, it most likely is because C is your issue here. Doesn't hurt to double check. C. You have Statement 1: "If Text is Hail", Statement 2: else "If Text is Journey", Statement 3: else "if Text is Journey AND qglobal is not defined". Statement 2 will always be evaluated before Statement 3, and even if Statement 3 is true, Statement 2 will be true first. Change the 2nd Statement to if the qglobal is defined and the text is there, and the final one as an elsif qglobal is not defined and the text is there. |
Code:
I want you to be able to get your note from this guy, and then he will just stare at you in disbelief if you hail him again. |
Code:
# Grizzly |
Yeah, saylinks need to be made within an EVENT, not outside of them. Though, while looking at this, I figured out why that is and will fix it tonight so it stops crashing zones at least if defined outside of an EVENT.
As for the saylink there, you can simplify it to just this: Code:
my $journey = quest::saylink("journey"); |
All times are GMT -4. The time now is 06:30 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.