Nick Gammon said:
Each button can have up to four entries:
icon - filename of the image to draw
tooltip - what to show if you hover the mouse over the button
send - what to send to the MUD
script - a script function to call
--]]
buttons = {
-- button 1
{
icon = "HealIcon.png", -- icon image
tooltip = "Heal self", -- tooltip help text
send = "cast 'lesser heal' self", -- what to send
}, -- end of button 1
-- button 2
{
icon = "SwordIcon.png",
tooltip = "Attack",
send = "kill @target",
}, -- end of button 2
-- button 3
{
icon = "SparkIcon2.png",
tooltip = "Cast Fireball",
send = "cast fireball",
script = function ()
ColourNote ('white', 'green', 'script test')
end, -- function
}, -- end of button 3
--> add more buttons here
-----------------------------------------
Hi
I was wondering if there is some restrictions of certain kind of functions called by the buttons. i would like to disable some groups of triggers, so i wrote:
-- button 3
{
icon = "peace.png",
tooltip = "Pacific Mode",
send = "say hello",
script = function ()
EnableTriggerGroup ("attack", false)
end,
}, -- end of button 3
} -- end of buttons table
...but it didn't work, and the button 3 of your example seems to work perfecty. Mine says hello, that's ok, but can't disable the "attack" group of triggers. Thanks for your comments. |