The Icon Bar plugin is amazing! I already have two icon bars modified and am now working on a third. For this one, I am hoping to update the text in different buttons (eg: button 1 goes to dungeon, but as I get to level 20, I want to go to village instead). My thought was to put a variable in the text="name", but it just displays as is.
--edited, see below for partial solution.
Here was my thought:
Is there a way to get the button text to change through use of an alias? It wouldn't have to be through the use of a variable, but that made the most sense to me since the variable already exists.
Thank you,
Aardwanderer
edit:
I was able to update the text by modifying the alias to change the table, buttons.
Now I have two new issues 1) the name doesn't update until the button is clicked or the cooldown is started from a trigger 2) when MuchClient is closed, the updated variable will return to what is entered in the xml file.
Also, I think I changed one of the other windows, that I copied and modified, so it doesn't show the pie filling. How do I turn that back on? Right now I only see the number countdown.
--edited, see below for partial solution.
Here was my thought:
<alias
match="^ibname set(?<button_number>\d+) +(?<name>\w+)$"
enabled="y"
regexp="y"
send_to="12"
sequence="100"
><send>
if "%1" == "1" then
SetVariable("ibname1", "%2")
elseif "%1" == "2" then
SetVariable("ibname2", "%2")
elseif "%1" == "3" then
SetVariable("ibname3", "%2")
elseif "%1" == "4" then
SetVariable("ibname4", "%2")
elseif "%1" == "5" then
SetVariable("ibname5", "%2")
else
Note("Icon bar number: " .. "%1" .. " not set.")
end --if
</send>
</alias>
-- button 1
{
icon = nil,
tooltip = "Update zone with: gtz <level> <zone>", -- tooltip help text
text = "GetVariable('ibname1')",
send = "gotozone", -- sends alias that updates to the favorite zone at the current level
cooldown = 0, -- cooldown time is 0 because it is set by a trigger
sound = "chimes.wav", -- sound to play when cast
--done = function () end -- what to do when done
}, -- end of button 1
-- button 2
{
icon = nil,
tooltip = "Current highest level fire spell", -- tooltip help text
text = "GetVariable('firespell')",
send = "cfs", -- sends alias for highest level fire spell
cooldown = 0, -- cooldown time is 0 because it is set by a trigger
sound = "chimes.wav", -- sound to play when cast
--done = function () end -- what to do when done
}, -- end of button 2
Is there a way to get the button text to change through use of an alias? It wouldn't have to be through the use of a variable, but that made the most sense to me since the variable already exists.
Thank you,
Aardwanderer
edit:
I was able to update the text by modifying the alias to change the table, buttons.
<send>
if "%1" == "1" then
SetVariable("arwArea1", "%2")
buttons[1].text = GetVariable("arwArea1")
Now I have two new issues 1) the name doesn't update until the button is clicked or the cooldown is started from a trigger 2) when MuchClient is closed, the updated variable will return to what is entered in the xml file.
Also, I think I changed one of the other windows, that I copied and modified, so it doesn't show the pie filling. How do I turn that back on? Right now I only see the number countdown.