找回密码
 立即注册

手机短信,快捷登录

搜索

Trinket Queue Manager

[复制链接]
 楼主| 发表于 2023-6-12 08:23:20 | 显示全部楼层 |阅读模式
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("LAYER_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] = 1
                end
        end
frame:SetScript("OnEvent", frame.OnEvent);
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|魔兽世界玩家社区APP官网 ( 鄂ICP备20007009号-6 )

GMT+8, 2025-8-23 06:22 , Processed in 0.187741 second(s), 27 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表