kolton / d2bot-with-kolbot

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

mf helpers dont party with leader leader invites #1227

Open lew130 opened 5 years ago

lew130 commented 5 years ago

leader makes game throws up portals invites other in game but they dont party after they are invited

ghost commented 5 years ago

Did you edit the Party script for helpers

lew130 commented 5 years ago

config.publicmode is set to 2

On Wed, Feb 13, 2019 at 7:41 AM drogga notifications@github.com wrote:

Did you edit the Party script for helpers

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kolton/d2bot-with-kolbot/issues/1227#issuecomment-463224085, or mute the thread https://github.com/notifications/unsubscribe-auth/AJvPA_J7ZiseUGQwuyMhA2oi8k2IwyEfks5vNCQzgaJpZM4a5iNc .

ghost commented 5 years ago

Please post Character Configs on pastebin and post the link

DarkHorseDre commented 5 years ago

set public mode correctly for both (better to have leader as invite, follower as accept only, to ensure it all works correctly)

set config.leader to leader name, case sensitive

edit follower and leader entry files (although if theyre all in the same game then this is working correctly) https://github.com/kolton/d2bot-with-kolbot/wiki/Kolbot-Leecher-Starter

lew130 commented 5 years ago

well i set the 2 followers to 1 and now they party but i have mf follow set but they dont join in and help they just sit there for a while then leave

DarkHorseDre commented 5 years ago

They're not finding the leader.

leader should run mfleader = true followers run mfhelper = true config.leader has to be correct for all this to work

show the console of the followers and ensure they're running mfhelper (written in yellow) when they start the game.

if you cant get it working after reading the guide I linked, paste your follower and leader configs separately to pastebin and link here

lew130 commented 5 years ago

09:06:29 (single2) Error in MFHelper (mfhelper.js #153) MFHelper: Leader not partied (Area: 109, Ping:78, Game: ) 09:06:59 (single2) Unhandled location 40 09:07:00 (single2) Restarting single2 is mfhelper he does party and then gets the unhandled location error is this possibly a problem because the leader hosts ip game and the helpers join an ip game all on 1 computer

lew130 commented 5 years ago

var StarterConfig = { MinGameTime: 120, // Minimum game length in seconds. If a game is ended too soon, the rest of the time is waited in the lobby PingQuitDelay: 30, // Time in seconds to wait in lobby after quitting due to high ping CreateGameDelay: 10, // Seconds to wait before creating a new game ResetCount: 999, // Reset game count back to 1 every X games. CharacterDifference: 99, // Character level difference. Set to false to disable character difference. ChatActionsDelay: 2, // Seconds to wait in lobby before entering a channel

// ChannelConfig can override these options for individual profiles.
JoinChannel: "chan1", // Default channel. Can be an array of channels - ["channel 1", "channel 2"]
FirstJoinMessage: "come join", // Default join message. Can be an array of messages
AnnounceGames: true, // Default value
AfterGameMessage: "its over", // Default message after a finished game. Can be an array of messages

SwitchKeyDelay: 5, // Seconds to wait before switching a used/banned key or after realm down
CrashDelay: 5, // Seconds to wait after a d2 window crash
FTJDelay: 10, // Seconds to wait after failing to create a game
RealmDownDelay: 3, // Minutes to wait after getting Realm Down message
UnableToConnectDelay: 5, // Minutes to wait after Unable To Connect message
CDKeyInUseDelay: 5, // Minutes to wait before connecting again if CD-Key is in use.
ConnectingTimeout: 20, // Seconds to wait before cancelling the 'Connecting...' screen
PleaseWaitTimeout: 10, // Seconds to wait before cancelling the 'Please Wait...' screen
WaitInLineTimeout: 60, // Seconds to wait before cancelling the 'Waiting in Line...' screen
GameDoesNotExistTimeout: 30 // Seconds to wait before cancelling the 'Game does not exist.' screen

};

var ChannelConfig = { /* Override default values for JoinChannel, FirstJoinMessage, AnnounceGames and AfterGameMessage per profile It's possible to override any number of these options (you don't have to put all of them)

    **** DO NOT EDIT ANYTHING INSIDE THIS COMMENT BLOCK ***

    Format:

    "Profile Name": {
        JoinChannel: "channel name", -OR- ["channel 1", "channel 2"],
        FirstJoinMessage: "first message", -OR- ["join msg 1", "join msg 2"],
        AnnounceGames: true,
        AfterGameMessage: "message after a finished run" -OR- ["msg 1", msg 2"]
    }

    Multiple entries are separated by a comma

    Examples:

    "Profile 1": {
        JoinChannel: "my channel",
        FirstJoinMessage: ".login",
        AnnounceGames: true,
        AfterGameMessage: "follow my runs or die"
    },
    "Profile 2": {
        JoinChannel: ["channel 1", "channel 2"],
        FirstJoinMessage: [".login", "^login"],
        AfterGameMessage: ["follow my runs or die", "seriously, you'll die"]
    }
*/

// Add your lines here

};

// No touchy! include("json2.js"); include("OOG.js"); include("automule.js"); include("gambling.js"); include("craftingsystem.js"); include("torchsystem.js"); include("common/misc.js");

if (!FileTools.exists("data/" + me.profile + ".json")) { DataFile.create(); }

var gameInfo, gameStart, ingame, chatActionsDone, pingQuit, handle, useChat, firstLogin, connectFail, gameCount = DataFile.getStats().runs + 1, lastGameStatus = "ready", isUp = "no", chanInfo = { joinChannel: "", firstMsg: "", afterMsg: "", announce: false };

function sayMsg(string) { if (!useChat) { return; }

say(string);

}

function ReceiveCopyData(mode, msg) { var obj;

switch (msg) {
case "Handle":
    handle = mode;

    break;
}

switch (mode) {
case 2: // Game info
    print("Recieved Game Info");

    gameInfo = JSON.parse(msg);

    break;
case 3: // Game request
    // Don't let others join mule/torch/key/gold drop game
    if (AutoMule.inGame || Gambling.inGame || TorchSystem.inGame || CraftingSystem.inGame) {
        break;
    }

    if (gameInfo) {
        obj = JSON.parse(msg);

        if (me.gameReady) {
            D2Bot.joinMe(obj.profile, me.gamename.toLowerCase(), "", me.gamepassword.toLowerCase(), isUp);
        } else {
            D2Bot.joinMe(obj.profile, gameInfo.gameName.toLowerCase(), gameCount, gameInfo.gamePass.toLowerCase(), isUp);
        }
    }

    break;
case 4: // Heartbeat ping
    if (msg === "pingreq") {
        sendCopyData(null, me.windowtitle, 4, "pingrep");
    }

    break;
case 0xf124: // Cached info retreival
    if (msg !== "null") {
        gameInfo.crashInfo = JSON.parse(msg);
    }

    break;
}

}

function setNextGame() { var nextGame = gameInfo.gameName;

if (StarterConfig.ResetCount && gameCount + 1 >= StarterConfig.ResetCount) {
    nextGame += 1;
} else {
    nextGame += (gameCount + 1);
}

DataFile.updateStats("nextGame", nextGame);

}

function locationTimeout(time, location) { var endtime = getTickCount() + time;

while (getLocation() === location && endtime > getTickCount()) {
    delay(500);
}

return (getLocation() !== location);

}

function updateCount() { D2Bot.updateCount(); delay(1000); ControlAction.click(6, 264, 366, 272, 35);

try {
    login(me.profile);
} catch (e) {

}

delay(1000);
ControlAction.click(6, 33, 572, 128, 35);

}

function ScriptMsgEvent(msg) { switch (msg) { case "mule": AutoMule.check = true;

    break;
case "muleTorch":
    AutoMule.torchAnniCheck = 1;

    break;
case "muleAnni":
    AutoMule.torchAnniCheck = 2;

    break;
case "torch":
    TorchSystem.check = true;

    break;
case "crafting":
    CraftingSystem.check = true;

    break;
case "getMuleMode":
    if (AutoMule.torchAnniCheck === 2) {
        scriptBroadcast("2");
    } else if (AutoMule.torchAnniCheck === 1) {
        scriptBroadcast("1");
    } else if (AutoMule.check) {
        scriptBroadcast("0");
    }

    break;
case "pingquit":
    pingQuit = true;

    break;
}

}

function timer(tick) { if (!tick) { return ""; }

var min, sec;

min = Math.floor((getTickCount() - tick) / 60000).toString();

if (min <= 9) {
    min = "0" + min;
}

sec = (Math.floor((getTickCount() - tick) / 1000) % 60).toString();

if (sec <= 9) {
    sec = "0" + sec;
}

return " (" + min + ":" + sec + ")";

}

function randomString(len, useNumbers = false) { var i, rval = "", letters = useNumbers ? "abcdefghijklmnopqrstuvwxyz0123456789" : "abcdefghijklmnopqrstuvwxyz";

len = len ? len : rand(5, 14);

for (i = 0; i < len; i += 1) {
    rval += letters[rand(0, letters.length - 1)];
}

return rval;

}

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

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

DataFile.updateStats("handle", handle);
delay(500);
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
            isUp = "yes";

            if (!ingame) {
                gameStart = getTickCount();

                print("Updating Status");
                //D2Bot.updateStatus("Game: " + me.gamename);

                lastGameStatus = "ingame";
                ingame = true;

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

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

        delay(1000);
    }

    isUp = "no";

    locationAction(getLocation());
    delay(1000);
}

}

function locationAction(location) { var i, control, string, text;

MainSwitch: switch (location) { case 0: break; case 1: // Lobby D2Bot.updateStatus("Lobby");

    if (!firstLogin) {
        firstLogin = true;
    }

    if (lastGameStatus === "pending") {
        gameCount += 1;
    }

    if (StarterConfig.PingQuitDelay && pingQuit) {
        ControlAction.timeoutDelay("Ping Delay", StarterConfig.PingQuitDelay * 1e3);

        pingQuit = false;
    }

    if (StarterConfig.JoinChannel !== "" || (ChannelConfig[me.profile] && ChannelConfig[me.profile].JoinChannel !== "")) {
        ControlAction.click(6, 27, 480, 120, 20);

        break;
    }

    if (ingame || gameInfo.error) {
        if (!gameStart) {
            gameStart = DataFile.getStats().ingameTick;
        }

        if (getTickCount() - gameStart < StarterConfig.MinGameTime * 1e3) {
            ControlAction.timeoutDelay("Min game time wait", StarterConfig.MinGameTime * 1e3 + gameStart - getTickCount());
        }
    }

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

        if (AutoMule.outOfGameCheck() || TorchSystem.outOfGameCheck() || Gambling.outOfGameCheck() || CraftingSystem.outOfGameCheck()) {
            break;
        }

        print("updating runs");
        D2Bot.updateRuns();

        gameCount += 1;
        lastGameStatus = "ready";
        ingame = false;

        if (StarterConfig.ResetCount && gameCount >= StarterConfig.ResetCount) {
            gameCount = 1;

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

    if (!ControlAction.click(6, 533, 469, 120, 20)) { // Create
        break;
    }

    if (!locationTimeout(5000, location)) { // in case create button gets bugged
        if (!ControlAction.click(6, 652, 469, 120, 20)) { // Join
            break;
        }

        if (!ControlAction.click(6, 533, 469, 120, 20)) { // Create
            break;
        }
    }

    break;
case 2: // Waiting In Line
    D2Bot.updateStatus("Waiting...");
    locationTimeout(StarterConfig.WaitInLineTimeout * 1e3, location);
    ControlAction.click(6, 433, 433, 96, 32);

    break;
case 3: // Lobby Chat
    D2Bot.updateStatus("Lobby Chat");

    if (lastGameStatus === "pending") {
        gameCount += 1;
    }

    if (ingame || gameInfo.error) {
        if (!gameStart) {
            gameStart = DataFile.getStats().ingameTick;
        }

        if (getTickCount() - gameStart < StarterConfig.MinGameTime * 1e3) {
            ControlAction.timeoutDelay("Min game time wait", StarterConfig.MinGameTime * 1e3 + gameStart - getTickCount());
        }
    }

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

        if (AutoMule.outOfGameCheck() || TorchSystem.outOfGameCheck() || Gambling.outOfGameCheck() || CraftingSystem.outOfGameCheck()) {
            break;
        }

        print("updating runs");
        D2Bot.updateRuns();

        gameCount += 1;
        lastGameStatus = "ready";
        ingame = false;

        if (StarterConfig.ResetCount && gameCount >= StarterConfig.ResetCount) {
            gameCount = 1;

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

        if (ChannelConfig[me.profile] && ChannelConfig[me.profile].hasOwnProperty("AfterGameMessage")) {
            chanInfo.afterMsg = ChannelConfig[me.profile].AfterGameMessage;
        } else {
            chanInfo.afterMsg = StarterConfig.AfterGameMessage;
        }

        if (chanInfo.afterMsg) {
            if (typeof chanInfo.afterMsg === "string") {
                chanInfo.afterMsg = [chanInfo.afterMsg];
            }

            for (i = 0; i < chanInfo.afterMsg.length; i += 1) {
                sayMsg(chanInfo.afterMsg[i]);
                delay(500);
            }
        }
    }

    if (!chatActionsDone) {
        chatActionsDone = true;

        if (ChannelConfig[me.profile] && ChannelConfig[me.profile].hasOwnProperty("JoinChannel")) {
            chanInfo.joinChannel = ChannelConfig[me.profile].JoinChannel;
        } else {
            chanInfo.joinChannel = StarterConfig.JoinChannel;
        }

        if (ChannelConfig[me.profile] && ChannelConfig[me.profile].hasOwnProperty("FirstJoinMessage")) {
            chanInfo.firstMsg = ChannelConfig[me.profile].FirstJoinMessage;
        } else {
            chanInfo.firstMsg = StarterConfig.FirstJoinMessage;
        }

        if (chanInfo.joinChannel) {
            if (typeof chanInfo.joinChannel === "string") {
                chanInfo.joinChannel = [chanInfo.joinChannel];
            }

            if (typeof chanInfo.firstMsg === "string") {
                chanInfo.firstMsg = [chanInfo.firstMsg];
            }

            for (i = 0; i < chanInfo.joinChannel.length; i += 1) {
                ControlAction.timeoutDelay("Chat delay", StarterConfig.ChatActionsDelay * 1e3);

                if (ControlAction.joinChannel(chanInfo.joinChannel[i])) {
                    useChat = true;
                } else {
                    print("ÿc1Unable to join channel, disabling chat messages.");

                    useChat = false;
                }

                if (chanInfo.firstMsg[i] !== "") {
                    sayMsg(chanInfo.firstMsg[i]);
                    delay(500);
                }
            }
        }
    }

    // Announce game
    if (ChannelConfig[me.profile] && ChannelConfig[me.profile].hasOwnProperty("AnnounceGames")) {
        chanInfo.announce = ChannelConfig[me.profile].AnnounceGames;
    } else {
        chanInfo.announce = StarterConfig.AnnounceGames;
    }

    if (chanInfo.announce) {
        sayMsg("Next game is " + gameInfo.gameName + gameCount + (gameInfo.gamePass === "" ? "" : "//" + gameInfo.gamePass));
    }

    if (!ControlAction.click(6, 533, 469, 120, 20)) { // Create
        break;
    }

    if (!locationTimeout(5000, location)) { // in case create button gets bugged
        if (!ControlAction.click(6, 652, 469, 120, 20)) { // Join
            break;
        }

        if (!ControlAction.click(6, 533, 469, 120, 20)) { // Create
            break;
        }
    }

    break;
case 4: // Create Game
    D2Bot.updateStatus("Creating Game");

    control = getControl(1, 657, 342, 27, 20);

    // Set character difference
    if (typeof StarterConfig.CharacterDifference === "number") {
        if (control.disabled === 4) {
            ControlAction.click(6, 431, 341, 15, 16);
        }

        ControlAction.setText(1, 657, 342, 27, 20, StarterConfig.CharacterDifference.toString());
    } else if (StarterConfig.CharacterDifference === false && control.disabled === 5) {
        ControlAction.click(6, 431, 341, 15, 16);
    }

    // Get game name if there is none
    while (!gameInfo.gameName) {
        D2Bot.requestGameInfo();
        delay(500);
    }

    // FTJ handler
    if (lastGameStatus === "pending") {
        isUp = "no";

        D2Bot.printToConsole("Failed to create game");
        ControlAction.timeoutDelay("FTJ delay", StarterConfig.FTJDelay * 1e3);
        D2Bot.updateRuns();
    }

    ControlAction.createGame((gameInfo.gameName === "?" ? randomString(null,true) : gameInfo.gameName + gameCount), (gameInfo.gamePass === "?" ? randomString(null,true) : gameInfo.gamePass), gameInfo.difficulty, StarterConfig.CreateGameDelay * 1000);

    lastGameStatus = "pending";

    setNextGame();
    locationTimeout(10000, location);

    break;
case 5: // Join Game
    break;
case 6: // Ladder
    break;
case 7: // Channel List
    break;
case 8: // Main Menu
case 9: // Login
case 12: // Character Select
case 18: // D2 Splash
    // Single Player screen fix
    if (getLocation() === 12 && !getControl(4, 626, 100, 151, 44)) {
        ControlAction.click(6, 33, 572, 128, 35);

        break;
    }

    if (firstLogin && getLocation() === 9) { // multiple realm botting fix in case of R/D or disconnect
        ControlAction.click(6, 33, 572, 128, 35);
    }

    D2Bot.updateStatus("Logging In");

    try {
        login(me.profile);
    } catch (e) {
        print(e + " " + getLocation());
    }

    break;
case 10: // Login Error
    string = "";
    text = ControlAction.getText(4, 199, 377, 402, 140);

    if (text) {
        for (i = 0; i < text.length; i += 1) {
            string += text[i];

            if (i !== text.length - 1) {
                string += " ";
            }
        }

        switch (string) {
        case getLocaleString(5207):
            D2Bot.updateStatus("Invalid Password");
            D2Bot.printToConsole("Invalid Password");

            break;
        case getLocaleString(5208):
            D2Bot.updateStatus("Invalid Account");
            D2Bot.printToConsole("Invalid Account");

            break;
        case getLocaleString(5202): // cd key intended for another product
        case getLocaleString(10915): // lod key intended for another product
            D2Bot.updateStatus("Invalid CDKey");
            D2Bot.printToConsole("Invalid CDKey: " + gameInfo.mpq, 6);
            D2Bot.CDKeyDisabled();

            if (gameInfo.switchKeys) {
                ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
                D2Bot.restart(true);
            } else {
                D2Bot.stop();
            }

            break;
        case getLocaleString(5199):
            D2Bot.updateStatus("Disabled CDKey");
            D2Bot.printToConsole("Disabled CDKey: " + gameInfo.mpq, 6);
            D2Bot.CDKeyDisabled();

            if (gameInfo.switchKeys) {
                ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
                D2Bot.restart(true);
            } else {
                D2Bot.stop();
            }

            break;
        case getLocaleString(10913):
            D2Bot.updateStatus("Disabled LoD CDKey");
            D2Bot.printToConsole("Disabled LoD CDKey: " + gameInfo.mpq, 6);
            D2Bot.CDKeyDisabled();

            if (gameInfo.switchKeys) {
                ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
                D2Bot.restart(true);
            } else {
                D2Bot.stop();
            }

            break;
        case getLocaleString(5347):
            D2Bot.updateStatus("Disconnected");
            D2Bot.printToConsole("Disconnected");
            ControlAction.click(6, 335, 412, 128, 35);

            break MainSwitch;
        default:
            D2Bot.updateStatus("Login Error");
            D2Bot.printToConsole("Login Error - " + string);

            if (gameInfo.switchKeys) {
                ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
                D2Bot.restart(true);
            } else {
                D2Bot.stop();
            }

            break;
        }
    }

    ControlAction.click(6, 335, 412, 128, 35);

    while (true) {
        delay(1000);
    }

    break;
case 11: // Unable To Connect
    D2Bot.updateStatus("Unable To Connect");

    if (connectFail) {
        ControlAction.timeoutDelay("Unable to Connect", StarterConfig.UnableToConnectDelay * 6e4);

        connectFail = false;
    }

    if (!ControlAction.click(6, 335, 450, 128, 35)) {
        break;
    }

    connectFail = true;

    break;
case 13: // Realm Down - Character Select screen
    D2Bot.updateStatus("Realm Down");
    delay(1000);

    if (!ControlAction.click(6, 33, 572, 128, 35)) {
        break;
    }

    updateCount();
    ControlAction.timeoutDelay("Realm Down", StarterConfig.RealmDownDelay * 6e4);
    D2Bot.CDKeyRD();

    if (gameInfo.switchKeys && !gameInfo.rdBlocker) {
        D2Bot.printToConsole("Realm Down - Changing CD-Key");
        ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
        D2Bot.restart(true);
    } else {
        D2Bot.printToConsole("Realm Down - Restart");
        D2Bot.restart();
    }

    break;
case 14: // Character Select / Main Menu - Disconnected
    D2Bot.updateStatus("Disconnected");
    delay(500);
    ControlAction.click(6, 351, 337, 96, 32);

    break;
case 16: // Character Select - Please Wait popup
    if (!locationTimeout(StarterConfig.PleaseWaitTimeout * 1e3, location)) {
        ControlAction.click(6, 351, 337, 96, 32);
    }

    break;
case 17: // Lobby - Lost Connection - just click okay, since we're toast anyway
    delay(1000);
    ControlAction.click(6, 351, 337, 96, 32);

    break;
case 19: // Login - Cdkey In Use
    D2Bot.printToConsole(gameInfo.mpq + " is in use by " + ControlAction.getText(4, 158, 310, 485, 40), 6);
    D2Bot.CDKeyInUse();

    if (gameInfo.switchKeys) {
        ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
        D2Bot.restart(true);
    } else {
        ControlAction.click(6, 335, 450, 128, 35);
        ControlAction.timeoutDelay("CD-Key in use", StarterConfig.CDKeyInUseDelay * 6e4);
    }

    break;
case 20: // Single Player - Select Difficulty
    break;
case 21: // Main Menu - Connecting
    if (!locationTimeout(StarterConfig.ConnectingTimeout * 1e3, location)) {
        ControlAction.click(6, 330, 416, 128, 35);
    }

    break;
case 22: // Login - Invalid Cdkey (classic or xpac)
    text = ControlAction.getText(4, 162, 270, 477, 50);
    string = "";

    if (text) {
        for (i = 0; i < text.length; i += 1) {
            string += text[i];

            if (i !== text.length - 1) {
                string += " ";
            }
        }
    }

    switch (string) {
    case getLocaleString(10914):
        D2Bot.printToConsole(gameInfo.mpq + " LoD key in use by " + ControlAction.getText(4, 158, 310, 485, 40), 6);
        D2Bot.CDKeyInUse();

        if (gameInfo.switchKeys) {
            ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
            D2Bot.restart(true);
        } else {
            ControlAction.click(6, 335, 450, 128, 35);
            ControlAction.timeoutDelay("LoD key in use", StarterConfig.CDKeyInUseDelay * 6e4);
        }

        break;
    default:
        if (gameInfo.switchKeys) {
            D2Bot.printToConsole("Invalid CD-Key");
            ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
            D2Bot.restart(true);
        } else {
            ControlAction.click(6, 335, 450, 128, 35);
            ControlAction.timeoutDelay("Invalid CD-Key", StarterConfig.CDKeyInUseDelay * 6e4);
        }

        break;
    }

    break;
case 23: // Character Select - Connecting
case 42: // Empty character screen
    string = "";
    text = ControlAction.getText(4, 45, 318, 531, 140);

    if (text) {
        for (i = 0; i < text.length; i += 1) {
            string += text[i];

            if (i !== text.length - 1) {
                string += " ";
            }
        }

        if (string === getLocaleString(11161)) { // CDKey disabled from realm play
            D2Bot.updateStatus("Realm Disabled CDKey");
            D2Bot.printToConsole("Realm Disabled CDKey: " + gameInfo.mpq, 6);
            D2Bot.CDKeyDisabled();

            if (gameInfo.switchKeys) {
                ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
                D2Bot.restart(true);
            } else {
                D2Bot.stop();
            }
        }
    }

    if (!locationTimeout(StarterConfig.ConnectingTimeout * 1e3, location)) {
        ControlAction.click(6, 33, 572, 128, 35);

        if (gameInfo.rdBlocker) {
            D2Bot.restart();
        }
    }

    break;
case 24: // Server Down - not much to do but wait..
    break;
case 25: // Lobby - Please Wait
    if (!locationTimeout(StarterConfig.PleaseWaitTimeout * 1e3, location)) {
        ControlAction.click(6, 351, 337, 96, 32);
    }

    break;
case 26: // Lobby - Game Name Exists
    ControlAction.click(6, 533, 469, 120, 20);

    gameCount += 1;
    lastGameStatus = "ready";

    break;
case 27: // Gateway Select
    ControlAction.click(6, 436, 538, 96, 32);

    break;
case 28: // Lobby - Game Does Not Exist
    D2Bot.printToConsole("Game doesn't exist");

    if (gameInfo.rdBlocker) {
        D2Bot.printToConsole(gameInfo.mpq + " is probably flagged.", 6);

        if (gameInfo.switchKeys) {
            ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
            D2Bot.restart(true);
        }
    } else {
        locationTimeout(StarterConfig.GameDoesNotExistTimeout * 1e3, location);
    }

    lastGameStatus = "ready";

    break;
case 38: // Game is full
    // doesn't happen when making
    break;
default:
    if (location !== undefined) {
        D2Bot.printToConsole("Unhandled location " + location);
        //takeScreenshot();
        delay(500);
        D2Bot.restart();
    }

    break;
}

} this is leader d2botlead

lew130 commented 5 years ago

this is d2botfollow var StarterConfig = { JoinChannel: "chan1", // Name of the channel to join FirstJoinMessage: "", // Message to say when first joining a channel, usually ".login" ChatActionsDelay: 2, // Seconds to wait in lobby before entering a channel

JoinRetryDelay: 5, // Time in seconds to wait before next join attempt
SwitchKeyDelay: 5, // Seconds to wait before switching a used/banned key or after realm down

CrashDelay: 5, // Seconds to wait after a d2 window crash
RealmDownDelay: 3, // Minutes to wait after getting Realm Down message
UnableToConnectDelay: 5, // Minutes to wait after Unable To Connect message
CDKeyInUseDelay: 5, // Minutes to wait before connecting again if CD-Key is in use. SwitchKeys overrides this!
ConnectingTimeout: 20, // Seconds to wait before cancelling the 'Connecting...' screen
PleaseWaitTimeout: 30, // Seconds to wait before cancelling the 'Please Wait...' screen
WaitInLineTimeout: 60, // Seconds to wait before cancelling the 'Waiting in Line...' screen
GameDoesNotExistTimeout: 30 // Seconds to wait before cancelling the 'Game does not exist.' screen

};

/ Join game settings Format: "bot1": ["bot2"] If you want everyone to join the same leader, use "leader's profile": ["all"] NOTE: Use PROFILE names (profile matches window title), NOT character/account names leader:leecher groups need to be divided by a comma example: var JoinSettings = { "lead1": ["follow1", "follow2"], "lead2": ["follow3", "follow4"] }; /

var JoinSettings = { "single1": ["single2", "bobarb"] }; // Advanced config - you don't have to edit this unless you need some of the features provided var AdvancedConfig = { /* Features: Override join delay for each profile

* Format *:
    "Profile Name": {JoinDelay: number_of_seconds}

* Example * (don't edit this - it's just an example):
    "MyProfile1": {JoinDelay: 3},
    "MyProfile2": {JoinDelay: 6}
*/

// Put your lines under this one. Multiple entries are separated by commas. No comma after the last one.

};

// No touchy! include("json2.js"); include("OOG.js"); include("automule.js"); include("gambling.js"); include("craftingsystem.js"); include("torchsystem.js"); include("common/misc.js");

var i, j, gameInfo, joinInfo, gameStart, ingame, handle, firstLogin, chatActionsDone, lastGameTick, connectFail, gameCount = DataFile.getStats().runs + 1, lastGameStatus = "ready", leader = "", lastGame = [];

if (!FileTools.exists("data/" + me.profile + ".json")) { DataFile.create(); }

function locationTimeout (time, location) { var endtime = getTickCount() + time;

while (!me.ingame && getLocation() === location && endtime > getTickCount()) {
    delay(500);
}

return (getLocation() !== location);

}

function updateCount () { D2Bot.updateCount(); delay(1000); ControlAction.click(6, 264, 366, 272, 35);

try {
    login(me.profile);
} catch (e) {

}

delay(1000);
ControlAction.click(6, 33, 572, 128, 35);

}

function ScriptMsgEvent (msg) { switch (msg) { case "mule": AutoMule.check = true;

    break;
case "muleTorch":
    AutoMule.torchCheck = true;

    break;
case "torch":
    TorchSystem.check = true;

    break;
case "crafting":
    CraftingSystem.check = true;

    break;
case "getMuleMode":
    if (AutoMule.torchAnniCheck === 2) {
        scriptBroadcast("2");
    } else if (AutoMule.torchAnniCheck === 1) {
        scriptBroadcast("1");
    } else if (AutoMule.check) {
        scriptBroadcast("0");
    }

    break;
}

}

function ReceiveCopyData (mode, msg) { var obj;

switch (msg) {
case "Handle":
    handle = mode;

    break;
}

switch (mode) {
case 1: // JoinInfo
    //print("Got Join Info");

    joinInfo = JSON.parse(msg);

    break;
case 2: // Game info
    print("Recieved Game Info");

    gameInfo = JSON.parse(msg);

    break;
case 3: // Game request
    // Don't let others join mule/torch/key/gold drop game
    if (AutoMule.inGame || Gambling.inGame || TorchSystem.inGame || CraftingSystem.inGame) {
        break;
    }

    if (gameInfo) {
        obj = JSON.parse(msg);

        D2Bot.joinMe(obj.profile, me.gamename || "", "", me.gamepassword || "", me.gameReady ? "yes" : "no");
    }

    break;
case 4:
    // Heartbeat ping
    if (msg === "pingreq") {
        sendCopyData(null, me.windowtitle, 4, "pingrep");
    }

    break;
}

}

function timer (tick) { if (!tick) { return ""; }

var min, sec;

min = Math.floor((getTickCount() - tick) / 60000).toString();

if (min <= 9) {
    min = "0" + min;
}

sec = (Math.floor((getTickCount() - tick) / 1000) % 60).toString();

if (sec <= 9) {
    sec = "0" + sec;
}

return " (" + min + ":" + sec + ")";

}

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));
        }

        delay(1000);
    }

    locationAction();
    delay(1000);
}

}

function joinCheck (leader) { D2Bot.requestGame(leader); delay(500);

//print(leader + " " + joinInfo.inGame + " " + lastGame.toSource() + " " + joinInfo.gameName);

if (!joinInfo.inGame || (lastGame.length && lastGame.indexOf(joinInfo.gameName) === -1)) {
    D2Bot.printToConsole("Game is finished. Stopping join delay.");

    return true;
}

return false;

}

function locationAction () { if (me.ingame) { return; }

var i, string, text, location;

location = getLocation();

MainSwitch: switch (location) { case 0: break; case 1: // Lobby D2Bot.updateStatus("Lobby");

    if (!firstLogin) {
        firstLogin = true;
    }

    if (StarterConfig.JoinChannel !== "") {
        ControlAction.click(6, 27, 480, 120, 20);

        break;
    }

    if (ingame) {
        if (AutoMule.outOfGameCheck() || TorchSystem.outOfGameCheck() || Gambling.outOfGameCheck() || CraftingSystem.outOfGameCheck()) {
            break;
        }

        print("updating runs");
        D2Bot.updateRuns();

        lastGameTick = getTickCount();
        gameCount += 1;
        lastGameStatus = "ready";
        ingame = false;
    }

    if (!ControlAction.click(6, 652, 469, 120, 20)) { // Join
        break;
    }

    if (!locationTimeout(5000, location)) { // in case join button gets bugged
        if (!ControlAction.click(6, 533, 469, 120, 20)) { // Create
            break;
        }

        if (!ControlAction.click(6, 652, 469, 120, 20)) { // Join
            break;
        }
    }

    break;
case 2: // Waiting In Line
    D2Bot.updateStatus("Waiting...");
    locationTimeout(StarterConfig.WaitInLineTimeout * 1e3, location);
    ControlAction.click(6, 433, 433, 96, 32);

    break;
case 3: // Lobby Chat
    D2Bot.updateStatus("Lobby Chat");

    if (ingame) {
        if (AutoMule.outOfGameCheck() || TorchSystem.outOfGameCheck() || Gambling.outOfGameCheck() || CraftingSystem.outOfGameCheck()) {
            break;
        }

        print("updating runs");
        D2Bot.updateRuns();

        lastGameTick = getTickCount();
        gameCount += 1;
        lastGameStatus = "ready";
        ingame = false;
    }

    if (!chatActionsDone) {
        chatActionsDone = true;

        ControlAction.timeoutDelay("Chat delay", StarterConfig.ChatActionsDelay * 1e3);
        say("/j " + StarterConfig.JoinChannel);
        delay(1000);

        if (StarterConfig.FirstJoinMessage !== "") {
            say(StarterConfig.FirstJoinMessage);
            delay(500);
        }
    }

    if (!ControlAction.click(6, 652, 469, 120, 20)) { // Join
        break;
    }

    if (!locationTimeout(5000, location)) { // in case join button gets bugged
        if (!ControlAction.click(6, 533, 469, 120, 20)) { // Create
            break;
        }

        if (!ControlAction.click(6, 652, 469, 120, 20)) { // Join
            break;
        }
    }

    break;
case 4: // Create Game
    break;
case 5: // Join Game
    D2Bot.updateStatus("Join Game");

    if (!leader) {
        leader = [];

        for (i in JoinSettings) {
            if (JoinSettings.hasOwnProperty(i) && typeof i === "string") {
                for (j = 0; j < JoinSettings[i].length; j += 1) {
                    if (JoinSettings[i][j] === me.profile || JoinSettings[i][j] === "all") {
                        leader.push(i);
                    }
                }
            }
        }
    }

    if (!leader || !leader.length) {
        break;
    }

JoinLoop2: for (i = 0; i < 5; i += 1) { for (j = 0; j < leader.length; j += 1) { joinInfo = false;

            D2Bot.requestGame(leader[j]);
            delay(100);

            if (joinInfo && joinInfo.gameName !== "" && (lastGame.indexOf(joinInfo.gameName) === -1 || lastGameStatus === "pending")) {
                ControlAction.setText(1, 606, 148, 155, 20, joinInfo.gamePass);
                ControlAction.setText(1, 432, 148, 155, 20, joinInfo.gameName);

                if (lastGameStatus === "pending" || (gameInfo.error && DataFile.getStats().gameName === joinInfo.gameName)) {
                    D2Bot.printToConsole("Failed to join game");
                    ControlAction.timeoutDelay("Join Delay", StarterConfig.JoinRetryDelay * 1000, joinCheck, leader[j]);
                    D2Bot.updateRuns();
                    D2Bot.requestGame(leader[j]);
                    delay(200);

                    if (!joinInfo.inGame) {
                        lastGameStatus = "ready";

                        break;
                    }
                }

                if (!joinInfo.inGame) {
                    continue;
                }

                // Don't join immediately after previous game to avoid FTJ
                if (getTickCount() - lastGameTick < 5000) {
                    ControlAction.timeoutDelay("Game Delay", (lastGameTick - getTickCount() + 5000));
                }

                print("joining game " + joinInfo.gameName);

                if (typeof AdvancedConfig[me.profile] === "object" && typeof AdvancedConfig[me.profile].JoinDelay === "number") {
                    ControlAction.timeoutDelay("Custom Join Delay", AdvancedConfig[me.profile].JoinDelay * 1e3);
                }

                me.blockMouse = true;

                DataFile.updateStats("gameName", joinInfo.gameName);
                ControlAction.click(6, 594, 433, 172, 32);

                me.blockMouse = false;

                lastGame.push(joinInfo.gameName);

                if (lastGame.length > leader.length) { // Might need a fixed number. Right now it stores 1 game per leader.
                    lastGame.shift();
                }

                lastGameStatus = "pending";

                locationTimeout(15000, location);

                break JoinLoop2;
            }
        }
    }

    break;
case 6: // Ladder
    break;
case 7: // Channel List
    break;
case 8: // Main Menu
case 9: // Login
case 12: // Character Select
case 18: // D2 Splash
    // Single Player screen fix
    if (getLocation() === 12 && !getControl(4, 626, 100, 151, 44)) {
        ControlAction.click(6, 33, 572, 128, 35);

        break;
    }

    if (firstLogin && getLocation() === 9) { // multiple realm botting fix in case of R/D or disconnect
        ControlAction.click(6, 33, 572, 128, 35);
    }

    D2Bot.updateStatus("Logging In");

    try {
        login(me.profile);
    } catch (e) {
        print(e + " " + getLocation());
    }

    break;
case 10: // Login Error
    string = "";
    text = ControlAction.getText(4, 199, 377, 402, 140);

    if (text) {
        for (i = 0; i < text.length; i += 1) {
            string += text[i];

            if (i !== text.length - 1) {
                string += " ";
            }
        }

        switch (string) {
        case getLocaleString(5207):
            D2Bot.updateStatus("Invalid Password");
            D2Bot.printToConsole("Invalid Password");

            break;
        case getLocaleString(5208):
            D2Bot.updateStatus("Invalid Account");
            D2Bot.printToConsole("Invalid Account");

            break;
        case getLocaleString(5202): // cd key intended for another product
        case getLocaleString(10915): // lod key intended for another product
            D2Bot.updateStatus("Invalid CDKey");
            D2Bot.printToConsole("Invalid CDKey: " + gameInfo.mpq, 6);
            D2Bot.CDKeyDisabled();

            if (gameInfo.switchKeys) {
                ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
                D2Bot.restart(true);
            } else {
                D2Bot.stop();
            }

            break;
        case getLocaleString(5199):
            D2Bot.updateStatus("Disabled CDKey");
            D2Bot.printToConsole("Disabled CDKey: " + gameInfo.mpq, 6);
            D2Bot.CDKeyDisabled();

            if (gameInfo.switchKeys) {
                ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
                D2Bot.restart(true);
            } else {
                D2Bot.stop();
            }

            break;
        case getLocaleString(10913):
            D2Bot.updateStatus("Disabled LoD CDKey");
            D2Bot.printToConsole("Disabled LoD CDKey: " + gameInfo.mpq, 6);
            D2Bot.CDKeyDisabled();

            if (gameInfo.switchKeys) {
                ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
                D2Bot.restart(true);
            } else {
                D2Bot.stop();
            }

            break;
        case getLocaleString(5347):
            D2Bot.updateStatus("Disconnected");
            D2Bot.printToConsole("Disconnected");
            ControlAction.click(6, 335, 412, 128, 35);

            break MainSwitch;
        default:
            D2Bot.updateStatus("Login Error");
            D2Bot.printToConsole("Login Error - " + string);

            if (gameInfo.switchKeys) {
                ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
                D2Bot.restart(true);
            } else {
                D2Bot.stop();
            }

            break;
        }
    }

    ControlAction.click(6, 335, 412, 128, 35);

    while (true) {
        delay(1000);
    }

    break;
case 11: // Unable To Connect
    D2Bot.updateStatus("Unable To Connect");

    if (connectFail) {
        ControlAction.timeoutDelay("Unable to Connect", StarterConfig.UnableToConnectDelay * 6e4);

        connectFail = false;
    } else {
        connectFail = true;
    }

    if (!ControlAction.click(6, 335, 450, 128, 35)) {
        break;
    }

    break;
case 13: // Realm Down - Character Select screen
    D2Bot.updateStatus("Realm Down");
    delay(1000);

    if (!ControlAction.click(6, 33, 572, 128, 35)) {
        break;
    }

    updateCount();
    ControlAction.timeoutDelay("Realm Down", StarterConfig.RealmDownDelay * 6e4);
    D2Bot.CDKeyRD();

    if (gameInfo.switchKeys && !gameInfo.rdBlocker) {
        D2Bot.printToConsole("Realm Down - Changing CD-Key");
        ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
        D2Bot.restart(true);
    } else {
        D2Bot.printToConsole("Realm Down - Restart");
        D2Bot.restart();
    }

    break;
case 14: // Character Select - Disconnected
    D2Bot.updateStatus("Disconnected");
    delay(500);
    ControlAction.click(6, 351, 337, 96, 32);

    break;
case 16: // Character Select - Please Wait popup
    if (!locationTimeout(StarterConfig.PleaseWaitTimeout * 1e3, location)) {
        ControlAction.click(6, 351, 337, 96, 32);
    }

    break;
case 17: // Lobby - Lost Connection - just click okay, since we're toast anyway
    delay(1000);
    ControlAction.click(6, 351, 337, 96, 32);

    break;
case 19: // Login - Cdkey In Use
    D2Bot.printToConsole(gameInfo.mpq + " is in use by " + ControlAction.getText(4, 158, 310, 485, 40), 6);
    D2Bot.CDKeyInUse();

    if (gameInfo.switchKeys) {
        ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
        D2Bot.restart(true);
    } else {
        ControlAction.timeoutDelay("CD-Key in use", StarterConfig.CDKeyInUseDelay * 6e4);
        ControlAction.click(6, 335, 450, 128, 35);
    }

    break;
case 20: // Single Player - Select Difficulty
    break;
case 21: // Main Menu - Connecting
    if (!locationTimeout(StarterConfig.ConnectingTimeout * 1e3, location)) {
        ControlAction.click(6, 330, 416, 128, 35);
    }

    break;
case 22: // Login - Invalid Cdkey (classic or xpac)
    text = ControlAction.getText(4, 162, 270, 477, 50);
    string = "";

    if (text) {
        for (i = 0; i < text.length; i += 1) {
            string += text[i];

            if (i !== text.length - 1) {
                string += " ";
            }
        }
    }

    switch (string) {
    case getLocaleString(10914):
        D2Bot.printToConsole(gameInfo.mpq + " LoD key in use by " + ControlAction.getText(4, 158, 310, 485, 40), 6);
        D2Bot.CDKeyInUse();

        if (gameInfo.switchKeys) {
            ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
            D2Bot.restart(true);
        } else {
            ControlAction.click(6, 335, 450, 128, 35);
            ControlAction.timeoutDelay("LoD key in use", StarterConfig.CDKeyInUseDelay * 6e4);
        }

        break;
    default:
        if (gameInfo.switchKeys) {
            D2Bot.printToConsole("Invalid CD-Key");
            ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
            D2Bot.restart(true);
        } else {
            ControlAction.click(6, 335, 450, 128, 35);
            ControlAction.timeoutDelay("Invalid CD-Key", StarterConfig.CDKeyInUseDelay * 6e4);
        }

        break;
    }

    break;
case 23: // Character Select - Connecting
case 42: // Empty character screen
    string = "";
    text = ControlAction.getText(4, 45, 318, 531, 140);

    if (text) {
        for (i = 0; i < text.length; i += 1) {
            string += text[i];

            if (i !== text.length - 1) {
                string += " ";
            }
        }

        if (string === getLocaleString(11161)) { // CDKey disabled from realm play
            D2Bot.updateStatus("Realm Disabled CDKey");
            D2Bot.printToConsole("Realm Disabled CDKey: " + gameInfo.mpq, 6);
            D2Bot.CDKeyDisabled();

            if (gameInfo.switchKeys) {
                ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
                D2Bot.restart(true);
            } else {
                D2Bot.stop();
            }
        }
    }

    if (!locationTimeout(StarterConfig.ConnectingTimeout * 1e3, location)) {
        ControlAction.click(6, 33, 572, 128, 35);

        if (gameInfo.rdBlocker) {
            D2Bot.restart();
        }
    }

    break;
case 24: // Server Down - not much to do but wait..
    break;
case 25: // Lobby - Please Wait
    if (!locationTimeout(StarterConfig.PleaseWaitTimeout * 1e3, location)) {
        ControlAction.click(6, 351, 337, 96, 32);
    }

    break;
case 26: // Lobby - Game Name Exists
    break;
case 27: // Gateway Select
    ControlAction.click(6, 436, 538, 96, 32);

    break;
case 28: // Lobby - Game Does Not Exist
    D2Bot.printToConsole("Game doesn't exist");

    if (gameInfo.rdBlocker) {
        D2Bot.printToConsole(gameInfo.mpq + " is probably flagged.", 6);

        if (gameInfo.switchKeys) {
            ControlAction.timeoutDelay("Key switch delay", StarterConfig.SwitchKeyDelay * 1000);
            D2Bot.restart(true);
        }
    } else {
        locationTimeout(StarterConfig.GameDoesNotExistTimeout * 1e3, location);
    }

    lastGameStatus = "ready";

    break;
case 38: // Game is full
    D2Bot.printToConsole("Game is full");
    ControlAction.click(6, 652, 469, 120, 20);
    lastGame.push(joinInfo.gameName);

    lastGameStatus = "ready";

    break;
default:
    if (location !== undefined) {
        D2Bot.printToConsole("Unhandled location " + location);
        //takeScreenshot();
        delay(500);
        D2Bot.restart();
    }

    break;
}

} thanks

DarkHorseDre commented 5 years ago

Bro I told you to paste the other files to pastebin.com and link here, why did you paste all that to this thread now? its unreadable and clogs up this thread. please edit and replace with links to these files.

Leader not partied

this is the script not recognising the leader by name. the fact it partied and accepted an invite is separate from the follower detecting leader by name.

go through the things I told you - set the leader name correctly and case sensitive you can also set "leadername": ["all"] in d2botfollow.dbj to make it easier

lew130 commented 5 years ago

lol sorry very new to this

lew130 commented 5 years ago

well i got a few things to work sorc enters barb enters pally enters they all bo sorc starts routine and pally follows barb sits in act1 they get to act4 and pally drops any ideas

DarkHorseDre commented 5 years ago

...so youre saying they now party right?

as for pally, bro, you still havent provided link to files or any info.. what does the on-screen console for pally say when he leaves? what does d2bs console say? what scripts is he running (paste a link to config). cmon - every forum is the same: you have to provide info if you want help.

lew130 commented 5 years ago

they party and barb bos then sits on act1wp the pally follows the sorc to do andy and meph then goes to act 4 and leaves 12:07:43 (single2) Unhandled location 40 12:07:43 (single2) Restarting how do i link to files thx

On Wed, Feb 13, 2019 at 11:23 AM DarkHorseDre notifications@github.com wrote:

...so youre saying they now party right?

as for pally, bro, you still havent provided link to files or any info.. what does the on-screen console for pally say when he leaves? what does d2bs console say? what scripts is he running (paste a link to config). cmon - every forum is the same: you have to provide info if you want help.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kolton/d2bot-with-kolbot/issues/1227#issuecomment-463310189, or mute the thread https://github.com/notifications/unsubscribe-auth/AJvPA6IsFd2g8qzEeoWX-NHzmNcE8SFAks5vNFgMgaJpZM4a5iNc .

DarkHorseDre commented 5 years ago

goto pastebin.com and paste your config into the page and copy the URL they provide and paste here for leader and pally config.

lew130 commented 5 years ago

if i remove bo barb does and and meph and drops like pally

lew130 commented 5 years ago

does andy

lew130 commented 5 years ago

file:///C:/Users/lew/Desktop/Paladin.hammy.js

On Wed, Feb 13, 2019 at 12:15 PM DarkHorseDre notifications@github.com wrote:

goto pastebin.com and paste your config into the page and copy the URL they provide and paste here for leader and pally config.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kolton/d2bot-with-kolbot/issues/1227#issuecomment-463329149, or mute the thread https://github.com/notifications/unsubscribe-auth/AJvPA6TRyTA60XThyGC2ZRcTWc8kmjWJks5vNGRjgaJpZM4a5iNc .

lew130 commented 5 years ago

file:///C:/Users/lew/Desktop/Sorceress.saassy.js

On Wed, Feb 13, 2019 at 12:41 PM Lewis Krause lew130@gmail.com wrote:

file:///C:/Users/lew/Desktop/Paladin.hammy.js

On Wed, Feb 13, 2019 at 12:15 PM DarkHorseDre notifications@github.com wrote:

goto pastebin.com and paste your config into the page and copy the URL they provide and paste here for leader and pally config.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kolton/d2bot-with-kolbot/issues/1227#issuecomment-463329149, or mute the thread https://github.com/notifications/unsubscribe-auth/AJvPA6TRyTA60XThyGC2ZRcTWc8kmjWJks5vNGRjgaJpZM4a5iNc .

ghost commented 5 years ago

We don't have access to your Computer Copy the config, go to pastebin.com, put text there, create paste, give link here

lew130 commented 5 years ago

I put it in sorc lew130 and pally lew130

On Wed, Feb 13, 2019 at 4:51 PM drogga notifications@github.com wrote:

We don't have access to your Computer Copy the config, go to pastebin.com, put text there, create paste, give link here

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kolton/d2bot-with-kolbot/issues/1227#issuecomment-463424307, or mute the thread https://github.com/notifications/unsubscribe-auth/AJvPA0Mxu0rjVW2aLD-agqzvjUVFWoidks5vNKT7gaJpZM4a5iNc .

ghost commented 5 years ago

Copy the Sorceress and Paladin config and upload it to pastebin.com please

lew130 commented 5 years ago

i got it going using diablo and baal helper sections thx for the help

DS1337 commented 5 years ago

Please post Character Configs on pastebin and post the link

if you cant get it working after reading the guide I linked, paste your follower and leader configs separately to pastebin and link here

Bro I told you to paste the other files to pastebin.com and link here, why did you paste all that to this thread now? its unreadable and clogs up this thread. please edit and replace with links to these files.

...so youre saying they now party right? (paste a link to config). cmon - every forum is the same: you have to provide info if you want help.

goto pastebin.com and paste your config into the page and copy the URL they provide and paste here for leader and pally config.

We don't have access to your Computer Copy the config, go to pastebin.com, put text there, create paste, give link here

Copy the Sorceress and Paladin config and upload it to pastebin.com please

Jesus wtf....what the hell is wrong with u dude??? why the mother of fuck u cant read? jeeeesus... They write 239856923 times, dat u PLS just post your config to pastebin.com!? Why u cant read?? U even fucking TRY to read, whats going on??? U did a shit and just keep spaming shit about your not working bot, omg...

So PLS uninstall Kolton Bot and NEVER try to run Bots again...go back to school and FIRST try to learn READ!

it IS !!!disrespectful!!! to ask for help and then do a shit for it! LISTEN to the community and THEN u get REAL and GOOD help for it! But sitting and writing shit is not a good question to get help!

file:///C:/Users/lew/Desktop/Paladin.hammy.js file:///C:/Users/lew/Desktop/Sorceress.saassy.js

And wtf u thing u do there?!?! U posting the directory from your Config from your OWN PC? bro, whats going on in your brain...u never use a PC in your life ore what?? Nobody can connect to your PC, so how u think, somebody can check your config on YOUR PC?? If u dont know how a PC ore the WWW (Internet) is working, then dont use it pls!

Its so hard to type "pastebin.com" in your browser??? Dude, rly... Go out and play ore ride something in the nature, better to chill on PC!

Never see someone like u who get no fucking idea, what the hell to do...!

Have a nice day and hopefully a good life with your damaged brain... No respect for the community here...ty buddy!!!

and sry 4 dat bad words, but it must go out now....Facepalm!

lew130 commented 5 years ago

ya all is well i didnt have the right name in leader now i do. also mf party only good to meph and then use diabloand baal helper sorry you got so upset i never used pastebin before and appartantly I still dont know how to use it thx

On Fri, Feb 15, 2019 at 8:34 AM DS1337 notifications@github.com wrote:

Please post Character Configs on pastebin and post the link

if you cant get it working after reading the guide I linked, paste your follower and leader configs separately to pastebin and link here

Bro I told you to paste the other files to pastebin.com and link here, why did you paste all that to this thread now? its unreadable and clogs up this thread. please edit and replace with links to these files.

...so youre saying they now party right? (paste a link to config). cmon - every forum is the same: you have to provide info if you want help.

goto pastebin.com and paste your config into the page and copy the URL they provide and paste here for leader and pally config.

We don't have access to your Computer Copy the config, go to pastebin.com, put text there, create paste, give link here

Copy the Sorceress and Paladin config and upload it to pastebin.com please

Jesus wtf....what the hell is wrong with u dude??? why the mother of fuck u cant read? jeeeesus... They write 239856923 times, dat u PLS just post your config to pastebin.com!? Why u cant read?? U even fucking TRY to read, whats going on??? U did a shit and just keep spaming shit about your not working bot, omg...

So PLS uninstall Kolton Bot and NEVER try to run Bots again...go back to school and FIRST try to learn READ!

it IS !!!disrespectful!!! to ask for help and then do a shit for it! LISTEN to the community and THEN u get REAL and GOOD help for it! But sitting and writing shit is not a good question to get help!

file:///C:/Users/lew/Desktop/Paladin.hammy.js file:///C:/Users/lew/Desktop/Sorceress.saassy.js

And wtf u thing u do there?!?! U posting the directory from your Config from your OWN PC? bro, whats going on in your brain...u ever use a PC in your life ore what?? Nobody can connect to your PC, so how u think, somebody can check your your config on YOUR PC??

Its so hard to type "pastebin.com" in your browser??? Dude, rly... Go out and play ore ride something, better to chill on PC!

Never see someone like u who get no fucking idea, what the hell to do...!

Have a nice day and hopefully a good life with your damaged brain... No respect for the community here...ty buddy!!!

and sry 4 dat bad words, but it must go out now....Facepalm!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kolton/d2bot-with-kolbot/issues/1227#issuecomment-464092656, or mute the thread https://github.com/notifications/unsubscribe-auth/AJvPAyE_KDQm6EhBGDqtKV48sfmuf08Nks5vNtOSgaJpZM4a5iNc .

DS1337 commented 5 years ago

i never used pastebin before and appartantly I still dont know how to use it

And DAT is YOUR problem! U cant read! U just copy and past your config to pastebin.com and create one...then just copy the link here and DONE! if u dont want to read ore go to the website, nobody can help u! Its your Problem then...