[Addon] Warforged Tracker

Discussion in 'General WoW' started by Dragpz, Jan 25, 2023.

Share This Page

Tags:
  1. Dragpz

    Dragpz Grandfathered

    Messages:
    834
    Likes Received:
    648
    Trophy Points:
    50
    Warforged Tracker

    Pretty late into the expac, but been getting pretty bored, so decided to tinker a bit with an addon to keep track of all the warforged gear automatically, and display some helpful statistics. Mildly bugtested so most of the functionality should be working, but would appreciate any error message screenshots. This only works for items from WoD.

    Usage Guide:

    - /wft list - Gives a list of all items obtained.
    - /wft totals - Gives a list of all items by slot type.
    - /wft upgrades - Gives a breakdown of all upgraded items obtained, as well as a percentage for upgrades. (*Note: Socketed % is calculated out of socketable items (Head,Neck,Finger,Wrist,Waist) and the specific Tertiaries are calculated out of all Tertiary items.)

    Databases are stored per character and will persist through a /reload. To reset the database, you can run "/wft reset" and that should clear the database.

    It's a pretty basic text-based addon, mostly to reduce the amount of time it takes for manual data entry and spreadsheeting for keeping track of Warforged/upgraded drops. Not sure if I really want to add new features atm, I'm getting bored of WoW, but I am willing to fix any bugs you guys might find.

    upload_2023-1-25_3-21-3.png
    upload_2023-1-25_3-22-47.png

    To manually insert item links into the database for testing, you can run the WoWLua Addon (found here).
    This code will let you insert whichever item is held in your cursor:
    Code:
    local _,_,itemLink = GetCursorInfo()
    
    amount = 1
    name,link,qualityRating,iLevel,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,expacLevel = GetItemInfo(itemLink)     
    
    if qualityRating < 3 or not(expacLevel==5) then
       return
    else
       id = link:match("item:(%d+):")
     
       if string.find(link,"6710") then
          subString = string.sub(link,string.find(link,"6710"),-30)
          id = id..subString
       end
     
       if WFT_lootDatabase[id] == nil then
          itemIndex = C_Item.GetItemInventoryTypeByID(link)
          WFT_lootDatabase[id] = {}
          WFT_lootDatabase[id]["count"] = 0
          WFT_lootDatabase[id]["index"] = itemIndex
          WFT_lootDatabase[id]["name"] = link
       end
     
       WFT_lootDatabase[id]["count"] = WFT_lootDatabase[id]["count"]+amount
       if WFT_SHOW_NOTIFICATIONS then
          print("WFTracker: "..link.." item acquired!")
       end
    end
    

    To manually insert your own links, you can replace this line:
    local _,_,itemLink = GetCursorInfo()

    with something like this:
    itemLink ="\124cff0070dd\124Hitem:109951::::::::20:255::1:3:6710:41:8810:2:9:20:28:2216:::::\124h[Fireblade Collar]\124h\124r"
    (credit goes to Farmcount addon for some of the logic for core functionality)
     

    Attached Files:

    • Like Like x 4
    • Creative Creative x 1
  2. Fugitivo

    Fugitivo Member

    Messages:
    17
    Likes Received:
    13
    Trophy Points:
    0
    Good job!!!
     
    • Like Like x 2
  3. Emelia

    Emelia Power Level Tier List Author

    Messages:
    681
    Likes Received:
    488
    Trophy Points:
    50
    I put a mention of this in the "stat display" addons section of the Tier list.

    Thanks Mate! Such good work!

    Sorry to hear your getting bored!
     
    Last edited: Jan 25, 2023
    • Like Like x 1
  4. Yagooglizer

    Yagooglizer Member

    Messages:
    25
    Likes Received:
    16
    Trophy Points:
    0
    That's awesome. One of my addons hasn't worked properly since 10.0. Still waiting on a fix with the API from Blizzard...if that ever comes.
     
    • Like Like x 1
  5. Brihan

    Brihan Too much time spent on F2P addon dev

    Messages:
    468
    Likes Received:
    764
    Trophy Points:
    0
    Nice initiative! I'm curious to see some feedback on the stats once it has been used for a while :PepeComfy:
     
    • Like Like x 2
  6. OP
    Dragpz

    Dragpz Grandfathered

    Messages:
    834
    Likes Received:
    648
    Trophy Points:
    50
    Thanks for the mention! yea I think alot of ppl feel the same way, but I think you are helping the community greatly with all your posts and speedrunning efforts

    Yea SL saw alot of API changes, quite a few in DF too, but not as much as SL. If you give me the name or send me the files i can see if i can fix them for you
     
  7. Yagooglizer

    Yagooglizer Member

    Messages:
    25
    Likes Received:
    16
    Trophy Points:
    0
    Sure if you want to. That would be great. I have put in a bug to Blizzard on the bug report forum.

    Well, the issue is that the OnEvent function variable "language" is now blank when it never used to be. It used to return "Gnomish," "Dwarvish," etc. My code still works in Classic and Wrath Classic...and it worked in Shadowlands. It's called Khadgar's Junk Drawer. and it's on curse. See the KhadgarsJunkDrawer_OnEvent function.

    My other addon also broke, but I ended up retiring it. It was called Skip Shadowlands...it auto-deleted the "shadowy summons" quest automatically whenever it got added from 47-49 so you could still do Chromie Time.

    By the way, I tried your tracker and it works...I even got a drop and it updated. I looked at your code, and I may try handling the events like you do.
     
    Last edited: Jan 26, 2023
    • Like Like x 2
  8. OP
    Dragpz

    Dragpz Grandfathered

    Messages:
    834
    Likes Received:
    648
    Trophy Points:
    50
    Thanks, glossed over the Shadowlands addon, and the main thing that I saw was that the function that was being declared inside the If statement was not firing at some point and throwing errors. You could replace lines 88 and 91 to reflect how Ketho handles TalkingHeadEvents (https://www.curseforge.com/wow/addons/hidetalkinghead) This will fix the Lua errors, but won't stop the quest from being auto-accepted on loop.

    Code:
    hooksecurefunc(TalkingHeadFrame, "PlayCurrent", function(self)
                        local displayInfo, cameraID, vo, duration, lineNumber, numLines, name, text, isNewTalkingHead, textureKit = C_TalkingHead.GetCurrentLineInfo()
                    if((vo==NCS_TALKINGHEAD_VO_ALLIANCE) or (vo==NCS_TALKINGHEAD_VO_HORDE)) then
                        self:Hide()
                    end
                end)
    As for the Translator/Junk Drawer addon, I'll try and take a closer look. Yea, I think at some point they broke Language addons and even broke their translating potion fix, Elixir of Tongues, but ill see if there's a workaround
     
    • Like Like x 1
  9. Yagooglizer

    Yagooglizer Member

    Messages:
    25
    Likes Received:
    16
    Trophy Points:
    0
    Thanks for taking a look. The junk drawer addon only has the one problem, that variable from the OnEvent function signature. It used to contain the language of the chat event, but not anymore. Don't worry about the Skip Shadowlands addon...it really doesn't apply anymore.
     

Share This Page