first release

This commit is contained in:
MarkuruThunderhoof
2026-07-30 22:05:44 +03:00
commit 1ecab6cb79
5 changed files with 173 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
<Bindings>
<Binding name="IWIA_NEXT" header="IWIA">
IWIA_Next()
</Binding>
</Bindings>
+130
View File
@@ -0,0 +1,130 @@
BINDING_HEADER_IWIA = "I Want It All"
BINDING_NAME_IWIA_NEXT = "Next Tracking"
function IWIA_Print(msg)
DEFAULT_CHAT_FRAME:AddMessage(msg, 1.0, 0.9, 0.1)
end
local textures = {
["Interface\\Icons\\INV_Misc_Flower_02"] = "Find Herbs",
["Interface\\Icons\\Racial_Dwarf_FindTreasure"] = "Find Treasure",
["Interface\\Icons\\Spell_Nature_Earthquake"] = "Find Minerals",
["Interface\\Icons\\inv_tradeskillitem_03"] = "Find Trees",
["Interface\\Icons\\INV_Misc_Fish_02"] = "Find Fish"
}
local cmds = {
["herbs"] = "Find Herbs",
["chests"] = "Find Treasure",
["ores"] = "Find Minerals",
["trees"] = "Find Trees",
["fish"] = "Find Fish"
}
local function skip(id)
return (IWIA_Settings[id] or {}).skip
end
local queue = nil
local firstId = nil
local info = nil
function IWIA_Scan()
if queue then
return
end
IWIA_Settings = IWIA_Settings or {}
queue = {}
info = {}
firstId = nil
local prevId = nil
local _, _, offset, numSpells = GetSpellTabInfo(1)
for s = offset + 1, offset + numSpells do
local texture = GetSpellTexture(s, BOOKTYPE_SPELL)
local name, _ = GetSpellName(s, BOOKTYPE_SPELL)
local id = textures[texture]
if id then
if not skip(id) then
firstId = firstId or id
queue[id] = {
slot = s,
nextId = firstId
}
local prev = queue[prevId]
if prev then
prev.nextId = id
end
prevId = id
end
info[id] = {
name = name,
texture = texture,
slot = s,
}
end
end
end
function IWIA_Rescan()
queue = nil
IWIA_Scan()
end
function IWIA_OnSpellChanged()
IWIA_Rescan()
end
function IWIA_Next()
IWIA_Scan()
local id = textures[GetTrackingTexture()]
local nextId = id and (queue[id] or {}).nextId or firstId
if not nextId then
return
end
local slot = queue[nextId].slot
local _, duration, _ = GetSpellCooldown(slot, BOOKTYPE_SPELL)
if duration == 0 then --"Not ready yet" spam prevention
CastSpell(slot, BOOKTYPE_SPELL)
end
end
function IWIA_Help()
IWIA_Scan()
IWIA_Print("/iwia next - to change tracking")
for cmd, id in pairs(cmds) do
local known = info[id]
local skip = skip(id)
local on = (known and not skip) and "|cFF00FF00on|r" or "on"
local off = (known and skip) and "|||cFFFF0000off|r" or "|off"
IWIA_Print("/iwia "..cmd.." "..on..off)
end
end
function IWIA_SlashCmd(cmd)
local _, _, cmd, arg1, arg2 = string.find(cmd, "(%w+)%s*(%w*)%s*(%w*)")
if cmd == "next" then
IWIA_Next()
elseif cmds[cmd] then
local id = cmds[cmd]
IWIA_Settings[id] = IWIA_Settings[id] or {}
if arg1 == "on" then
IWIA_Settings[id].skip = false
elseif arg1 == "off" then
IWIA_Settings[id].skip = true
else
IWIA_Help()
end
IWIA_Rescan()
else
IWIA_Help()
end
end
function IWIA_OnLoad()
SLASH_IWIA1 = "/iwia"
SLASH_IWIA2 = "/iwantitall"
SlashCmdList.IWIA = IWIA_SlashCmd
end
+8
View File
@@ -0,0 +1,8 @@
## Interface: 11200
## Version: 0.1.0
## Title: I Want It All
## Notes: One-button rotation for resource tracking abilities.
## SavedVariablesPerCharacter: IWIA_Settings
IWantItAll.lua
IWantItAll.xml
+20
View File
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<UI xmlns="http://www.blizzard.com/wow/ui/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Frame name="IWIAOptionFrame" toplevel="true" movable="true" parent="UIParent" enableMouse="true" hidden="true">
<Scripts>
<OnLoad>
IWIA_OnLoad()
this:RegisterEvent("LEARNED_SPELL_IN_TAB")
this:RegisterEvent("SPELLS_CHANGED")
</OnLoad>
<OnEvent>
IWIA_OnSpellChanged()
</OnEvent>
</Scripts>
</Frame>
</UI>
+10
View File
@@ -0,0 +1,10 @@
## I Want It All
This is yet another addon to rotate all your resource tracking abilities (TWoW included) with a single button.
Type `/iwia` to display the list of available commands and tracking abilities.
Type `/iwia next` to switch to the next enabled tracking ability, or bind it in the "Key Bindings" menu.
### Supported Tracking Abilities
- ![](https://wow.zamimg.com/images/wow/icons/small/inv_misc_flower_02.jpg) **Find Herbs** &rarr; `/iwia herbs on|off`
- ![](https://wow.zamimg.com/images/wow/icons/small/spell_nature_earthquake.jpg) **Find Minerals** &rarr; `/iwia ores on|off`
- ![](https://wow.zamimg.com/images/wow/icons/small/inv_tradeskillitem_03.jpg) **Find Trees** &rarr; `/iwia trees on|off`
- ![](https://wow.zamimg.com/images/wow/icons/small/inv_misc_fish_02.jpg) **Find Fish** &rarr; `/iwia fish on|off`
- ![](https://wow.zamimg.com/images/wow/icons/small/racial_dwarf_findtreasure.jpg) **Find Treasure** &rarr; `/iwia chests on|off`