Auto Quests

Auto Quests

207k Downloads

Add a slash command to enable/disable the addon

b-morgan opened this issue · 6 comments

commented

Attached is a .zip file containing the changes I made to main.lua (along with the original) and a .patch file.

AutoQuests.zip

The changes are simple enough so I didn't attempt to do a pull request.

commented

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.

commented

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
commented

Completed a few more quests and AutoQuests did its thing as expected.

commented

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 ?

commented

Sure, you can add me if you like.

commented

hi !

Your code create a lot a error i think this line :
if (not L.enabled) or IsShiftKeyDown() or IsControlKeyDown() or IsAltKeyDown() then

Your script work on your side?