• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Question - How script can see that a particular task is still active without opening the TaskWnd (1 Viewer)

Joined
Jan 29, 2023
RedCents
189¢
Hi All. I'm writing a script to run a quest (task) repeatedly for faction. I originally keyed off of the completion text to know when the task was done, however, this had the downside of not allowing me to know if the quest was present when I started the script. So I switched over to checking the task window like this:

INI:
function WeHaveTheQuest()
    local count = tonumber(mq.TLO.Window("TaskWnd").Child("TASK_TaskList").Items())
    --print('Found ' .. count .. ' active tasks')
    for j = 1,count do
        local localQuestName = mq.TLO.Window("TaskWnd").Child("TASK_TaskList").List(j,3)()
        --print('Task #' .. j .. ' is "' .. localQuestName .. '"')
        if (localQuestName == questName) then
            return true
        end
    end
    return false
end

The thing that I observed is that when the quest completes the list doesn't refresh unless I actually open the TaskWnd. So now my script goofily opens the task window, queries the quest status, the closes the task window. It does this once every 10 seconds. The TaskWnd is only up for a split second, but still it annoys me.

Question: Is there any reliable way to query whether the task is still present without popping up the TaskWnd? I don't really want to rely on querying the "Quest Overlay" either since I'm not certain that everyone would have that visible.

I *could* do both: Check the quest status once on script launch and then after that key off of the completion text, but I just feel like there should be one unified solution that handles both well.

Thanks.
 
Solution
This is what I have/use. I am not coder, but I slept in a Holiday Inn once. (Note I removed some code not related to answering your question, like delays and payloads)

Waiting for player to get task:
while mq.TLO.Task('When One Door Closes').ID() == nil do
    print('\a-wWaiting for player to get task')
end

Wait to zone in:
while not mq.TLO.DynamicZone.Leader.Flagged() do
    print('\a-wWaiting to zone in.')
end

Waiting for mission objective to complete:
while mq.TLO.Task('When One Door Closes').ID() ~= nil and mq.TLO.Task('When One Door Closes').Objective(1).Status() ~= 'Done' do
    print('\a-wWaiting for fight to end.')
end

Waiting for chest to be opened:
while mq.TLO.Task('When One Door Closes').Objective(1).Status() == 'Done' and mq.TLO.Task('When One Door Closes').Objective(2).Status() ~= 'Done' do
    print('\a-wWaiting to...
This is what I have/use. I am not coder, but I slept in a Holiday Inn once. (Note I removed some code not related to answering your question, like delays and payloads)

Waiting for player to get task:
while mq.TLO.Task('When One Door Closes').ID() == nil do
    print('\a-wWaiting for player to get task')
end

Wait to zone in:
while not mq.TLO.DynamicZone.Leader.Flagged() do
    print('\a-wWaiting to zone in.')
end

Waiting for mission objective to complete:
while mq.TLO.Task('When One Door Closes').ID() ~= nil and mq.TLO.Task('When One Door Closes').Objective(1).Status() ~= 'Done' do
    print('\a-wWaiting for fight to end.')
end

Waiting for chest to be opened:
while mq.TLO.Task('When One Door Closes').Objective(1).Status() == 'Done' and mq.TLO.Task('When One Door Closes').Objective(2).Status() ~= 'Done' do
    print('\a-wWaiting to open chest.')
end

Wait for player to kick task:
while mq.TLO.Task('When One Door Closes').ID() ~= nil do
    print('\a-wWaiting for player kick task')
end
 
Solution
Question - How script can see that a particular task is still active without opening the TaskWnd

Users who are viewing this thread

Back
Top