View Single Post
  #1  
Old 10-20-2008, 02:31 AM
Sophoket
Fire Beetle
 
Join Date: Apr 2007
Posts: 2
Default

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?

For example:

Code:
sub EVENT_SAY {

if(($text=~/hail/i)&&($ulevel == 70)){
quest::say("I can set you to any level you like, just let me know.");
 }

if($text!= "Hail, $mName") {
$levelVar = $text;
quest::say("Ok, You are now level $levelVar");
quest::summonitem(12941);
quest::level($levelVar);
}
}

sub EVENT_ITEM
{
 if ($item1 == 12941){
quest::say("Looks like you took good care of it!  Here are your levels back.");
quest::emote("casts a spell and you instantly feel more powerful!  Like you could take on anything in battle!");
quest::level(70);
}
    else {
        plugin::return_items(\% itemcount);
       quest::say("I have no use for this item, $name.  Take it back.");
   } 
}
Reply With Quote