Jaksuhn / Automaton

BSD 3-Clause "New" or "Revised" License
21 stars 26 forks source link

[Bug Report] Enhanced Duty Start/End(Auto Leave) and Auto Queue #23

Closed Ecselsior closed 4 months ago

Ecselsior commented 4 months ago

Describe the bug Enhanced Duty Start/End AutoLeave triggering when entering into a new duty before time has elapsed causing a lockout and AutoQueue triggering when not all members have loaded in from a duty (causing Y*sAlready to fail to autocommence on duty pop)

To Reproduce Steps to reproduce the behaviour: --Enhanced Duty Start/End AutoLeave

  1. Have AutoLeave, AutoQueue enabled 2, Queue into guildhest "Under The Armour" as a healer at peak.
  2. Complete guildhest
  3. Somebody uses the battlewarden twice in quick succession, causing the instance to end for everybody.
  4. Autoqueue immediately puts you into a duty, and it pops instantly.
  5. Enter the new instance
  6. AutoLeave triggers, causing a 30min lockout.

--Auto Queue triggering early while in party

  1. Have enabled AutoQueue enabled 2, Queue into guildhest "Under The Armour" as a party
  2. Complete guildhest and leave
  3. Autoqueue immediately puts you into a duty, and it pops instantly.
  4. Member who is still in loading, gets duty pop while in loading screen, causing Y*sAlready's autocommence to fail.

Expected behaviour

  1. AutoLeave should not trigger if the current instance is different from the one that just ended.
  2. AutoQueue should not trigger while party members are still in the loading screen.

Additional context Both issues are caused by getting a duty pop almost immmediately after a duty ends. Perhaps both issues could be partially resolved by adding an optional delay into the config of AutoQueue.

Jaksuhn commented 4 months ago

I don't think I really understand what you mean in the first scenario. Why is someone interacting with the battlewarden? That ends the duty before you killed bockman? Autoleave hooks the duty state so if that is somehow triggering falsely then there's bigger problems.

AutoLeave should not trigger if the current instance is different from the one that just ended.

There's no way to know what instance you're in, but even if you could, that behaviour would just mean you'd only ever be able to auto leave once, which if you're farming under the armour you wouldn't want that.

AutoQueue should not trigger while party members are still in the loading screen.

I unfortunately do not really have a way to check the status of party members, much less ones that could be in different zones from you. All I can (and do) check is their territory. Only thing else I could do is add a customisable delay

Ecselsior commented 4 months ago

I don't think I really understand what you mean in the first scenario. Why is someone interacting with the battlewarden? That ends the duty before you killed bockman?

Ok, let me try to explain again. In the guildhest, you have to kill the boss bockman, and once you do, the npc battlewarden becomes interactable. The first time you interact with him, you pickup the reward for the guildhest. If you interact with him again, it ends the instance and kicks everybody in the instance out. This behaviour is the same for all guildhests afaik.

What I think is happening, is the following:

  1. Duty Starts
  2. Boss "Bockman" is killed, this is the trigger for the duty to be 'complete'. If you have a message set in Enhanced Duty Start/End, it will say it the second the boss dies.
  3. AutoLeave timer begins (for example set to 20s)
  4. NPC battlewarden becomes interactable, and is interacted with twice, causing the instance to end for everybody
  5. Auto Queue triggers and you commence the next duty
  6. You enter the duty
  7. 20 seconds have elapsed, causing AutoLeave to trigger
  8. AutoLeave leaves the instance, causing a 30min lockout.

As for another possible solution, I replaced the Automaton Auto Leave with a lua script in S*methingNeedDoing. Maybe this will give you some idea of what to do, so that I could switch back to Auto Leave. The idea is that if the script detects the zoneId changing, it aborts leaving the duty.

local i = 0
while i < 15 do
    if GetZoneID() == 190 then
        i = i + 1
        yield("/wait 1")
    else
        zone_changed = true
        yield("/e Zone Change Detected!")
        return
    end
end
if GetZoneID() == 190 and zone_changed ~= true then
    yield("/pdfleave") -- From P*ndora'sBox
    yield("/e Manually Left instance: " .. instance)
elseif GetZoneID() == 190 and zone_changed == true then
    yield("/e New instance detected!")
else
    yield("/e Instance shutdown by somebody else!")
end
zone_changed = false

I unfortunately do not really have a way to check the status of party members, much less ones that could be in different zones from you. All I can (and do) check is their territory. Only thing else I could do is add a customisable delay

We were in the same zone. but one person had not fully loaded. I know that in S*methingNeedDoing you can check if you are inbetweenzones with GetCharacterCondition(), though I have no idea if this is possible to do with party members. Otherwise a delay would be nice, thank you.

Jaksuhn commented 4 months ago

Ohh... you had a delay on auto leave I assume you're comm farming and not mentor roulette farming then

you can check if you are inbetweenzones with GetCharacterCondition(

Other players do not have Conditions. Some info about other players is checkable, but very few relative to all the conditions that you the local player have. Being in between zones isn't one of them. I can add a check for targetability but it'll require all the members of the party to be relatively close to each other

Jaksuhn commented 4 months ago

new version has the zone check for the first issue and targetability check for the second