View Single Post
  #7  
Old 10-20-2008, 12:39 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by Sophoket View Post
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 )
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote