workUntil()

Forum Forums Discussion workUntil()

This topic contains 4 replies, has 2 voices, and was last updated by  woshigi 7 years ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5713

    woshigi
    Participant
    0

    If I have two of these in the same chapter, will the second one overwrite the first?

    teleport(House of the Fierce)
    ChangeJob(BTN)
    selectGrid(Wind Crystal)
    selectGatherPreset(Wind Crystal)
    selectGatherRotation(Normal)
    workUntil(22:05et)
    startGathering(999)
    teleport(Ala Ghiri)
    unstealth()
    changeJob(Miner)
    selectGrid(Chromite)
    selectGatherPreset(GA Spring)
    selectGatherRotation(70HQ)
    startGathering(1)

    This part of my scenario makes the second startGathering (last line) not happen and miqo says that work time is over because the workUntil time is passed. If I add another workUntil() before the second startGathering() will it solve the issue?

    #5716
    Miqobot
    Miqobot
    Keymaster
    1+

    We do not recommend mixing different activities in the same chapter.

    Many functions are designed with chapter context in mind, and simply calling a function twice does not override context completely, which may result in unexpected behaviour later. However, when the chapter ends it is guaranteed to clear context including any calls to workUntil().

    Please split your scenario in the following way.

    Chapter 1:

    teleport(House of the Fierce)
    ChangeJob(BTN)
    selectGrid(Wind Crystal)
    selectGatherPreset(Wind Crystal)
    selectGatherRotation(Normal)
    workUntil(22:05et)
    startGathering(999)

    Chapter 2:

    teleport(Ala Ghiri)
    unstealth()
    changeJob(Miner)
    selectGrid(Chromite)
    selectGatherPreset(GA Spring)
    selectGatherRotation(70HQ)
    startGathering(1)
    #5753

    woshigi
    Participant
    0

    I only do this, because I have the scenario set up so that I craft then I gather. If I don’t put everything in one chapter, I can’t repeat it. Maybe a nice feature would be repeatChapters(ch #’s to repeat, # of times to repeat) so that we can loop just part of a scenario?

    #5754
    Miqobot
    Miqobot
    Keymaster
    0

    It’s a nice suggestion!
    Indeed, we consider implementing additional control functions for scenario toolset, including special checkpoints and repeat scopes.

    In this case – yes, another call to workUntil() function is the only way to update timer context.
    Also, please note that selectGatherPreset() automatically selects grid and rotation stored in this preset. So you don’t really need to selectGrid() and selectGatherRotation() separately. Additionally, we would recommend using aliases as they make your scenario much easier to read.

    Your optimized chapter would look like this.

    teleport(House of the Fierce)
    job(BTN)
    gatherPreset(Wind Crystal)
    workUntil(22:05et)
    gather(999)
    
    teleport(Ala Ghiri)
    unstealth()
    job(Miner)
    gatherPreset(GA Spring)
    workUntil(00:05et)
    gather(1)
    
    repeatChapter(5)
    #5765

    woshigi
    Participant
    0

    Thanks for the suggestions 😀

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.