Quote:
Originally Posted by Sophoket
Would it not be easier to just let the player be set to any level instead of having a really long list of if statements for a range of levels?
|
I agree (more flexibility!)
I think it would be better to test for a specific regexp though, maybe something like this:
Code:
if ($text~=/^[1-7]?[0-9]$/) { #1st number optional, but if there, will be 1-7 (10-70), has to be the only thing in the text (^ and $)
my $maxLevel = 75;
if ($text <= $maxLevel)
quest::say("Here you go! Remember, DO NOT lose that trinket! You will need it to turn into me when you want to restore your level back to 70. If you lose it, you will have to level up the normal way all over again!");
quest::emote("casts a spell and before you know it, you feel young and vibrant again. The world suddenly seems much larger and more intimidating!");
quest::summonitem(12941);
quest::selfcast(331);
quest::level($level);
}
Now, I know Trev uses a quest global in his to remember the max level you obtained over & above 70, since you can only get them through a quest, so he might have to add checks in & others may need to modify
$maxLevel based on their server, but this wouldn't limit you to just specific levels (which is why I hope Trev updates to this

)