kolton / d2bot-with-kolbot

d2bot game manager by D3STROY3R with kolbot libs by kolton for d2bs
346 stars 334 forks source link

MFHelper following problems #2477

Closed ARkaine2 closed 4 years ago

ARkaine2 commented 4 years ago

Problem 1.

MFHelper "Stalling for x seconds"

I read this (https://github.com/kolton/d2bot-with-kolbot/issues/595) theme, but I didn't find solution.

I have such route:

// SCRIPTS BOSS/AREA

Scripts.Pit = true;
    Config.Pit.ClearPit1 = true;

Scripts.Cows = true;

Scripts.ClearAnyArea31 = true;
    Config.ClearAnyArea.AreaList31 = [102];                             // Durance of Hate (L3)

Scripts.Travincal = true;

Scripts.ClearAnyArea41 = true;
    Config.ClearAnyArea.AreaList41 = [107];                             // River Of Flame

Scripts.Diablo = true;
    Config.Diablo.Entrance = true;

Scripts.ClearAnyArea51 = true;
    Config.ClearAnyArea.AreaList51 = [113, 115, 116, 118, 119]; // Ice Caves

Scripts.ClearAnyArea52 = true;
    Config.ClearAnyArea.AreaList52 = [128, 129, 130, 131];          // WSK (L1--3), TOD

Scripts.Baal = true;
    Config.Baal.KillBaal = true;

Scripts.ClearAnyArea53 = true;
    Config.ClearAnyArea.AreaList53 = [122, 123];

Scripts.Nihlathak = true;
    Config.Nihlathak.ViperQuit = false;

But after Act3, when MFLeader goes to Act4, MFHelper stays in Act4 town with "Stalling for x seconds" text above character.

image

...

Problem 2.

After doing all locations in Act 3 (which are):

    Scripts.Travincal = true;
    Scripts.ClearAnyArea31 = true;
    Config.ClearAnyArea.AreaList31 = [102];                                 // Durance of Hate (L3)

When MFLeader goes to Act4 MFHelper stays (losts) in Act3 town:

image

Can this be fixed? Thanks.

DarkHorseDre commented 4 years ago

bro, #595 tells you that script will quit if leader goes to cs or baal. in that topic they reference mfhelper script, namely:

// Finish MFHelper script if leader is in Chaos or Throne
            if ([108, 131].indexOf(player.area) > -1) {
                break MainLoop;
            }

Disable this break if you dont want them to exit, as perr #595

as for problem 2, mfhelper looks out of sync, still trying to clearlevel - where was the leader when mfhelper is "stuck" in act 3 town? There is a PR waiting to refactor/fix mfhelper to help it stay in sync - not sure if changes made recently - worth you checking.

ARkaine2 commented 4 years ago

Thanks for answering. Seems that you met and find this problem aweful too.

...

Now bot often stays in town and stops during Diablo/Baalrun. Like this: image image Can this be fixed?

After your advice (and code changing) I have to notice one nice point: When MFLeader finished Diablo/Baalrun and starts another area/script, MFHelper enters announced MFLeader's TP of next area; so run can be continued.

ADD: Seems that problem is in that: MFLeader doesn't announce Chaos Sanctuary and Throne of Destruction during Diablo/Baalrun. Because when MFLeader is killing seals keepers (Visier, De Seis, Infector) and Diablo, MFHelper enters TPs and helps MFLeader to kill em (and then MFHelper goes to town). Can you provide any advice about it?

..

Also MFHelper often losts in River of Flame: image (while MFLeader is doing usual run [in River of Flame])

...

as for problem 2, mfhelper looks out of sync, still trying to clearlevel - where was the leader when mfhelper is "stuck" in act 3 town?

Yeah, seems so.

This problem always happens in one scenario: After run was ended (or probably not), bots (both: MFLeader/MFHelper) come back to town. Then MFLeader starts next area (in same/other act) and MFHelper "losts". In most cases it happens in Act3 after visinig NPCs, but it's not necessarily.

...

There is a PR waiting to refactor/fix mfhelper to help it stay in sync - not sure if changes made recently - worth you checking.

I'll try and answer about results.

ARkaine2 commented 4 years ago

I tried MFHelper.js from updated KolBot, but MFHelper acts the same way as above (doesn't do Diablo/Baalrun).

DarkHorseDre commented 4 years ago

I tried MFHelper.js from updated KolBot, but MFHelper acts the same way as above (doesn't do Diablo/Baalrun).

Bro, the topic #595 and my responses here tell you what you need to do - why are you ignoring what you are being told?

ARkaine2 commented 4 years ago

I looked in that theme and copy>pasted described by you part of code in MFHelper.js:

// Finish MFHelper script if leader is in Chaos or Throne
    if ([108, 131].indexOf(player.area) > -1) {
        break MainLoop;
    }

I also tried:

// Finish MFHelper script if leader is in Chaos or Throne
//  if ([108, 131].indexOf(player.area) > -1) {
//      break;
//  }
// Finish MFHelper script if leader is in Chaos or Throne
    if ([108, 131].indexOf(player.area) > -1) {
//      break;
    }
// Finish MFHelper script if leader is in Chaos or Throne
    if ([].indexOf(player.area) > -1) {
        break;
    }

MFHelper now stopped send message "Stalling for x seconds" and stopped to leave game. But still standing without any action during Diablo/Baalrun of MFLeader.

Did I miss something?

DarkHorseDre commented 4 years ago

yep. 1) you didn't need to copy paste anything as the code is already there - just do the 1 thing suggested - disable/comment out the function/break command so bot continues 2) it needs to continue to do something. In dia/baal as I mentioned:

to be clear before I close this - this section makes the mfhelper script exit it's loop and end if leader enters dia or baal areas (because you're supposed to run dia and baal helper scripts after mfhelper)

also you will save yourself time if you search existing issues: https://github.com/kolton/d2bot-with-kolbot/issues/1827 https://github.com/kolton/d2bot-with-kolbot/issues/1257

ARkaine2 commented 4 years ago

Okay. I made them work together. Thank for your help.

To conclude here:

  1. In MFHelper.js we should change part of code to this:

            // Finish MFHelper script if leader is in Chaos or Throne
            if ([108, 131].indexOf(player.area) > -1) {
                break MainLoop;
            }

2. We should make MFHelper#.js to be able to run MFHelper script multiple times during one run.

3. In character/profile's config we have to include multiple MFHelper#.js.

    // SCRIPTS BOSS/AREA

    // TEAM MF SCRIPT

    Scripts.MFHelper1 = true;                               // Run the same MF run as the MFLeader.

    Scripts.DiabloHelper = true;                            // Chaos helper, kills monsters and doesn't open seals on its own.
        Config.DiabloHelper.Wait = 120;                     // Seconds to wait for a runner to be in Chaos.
                                                                        //  If Config.Leader is set, it will wait only for the leader.
        Config.DiabloHelper.Entrance = true;            // Start from entrance. Set to false to start from star.
        Config.DiabloHelper.SkipTP = false;             // Don't wait for town portal and directly head to chaos.
        Config.DiabloHelper.SkipIfBaal = false;         // End script if there are party members in a Baal run.

    Scripts.MFHelper2 = true;                               // Run the same MF run as the MFLeader.

That's all.

I hope that this time I didn't miss anything.