View Single Post
  #10  
Old 04-02-2008, 03:06 AM
Aramid
Discordant
 
Join Date: May 2006
Posts: 356
Default

I'm SLOW but persistant... LOL

The following is working perfectly on my system.... As you can see, you only can have 1 if for the items and then do your multiple checks for the max_level. Even returns multiple incorrect items.

Code:
sub EVENT_ITEM {

if (plugin::check_handin(\%itemcount, 2835 => 4)){
   if ($max_level ==undef) {
    quest::say("These are in excellent shape!  They will be trophies in my collection!");
    $client->Message(6, "Maximus Serilious rewards you with a new level!" );
    quest::exp(9999999);
    quest::setglobal("max_level", 71, 0, "F");
    quest::level(71);
   }
   elsif ($max_level == 71) {
    quest::say("These are in excellent shape!  They will be trophies in my collection!");
   $client->Message(6, "Maximus Serilious rewards you with a new level!" );
    quest::exp(9999999);
    quest::setglobal("max_level", 72, 0, "F");
    quest::level(72);
   }
   elsif ($max_level == 72) {
    quest::say("These are in excellent shape!  They will be trophies in my collection!");
    $client->Message(6, "Maximus Serilious rewards you with a new level!" );
    quest::exp(9999999);
    quest::setglobal("max_level", 73, 0, "F");
    quest::level(73);
   }
   elsif ($max_level == 73) {
    quest::say("These are in excellent shape!  They will be trophies in my collection!");
$client->Message(6, "Maximus Serilious rewards you with a new level!" );
    quest::exp(9999999);
    quest::setglobal("max_level", 74, 0, "F");
    quest::level(74);
   }
   elsif ($max_level == 74) {
    quest::say("These are in excellent shape!  They will be trophies in my collection!");
$client->Message(6, "Maximus Serilious rewards you with a new level!" );
    quest::exp(9999999);
    quest::setglobal("max_level", 75, 0, "F");
    quest::level(75);
   }
 }
    else
   {
    quest::emote("I have no use for this item");
    plugin::return_items(\%itemcount);
    return;
  }
}
I'm too tired to do it now, but you will want to have a check for the last max_level to give back the items when they are AT the max_level of 75!
__________________
Random Segments of Code....

Last edited by Aramid; 04-02-2008 at 11:09 AM.. Reason: Check for max_level 75.
Reply With Quote