Sizzzles / TFT-OCR-BOT

TFT OCR Bot with auto comps loading from lolchess
GNU General Public License v3.0
18 stars 2 forks source link

Not placing completed item on random unit if same item is being built on another unit #27

Open Sizzzles opened 10 months ago

Sizzzles commented 10 months ago

Ahri building BlueBuff has TearoftheGoddess on unit and if BlueBuff is on item bench it won't put BlueBuff on random unit until TearoftheGoddess is completed on Ahri

Also sometimes puts a random item on a champion with a predefined build... Eg randomly putting EvenShroud on Samira as last item instead of GiantSlayer

kizxlove commented 7 months ago

Currently, there is still a limitation that there are many unnecessary items on the board if a completed item has not been built yet. I think there needs to be a mechanism to check which items are completely unnecessary. Or place it randomly on champions in a specific round to avoid it taking up all the positions on the board.

Sizzzles commented 7 months ago

You are meaning items aren't being picked up from board because item bench is full of components that are never used by the comp? So something like if component items not in comp build list then throw away component items on random champ to make space on item bench?

kizxlove commented 7 months ago

You are meaning items aren't being picked up from board because item bench is full of components that are never used by the comp? So something like if component items not in comp build list then throw away component items on random champ to make space on item bench?

yes sir, actually I have added a minor function based on your code that when the health is below 35 HP, the bot will place items randomized into a champion that doesn't item at all.

Sizzzles commented 7 months ago

Ahh so you are currently slamming everything on champs without a build once health is below 35

Honestly I want to clean up the item placement code into separate functions because it's a nested mess that's hard to read and understand at first glance but every time I try it breaks it and I end up reverting back to the nest haha

kizxlove commented 7 months ago

Ahh so you are currently slamming everything on champs without a build once health is below 35

Honestly I want to clean up the item placement code into separate functions because it's a nested mess that's hard to read and understand at first glance but every time I try it breaks it and I end up reverting back to the nest haha

I think this bot is just for farming so don't need so much effort.

Sizzzles commented 7 months ago

Oh yeah I only use it to farm but I'd also like to read it the item placement code without having to re-read it 10 times to understand one small section even with the comments I have left for myself

Sizzzles commented 7 months ago

You are meaning items aren't being picked up from board because item bench is full of components that are never used by the comp? So something like if component items not in comp build list then throw away component items on random champ to make space on item bench?

Also I'll work on this during my weekend and add the below 35 item slamming too

kizxlove commented 7 months ago

You are meaning items aren't being picked up from board because item bench is full of components that are never used by the comp? So something like if component items not in comp build list then throw away component items on random champ to make space on item bench?

Also I'll work on this during my weekend and add the below 35 item slamming too

Glad to hear that. So I don't need to update the code myself again hehe.

Sizzzles commented 7 months ago

Haha sure your code is better than mine

Sizzzles commented 7 months ago

So just an update for you. I'm using the item placement logic from AntonSax's bot in my current build though I have had to change things so it actually works... Mainly adding the correct number for item slots once a item is added to a champ.

I also added logic for Tacticians Crown and all the Glove items since it wasn't there Champs also have recommended items now which we are getting from the deck.json. If we can build recommended items on our champs in the comp it will. We are also slamming items below 35 health

I need to do more testing and remove all the printing of useless spam information so I'm hoping I'll have it done by tomorrow at some point

Sizzzles commented 7 months ago

@kizxlove so I've made a branch for new item placement This is just so I don't overwrite the live version of this bot if this item placement sucks haha

kizxlove commented 7 months ago

I will try it asap. Haha

Sizzzles commented 6 months ago

I've made changes to when secondary items are placed on champs previously one of the conditions was placing when item bench was full of items (10 items) now I've changed this to 6 or more items that way we don't have item orbs on our board like before.

Also added logic for magnetic remover to add a item to a champ then use the remover on that champ that way we don't have them taking up item spaces. Reforger also does with but only if we have more than 2 of the same item so if we have 3 tears it will place a tear on a champ and use reforger on that champ

Still testing remover and reforger... Somehow haven't got these items since updating the logic lol

kizxlove commented 6 months ago

it may be because these items don't have data in the original code. In addition, RITO just updated the vanguard, so I think that we might test this code in clone account to ensure that it's still safe enough for farming tokens.

Sizzzles commented 6 months ago

I've made a few changes... Mostly getting gloves to work correctly since it was still trying to add gloves to champs with items but still not sure if the new code has fixed that but I'll push changes anyway since it has the working remover and reforger code... I also haven't came across anything that has crashed the bot so I think it's fine to push update to the branch