Jafula,
Having discovered ISBoxer's new variable keystroke feature, I have been looking for ways to simplify my character sets. This had led me to wish for a JambaFTLFollow button to go along with the target & assist buttons. Yes, I know I can macro a combination of /click JambaFTLTarget, /follow, and /targetlasttarget together but that both seems inelegant and is also unnecessarily complicated.
The attached patch adds the JambaFTLFollow button and also reduces the overall macro character count by moving the toon name outside the conditional and dropping the 'target=' text.
Hopefully, you'll be willing to added to the module so I don't have to keep re-coding it.
Code:
*** Jamba-FTL/JambaFTL - Copy.lua Mon Jun 3 23:02:41 2013
--- Jamba-FTL/JambaFTL.lua Mon Jun 3 23:45:42 2013
***************
*** 29,34 ****
--- 29,35 ----
AJM.moduleDisplayName = L["FTL Helper"]
local assistButton
+ local followButton
local targetButton
-- Settings - the values to store and their defaults for the settings database.
***************
*** 102,107 ****
--- 103,115 ----
AJM.db.assistString = astring
end
+ -- Updates The FollowButton with an FTL String (called when the AJM.COMMAND_UPDATE_FTL_BUTTON is recieved)
+ local function UpdateFTLFollowButton( fstring )
+ followButton:SetAttribute("macrotext", fstring)
+ AJM:Print("Updating JambaFTLFollow-Button with:" .. fstring)
+ AJM.db.followString = fstring
+ end
+
-- Updates The AssistButton with an FTL String (called when the AJM.COMMAND_UPDATE_FTL_BUTTON is recieved)
local function UpdateFTLTargetButton( tstring )
targetButton:SetAttribute("macrotext", tstring)
***************
*** 111,118 ****
--- 119,128 ----
local function UpdateFTLButton( ftlstring )
a = "/assist " .. ftlstring
+ f = "/follow " .. ftlstring
t = "/target " .. ftlstring
UpdateFTLAssistButton(a)
+ UpdateFTLFollowButton(f)
UpdateFTLTargetButton(t)
end
***************
*** 248,254 ****
ftlstring = ftlstring .. "mod:ctrl,"
end
end
! ftlstring = ftlstring .. "target=" .. characterName .. "]"
end
return ftlstring
end
--- 258,264 ----
ftlstring = ftlstring .. "mod:ctrl,"
end
end
! ftlstring = ftlstring .. "]" .. characterName .. ";"
end
return ftlstring
end
***************
*** 637,642 ****
--- 647,658 ----
if AJM.db.assistString then
UpdateFTLAssistButton(AJM.db.assistString)
end
+ -- Creates the Followbutton
+ followButton = CreateFrame("Button", "JambaFTLFollow", nil, "SecureActionButtonTemplate")
+ followButton:SetAttribute("type", "macro")
+ if AJM.db.followString then
+ UpdateFTLFollowButton(AJM.db.followString)
+ end
-- Creates the Targetbutton
targetButton = CreateFrame("Button", "JambaFTLTarget", nil, "SecureActionButtonTemplate")
targetButton:SetAttribute("type", "macro")
Connect With Us