Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PlugY single player support #402

Open
wants to merge 10 commits into
base: restructure
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
13 changes: 13 additions & 0 deletions d2bs/kolbot/libs/core/Town.js
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,19 @@ const Town = {
|| !Town.canStashGem(item)) {
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(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
*/
Expand Down