kolton / d2bot-with-kolbot

d2bot game manager by D3STROY3R with kolbot libs by kolton for d2bs
345 stars 332 forks source link

I need skip this location,how i can do it #286

Open ImBoluo opened 7 years ago

ImBoluo commented 7 years ago

123

how click the OK ? or ESC ? I have no ideal

ImBoluo commented 7 years ago

function main() { debugLog(me.profile); addEventListener('copydata', ReceiveCopyData); addEventListener('scriptmsg', ScriptMsgEvent);

while (!handle) {
    delay(100);
}

DataFile.updateStats("handle", handle);
D2Bot.init();
load("tools/heartbeat.js");

while (!gameInfo) {
    D2Bot.requestGameInfo();
    delay(500);
}

if (gameInfo.error) {
    //D2Bot.retrieve();
    delay(200);

    if (!!DataFile.getStats().debugInfo) {
        gameInfo.crashInfo = DataFile.getStats().debugInfo;

        D2Bot.printToConsole("Crash Info: Script: " + JSON.parse(gameInfo.crashInfo).currScript + " Area: " + JSON.parse(gameInfo.crashInfo).area, 10);
    }

    /*if (gameInfo.crashInfo) {
        D2Bot.printToConsole("Crash Info: Script: " + gameInfo.crashInfo.currScript + " Area: " + gameInfo.crashInfo.area + (gameInfo.crashInfo.hasOwnProperty("lastAction") ? " " + gameInfo.crashInfo.lastAction : ""), 10);
    }*/

    ControlAction.timeoutDelay("Crash Delay", StarterConfig.CrashDelay * 1e3);
    D2Bot.updateRuns();
}

//D2Bot.store(JSON.stringify({currScript: "none", area: "out of game"}));
DataFile.updateStats("debugInfo", JSON.stringify({currScript: "none", area: "out of game"}));

while (true) {
    while (me.ingame) { // returns true before actually in game so we can't only use this check
        if (me.gameReady) { // returns false when switching acts so we can't use while
            if (!ingame) {
                print("c4Updating Status");
                //D2Bot.updateStatus("Game: " + me.gamename);

                lastGameStatus = "ingame";
                ingame = true;
                gameStart = getTickCount();

                DataFile.updateStats("runs", gameCount);
            }

            D2Bot.updateStatus("Game: " + me.gamename + timer(gameStart));

            //********************************************add some code in this line? how ?what?

        }
                 //***********************************
        delay(1000);
    }

    locationAction();
    delay(1000);
}

}

yharahuts commented 7 years ago

By me, the easiest way is to add new script to char config after baal, which will check baal quest status and restarts profile if quest was just finished.

ImBoluo commented 7 years ago

thanks for you help, this Rushee.js, I add some new script like this

Scripts.Rusher = false; // Rush bot. For a list of commands, see Rusher.js Config.Rusher.WaitPlayerCount = 0; // Wait until game has a certain number of players (0 - don't wait, 8 - wait for full game). Config.Rusher.Radament = false; // Do Radament quest. Config.Rusher.LamEsen = false; // Do Lam Esen quest. Config.Rusher.Izual = false; // Do Izual quest. Config.Rusher.Shenk = false; // Do Shenk quest. Config.Rusher.Anya = false; // Do Anya quest. Config.Rusher.LastRun = "diablo"; // End rush after this run. List of runs: http://pastebin.com/Uez3nZ6g Scripts.Rushee = true; // Automatic rushee, works with Rusher. Set Rusher's character name as Config.Leader Config.Rushee.Quester = true; // Enter portals and get quest items. Config.Rushee.Bumper = false; // Do Ancients and Baal. Minimum levels: 20 - norm, 40 - nightmare

    Scripts.Izual = false;//**************************2017916

but finished the diablo,…… and so on, that is no work

can you test it ? thanks very much anyway

ImBoluo commented 7 years ago

OK I add a new fanction like this D2bot.restart(); and some other ……in this,this problem solved thanks all