View Single Post
  #1  
Old 02-04-2009, 02:15 AM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default NPC sells AA points

This is a quest I am using on my server that seems to work fine for a level 70. It takes 2k and gives the player 5 aa's. It also fixes a problem that is caused by the experience somehow lowering the player's level.

Code:
#NPC takes 2k And gives 5 AA points to a level 70
sub EVENT_SAY{
if ($ulevel >=70){
 if ($text =~/hail/i){
 quest::say("Hello, I have heard that AA exp moves rather slowly on this server, so I am here to take advantage of that and sell level 70s [AA].");
 }
 if ($text =~/AA/i){
 quest::say("Yes, it is two-thousand platinum for 5 AAs. You must be level 70 and have AA experience turned on to 100% or it will not work!");
 }
}
 else{
 quest::say("You must be level 70 before I can help you.");
 } 
}

sub EVENT_ITEM{
 if ($ulevel >=70){
  if ($platinum ==2000){
  quest::exp(4067240000);
  quest::level(70);
  }
 if ($platinum !=2000){
 quest::say("That's the wrong amount.");
 quest::givecash($copper,$silver,$gold,$platinum );
 }
 }
 if ($ulevel <=69){
 quest::say("Reach level 70 first.");
 quest::givecash($copper,$silver,$gold,$platinum );
}
}
Reply With Quote