Thread Tools Display Modes
11-21-14, 12:49 AM   #1
Tegara
A Murloc Raider
Join Date: May 2013
Posts: 5
Addon to expedite finished missions

Hi,

I'm loving WoD and the whole Followers/Missions thingy but...

Whenever I log in i've got at least x4 toons who all have about 6 or more completed missions that have to be finalised. At first I thought the whole animation of the followers going jumpy jumpy and punching the air was kinda cute but now it's just time consuming.

Is there an addon that could once I open the mission table, with just one click, it will just complete everything without having to do it for each and every follower? I'm not even slightly interested if the missions failed or not cause I often send followers on missions with a low seccess rate just to earn the base XP.

Thanx in advance.
  Reply With Quote
11-21-14, 03:43 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
I've been trying to make this happen myself. The code I wrote kind of works, but not 100%. I've been running into situations where missions would ignore the request to be marked as turned in and would require multiple passes to complete.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
11-21-14, 06:11 AM   #3
sezz
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 158
Originally Posted by SDPhantom View Post
I've been trying to make this happen myself. The code I wrote kind of works, but not 100%. I've been running into situations where missions would ignore the request to be marked as turned in and would require multiple passes to complete.
I'm having the same issue since beta, currently using a 0.25sec timer if #(C_Garrison.GetCompleteMissions()) > 0. I hate the solution, but it works for now.

Same problems with follower list updates, C_Garrison.GetFollowers() isn't always up to date...
  Reply With Quote
11-21-14, 07:22 AM   #4
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
There is an addon called Breeze to speed it up very much:
http://www.curse.com/addons/wow/breeze
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________
  Reply With Quote
11-21-14, 02:59 PM   #5
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
For now, I got the OnFinished handlers on the animations to trigger the next logical step. This makes it play more like a movie without the need for interaction. I might end up hiding the next button and seeing how it turns out visually.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
11-21-14, 06:10 PM   #6
Tegara
A Murloc Raider
Join Date: May 2013
Posts: 5
Well Tonyleila, I have to say that the Breeze addon sure lives up to its name. It's made things a lot faster and far less boring.

In that strange Utopia that resides somewhere within my WoW psyche, I'll still dream of just one clicking the "View Completed Missions" button and having them all auto-complete but until then, this will do nicely.

I never acquired the skill to write addons so I appreciate the work and effort everyone puts into the addon community. Now, I gotta run. I'm on a mission(s)!
  Reply With Quote
11-21-14, 09:50 PM   #7
sezz
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 158
Originally Posted by SDPhantom View Post
For now, I got the OnFinished handlers on the animations to trigger the next logical step. This makes it play more like a movie without the need for interaction. I might end up hiding the next button and seeing how it turns out visually.
I just complete them all in the background using C_Garrison.MarkMissionComplete(missionID) and C_Garrison.MissionBonusRoll(missionID) depending on .state, but sometimes GarrisonMissionList_UpdateMissions() doesn't update the mission list and I have to reopen the table...

Also couldn't find a way to tell if a mission failed or was successful, so I don't output rewards.

http://youtu.be/FdMo8hdc4rY

Too much issues for a release
  Reply With Quote
11-22-14, 05:11 AM   #8
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
I ended up going with a two way approach. When GARRISON_MISSION_NPC_OPENED fires, I run a scanner that reruns itself every half second until there are no completed quests. I also have GARRISON_MISSION_FINISHED directly call C_Garrison.MarkMissionComplete() using the passed mission id and trigger a delayed scan to make sure everything was caught. I handle looting with GARRISON_MISSION_COMPLETE_RESPONSE checking C_Garrison.CanOpenMissionChest() and running C_Garrison.MissionBonusRoll() if true.



Note: GARRISON_MISSION_COMPLETE_RESPONSE should fire in response to C_Garrison.MarkMissionComplete() with info on whether the mission succeeded or not. It isn't reliable right now as it only seems to fire on successful missions.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
11-22-14, 05:25 AM   #9
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Here's what I use, seems to work fine for me atleast:

Lua Code:
  1. local lastMissionID
  2. local function QueryMissions()
  3.     local missions = C_Garrison.GetCompleteMissions()
  4.     if(#missions > 0) then
  5.         lastMissionID = missions[1].missionID
  6.         C_Garrison.MarkMissionComplete(lastMissionID)
  7.     else
  8.         GarrisonMissionFrame.MissionTab.MissionList.CompleteDialog:Hide()
  9.     end
  10. end
  11.  
  12. Handler('GARRISON_MISSION_NPC_OPENED', QueryMissions)
  13. Handler('GARRISON_MISSION_COMPLETE_RESPONSE', function(missionID, canComplete, success)
  14.     if(missionID == lastMissionID and canComplete) then
  15.         if(success and C_Garrison.CanOpenMissionChest(missionID)) then
  16.             C_Garrison.MissionBonusRoll(missionID)
  17.             return
  18.         end
  19.  
  20.         C_Timer.After(1/2, QueryMissions)
  21.     end
  22. end)
  Reply With Quote
11-22-14, 01:55 PM   #10
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
Strange, that's the approach I tried the first time, but it didn't work out for me. I get the feeling this mechanic has more events firing that they aren't exposing to Lua side. Anyway, this is the code I have. It's really robust in which I like to have anything I can think of covered.

This also allows any addon wanting to poll GarrisonMissionFrame.MissionComplete.completeMissions get updated info.

Note: nop() is a global dummy function in UIParent.lua

Lua Code:
  1. LoadAddOn("Blizzard_GarrisonUI");
  2. GarrisonMissionFrame_CheckCompleteMissions=nop;
  3.  
  4. local EFrame=CreateFrame("Frame");
  5. EFrame:RegisterEvent("GARRISON_MISSION_NPC_OPENED");--      Open Command Table
  6. EFrame:RegisterEvent("GARRISON_MISSION_NPC_CLOSED");--      Close Command Table
  7. EFrame:RegisterEvent("GARRISON_MISSION_FINISHED");--        Mission Completed
  8. EFrame:RegisterEvent("GARRISON_MISSION_COMPLETE_RESPONSE");--   Mission Turned In
  9.  
  10. local MissionsOpen=false;
  11. local function ScanMissions(delay)
  12.     if not MissionsOpen then return; end
  13.     if not delay then
  14.         local list=C_Garrison.GetCompleteMissions();
  15.         GarrisonMissionFrame.MissionComplete.completeMissions=list;
  16.         if #list<=0 then GarrisonMissionList_UpdateMissions(); return; end
  17.  
  18.         for i,j in ipairs(list) do
  19.             C_Garrison.MarkMissionComplete(j.missionID);
  20.         end
  21.     end
  22.     C_Timer.After(0.5,ScanMissions);
  23. end
  24.  
  25. EFrame:SetScript("OnEvent",function(self,event,...)
  26.     if event=="GARRISON_MISSION_NPC_OPENED" then
  27.         MissionsOpen=true;
  28.         ScanMissions();
  29.     elseif event=="GARRISON_MISSION_NPC_CLOSED" then
  30.         MissionsOpen=false;
  31.     elseif event=="GARRISON_MISSION_FINISHED" and MissionsOpen then
  32.         C_Garrison.MarkMissionComplete((...));
  33.         ScanMissions(true);
  34.     elseif event=="GARRISON_MISSION_COMPLETE_RESPONSE" then
  35.         if C_Garrison.CanOpenMissionChest((...)) then C_Garrison.MissionBonusRoll((...)); end
  36.     end
  37. end);
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
11-22-14, 03:06 PM   #11
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
I'm using this:
Code:
local frame = CreateFrame('Frame')
frame:Hide()

frame:SetScript('OnEvent', function(self, event, ...)
	if event == 'GARRISON_MISSION_COMPLETE_RESPONSE' then
		local missionID, canComplete, succeeded = ...
		if canComplete and succeeded and C_Garrison.CanOpenMissionChest(missionID) then
			C_Garrison.MissionBonusRoll(missionID)
		end
	elseif event == 'GARRISON_MISSION_FINISHED' or event == 'GARRISON_MISSION_NPC_OPENED' then
		if not (GarrisonMissionFrame and GarrisonMissionFrame:IsShown()) then return end
		local missions = C_Garrison.GetCompleteMissions()
		for index = 1, #missions do
			C_Garrison.MarkMissionComplete(missions[index].missionID)
		end
		GarrisonMissionFrame.MissionTab.MissionList.CompleteDialog:Hide()
		GarrisonMissionFrameMissions.CompleteDialog:Hide()
		self:Show()
	else	-- event == 'ADDON_LOADED'
		if ... ~= 'Blizzard_GarrisonUI' then return end
		self:UnregisterEvent(event)
		GarrisonMissionFrame:UnregisterEvent('GARRISON_MISSION_FINISHED')
		GarrisonMissionFrame.MissionComplete:UnregisterEvent('GARRISON_MISSION_COMPLETE_RESPONSE')
	end
end)
frame:RegisterEvent('GARRISON_MISSION_COMPLETE_RESPONSE')
frame:RegisterEvent('GARRISON_MISSION_FINISHED')
frame:RegisterEvent('GARRISON_MISSION_NPC_OPENED')

frame:SetScript('OnUpdate', function(self)
	self:Hide()
	GarrisonMissionList_UpdateMissions()
end)

if GarrisonMissionFrame then
	GarrisonMissionFrame:UnregisterEvent('GARRISON_MISSION_FINISHED')
	GarrisonMissionFrame.MissionComplete:UnregisterEvent('GARRISON_MISSION_COMPLETE_RESPONSE')
else
	frame:RegisterEvent('ADDON_LOADED')
end
  Reply With Quote
11-22-14, 04:18 PM   #12
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
Originally Posted by Vrul View Post
Code:
local frame = CreateFrame('Frame')
frame:Hide()
BTW, you don't need to hide the frame. It won't render anything if there are no points set or frame size.



Also, unregistering GARRISON_MISSION_FINISHED from GarrisonMissionFrame isn't enough to stop the complete mission dialog from showing. It also triggers the check function from the OnShow handler. I handled this by overriding GarrisonMissionFrame_CheckCompleteMissions with a dummy no-op function.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
11-23-14, 01:02 AM   #13
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
Originally Posted by SDPhantom View Post
BTW, you don't need to hide the frame.
Except that you're completely wrong and the frame does in fact need to be hidden.

Originally Posted by SDPhantom View Post
Also, unregistering GARRISON_MISSION_FINISHED from GarrisonMissionFrame isn't enough to stop the complete mission dialog from showing. It also triggers the check function from the OnShow handler.
Hence why I hide that dialog in the code posted.
  Reply With Quote
11-23-14, 01:17 AM   #14
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Vrul View Post
Except that you're completely wrong and the frame does in fact need to be hidden.
While I admit that being a dick can be oh so satisfying sometimes, in this case it probably would have been better to point out that the frame does need to be hidden because you later set an OnUpdate script on it that shouldn't start running right away.

(Also, personally, when I use the same method, I put the :Hide() line right before the :SetScript line to avoid that particular confusion.)
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
11-24-14, 12:19 AM   #15
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
I wasn't able to follow that the OnUpdate handler was being controlled in that way. It's not an approach I would've expected.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
12-07-14, 05:50 PM   #16
endorakai
A Defias Bandit
Join Date: Dec 2014
Posts: 2
Originally Posted by Vrul View Post
I'm using this:
Code:
local frame = CreateFrame('Frame')
frame:Hide()

frame:SetScript('OnEvent', function(self, event, ...)
	if event == 'GARRISON_MISSION_COMPLETE_RESPONSE' then
		local missionID, canComplete, succeeded = ...
		if canComplete and succeeded and C_Garrison.CanOpenMissionChest(missionID) then
			C_Garrison.MissionBonusRoll(missionID)
		end
	elseif event == 'GARRISON_MISSION_FINISHED' or event == 'GARRISON_MISSION_NPC_OPENED' then
		if not (GarrisonMissionFrame and GarrisonMissionFrame:IsShown()) then return end
		local missions = C_Garrison.GetCompleteMissions()
		for index = 1, #missions do
			C_Garrison.MarkMissionComplete(missions[index].missionID)
		end
		GarrisonMissionFrame.MissionTab.MissionList.CompleteDialog:Hide()
		GarrisonMissionFrameMissions.CompleteDialog:Hide()
		self:Show()
	else	-- event == 'ADDON_LOADED'
		if ... ~= 'Blizzard_GarrisonUI' then return end
		self:UnregisterEvent(event)
		GarrisonMissionFrame:UnregisterEvent('GARRISON_MISSION_FINISHED')
		GarrisonMissionFrame.MissionComplete:UnregisterEvent('GARRISON_MISSION_COMPLETE_RESPONSE')
	end
end)
frame:RegisterEvent('GARRISON_MISSION_COMPLETE_RESPONSE')
frame:RegisterEvent('GARRISON_MISSION_FINISHED')
frame:RegisterEvent('GARRISON_MISSION_NPC_OPENED')

frame:SetScript('OnUpdate', function(self)
	self:Hide()
	GarrisonMissionList_UpdateMissions()
end)

if GarrisonMissionFrame then
	GarrisonMissionFrame:UnregisterEvent('GARRISON_MISSION_FINISHED')
	GarrisonMissionFrame.MissionComplete:UnregisterEvent('GARRISON_MISSION_COMPLETE_RESPONSE')
else
	frame:RegisterEvent('ADDON_LOADED')
end

this is currently what i am now using and ty vrul for the materials...

i made an addon using the most basic things (as this is not really my gig and am horrible making addons) but there is only one problem i feel with your lua.
while i wanted the animations of both the followers completing and the chest to stop having a wait time, that is as far as i want the addon to go. i didnt want it to stop telling what i received from completing or the bonuses of currency/xp/etc.

is there something you can tell me (perhaps reposting an edited code) that would have this effect? i really want it for its functions before i click the chest. all else i want it to do is behave normally so that i can see the bonuses being awarded and whatnot.

thanks ahead of time.

P.S. if you do this and package it as a zip a LOT of ppl are going to want this instead of many of the other addons that have so many bugs.
this one hasnt screwed in any bugs yet. will post if that changes or if the edited post has bugs) KEEP THIS IDEA ALIVE PLZ!
Attached Files
File Type: zip Faster.zip (840 Bytes, 228 views)

Last edited by endorakai : 12-07-14 at 06:00 PM.
  Reply With Quote
12-07-14, 08:31 PM   #17
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by endorakai View Post
P.S. if you do this and package it as a zip a LOT of ppl are going to want this instead of many of the other addons that have so many bugs.
I haven't noticed any bugs in the garrison addons I've downloaded. If you have, you should probably report them to the addons' authors so they can get fixed, rather than just complaining about them vaguely.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
12-07-14, 09:39 PM   #18
Vranx
A Flamescale Wyrmkin
 
Vranx's Avatar
Join Date: May 2008
Posts: 101
Not sure if you guys have seen Master Plan. It has a single screen that shows the results of all missions and then their rewards.
http://www.curse.com/addons/wow/master-plan
  Reply With Quote
12-08-14, 05:59 PM   #19
endorakai
A Defias Bandit
Join Date: Dec 2014
Posts: 2
Originally Posted by Phanx View Post
I haven't noticed any bugs in the garrison addons I've downloaded. If you have, you should probably report them to the addons' authors so they can get fixed, rather than just complaining about them vaguely.
here is the problem with that... i have played wow for over 6 1/2 years. i have not once submitted a bug report and successfully received a response. i dont know why that is, but i dont. i dont even try anymore. i make suggestions not complaints. i dont NEED to use anything to play wow except wow itself. however, if i am to use an addon i would always look for ways to personalize it for me. why wouldn't i? is that not the reason for addons?!?

that said there are reasons for the suggestions i made.
1. yes there are bugs in many addons concerning the garrison because garrison stuff is still relatively new.
2. oddly enough i dont get any bugs from this particular creation of awesome that vrul has made.
3. i honestly dont want to "change" the way garrison looks or behaves except for the speed of which things are finalized. thus i dont even want the addons you suggested even if not for the bugs
4. the only change i suggested was to make it so i didnt have to watch that lame
"everybody-jump-in-the-air-like-you-just-dont-care-that-you-are-wasting-my-play-time" animation. also the chest makes me wait too.
and neither of these things did i want to wait on.

his script allows it to go faster. thats a plus! but i would much prefer to still see the bonus rewards on the garrison ui and THEN i can click the next button as i see fit.

i really dont see the problem with this request and also do not know what your deal was/is... i felt salt from your response.

edit to 2. oddly enough i dont get any bugs from this particular creation of awesome that vrul has made.

--apparently if you receive any lag spike you could have it needing to run more than once by closing the garrison mission, then at the table reopen them to start fresh. there is an unrelated addon called postal and its meant for opening mail no matter how much you have with a single click. taking a note from that, i am thinking that if you add a hardware action (button) to refresh it this would be remedied. simply put, i think blizz is just not letting it fire off that fast without some form of hardware function. otherwise still extremely useful and once again thank you

Last edited by endorakai : 12-09-14 at 01:52 PM. Reason: found a suggestion for vrul that might fix the problem i just found
  Reply With Quote
12-09-14, 10:04 PM   #20
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by endorakai View Post
here is the problem with that... i have played wow for over 6 1/2 years. i have not once submitted a bug report and successfully received a response. i dont know why that is, but i dont. i dont even try anymore. i make suggestions not complaints.
You must only be using abandoned addons, then, or posting reports that don't make any sense. I've never gotten a bug report and not responded to it, even if it was to say "this report has nothing to do with my addon" or "this report doesn't make any sense" which (at least on Curse; WoWI posters are generally better) are responses that apply to a disappointingly high percent of the bug reports I've received over the ~8 years I've been publishing addons. I've also almost always gotten some kind of reply to bug reports I've posted on other people's addons, even if that "reply" was just the bug being fixed. When I haven't, it's generally because the addon's author is obviously AFK and the addon hasn't been updated in months/years and no other comments/tickets have replies either.

As for "suggestions" keep in mind that most authors write addons primarily for themselves to use, and while most are generally open to ideas, no sane addon author (or author of any kind of software) will implement every single feature that's "suggested" by users. If I did that, I'd currently have 50 addons that all did the same 10000000 things, instead of 50 addons that all do distinctly different things.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Addon to expedite finished missions

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off