diff --git a/README.md b/README.md index fb209736e..73013f4d2 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](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) diff --git a/d2bs/kolbot/libs/core/Town.js b/d2bs/kolbot/libs/core/Town.js index d6d503f6f..4182fa296 100644 --- a/d2bs/kolbot/libs/core/Town.js +++ b/d2bs/kolbot/libs/core/Town.js @@ -1425,10 +1425,22 @@ 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) || !Town.canStashGem(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(50); + say("/insertpage"); + console.log("Inserted new empty page into stash"); + delay(250); + sendClick(firstPageBtn.x, firstPageBtn.y); //click previous page + return true + } /** * @todo add sorting here first if we can't fit the item */