Wikia

WoWWiki

API GetCurrencyInfo

104,492pages on
this wiki
Talk0
WoW API < GetCurrencyInfo

Retrieve Information about a currency at index including it's amount.

name, CurrentAmount, texture, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo(index)

Arguments Edit

index 
Integer - Index of the currency to retrieve

Returns Edit

name

String - the name of the currency, localized to the language

amount

Number - Current amount of the currency at index

texture

String - The file name of the currency's icon. As of 5.2.0, does include the path (\\Interface\\Icons\\)

earnedThisWeek

Number - The amount of the currency earned this week

weeklyMax

Number - Maximum amount of currency possible to be earned this week

totalMax

Number - Total maximum currency possible to stockpile

isDiscovered

Boolean - Whether the character has ever got some of this currency

Details Edit

  • index appears to correspond to IDs seen at Wowhead's currencies list.[1]
    • As of patch 4.0.1 (16-Oct-2010) new indexes: 241-Champion's Seal 390-Conquest Points 392-Honor Points 395-Justice Points
    • Patch 4.0.3 (09-Aug-2012) - Table Updated ID's 0-1000
index name
61 Dalaran Jewelcrafter's Token 0300Wrath-Logo-Small (Dalaran [Jewelcrafting] dailies)
81 Dalaran Cooking Award 0300Wrath-Logo-Small
(Dalaran [Cooking] dailies; becomes Epicurean's Award 0500Mists-Logo-Small)
241 Champion's Seal 0300Wrath-Logo-Small (Argent Tournament)
361 Illustrious Jewelcrafter's Token 0400Cataclysm-Logo-Small ([Jewelcrafting] dailies)
384 Dwarf Archaeology Fragment 0400Cataclysm-Logo-Small
385 Troll Archaeology Fragment 0400Cataclysm-Logo-Small
390 Conquest Points 0400Cataclysm-Logo-Small (PvP, Ranked Arena/Rated battleground)
391 Tol Barad Commendation 0400Cataclysm-Logo-Small
392 Honor Points (PvP)
393 Fossil Archaeology Fragment 0400Cataclysm-Logo-Small
394 Night Elf Archaeology Fragment 0400Cataclysm-Logo-Small
395 Justice Points 0400Cataclysm-Logo-Small
396 Valor Points 0400Cataclysm-Logo-Small
397 Orc Archaeology Fragment 0400Cataclysm-Logo-Small
398 Draenei Archaeology Fragment 0400Cataclysm-Logo-Small
399 Vrykul Archaeology Fragment 0400Cataclysm-Logo-Small
400 Nerubian Archaeology Fragment 0400Cataclysm-Logo-Small
401 Tol'vir Archaeology Fragment 0400Cataclysm-Logo-Small
402 Chef's Award 0400Cataclysm-Logo-Small ([Cooking] dailies)
416 Mark of the World Tree 0400Cataclysm-Logo-Small (Molten Front, Firelands)
515 Darkmoon Prize Ticket 0400Cataclysm-Logo-Small
614 Mote of Darkness 0400Cataclysm-Logo-Small (Dragon Soul)
615 Essence of Corrupted Deathwing 0400Cataclysm-Logo-Small (Madness of Deathwing)
676 Pandaren Archaeology Fragment 0500Mists-Logo-Small
679 Elder Charm of Good Fortune 0500Mists-Logo-Small
692 Conquest Random BG Meta 0500Mists-Logo-Small
697 Elder Charm of Good Fortune 0500Mists-Logo-Small
738 Lesser Charm of Good Fortune 0500Mists-Logo-Small
752 Mogu Rune of Fate 0500Mists-Logo-Small
776 Warforged Seal 0500Mists-Logo-Small
777 Timeless Coin 0500Mists-Logo-Small

Example(s) Edit

  1. This Example will Output every currency you have Discovered, and have at least one of, to the Main chat Frame.
local name, currentAmount, texture, earnedThisWeek, weeklyMax, totalMax, isDiscovered = nil,nil,nil,nil,nil,nil,nil;

for i = 61,777,1 do
   name, currentAmount, texture, earnedThisWeek, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo(i);
   if name ~= nil and isDiscovered and currentAmount > 0 then
      if weeklyMax > 0 then
         DEFAULT_CHAT_FRAME:AddMessage(string.format("(%s): Current: %d Earned This Week: %d/%d",name,currentAmount,earnedThisWeek,weeklyMax))
      else
         DEFAULT_CHAT_FRAME:AddMessage(string.format("(%s): Current: %d",name,currentAmount))
      end
   end
end

Patch Changes Edit

  • Some time after Patch 4.0.1, the returns changed from "localized_label, amount, icon_file_name = GetCurrencyInfo(id)" to "name, currentAmount, texture, weeklyMax, totalMax, isDiscovered = GetCurrencyInfo(index)"

References Edit

  1. ^ Currencies. Wowhead. Retrieved on 2012-08-09.

Around Wikia's network

Random Wiki