Deopster / Mercenaries-Hearthstone-game-bot

bot for hearthstone mercenaries mode
Apache License 2.0
57 stars 15 forks source link

[Error] doesn't chose a character to fight and use only the one on the left #23

Open Efemache opened 3 years ago

Efemache commented 3 years ago

The bot start a game (level and normal/heroic found). It doesn't chose any minion to put in the battle and click on start. So Hearthstone choose the 3 first minions. After that, the bot click on your minion in the middle (the second) but do nothing and click on the first one (on your left) and choose to attack with this one but only with him; after that, it clicks on "battle/ready" button.

OS: Linux Resolution: 1920x1080 Language : English Fullscreen : no, because in fullscreen, the bot doesn't find chekers/menu.png (the screenshot is correct, though)

You'll find the logs / output below with the error "Battle error,please write what happend on github issue" :

start ['1920x1080', '27', 'Felwood', 'Normal', 'False', 'False', 1] 42 38 40 auto auto auto

[...]

['38.Natalie Seline.Blue', '40.Tamsin Roame.Blue', "42.Vol'jin.Blue", 'auto', 'auto', 'auto'] ['Blue', 'Blue', 'Blue', 'auto', 'auto', 'auto'] 204 38 212 32 151 32 Loop start Found chekers/menu.png 1000 310 Битва Found UI_ellements/battle.png 972 338 Not found UI_ellements/Felwood.png Not found UI_ellements/normal.png Not found chekers/levelstarted.png Not found buttons/play.png Found buttons/sta.png 1269 786 Found levels/27.png 811 758 Found buttons/start.png 1486 894 Not found chekers/find.png Found chekers/find.png 411 410 Found buttons/start1.png 1432 921 Not found buttons/play.png Not found buttons/submit.png Not found buttons/play.png Not found buttons/submit.png Found buttons/play.png 1494 865 Not found buttons/num.png Not found buttons/num.png Not found buttons/num.png Not found buttons/num.png Not found buttons/num.png Not found buttons/num.png Not found buttons/num.png Not found buttons/num.png Not found buttons/num.png Not found buttons/num.png Not found buttons/num.png Not found buttons/num.png Found buttons/num.png 1524 531 (xp=0, yp=69, widthp=1920, heightp=1011) Not found buttons/allready.png Found buttons/onedie.png 1524 534 Not found chekers/win.png Not found buttons/startbattle.png Not found buttons/startbattle1.png Not found buttons/onedie.png Not found chekers/win.png Not found buttons/startbattle.png Not found buttons/startbattle1.png Not found buttons/onedie.png Not found chekers/win.png Not found buttons/startbattle.png Not found buttons/startbattle1.png Not found buttons/onedie.png Not found chekers/win.png Not found buttons/startbattle.png Not found buttons/startbattle1.png Not found buttons/onedie.png Not found chekers/win.png Not found buttons/startbattle.png Not found buttons/startbattle1.png Not found buttons/onedie.png Not found chekers/win.png Found buttons/startbattle.png 1525 528 (xp=0, yp=69, widthp=1920, heightp=1011) entered screenpart Found UI_ellements/red.png 1070 415 Found UI_ellements/green.png 893 372 Found UI_ellements/blue.png 773 417 Not found UI_ellements/noclass.png red: (1070, 415) green: (893, 372) blue: (773, 417) noclass: (0, 0) Not found UI_ellements/sob.png entered screenpart enter serch Red Unsort Data of our heroes [['Red', 829, 816]] ['Red', 829, 816] it wrote 829 in 0 enemiwiz now [829, 0, 0, 0, 0, 0] herobattle now [['Red', 829, 816]] [829, 0, 0, 0, 0, 0] Sort Data of our heroes [['Red', 829, 816]] enter serch Green enter serch Blue cords of my heroes [['Red', 829, 816]] print index ['Red', 829, 816] Attack function open Red Red Hero dump [] Not found buttons/allready.png Not found buttons/allready.png Not found buttons/allready.png Not found buttons/allready.png Not found buttons/allready.png Not found buttons/allready.png Not found buttons/allready.png Not found buttons/allready.png Not found buttons/allready.png Not found buttons/allready.png Not found buttons/allready.png Not found buttons/allready.png Battle error,please write what happend on github issue Found buttons/startbattle.png 1524 529 Not found buttons/onedie.png Not found chekers/win.png Not found buttons/startbattle.png Not found buttons/startbattle1.png Not found buttons/onedie.png Not found chekers/win.png Not found buttons/startbattle.png Not found buttons/startbattle1.png Not found buttons/onedie.png Not found chekers/win.png Not found buttons/startbattle.png Not found buttons/startbattle1.png Not found buttons/onedie.png Not found chekers/win.png Found buttons/startbattle.png 1525 528 (xp=0, yp=69, widthp=1920, heightp=1011) entered screenpart Found UI_ellements/red.png 1070 415 Found UI_ellements/green.png 893 372 Found UI_ellements/blue.png 773 417 Not found UI_ellements/noclass.png red: (1070, 415) green: (893, 372) blue: (773, 417) noclass: (0, 0) Not found UI_ellements/sob.png

Deopster commented 3 years ago

was it working before?

Deopster commented 3 years ago

course i did not change anything yet, just move yr updates to main fork.

Efemache commented 3 years ago

was it working before?

No, it wasn't working. I have the problem since the beginning. I don't know why and I was occupied with the Linux port :) so I didnt' take a lot of time to find the problem.

I know a lot of your code now but not this part.

Efemache commented 3 years ago

(closed by misclick)

Deopster commented 3 years ago

check out i fixed it

Deopster commented 3 years ago

published on main

Efemache commented 3 years ago

check out i fixed it

Hi, no but it's better, I can see it. The mouse is trying to get over cards and then the bot try to put down each card. It think coordinate must be a little to high (or to low in fact)

Deopster commented 3 years ago

Could be, for me and other dude all is working maybe it is some specific of Linux UX, i think we should communicate by discord so i could see what is happening and after fix it.

вт, 9 нояб. 2021 г., 00:57 Efemache @.***>:

check out i fixed it

Hi, no but it's better, I can see it. The mouse is trying to get over cards and then the bot try to put down each card. It think coordinate must be a little to high (or to low in fact)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Deopster/Mercenaries-Hearthstone-game-bot/issues/23#issuecomment-963610450, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQJCAACPEZ25JITYIJXMUI3ULBBT7ANCNFSM5HTJAGLA .

Efemache commented 3 years ago

Hi,

I suppose you can have the same problem with Windows if you use Hearthstone in window mode (not fullscreen).

I think you can solve the problem with this solution, replace :

Efemache commented 3 years ago

Could be, for me and other dude all is working maybe it is some specific of Linux UX, i think we should communicate by discord so i could see what is happening and after fix it. вт, 9 нояб. 2021 г., 00:57 Efemache @.***>: check out i fixed it Hi, no but it's better, I can see it. The mouse is trying to get over cards and then the bot try to put down each card. It think coordinate must be a little to high (or to low in fact) — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#23 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQJCAACPEZ25JITYIJXMUI3ULBBT7ANCNFSM5HTJAGLA .

Hi, I found the problem. I had to replace "windowMP()[3] - windowMP()[3] / 10" with "windowMP()[1] + windowMP()[3] * 0.91". There is a lot of misclick I need to change. I don't know if it's related to the resolution. I'll post an update when it will be finished so you can check on Windows with your resolution.

Efemache commented 2 years ago

fixed here : https://github.com/Efemache/Mercenaries-Farm-bot