Let me start by saying I use this addon THE MOST, and this was a huge part of what brought me to MQ2. Thank you for all the time and effort you put into this macro, its clearly a labor of love, and I am thankful to
@GoldenFrog for every bit of it. I'm not a coder, and I couldn't make something like this. I can't state that part enough. So I am hoping my contribution below is helpful, not misperceived as criticism or nit picking. After all, QA work is ideal for guys that can't code, so here I go.
ignoreRecruitmentQuests=1 Does not appear to work, it still ran recruit missions.
Current version was also picking recovery missions. Maybe type=any means literally any? Especially when I was prioritizing 6h.
Getting an occasional, but not easily repeatable crash on claiming conversion quests. Maybe a delay issue?
questSelectionType=Exp had some crash issues scanning through all the quests. I love the concept, does this take into consideration that 3x 6H quests is more XP than 1x 24H quest of the same level/rarity? OR will it just go for the biggest XP quests which will typically be the 24h ones?
Claiming EXP rewards is broken because the skipRewardOption function has the greater/less than backwards. Here is a temp hot fix for that
function SkipRewardOption
Lua:
function SkipRewardOption(rewardOptionName)
if (rewardOptionName ~= "Character Experience") then return false end
local maxLevel = settings['General']['maxLevelForClaimingExpReward']
local maxPct = settings['General']['maxLevelPctForClaimingExpReward']
if (maxLevel == nil) then return false end
if (maxPct == nil) then maxPct = 95 end
if (maxLevel < mq.TLO.Me.Level()) then return true end
if (maxLevel > mq.TLO.Me.Level()) then return false end
if (maxPct < mq.TLO.Me.PctExp()) then return true end
return false
end
The exit() on line 103 (and possibly 96 too) cause
Lua errors to spew when the script ends. Here is what I did to fix that.
function Main (edited)
Lua:
function Main ()
Initialize()
LoadMq2Rewards()
local countdownDelayMinutes = 60
local minutesToWait
local repeatTimeMinutes = settings['General']['repeatTimeMinutes']
if (DebugNoRunQuestMode == true) then
Log ('DEBUG: Not Actually Running Quests due to Debug|doNotRunQuests configuration flag')
end
if (Param0 ~= nil) then
Parameterized(Param0)
return
end
::cycleLoop::
-- Reset any variables we're keying off of
TooManyPendingRewards = false
AvailableQuestListLoaded = false
ActiveQuestListDirty = true
Log2 ('Starting Cycle '..os.date('(%H:%M:%S)', os.time()))
OpenOverseerWindow()
ValidateTutorialStatus()
CollectAllRewards()
ClaimCompletedMissions()
CollectAllRewards()
RunConversions()
RunRecruitQuests()
RunGeneralQuests()
DetermineNextQuestTimes()
DetermineNextRunTime()
CloseOverseerWindow()
if (MinutesUntilNextQuest == 0) then
-- TEMP: 'Til tracking down when this happens. Possibly when quest completes during run?
-- Check that we actually do NOT have pending quests.
if (mq.TLO.Window(ActiveQuestList).Children()) then
LogError ('Out of sync: No next quest minutes but pending quests exist. Checking cycle again.')
goto cycleLoop
end
Log ('No pending quests.')
goto exit
else
Log ('Next Quest Completes In :'..NextQuestCompletion)
end
if (repeatTimeMinutes == 0) then
Log ('Ending Macro.')
goto exit
end
if (repeatTimeMinutes > 0) then
local MinutesUntilNextQuest = repeatTimeMinutes
end
if (settings['General']['countAgentsBetweenCycles'] == true) then
OutputAgentCounts()
end
::countdownLoop::
if (MinutesUntilNextQuest <= 0) then
goto cycleLoop
end
Log ('*** '..MinutesUntilNextQuest..' minutes until next overseer check. '..os.date('(%H:%M:%S)', os.time()))
if (MinutesUntilNextQuest > countdownDelayMinutes) then
MinutesUntilNextQuest = MinutesUntilNextQuest - countdownDelayMinutes
minutesToWait = countdownDelayMinutes
else
minutesToWait = MinutesUntilNextQuest
MinutesUntilNextQuest = 0
end
mq.delay(minutesToWait.."m")
goto countdownLoop
::exit::
end
Again, thank you for the great script. It gets much mileage at my house, so much that it had some issues, I started googling
Lua code samples until I could patch my local copy. Sorry to be a pain in the butt, but I hope it helps!