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
    Pit Lord
    Join Date
    Jun 2008
    Location
    Italy
    Posts
    2,489
    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.
    CPU: Intel Core i7-2600K @ 4.8GHz
    Motherboard: Asus P8Z68 Deluxe
    Memory: G.Skill Ripjaws-X 2x4GB 1600Mhz
    VGA: XFX Radeon HD 6990
    Drive: 1 x OCZ Vertex 3 240Gb + 1 x WD Caviar Black 1TB
    PSU: Corsair AX850W Case: Cooler Master HAF X CPU Heatsink: Noctua NH-D14

  3. #3
    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.
    UI & AddOns expert | Interface & Macros moderator - My work

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

  5. #5
    Dreadlord Ogait's Avatar
    Join Date
    Jul 2009
    Location
    Portugal
    Posts
    865
    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 & Hellscream's Downfall

Posting Permissions

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