Help with script to purchase AA points from vendor.
I am looking to see if anyone has a script that will allow me to buy AA points from an NPC using tokens that I have already created. I have played on servers that have this and I want to set it up on my own server. I am new to scripting so any help that I can get I would be grateful.
|
You may find the best help is available on Discord these days
Join us @ https://discord.gg/785p886eCw #support-quest-scripts channel |
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. |
oh lol, just realized this post is 2 years old :-)
|
All times are GMT -4. The time now is 10:59 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.