Getting Started
Rules
Character Mover
Optimization Guide
EZ Wiki
EZ Guide
Magelo
Zone List
Spell Recipes
T10.5 Spell Recipes
Crafting Recipes
Donate
EZ Player Discord
EZ Server Files
EZ Client Downloads
Custom UF MiniMap
Custom UF Inventory
EQEmulator Home
Allakhazam Home
UFMissingFilesList
TwitchTV
#AA Vendor to exchange AA points for Items, Charm Upgrades, Flags, whatever...sub EVENT_SAY{ #get client AA total my $playerAA = $client->GetAAPoints(); my $NPCname = $npc->GetCleanName(); my $item = quest::saylink("item", 1); if($text=~/Hail/i) { $client->Message(315, " "); $client->Message(315, "$NPCname whispers to you, 'You have $playerAA AA. Spend 1000 AA for an [$item]?'"); } if($text=~/item/i) { #makes sure player has ENOUGH aa for purchase if($playerAA >= 1000) { #removes 1000 AA from the $playerAA total and sets the AA points to that value. $client->SetAAPoints($playerAA - 1000); #makes sure player data is saved to database immediately after adjusting AA quest::save(); #make sure NPC now has updated AA value. $playerAA = $client->GetAAPoints(); #spacer, to make it easier to read~ $client->Message(315, " "); $client->Message(315, "$NPCname whispers to you, 'You have spent 1000 AA!'"); #Insert code here to give items, charm levels, whatever you want. } elsif($playerAA <= 999) { #spacer, to make it easier to read~ $client->Message(315, " "); $client->Message(315, "$NPCname whispers to you, 'You do not have enough AA for this purchase! Required: 1000, You have: $playerAA'"); } }}