From 9617436de404f0e12ed6eaed1d0de552719f6da4 Mon Sep 17 00:00:00 2001 From: Alexflu <77942685+Alexflu@users.noreply.github.com> Date: Mon, 8 Mar 2021 02:44:06 -0500 Subject: [PATCH 1/2] Update D2BotMuleLog.dbj to reuse same game adds check for existing game before creating a new game to allow for faster logging without RD Credit goes to theddubs aka esd1 --- d2bs/kolbot/D2BotMuleLog.dbj | 50 +++++++++++++++--------------------- 1 file changed, 21 insertions(+), 29 deletions(-) diff --git a/d2bs/kolbot/D2BotMuleLog.dbj b/d2bs/kolbot/D2BotMuleLog.dbj index 4c07699a..e6b70c5d 100644 --- a/d2bs/kolbot/D2BotMuleLog.dbj +++ b/d2bs/kolbot/D2BotMuleLog.dbj @@ -1,5 +1,7 @@ var StarterConfig = { - MinGameTime: rand(150, 180), // Minimum game length in seconds. If a game is ended too soon, the rest of the time is waited in the lobby + GameName: "yourgamename", + GamePass: "yourgamepass", + MinGameTime: rand(30, 60), // Minimum game length in seconds. If a game is ended too soon, the rest of the time is waited in the lobby CreateGameDelay: rand(5, 15), // Seconds to wait before creating a new game SwitchKeyDelay: 0, // Seconds to wait before switching a used/banned key or after realm down @@ -200,9 +202,13 @@ MainSwitch: break; } - if (!ControlAction.click(6, 533, 469, 120, 20)) { // Create - break; - } + if (StarterConfig.GameName && !ControlAction.click(6, 652, 469, 120, 20)) { // Join + break; + } + + // if (!ControlAction.click(6, 533, 469, 120, 20)) { // Create + // break; + // } if (getControl(6, 533, 469, 120, 20) && getControl(6, 533, 469, 120, 20).disabled === 4) { // dead HC character ControlAction.click(6, 693, 490, 80, 20); // Quit from Lobby @@ -227,35 +233,21 @@ MainSwitch: break; case 4: // Create Game - D2Bot.updateStatus("Creating Game"); - - control = getControl(1, 657, 342, 27, 20); + if (StarterConfig.GameName) { + createGame(StarterConfig.GameName, StarterConfig.GamePass, 0); + } else { + createGame(MuleLogger.LogGame[0] + gameCount, MuleLogger.LogGame[1], 0); + } - if (control && control.disabled === 5) { - ControlAction.click(6, 431, 341, 15, 16); // remove level restriction - } - - if (gameCount >= 99) { - gameCount = 1; - - DataFile.updateStats("runs", gameCount); - } - - if (lastGameStatus === "pending") { - D2Bot.printToConsole("Failed to create game"); - - gameCount += 1; - } + break; + case 5: // Join Game + D2Bot.updateStatus("Join Game"); - timeoutDelay("Make Game Delay", StarterConfig.CreateGameDelay * 1e3); - createGame(MuleLogger.LogGame[0] + gameCount, MuleLogger.LogGame[1], 0); - locationTimeout(5000, location); + joinGame(StarterConfig.GameName, StarterConfig.GamePass); - lastGameStatus = "pending"; + locationTimeout(5000, location); - break; - case 5: // Join Game - break; + break; case 6: // Ladder break; case 7: // Channel List From 0612f43e6f1b11cf099d36e358c28b398d5fe312 Mon Sep 17 00:00:00 2001 From: Alexflu <77942685+Alexflu@users.noreply.github.com> Date: Mon, 8 Mar 2021 03:00:52 -0500 Subject: [PATCH 2/2] Update MuleLogger.js update MuleLogger.js ingametime for new D2BotMuleLog.dbj --- d2bs/kolbot/libs/MuleLogger.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d2bs/kolbot/libs/MuleLogger.js b/d2bs/kolbot/libs/MuleLogger.js index 9ec7ef37..444d5b86 100644 --- a/d2bs/kolbot/libs/MuleLogger.js +++ b/d2bs/kolbot/libs/MuleLogger.js @@ -27,7 +27,7 @@ var MuleLogger = { LogEquipped: false, // include equipped items LogMerc: false, // include items merc has equipped (if alive) SaveScreenShot: false, // Save pictures in jpg format (saved in 'Images' folder) - IngameTime: rand(180, 210), // (180, 210) to avoid RD, increase it to (7230, 7290) for mule perming + IngameTime: rand(30, 60), //Increase to (7230, 7290) for mule perming // don't edit getItemDesc: function (unit, logIlvl) { @@ -403,4 +403,4 @@ var MuleLogger = { FileTools.writeText("mules/" + realm + "/" + me.account + "/" + me.name + "." + ( me.playertype ? "h" : "s" ) + (me.gametype ? "e" : "c" ) + ( me.ladder > 0 ? "l" : "n" ) + ".txt", finalString); print("Item logging done."); } -}; \ No newline at end of file +};