Issues making this work the way I need it to.
I've made this quest which levels a character to 10 and gives them a set of starting gear. The problem comes in when I try to keep people over level 10 from being able to trigger the quest (in order to keep them from accidentally deleveling themselves). I can't figure out where to put the if statement, or if I'm using all the right commands for it.
I've tried putting Code:
if ($mlevel >= 10) |
I edited out some of the classes to make the post fit, but the basic structure is the same.
Code:
sub EVENT_SAY { |
Quote:
Code:
if (($ulevel<="10")&&($text=~/Hail/i)) |
Also make sure your "else if" is not "elsif" :)
|
The level check works fine now, but another problem popped up when I tested it with a character other than my GM character (a shadowknight). It seems as though no matter the class of the character, they get the SK gear every time. Any ideas as to what's wrong? I'm just learning so it's probably a pretty obvious mistake.
|
I read somewhere that Perl refers "eq" to "==" doing comparisons. I do not think == fails, but you might try that?
|
Changing that fixed it! It works perfectly now. Thanks for the replies.
|
All times are GMT -4. The time now is 04:35 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.