WoW:API GetBankSlotCost: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Created page with '{{wowapi}} Returns the price of a particular bank slot. cost = GetBankSlotCost(numSlots); == Arguments == ; numSlots : Number - Number of slots already purchased. == Returns =…')
 
m (Move page script moved page API GetBankSlotCost to API GetBankSlotCost without leaving a redirect)
 
(No difference)

Latest revision as of 04:45, 15 August 2023

WoW API < GetBankSlotCost

Returns the price of a particular bank slot.

cost = GetBankSlotCost(numSlots);

Arguments[edit]

numSlots
Number - Number of slots already purchased.

Returns[edit]

cost
Number - Price of the next bank slot in copper.

Example[edit]

The following example outputs amount of money you'll have to pay for the next bank slot:

local numSlots,full = GetNumBankSlots();
if full then
 print("You may not buy any more bank slots");
else
 local c = GetBankSlotCost(numSlots);
 print(("Your next bank slot costs %d g %d s %d c"):format(c/10000, c/100 % 100, c % 100));
end