Hi Nick,
Thank you so much for this great script. I've been using the basic functions and they are wonderful, but I need some help to properly code the drop-down menu button for a variable spell vs attacking a target. In essence, what the spell does is choose a damage type (from the drop-down menu) then casts the spell to set that damage type. Example is click on button, choose earth, "cast 'spell string' earth" - but I'm having trouble modifying the attack target functions to apply to that kind of spell variable function. Here is the code section for that button:
-- button 6
{
icon = "gaiasfocus.png",
tooltip = "Gaias Focus",
script = function () -- script to execute when clicked
-- choose from menu
local result = WindowMenu (win,
WindowInfo (win, 14), -- x
WindowInfo (win, 15), -- y
"Air|Earth|Cold|Water")
-- if not cancelled, do action on current target
if result ~= "" then
Send (result:lower () .. " " .. GetPluginVariable ("", "target"))
end -- if
end, -- script function
cooldown = 1 * 60 * 15, -- 15 minute cooldown
}, -- end of button 6
Please help modify this code for me to allow for the casting of the spell (cast 'gaias focus' [damtype]) as determined by the player clicking on their desired damtype variable.
Cheers!
|