blizzhackers / autosmurf

Dark-f version of JeanMax/Autosmurf
19 stars 21 forks source link

Switches to MF mode, does nothing #15

Closed Narodweas closed 4 years ago

Narodweas commented 4 years ago

The bot worked great until A5 nightmare mode, where it switched to mf mode, does nothing and sits in town for 2 minutes before closing the game

jeffizebot commented 4 years ago

I'm having this exact same problem. The code causing it is 6099 to 6126 in autosmurf.js. Once you're in nightmare at Baal but haven't reached the Baal kill level the code automatically turns off Autosmurf in your character config files and then tries to turn on MFLeader, Andariel, Countess, etc.. for your leader and MFHelper for your followers.

But, it never actually loads any of those scripts. If you join a game with your autosmurf leader it shows no scripts loaded at the top. I noticed in all the char config files for autosmurf these scripts have been removed, but they're in the libs/common/config file. I'm not sure if the autosmurf.js code is failing to connect with that code or something.

//act5
    if (me.gametype === 1 && teleportingSorc && me.getQuest(39, 0) && !getWaypoint(38) )
        Pather.getWP(129, false);
    if (me.gametype === 1 && me.getQuest(39, 0) && ((me.diff == 1 && !this.partyLevel(baalLvlnm)) || me.diff == 2)) { //Dark-f
        if (teleportingSorc) {
            D2Bot.printToConsole("I'm the leader, changed script.");
            OnOff.enable("Config.MFLeader");
            OnOff.enable("Scripts.Andariel");
            OnOff.enable("Scripts.Countess");
            //OnOff.enable("Scripts.Mausoleum");
            //OnOff.enable("Scripts.Pit");
            //OnOff.enable("Scripts.AncientTunnels");
            OnOff.enable("Scripts.Duriel");
            OnOff.enable("Scripts.Travincal");
            OnOff.enable("Scripts.Mephisto");
            OnOff.enable("Scripts.Pindleskin");
            OnOff.enable("Scripts.Eldritch");
            //OnOff.enable("Scripts.Nihlathak");
            OnOff.enable("Scripts.Diablo");
            OnOff.enable("Scripts.Baal");
            if ((me.diff === 1 && !this.partyLevel(baalLvlnm)) || (me.diff == 2 && !this.partyLevel(mfLvlhell)))
                OnOff.disable("Config.Baal.KillBaal");
        } else {
            OnOff.enable("Scripts.MFHelper");
            OnOff.enable("Scripts.DiabloHelper");
            OnOff.enable("Scripts.BaalHelper");
            D2Bot.printToConsole("I'm a follower, changed script.");
        }
        OnOff.disable("Scripts.AutoSmurf");
    }
viputz commented 4 years ago

u need puth this scripts into config chars files

D2Bot.printToConsole("I'm the leader, changed script."); OnOff.enable("Config.MFLeader"); OnOff.enable("Scripts.Andariel"); OnOff.enable("Scripts.Countess"); //OnOff.enable("Scripts.Mausoleum"); //OnOff.enable("Scripts.Pit"); //OnOff.enable("Scripts.AncientTunnels"); OnOff.enable("Scripts.Duriel"); //OnOff.enable("Scripts.Travincal"); OnOff.enable("Scripts.Mephisto"); //OnOff.enable("Scripts.Pindleskin"); //OnOff.enable("Scripts.Eldritch"); //OnOff.enable("Scripts.Nihlathak"); OnOff.enable("Scripts.Diablo"); OnOff.enable("Scripts.Baal"); if ((me.diff === 1 && !this.partyLevel(baalLvlnm)) || (me.diff == 2 && !this.partyLevel(mfLvlhell))) OnOff.disable("Config.Baal.KillBaal"); } else { OnOff.enable("Scripts.MFHelper"); OnOff.enable("Scripts.DiabloHelper"); OnOff.enable("Scripts.BaalHelper"); D2Bot.printToConsole("I'm a follower, changed script."); } OnOff.disable("Scripts.AutoSmurf");

Narodweas commented 4 years ago

Thank you

On Fri, May 8, 2020, 9:46 AM Vinicius Mendes notifications@github.com wrote:

u need puth this scripts into config chars files

D2Bot.printToConsole("I'm the leader, changed script."); OnOff.enable("Config.MFLeader"); OnOff.enable("Scripts.Andariel"); OnOff.enable("Scripts.Countess"); //OnOff.enable("Scripts.Mausoleum"); //OnOff.enable("Scripts.Pit"); //OnOff.enable("Scripts.AncientTunnels"); OnOff.enable("Scripts.Duriel"); //OnOff.enable("Scripts.Travincal"); OnOff.enable("Scripts.Mephisto"); //OnOff.enable("Scripts.Pindleskin"); //OnOff.enable("Scripts.Eldritch"); //OnOff.enable("Scripts.Nihlathak"); OnOff.enable("Scripts.Diablo"); OnOff.enable("Scripts.Baal"); if ((me.diff === 1 && !this.partyLevel(baalLvlnm)) || (me.diff == 2 && !this.partyLevel(mfLvlhell))) OnOff.disable("Config.Baal.KillBaal"); } else { OnOff.enable("Scripts.MFHelper"); OnOff.enable("Scripts.DiabloHelper"); OnOff.enable("Scripts.BaalHelper"); D2Bot.printToConsole("I'm a follower, changed script."); } OnOff.disable("Scripts.AutoSmurf");

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/blizzhackers/autosmurf/issues/15#issuecomment-625823574, or unsubscribe https://github.com/notifications/unsubscribe-auth/APJS7L6FIV4N3OQNDMT23K3RQQEKBANCNFSM4MORXZVA .

DryUrEyesM8 commented 4 years ago

u need puth this scripts into config chars files

D2Bot.printToConsole("I'm the leader, changed script."); OnOff.enable("Config.MFLeader"); OnOff.enable("Scripts.Andariel"); OnOff.enable("Scripts.Countess"); //OnOff.enable("Scripts.Mausoleum"); //OnOff.enable("Scripts.Pit"); //OnOff.enable("Scripts.AncientTunnels"); OnOff.enable("Scripts.Duriel"); //OnOff.enable("Scripts.Travincal"); OnOff.enable("Scripts.Mephisto"); //OnOff.enable("Scripts.Pindleskin"); //OnOff.enable("Scripts.Eldritch"); //OnOff.enable("Scripts.Nihlathak"); OnOff.enable("Scripts.Diablo"); OnOff.enable("Scripts.Baal"); if ((me.diff === 1 && !this.partyLevel(baalLvlnm)) || (me.diff == 2 && !this.partyLevel(mfLvlhell))) OnOff.disable("Config.Baal.KillBaal"); } else { OnOff.enable("Scripts.MFHelper"); OnOff.enable("Scripts.DiabloHelper"); OnOff.enable("Scripts.BaalHelper"); D2Bot.printToConsole("I'm a follower, changed script."); } OnOff.disable("Scripts.AutoSmurf");

Can you specify what files and where to put this code into them? I'm not sure what you mean by "config chars files".

emaner commented 4 years ago

u need puth this scripts into config chars files D2Bot.printToConsole("I'm the leader, changed script."); OnOff.enable("Config.MFLeader"); OnOff.enable("Scripts.Andariel"); OnOff.enable("Scripts.Countess"); //OnOff.enable("Scripts.Mausoleum"); //OnOff.enable("Scripts.Pit"); //OnOff.enable("Scripts.AncientTunnels"); OnOff.enable("Scripts.Duriel"); //OnOff.enable("Scripts.Travincal"); OnOff.enable("Scripts.Mephisto"); //OnOff.enable("Scripts.Pindleskin"); //OnOff.enable("Scripts.Eldritch"); //OnOff.enable("Scripts.Nihlathak"); OnOff.enable("Scripts.Diablo"); OnOff.enable("Scripts.Baal"); if ((me.diff === 1 && !this.partyLevel(baalLvlnm)) || (me.diff == 2 && !this.partyLevel(mfLvlhell))) OnOff.disable("Config.Baal.KillBaal"); } else { OnOff.enable("Scripts.MFHelper"); OnOff.enable("Scripts.DiabloHelper"); OnOff.enable("Scripts.BaalHelper"); D2Bot.printToConsole("I'm a follower, changed script."); } OnOff.disable("Scripts.AutoSmurf");

Can you specify what files and where to put this code into them? I'm not sure what you mean by "config chars files".

i also would like to know what file you put this in

emaner commented 4 years ago

Figured it out. If you are using the default autosmurf character files, you need to add the sections of code into them.

so for example. if its a helper instead of mfleader you add these to the config file. So when it tries to toggle from autosmurf to mf mode, it has the settings it needs to run the script.

Scripts.MFHelper = true; // Run the same MF run as the MFLeader. Leader must have Config.MFLeader = true

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. It will clear monsters around chaos entrance and wait for the runner.
    Config.DiabloHelper.SkipIfBaal = false; // End script if there are party members in a Baal run.
    Config.DiabloHelper.OpenSeals = false; // Open seals as the helper
    Config.DiabloHelper.SafePrecast = true; // take random WP to safely precast
    Config.DiabloHelper.SealOrder = ["vizier", "seis", "infector"]; // the order in which to clear the seals. If seals are excluded, they won't be checked unless diablo fails to appear
    Config.DiabloHelper.RecheckSeals = false; // Teleport to each seal and double-check that it was opened and boss was killed if Diablo doesn't appear
Scripts.BaalHelper = true;
    Config.BaalHelper.Wait = 120; // Seconds to wait for a runner to be in Throne
    Config.BaalHelper.KillNihlathak = false; // Kill Nihlathak before going to Throne
    Config.BaalHelper.FastChaos = false; // Kill Diablo before going to Throne
    Config.BaalHelper.DollQuit = false; // End script if Dolls (Undead Soul Killers) are found.
    Config.BaalHelper.KillBaal = true; // Kill Baal. If set to false, you must configure Config.QuitList or the bot will wait indefinitely.
    Config.BaalHelper.SkipTP = false; // Don't wait for a TP, go to WSK3 and wait for someone to go to throne. Anti PK measure. 

for the leader config you add
// Team MF system Config.MFLeader = true; // Set to true if you have one or more MFHelpers. Opens TP and gives commands when doing normal MF runs.

// Boss/area scripts

// *** act 1 ***
Scripts.Corpsefire = false;
    Config.Corpsefire.ClearDen = false;
Scripts.Mausoleum = false;
    Config.Mausoleum.KillBloodRaven = false;
    Config.Mausoleum.ClearCrypt = false;
Scripts.Rakanishu = false;
    Config.Rakanishu.KillGriswold = true;
Scripts.UndergroundPassage = false;
Scripts.Coldcrow = false;
Scripts.Tristram = false;
    Config.Tristram.WalkClear = false; // Disable teleport while clearing to protect leechers
    Config.Tristram.PortalLeech = false; // Set to true to open a portal for leechers.
Scripts.Pit = false;
    Config.Pit.ClearPit1 = true;
Scripts.Treehead = false;
Scripts.Smith = false;
Scripts.BoneAsh = false;
Scripts.Countess = true;
    Config.Countess.KillGhosts = false;
Scripts.Andariel = true;
Scripts.Cows = false;

// *** act 2 ***
Scripts.Radament = false;
Scripts.Coldworm = false;
    Config.Coldworm.KillBeetleburst = false;
    Config.Coldworm.ClearMaggotLair = false; // Clear all 3 levels
Scripts.AncientTunnels = false;
    Config.AncientTunnels.OpenChest = false; // Open special chest in Lost City
    Config.AncientTunnels.KillDarkElder = false;
Scripts.Summoner = false;
    Config.Summoner.FireEye = false;
Scripts.Tombs = false;
Scripts.Duriel = true;

// *** act 3 ***
Scripts.Stormtree = false;
Scripts.KurastTemples = false;
Scripts.Icehawk = false;
Scripts.Endugu = false;
Scripts.Travincal = true;
    Config.Travincal.PortalLeech = false; // Set to true to open a portal for leechers.
Scripts.Mephisto = true;
    Config.Mephisto.MoatTrick = false;
    Config.Mephisto.KillCouncil = false;
    Config.Mephisto.TakeRedPortal = true;

// *** act 4 ***
Scripts.OuterSteppes = false;
Scripts.Izual = false;
Scripts.Hephasto = false;
    Config.Hephasto.ClearRiver = false; // Clear river after killing Hephasto
    Config.Hephasto.ClearType = 0xF; // 0xF = skip normal, 0x7 = champions/bosses, 0 = all
Scripts.Vizier = false; // Intended for classic sorc, kills Vizier only.
Scripts.FastDiablo = false;
Scripts.Diablo = true;
    Config.Diablo.WalkClear = false; // Disable teleport while clearing to protect leechers
    Config.Diablo.Entrance = true; // Start from entrance
    Config.Diablo.SealWarning = "Leave the seals alone!";
    Config.Diablo.EntranceTP = "Entrance TP up";
    Config.Diablo.StarTP = "Star TP up";
    Config.Diablo.DiabloMsg = "Diablo";
    Config.Diablo.SealOrder = ["vizier", "seis", "infector"]; // the order in which to clear the seals. If seals are excluded, they won't be checked unless diablo fails to appear
Scripts.SealLeader = false; // Clear a safe spot around seals and invite leechers in. Leechers should run SealLeecher script. Don't run with Diablo or FastDiablo.

// *** act 5 ***
Scripts.Pindleskin = true;
    Config.Pindleskin.UseWaypoint = false;
    Config.Pindleskin.KillNihlathak = true;
    Config.Pindleskin.ViperQuit = false; // End script if Tomb Vipers are found.
Scripts.Nihlathak = false;
    Config.Nihlathak.ViperQuit = false; // End script if Tomb Vipers are found.
Scripts.Eldritch = true;
    Config.Eldritch.OpenChest = true;
    Config.Eldritch.KillShenk = true;
    Config.Eldritch.KillDacFarren = true;
Scripts.Eyeback = false;
Scripts.SharpTooth = false;
Scripts.ThreshSocket = false;
Scripts.Abaddon = false;
Scripts.Frozenstein = false;
    Config.Frozenstein.ClearFrozenRiver = true;
Scripts.Bonesaw = false;
    Config.Bonesaw.ClearDrifterCavern = false;
Scripts.Snapchip = false;
    Config.Snapchip.ClearIcyCellar = true;
Scripts.Worldstone = false;
Scripts.Baal = true;
    Config.Baal.HotTPMessage = "Hot TP!";
    Config.Baal.SafeTPMessage = "Safe TP!";
    Config.Baal.BaalMessage = "Baal!";
    Config.Baal.SoulQuit = false; // End script if Souls (Burning Souls) are found.
    Config.Baal.DollQuit = false; // End script if Dolls (Undead Soul Killers) are found.
    Config.Baal.KillBaal = false; // Kill Baal. Leaves game after wave 5 if false.
Marcelpro88 commented 3 years ago

Saved my day... Thx I just wonder why the "standard" config isn't set so for the download file...