1. #1

    Question Macro to display Currencies [Solved]

    Hello,

    I am wondering if you can help me, I am looking for a macro/script to print all my major currencies in world of warcraft to a chat window at the click of a button. The closest I have found is this

    Code:
    /run for k, v in pairs({Celestials=33117, Ordos=33118, Galleon=32098, Sha=32099, CHARMS=33133, Oondasta=32519, Nalak=32518}) do print(format("%s: %s", k, IsQuestFlaggedCompleted(v) and "\124cFF00FF00Looted\124r" or "\124cFFFF0000Incomplete\124r")) end
    but i can't figure out how to modify it to show currencies, Valor Points, Lesser Charm of Good Fortune, Timeless Coins, Warforged Seal and Gold

    Preferably with some colour to make it easier to read.

    Can anyone help?

    Thank you


    PS I know some addons can do this, but i would prefer it this way

  2. #2
    The Lightbringer
    15+ Year Old Account
    Join Date
    Jun 2008
    Location
    Italy
    Posts
    3,564
    try this:
    Code:
    /run local k,n,num,tx={396,738,777,776} for i=1,4 do n,num,tx=GetCurrencyInfo(k[i]) print("\124T"..tx..":20\124t ",n..":",num) end
    EDIT: back home, fixed as treeston wrote and added the icons

    if you need to add more just add IDs (http://www.wowhead.com/currencies, ID is in the URL when you open the page of a specific currency) in the brackets and the "4" in the for loop
    Last edited by S7orm; 2014-08-15 at 10:19 PM.

  3. #3
    Deleted
    Code:
    /run local k,n,num={396,739,777,776} for i=1,4 do n,num=GetCurrencyInfo(k[i]) print(("%s: %s"):format(n,num)) end
    Fixed some small errors.

  4. #4
    Wow thank you guys that is 100% perfect

  5. #5
    Brewmaster Ogait's Avatar
    10+ Year Old Account
    Join Date
    Jul 2009
    Location
    Portugal
    Posts
    1,343
    Quote Originally Posted by S7orm View Post
    try this:
    Code:
    /run local k,n,num,tx={396,738,777,776} for i=1,4 do n,num,tx=GetCurrencyInfo(k[i]) print("\124T"..tx..":20\124t ",n..":",num) end
    This macro is working 100% correct!
    Thanks a lot for it!
    | Realm First Monk | Dragonflight Beta Tester ( ty Blizzard! ) |

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •