From 8f11cb0d5928f559e63f7c6be79acdb8a0224d1b Mon Sep 17 00:00:00 2001 From: SPCommY <159726140+SPCommY@users.noreply.github.com> Date: Sun, 11 Feb 2024 22:04:44 +0200 Subject: [PATCH 01/10] Update Town.js Add PlugY commands --- d2bs/kolbot/libs/core/Town.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/d2bs/kolbot/libs/core/Town.js b/d2bs/kolbot/libs/core/Town.js index d6d503f6f..86faa90b2 100644 --- a/d2bs/kolbot/libs/core/Town.js +++ b/d2bs/kolbot/libs/core/Town.js @@ -1429,6 +1429,14 @@ const Town = { || !Town.canStashGem(item)) { return false; } + if (!Storage.Stash.CanFit(item) && Config.SortSettings.PlugYStash) { + say("/swappage"); + delay(100); + say("/insertpage"); + delay(100); + quit(); //or Common.Toolsthread.exit(); + return true + } /** * @todo add sorting here first if we can't fit the item */ From 81f875bdcc102a833281c5e140ed8e897ce11c27 Mon Sep 17 00:00:00 2001 From: SPCommY <159726140+SPCommY@users.noreply.github.com> Date: Sun, 11 Feb 2024 22:07:17 +0200 Subject: [PATCH 02/10] Update README.md Add guide for plugy p1. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index fb209736e..a257d40c1 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ If you want to contribute to d2bs/d2bot#, come to irc.synirc.net/d2bs and ask ar ## Guides - [manual playing](https://github.com/blizzhackers/documentation/blob/master/kolbot/ManualPlay.md/#manual-playing) - [multi botting](https://github.com/blizzhackers/documentation/blob/master/kolbot/MultiBotting.md/#multi-botting) +- [PlugY Setup for Single Player] - [kolbot-SoloPlay](https://github.com/blizzhackers/kolbot-SoloPlay) - [character config](https://github.com/blizzhackers/documentation/blob/master/kolbot/CharacterConfig.md/#character-configuration) - [TCP/IP Games](https://github.com/blizzhackers/documentation/blob/master/kolbot/TCP-IP%20games.md#tcpip-games) From 01e10d1e7556423c97339a3af5cb48bba56948db Mon Sep 17 00:00:00 2001 From: SPCommY <159726140+SPCommY@users.noreply.github.com> Date: Sun, 11 Feb 2024 22:40:18 +0200 Subject: [PATCH 03/10] p3 p3 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a257d40c1..73013f4d2 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ If you want to contribute to d2bs/d2bot#, come to irc.synirc.net/d2bs and ask ar ## Guides - [manual playing](https://github.com/blizzhackers/documentation/blob/master/kolbot/ManualPlay.md/#manual-playing) - [multi botting](https://github.com/blizzhackers/documentation/blob/master/kolbot/MultiBotting.md/#multi-botting) -- [PlugY Setup for Single Player] +- [PlugY Setup for single player](https://github.com/blizzhackers/documentation/blob/master/kolbot/PlugY.md#plugy-setup-for-single-player-botting) - [kolbot-SoloPlay](https://github.com/blizzhackers/kolbot-SoloPlay) - [character config](https://github.com/blizzhackers/documentation/blob/master/kolbot/CharacterConfig.md/#character-configuration) - [TCP/IP Games](https://github.com/blizzhackers/documentation/blob/master/kolbot/TCP-IP%20games.md#tcpip-games) From 60bda411874da66775285562975434cecf4fce43 Mon Sep 17 00:00:00 2001 From: SPCommY <159726140+SPCommY@users.noreply.github.com> Date: Sun, 11 Feb 2024 22:42:16 +0200 Subject: [PATCH 04/10] Update Town.js indentation fix --- d2bs/kolbot/libs/core/Town.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d2bs/kolbot/libs/core/Town.js b/d2bs/kolbot/libs/core/Town.js index 86faa90b2..1ca97fb23 100644 --- a/d2bs/kolbot/libs/core/Town.js +++ b/d2bs/kolbot/libs/core/Town.js @@ -1430,7 +1430,7 @@ const Town = { return false; } if (!Storage.Stash.CanFit(item) && Config.SortSettings.PlugYStash) { - say("/swappage"); + say("/swappage"); delay(100); say("/insertpage"); delay(100); From 9848e6a90f2d391cc92ba2e1d65b71be0969451b Mon Sep 17 00:00:00 2001 From: SPCommY <159726140+SPCommY@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:58:07 +0200 Subject: [PATCH 05/10] Town.js fix indentations fix indentations --- d2bs/kolbot/libs/core/Town.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/d2bs/kolbot/libs/core/Town.js b/d2bs/kolbot/libs/core/Town.js index 1ca97fb23..129494c41 100644 --- a/d2bs/kolbot/libs/core/Town.js +++ b/d2bs/kolbot/libs/core/Town.js @@ -1430,11 +1430,11 @@ const Town = { return false; } if (!Storage.Stash.CanFit(item) && Config.SortSettings.PlugYStash) { - say("/swappage"); - delay(100); - say("/insertpage"); - delay(100); - quit(); //or Common.Toolsthread.exit(); + say("/swappage"); + delay(100); + say("/insertpage"); + delay(100); + quit(); //or Common.Toolsthread.exit(); return true } /** From 3156d5d2eb9e3302a3fd687e3f5d46b9e44501a2 Mon Sep 17 00:00:00 2001 From: SPCommY <159726140+SPCommY@users.noreply.github.com> Date: Mon, 12 Feb 2024 13:01:20 +0200 Subject: [PATCH 06/10] Town.js add console logging add console logging --- d2bs/kolbot/libs/core/Town.js | 1 + 1 file changed, 1 insertion(+) diff --git a/d2bs/kolbot/libs/core/Town.js b/d2bs/kolbot/libs/core/Town.js index 129494c41..58784cc8d 100644 --- a/d2bs/kolbot/libs/core/Town.js +++ b/d2bs/kolbot/libs/core/Town.js @@ -1434,6 +1434,7 @@ const Town = { delay(100); say("/insertpage"); delay(100); + console.log("Inserted new empty page into stash"); quit(); //or Common.Toolsthread.exit(); return true } From 6738df9eb956ba274684b1d8c8aede6a10d744d4 Mon Sep 17 00:00:00 2001 From: SPCommY <159726140+SPCommY@users.noreply.github.com> Date: Tue, 13 Feb 2024 02:12:09 +0200 Subject: [PATCH 07/10] Update Town.js changed quit to scriptbroadcast --- d2bs/kolbot/libs/core/Town.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d2bs/kolbot/libs/core/Town.js b/d2bs/kolbot/libs/core/Town.js index 58784cc8d..cefde77f9 100644 --- a/d2bs/kolbot/libs/core/Town.js +++ b/d2bs/kolbot/libs/core/Town.js @@ -1435,7 +1435,7 @@ const Town = { say("/insertpage"); delay(100); console.log("Inserted new empty page into stash"); - quit(); //or Common.Toolsthread.exit(); + scriptBroadcast("quit"); //or Common.Toolsthread.exit(); return true } /** From 877d456d452bd115b163306b3702780b525c9988 Mon Sep 17 00:00:00 2001 From: SPCommY <159726140+SPCommY@users.noreply.github.com> Date: Thu, 22 Feb 2024 19:23:14 +0200 Subject: [PATCH 08/10] Update Town.js Update to click page instead of quitgame --- d2bs/kolbot/libs/core/Town.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/d2bs/kolbot/libs/core/Town.js b/d2bs/kolbot/libs/core/Town.js index cefde77f9..38a0f8242 100644 --- a/d2bs/kolbot/libs/core/Town.js +++ b/d2bs/kolbot/libs/core/Town.js @@ -1430,12 +1430,16 @@ const Town = { return false; } if (!Storage.Stash.CanFit(item) && Config.SortSettings.PlugYStash) { + const firstPageBtn = me.screensize + ? { x: 226, y: 463} // 800x600 + : { x: 191, y: 400}; // 640x480 + !getUIFlag(sdk.uiflags.Stash) && Town.openStash(); say("/swappage"); - delay(100); - say("/insertpage"); - delay(100); + delay(50); + say("/insertpage"); console.log("Inserted new empty page into stash"); - scriptBroadcast("quit"); //or Common.Toolsthread.exit(); + delay(250); + sendClick(firstPageBtn.x, firstPageBtn.y); //click previous page sendClick(firstPageBtn.x, firstPageBtn.y) return true } /** From d52fb1aa140d58ceac51a277ebf8eabd55327ed5 Mon Sep 17 00:00:00 2001 From: SPCommY <159726140+SPCommY@users.noreply.github.com> Date: Thu, 22 Feb 2024 19:24:46 +0200 Subject: [PATCH 09/10] Update Town.js fix --- d2bs/kolbot/libs/core/Town.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/d2bs/kolbot/libs/core/Town.js b/d2bs/kolbot/libs/core/Town.js index 38a0f8242..0de9c8c7d 100644 --- a/d2bs/kolbot/libs/core/Town.js +++ b/d2bs/kolbot/libs/core/Town.js @@ -1435,11 +1435,11 @@ const Town = { : { x: 191, y: 400}; // 640x480 !getUIFlag(sdk.uiflags.Stash) && Town.openStash(); say("/swappage"); - delay(50); - say("/insertpage"); + delay(50); + say("/insertpage"); console.log("Inserted new empty page into stash"); delay(250); - sendClick(firstPageBtn.x, firstPageBtn.y); //click previous page sendClick(firstPageBtn.x, firstPageBtn.y) + sendClick(firstPageBtn.x, firstPageBtn.y); //click previous page return true } /** From 32529f12bbf3081790dfd73bb692ccbc63709f0c Mon Sep 17 00:00:00 2001 From: SPCommY <159726140+SPCommY@users.noreply.github.com> Date: Fri, 23 Feb 2024 07:49:15 +0200 Subject: [PATCH 10/10] Update Town.js added gem func too --- d2bs/kolbot/libs/core/Town.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/d2bs/kolbot/libs/core/Town.js b/d2bs/kolbot/libs/core/Town.js index 0de9c8c7d..4182fa296 100644 --- a/d2bs/kolbot/libs/core/Town.js +++ b/d2bs/kolbot/libs/core/Town.js @@ -1425,11 +1425,10 @@ const Town = { */ canStash: function (item) { if (Town.ignoreType(item.itemType) - || [sdk.items.quest.HoradricStaff, sdk.items.quest.KhalimsWill].includes(item.classid) - || !Town.canStashGem(item)) { + || [sdk.items.quest.HoradricStaff, sdk.items.quest.KhalimsWill].includes(item.classid)) { return false; } - if (!Storage.Stash.CanFit(item) && Config.SortSettings.PlugYStash) { + if ((!Storage.Stash.CanFit(item) || !Town.canStashGem(item)) && Config.SortSettings.PlugYStash) { const firstPageBtn = me.screensize ? { x: 226, y: 463} // 800x600 : { x: 191, y: 400}; // 640x480