aeon0 / botty

D2R Pixel Bot
MIT License
531 stars 376 forks source link

Botty will discard equipped items if they somehow end up in inventory #197

Closed offlineplayer1 closed 2 years ago

offlineplayer1 commented 2 years ago

Is it really a Bug report? Yes.

Botty Version Botty v0.4.3 pre-compiled release.

Describe the bug There is a particular set of events that might get your equipped items to disappear forever.

To Reproduce If you are between equipment repair sequence points and have an item with + str or dex break (ex. Shako) other items that were depending on those stats will remain equipped but have no effect on character's stats (ex. Enigma stays equipped but you don't get the str bonus).

However, if you then die (having the str/dex bonus item still broken), botty will pick up your body but since you don't get bonuses from broken items, other gear depending on the broken item's stats won't get equipped and will remain in inventory. (ex. Enigma armor needs +2 str from Shako, Shako is broken, you don't have enough str to equip Enigma armor, Enigma will be picked up in inventory).

From here, you end up with a previously equipped item in your inventory and because that item is not in your pick it (ex. runewords), botty will drop it on the ground (like when discarding accidentally picked up items).

Expected behavior Don't discard gear.

Screenshots / Video N/A

Logs N/A

Additional info Some possible solutions:

SwePow commented 2 years ago

I vote for a combo of option number 3 and on top of that a configurable random visit to Larzuk for repairs and restock TPs In config having a float number: visit_larzuk = 0.1 will allow the user to configure how randomly human the bot should be visiting Larzuk. 0 meaning never by random, 1 meaning every run, 0.1 meaning 10% of the runs.

bobcho commented 2 years ago

While this is a totally valid concern I'm thinking: since repair happens along with tp refill, that makes it once every 18 games or so (< 3 tp = buy tp book). Unless you are a punching bag build I think it is quite unlikely your items lose all durability so quick. Am I missing something?

aeon0 commented 2 years ago

@bobcho for sure a edge case. But if you start botty and haven't repaired for a while and your shako is right before braking and you rely on the +2 str to equip stuff, well then this happens.

There is a reason I haven't fixed it yet, cause its a rare edge case. But I agree a quite serious one in case it does happen :D So at some point we might want to have a fail save for this.

My preferred method would actually be to have a repair triggered when this repair thingy shows on the top right corner.