Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The code block that deals with erozea time needs fixing
#1
So this is the issue i've been seeing, i have a gathering profile i made to cover all hrs of the erozean day, however i'm having an issue where the bot is not taking in the eorzeamaxhour into consideration properly. So for example my task 1 runs from 0-4 and my task 2 runs from 4-8, meaning that at 4am ez time task 1 should not be able to pop at all, however there are times it'll tele to the task 2 zone, start flying a bit towards task 2 and then just teles back to task 1, however when it reach's the task 1 location it then re-reads the time and sends it back on it's way to task 2 (making me loose about 30mins-1hr of ez gathering time on task 2). I feel that should be looked into so that a task going from 0-4 will not pop/run at all once it hits 4 ez time.

Edit: I've also tried 0-3 ez time for task 1 and then 4-7 for task 2, but then it's just sit there at task 1 for a full ez hr from 3-4 and then at 4 it'll start task 2 and then will just sit another ez 1hr till task 3 is good to go.

i have a feeling it has something to do with the below code (pulled from ffxiv_task_gather), i'll probably take a shot at fixing it tomorrow sometime.

Code:
if (IsNull(currentTask.eorzeaminhour,-1) ~= -1 and IsNull(currentTask.eorzeamaxhour,-1) ~= -1) then
    local validHour = false
    local i = currentTask.eorzeaminhour
    while (i ~= currentTask.eorzeamaxhour) do
        if (i == eHour or (i == precedingHour and eMinute >= 45)) then
            validHour = true
            i = currentTask.eorzeamaxhour
        else
            i = AddHours(i,1)
        end
    end
    
    if (not validHour) then
        gd("[GatherNextTask]: We are not in a valid time window for this task, invalidate.",3)
        invalid = true
    end
end
Reply
#2
where are your tasks?

that code works fine in all my packs on the store
Reply
#3
1. Clary Sage @ 12AM-4AM (Botanist / Coerthas Western Highlands)
2. Lover's Laurel @ 4AM-8AM (Botanist / The Dravanian Hinterlands)
3. Black Soil @ 8AM-12PM (Botanist / The Dravanian Forelands)
4. Radiant Fire Moraine @ 12PM-4PM (Miner / The Churning Mists)
5. Radiant Lightning Moraine @ 4PM-8PM (Miner / The Sea of Clouds)
6. Radiant Astral Moraine @ 8PM-12AM (Miner / Coerthas Western Highlands)
Reply
#4
I never said it wasn't working it's just working really weird, just coming from a background in programming i feel there's an extra check happening after it tele's to the next task.

So like task 1 ends at 4am, actually quick glancing the code snippet i posted above should only run to 3:45, which it does and it switches to task 2, the problem seems to arise when it's on it's way to it's next task, almost as if that check seemed to be a  if((eztime-1) < nodemaxhr)... like the current task always ends fine and starts heading to the next, but then it seems to run another check on the way to the next task, which in that check it seems to be using a incorrect eztime value.

also this is happening from task 1-2, 2-3, 3-4. 4-5, 5-6, so basically it's every task group i have being effected, i attached the gather and skill profile it's happening on, but you got to keep a close eye on it when it's making the task switch, so like around 4AM, 8AM, 12PM, 4PM, 8PM, and 12AM also doesn't happen every time, and sometimes it'll fully collect the next tasks items once before it heads back to only realize it messed up and return right back to where it left.


Attached Files
.zip   test.zip (Size: 3.13 KB / Downloads: 3)
Reply
 


Forum Jump:


Users browsing this thread: 1 Guest(s)

We help you win the game.

FFXIV Bot and More.

 

Products