Add a slash command to enable/disable the addon
b-morgan opened this issue · 6 comments
Attached is a .zip file containing the changes I made to main.lua (along with the original) and a .patch file.
The changes are simple enough so I didn't attempt to do a pull request.
Works here on Cataclysm Classic (have to load out-of-date addons). Below I'm typing"
"/aq", "/aq on", "/aq off", "/aq", "/aq on", "/aq", "/aq off". "/autoquest" can be used instead of "/aq".
My locale is "enUS".
[09:05:48] AutoQuests — State= nil
[09:05:53] AutoQuests — Enabled
[09:05:58] AutoQuests — Disabled
[09:06:05] AutoQuests — State= false
[09:06:09] AutoQuests — Enabled
[09:06:14] AutoQuests — State= true
[09:06:23] AutoQuests — Disabled
I'll have to go find a quest to auto complete...
Just started a new character and completed two quests, one with AutoQuests disabled and one with it enabled.
I added another line to make sure the function was being called:
local function Autoquests(self, event, key, down, ...)
selfMessage("Autoquests()")
if (not L.enabled) or IsShiftKeyDown() or IsControlKeyDown() or IsAltKeyDown() then
-- nothing ... deactivate Autoquests
else
Strange, not working with (not L.enabled)
.
I fix it with if L.enable == false or IsShiftKeyDown() or IsControlKeyDown() or IsAltKeyDown() then
!
Good for me, juste rework msg add go to release !
Thanks Morgan, can i have add you to addon author ?