View Full Version : Purchasing AA points
LogansRun
07-16-2014, 11:45 PM
I want to allow players on my server to talk to an NPC and buy AA points from them. This will be a simple exchange of plat for experience. However, I want to put some sort of scale factor on the cost. Right now my idea is to increase the cost based on how many AAs the player has.
Could someone suggest how one might write a script to do this?
Coenxai
07-30-2014, 11:25 PM
sub EVENT_SAY {
my $AA = $client->GetAAPoints();
my $cost = $AA * 10;
if($text=~/hail/i) {
quest::say("It will cost you $cost platinum for a chunk of experience.");
}
}
sub EVENT_ITEM {
my $AA = $client->GetAAPoints();
my $cost = $AA * 10;
if($platinum == $cost) {
quest::exp(10000000);
}
else {
$client->AddMoneyToPP(0, 0, 0, $platinum, updateclient);
quest::say("That's not what I asked for!");
}
}
Not sure if you still need a script, it's been a while. Here's a quick and sloppy one to give you an idea of a way you could do it.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.