View Single Post
  #3  
Old 12-06-2024, 03:15 AM
ragetli's Avatar
ragetli
Fire Beetle
 
Join Date: Aug 2018
Location: Zurich, Switzerland
Posts: 13
Default

A simple approach is using an item, which when handed in, grants AA as a reward.

sub EVENT_ITEM {

if (plugin::check_handin(\%itemcount, 148666 => 1)) # Grimoire of Profound Experience
{
$AA_points = 6;
$client->Message(315, "A most profound book!");
$client->AddAAPoints($AA_points);
$client->Message(15, "You have received $AA_points AA.");
}

#:: Return unused items
plugin::returnUnusedItems();
}


If you want to use custom currency in an NPC dialog, you can use GetAlternateCurrencyValue to check the amount the player has and SetAlternateCurrencyValue to set the new value after the purchase.
Reply With Quote