58 Commits

Author SHA1 Message Date
mgleed
5bb62a9642 Bugfix: string literal, added tp charges debug line (#535) 2022-02-11 21:50:57 -05:00
Vladimir Makaev
27388b82fc Bugfix: remap keybind is crashing (#533) 2022-02-11 13:48:11 -05:00
mgleed
35b5d7d6f8 Bugfix: Correct handling of empty img parameter 2022-02-11 13:47:17 -05:00
mgleed
883aa4468a Bugfix: Incorrect merge for turning off gold pickup (#530) 2022-02-08 21:28:14 -05:00
mgleed
64908630f4 Update transmute.py (#528) 2022-02-08 20:57:46 -05:00
mgleed
56bde23156 Cleanup: Artifact from recent PR (#521) 2022-02-08 20:56:05 -05:00
Vladimir Makaev
9c0fa2207c Bugfix: Skip Transmuting if Cube isn't empty (#529) 2022-02-08 20:52:42 -05:00
Vladimir Makaev
a1a1a5f375 Fix barbarian crashing on pre_move() (#527)
Co-authored-by: Vladimir Makayev <vmakaev@fb.com>
2022-02-08 20:32:36 -05:00
Steve6030
4e35b8a1a8 Correcting poison resist asset spelling. (#523) 2022-02-08 20:32:10 -05:00
Brett Davis
589fda539f Bugfix: Config constructor no longer takes a string (#522) 2022-02-08 20:31:29 -05:00
mgleed
c65ae545df Bugfix: Provide precompiled tesserocr (#520)
* Revert tesserocr to conda-forge rather than pip

Tesserocr with Tesseract > 5 works with pip install but installer fails if user doesn't have VS compilers. Will revisit

* fixed by providing precompiled tesserocr
2022-02-06 15:14:12 -05:00
RB-Development
5ae6194d23 gambling bugfix (#519)
* Update ui_manager.py

Fix for gambling issue. Looks like self._config.char["gamble_items"] always returns true. Therefore im checking if the first entry is empty and go for a not.
not self._config.char["gamble_items"][0]==""

* simplify

Co-authored-by: mgleed <aliigleed16@gmail.com>
2022-02-06 12:09:50 -05:00
mgleed
b83dbb8e8d Track item charges with OCR (#516) 2022-02-06 00:12:45 -05:00
mgleed
f8e41d525b OCR as a service (#505) 2022-02-05 23:49:17 -05:00
Vladimir Makaev
d9624e04c1 Fix game isn't restarted when in main menu / character selection screen (#517)
* Fix max_game_length_s isn't properly tracked during character selection

* Fix restart routine not waiting for main menu to appear.
2022-02-05 21:23:44 -05:00
mgleed
f4ff1b953f bugfix: runs_per_repair = 0 modulo issue (#515) 2022-02-05 15:58:30 -05:00
pokzcodes
da6ccc6250 Kill d2r when botty cannot recover and shuts down (#511) 2022-02-05 13:52:41 -05:00
pokzcodes
a87d72a044 Added exception handling to Discord API calls (#510)
* added exception handling to discord api calls

* restored accidental deleted vars

* removed word "discord" from log in generic api
2022-02-05 13:24:41 -05:00
mgleed
ab1d496fff Change always_repair to runs_per_repair (#509)
**This is potentially a breaking change for users using `always_repair`**

Co-authored-by: Vladimir Makaev <vmakaev@gmail.com>
2022-02-05 13:24:13 -05:00
mgleed
5d4e7e8dec Add more act 5 paths (#506)
* initial

* finished a TODO!
2022-02-05 13:22:52 -05:00
mgleed
e4f2ae4826 Bugfix: vendor_stash merging artifact (#514) 2022-02-05 10:30:00 -05:00
mgleed
1315d9decb Bugfix for TP charge detection: use color_filter instead of template match threshold (#513) 2022-02-05 10:29:36 -05:00
Vladimir Makaev
c358282e68 Launch botty from town or main menu; fix character recovery after restart/death (#494)
* Add ability to launch botty from either main menu or town

* Fix game recovery routine is stuck forever on character selection screen

* Move _char_template to class variable to be able to share among instances

* fix character recovery and character select, support offline/online. WIP

Co-authored-by: Vladimir Makayev <vmakaev@fb.com>
Co-authored-by: mgleed <aliigleed16@gmail.com>
2022-02-04 20:27:56 -05:00
Vladimir Makaev
c57e820d63 Fix character stuck trying to teleport in town (#512) 2022-02-04 19:02:43 -05:00
Vladimir Makaev
6b1e155197 Support Gem Transmuting (#491)
Co-authored-by: Vladimir Makayev
2022-02-04 17:58:41 -05:00
Vladimir Makaev
47c5e20238 Optimized handling of teleport charges (#476) 2022-02-04 14:59:39 -05:00
RB-Development
36d3c2e913 Gambling by @RB-Development (#445)
This branch will detect if stash is full of gold. Afterwards the gambling functionality (currently only in act 4 implemented) will be called. The bot will gamble for specific items (determined in params.ini) until no gold is left. He will check for properties specified in pickit.ini and sell not matching items.
Supported items are: ring, amulet, circlet, coronet, talon

Leverages recent advanced pickit PR.
2022-02-04 14:12:56 -05:00
mgleed
06623142f7 Controller item spacing 2022-02-04 12:42:38 -05:00
mgleed
1b9fdad539 fix gold stashing (#508) 2022-02-04 12:25:50 -05:00
egut125
c0a598cc34 Merge pull request #503 from aeon0/max-consecutive-fails
New Param for fails, if max is reached, kill botty. Defaults off.
2022-02-04 10:15:16 -05:00
egut125
e3fd1b61f5 Merge pull request #504 from aeon0/stash-bugfix
stash bugfix
2022-02-03 22:31:20 -05:00
mgleed
2dcc8fcdfe gdi 2022-02-03 22:26:32 -05:00
mgleed
6fe9a18d43 Make gold low priority during pickit (#502)
By @codahq
2022-02-03 18:10:29 -05:00
egut125
9f8bed6efb New Param for fails, if max is reached, kill botty. Defaults off. 2022-02-03 14:45:45 -05:00
mgleed
0121c7af2e Allow color_filter to range <0, >180 in H; etc. (#492)
* initial

* move image erosion from item_cropper.py to misc.py for planned use elsewhere

Co-authored-by: aeon0 <aeon4@pm.me>
2022-02-03 07:28:55 +01:00
mgleed
1d84a86e0b Updates to template_search, trim lots of code throughout (#499)
* initial

* Support list of templates (not just template names) as an input for search()

* fix grayscale for new list of templates
2022-02-03 07:17:57 +01:00
mgleed
99f8c65c2e Nihlathak spelling (#488)
Unified the variety of nihlathak spellings throughout the codebase
2022-02-01 21:34:21 -05:00
Vladimir Makaev
0ec7ced4d6 Nihlathak pathing for lightning sorc (#495) 2022-02-01 16:51:13 -05:00
RB-Development
551a547ddb Advanced pickit (#383)
* logic for ident, first attr. advanced pickit

* logic advanced vs normal pickit

* logic_empty_ID_Tome

* small adj. to fit PR

* converted yaml to ini. changed some val.

* changed param to auto_ident

* pickit integration

* added set in routine

* reset bot init value

* bugfix

* removed old id logic

* added_nested_filter

* changed pickit

* bugfix replace

* added some more props

* Cleanup

* cleanup

* cleanup

* started unittests

* unittest

* small pickit adjustments

* Added missing fct. after merge

* bugfix due to static method in config.py

* added comments in pickit.ini

* Update pickit.ini

* Update params.ini

* Update ui_manager.py

* Update pickit.ini

Co-authored-by: aeon0
Co-authored-by: mgleed
2022-01-30 19:40:36 -05:00
aeon0
09caab2120 Move messanger (#498) 2022-01-30 15:30:47 +01:00
aeon0
2905ee5d31 Remove configs (#497)
* remove config window always on top

* remove message highlights

* only use win32api for window offset
2022-01-30 13:26:10 +01:00
aeon0
e9d31f220f Config cleanup (#496) 2022-01-30 11:59:52 +01:00
aeon0
27f0e3d793 Revert "Add Linting (#487)" (#490)
This reverts commit 5e1a783394.
2022-01-28 18:24:47 +01:00
aeon0
5e1a783394 Add Linting (#487)
* add black linting

* fix linting

* doc update
2022-01-28 17:47:03 +01:00
AlekseyLesnoy
7aef2a6a73 fix window detection with multiple monitors via winapi (#483) 2022-01-28 16:51:52 +01:00
flapjax
9761f87826 fix duplicate bot name in status update message (#458)
* fix duplicate bot name in status update message

This commit changes the behavior of the _send_status_update method. If the generic_api is in use, it will avoid adding the bot name to the start of the message because the bot name is already added by the generic api.

* fix duplicate bot name in status update message

This commit moves the fix to the DiscordEmbeds class instead of performing it with an if statement in the GameStats class.
2022-01-24 16:17:53 +01:00
nlapinski
3321b7bc84 necro fixes (#470)
* trav walking repathing

* trav source paths for walking

* traverse image threshold

* shenk death check

* images to check summon status

* enter durance

* default configs
2022-01-24 16:13:20 +01:00
pokzcodes
667c2a4dc5 Add option to fill shared stash tabs first (useful for HC characters) (#472)
* fixed bug w/ walking hammerdin that would cause vigor to be left on while attacking in trav

* added option to fill shared stash first

* reverted a change not related to this PR
2022-01-21 22:01:27 +01:00
Fise
87b4737901 Drognan shopper fixes (#468)
* Improved navigation in and out of town. New options for tuning it

* Delete a2_town_drognan_fire.png
2022-01-21 21:53:44 +01:00
Legit
376547ebfe Nihlathak cold immune accuracy update (#463)
* Nihlathak cold immune accuracy update

Much higher accuracy

* nihl health bar

* fixed pathing issue bottom left
2022-01-19 07:22:13 +01:00
skizotenigma
7935da58a7 Update pather.py (#459) 2022-01-19 07:16:13 +01:00
Vladimir Makaev
b890ff266f Find D2R window using win32api instead of pattern matching (#453) 2022-01-18 20:32:35 +01:00
Legit
c939877c7b Nihlathaks no longer count cold immune run as fail (#448)
Changed false to True
2022-01-17 16:17:51 +01:00
aeon0
1bc392327c Hot fix (#454)
* fix pather timeout

* revert changes
2022-01-15 11:06:41 +01:00
aeon0
df0e70470c Update version.py 2022-01-15 11:02:52 +01:00
aeon0
2eb9f84520 Make config static and global (#451) 2022-01-14 23:22:22 +01:00
aeon0
5c6fd83155 Update pather.py 2022-01-14 16:57:10 +01:00
aeon0
6226956af4 Update version.py 2022-01-14 15:39:42 +01:00
256 changed files with 6197 additions and 1221 deletions

1
.gitignore vendored
View File

@@ -15,6 +15,7 @@ generated/
botty_v*/
custom.ini
config/custom.ini
config/custom.*.ini
*info_*.png
.vscode
.vs/

View File

@@ -41,7 +41,7 @@ All botty configuration files are located in the __config__ folder. To ease the
```ini
; custom.ini - overwrites 3 params in the param.ini
[general]
monitor=1
name=MyCustomName
[routes]
run_pindle=1
@@ -51,10 +51,10 @@ run_shenk=0
| [general] | Descriptions |
| -------------------- | --------------------------|
| name | Name used in terminal and discord messages |
| monitor | Select on which monitor D2R is running in case multiple are available |
| custom_message_hook | Add your own message hook here to get messages about drops and botty status updates, discord webhook is default |
| logger_lvl | Can be any of [info, debug] and determines how much output you see on the command line |
| max_game_length_s | Botty will attempt to stop whatever its doing and try to restart a new game. Note if this fails, botty will attempt to shut down D2R and Bnet |
| max_consecutive_fails | Botty will stop making games if the number of consecutive fails reaches this max value |
| randomize_runs | 0: the order will be as seen in the params.ini. 1: the order will be random |
| difficulty | Set to `normal` `nightmare` or `hell` for game difficulty |
| message_api_type | Which api to use to send botty messages. Supports "generic_api" (basic discord), or "discord" (discord embeds with images).
@@ -72,7 +72,7 @@ run_shenk=0
| run_pindle | Run Pindle in each new game. Select "1" to run it "0" to leave it out. |
| run_eldritch | Run Eldritch in each new game. Select "1" to run it "0" to leave it out. |
| run_shenk | Run shenk in each new game. Select "1" to run it "0" to leave it out. |
| run_nihlatak | Run Nihlatak in each new game. Select "1" to run it "0" to leave it out. (Teleport required) |
| run_nihlathak | Run Nihlathak in each new game. Select "1" to run it "0" to leave it out. (Teleport required) |
| run_arcane | Run Arcane Sanctuary in each new game. Select "1" to run it "0" to leave it out. (Teleport required) |
| run_diablo | Run Diablo (just the Boss, not the trashmobs) in each new game. Select "1" to run it "0" to leave it out. (Teleport required) |
@@ -104,7 +104,7 @@ run_shenk=0
| atk_len_pindle | Attack length for hdin or number of attack sequences for sorc when fighting pindle |
| atk_len_eldritch | Attack length for hdin or number of attack sequences for sorc when fighting eldritch |
| atk_len_shenk | Attack length for hdin or number of attack sequences for sorc when fighting shenk |
| atk_len_nihlatak | Attack length for hdin or number of attack sequences for sorc when fighting nihlatak |
| atk_len_nihlathak | Attack length for hdin or number of attack sequences for sorc when fighting nihlathak |
| atk_len_cs_trashmobs | Attack length for hdin or number of attack sequences when fighting Trash Mobs in Chaos Sanctuary (Diablo) |
| atk_len_diablo_vizier | Attack length for hdin or number of attack sequences when fighting Sealboss A "Vizier of Chaos" in Chaos Sanctuary (Diablo) |
| atk_len_diablo_deseis | Attack length for hdin or number of attack sequences when fighting Sealboss B "Lord De Seis" in Chaos Sanctuary (Diablo) |
@@ -123,9 +123,16 @@ run_shenk=0
| belt_hp_columns | Number of belt columns for healing potions |
| belt_mp_columns | Number of belt columns for mana potions |
| pre_buff_every_run | 0: Will only prebuff on first run, 1: Will prebuff after each run/boss |
| always_repair | 0: Will only repair when needed, 1: Will repair at the start of each run (EXPENSIVE FOR HIGH RUNEWORDS) |
| runs_per_repair | 0: Will only repair when needed, 1+: Will repair after # of runs set here |
| id_items | Will identify items at cain before stashing them. Cain must be rescued for this to work.|
| open_chests | Open up chests in some places. E.g. on dead ends of arcane. Note: currently bad runtime. |
| fill_shared_stash_first | Fill stash tabs starting from right to left, filling personal stash last |
| gamble_items | List of items to gamble when stash fills with gold. Leave blank to disable. Supported items currently include circlet, ring, coronet, talon, amulet
| [transmute] | Descriptions |
| ------------------ | -------------------------------------------------------------------------------------------------|
| transmute_every_x_game | How often to run transmute routine (currently transmutes flawless gems into perfect gems). Transmute routine depends on stashing routine it will only start after items stashing is done. E.g. so it could take more than X games to perform transmutes if there were no items to stash at the time. Default: 20 |
| stash_destination | Stash tabs by priority to place the results of the transmute. Default: 3,2,1,0. (It means the result will be first placed in stash 3 untils it's full, then to stash 2, etc. 0 - personal tab)
### Builds
| [sorceress] | Descriptions |
@@ -200,7 +207,6 @@ run_shenk=0
| pathing_delay_factor | A linear scaling factor, between 1 and 10, applied to pathing delays. |
| message_headers | Headers that are sent with each messages |
| message_body_template | Message body of the post message sent |
| message_highligh | 0: Send messages as is, 1: Uses message highlighting for discord |
## Support this project

View File

@@ -44,5 +44,6 @@
"Chat Background": 0,
"Always Run": 1,
"Quick Cast Enabled": 0,
"Display Active Skill Bindings": 0
"Display Active Skill Bindings": 0,
"Lobby Wide Item Drop Enabled": 1
}

BIN
assets/gamble/amulet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
assets/gamble/circlet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/gamble/coronet.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/gamble/no_gold.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
assets/gamble/refresh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/gamble/ring.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
assets/gamble/talon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 760 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Some files were not shown because too many files have changed in this diff Show More