WA发布 发表于 2023-6-12 08:23:20

Trinket Queue Manager

Using different itemrack sets to make different trinket queues was a bit annoying with how I use it, so here is a Trinket Queue Manager that sort of adds functionality but is probably sketchy in the way it does it, use at your own risk I guess.

- You can have 10 different trinket sets, naming them in the config.
- You can go up and down the sets (through macros) and have the changes made automatically in ItemRack as you do so.
- You can edit sets by going to the set you want to change, opening item rack and making the changes, then pressing the save macro.


Extra Stuff You HAVE To Do

1.) Weakauras doesn't really work with buttons so you have to make your own using macros that fire some events:
      Increase Set:
                /script WeakAuras.ScanEvents("TQM_SET_DECREASE", 1)
      Decrease Set:
                /script WeakAuras.ScanEvents("TQM_SET_INCREASE", 1)
      Save current itemrack queue into the currently selected set:
                /script WeakAuras.ScanEvents("TQM_SAVE", 1)

2.) Weakauras doesn't really allow saving variable after logout and stuff, and this manager won't really be useful without that feature. So you have to get an addon just for the purpose of saving 2 variables across sessions. Here are some explicit instructions because im too lazy to figure out the best way to upload an addon which would have been a lot simpler for you, the user.
(I named mine RaikhoSavedVariables, but you can name yours whatever and change it at the appropriate places.)

2a.) Go into your addons folder and create a folder named RaikhoSavedVariables

2b.) Go into that folder and create 2 files, RaikhoSavedVariables.toc and RaikhoSavedVariables.lua. If you don't know how to create those file extensions, just go into another addon folder and copy and rename the toc/lua files since we will change the contents anyways.

2c.) Open the .toc file in a text editor, paste this code:
## Interface: 11305
## Notes: Saved Variables to use for Raikho's Weak Auras
## Title: Raikho's Saved Variables
## Author: Raikho
## Version: 1.0
## SavedVariables: TQM_Queue_Table, TQM_Set_Table
RaikhoSavedVariables.lua

2d.) Open the .lua file in a text editor, paste this code:
local frame = CreateFrame("FRAME"); -- Need a frame to respond to events
frame:RegisterEvent("ADDON_LOADED"); -- Fired when saved variables are loaded
frame:RegisterEvent("PLAYER_LOGOUT"); -- Fired when about to log out
function frame:OnEvent(event, arg1)
        if event == "ADDON_LOADED" and arg1 == "RaikhoSavedVariables" then
               
                if TQM_Queue_Table == nil then
                        TQM_Queue_Table = {}
                end

                if TQM_Set_Table == nil then
                        TQM_Set_Table = {}
                        TQM_Set_Table = 1
                end
      end
frame:SetScript("OnEvent", frame.OnEvent);
页: [1]
查看完整版本: Trinket Queue Manager