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

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

Open
Efemache opened this issue Nov 8, 2021 · 11 comments

Comments

@Efemache
Copy link
Contributor

Efemache commented Nov 8, 2021

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
Copy link
Owner

Deopster commented Nov 8, 2021

was it working before?

@Deopster
Copy link
Owner

Deopster commented Nov 8, 2021

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

@Efemache
Copy link
Contributor Author

Efemache commented Nov 8, 2021

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 Efemache closed this as completed Nov 8, 2021
@Efemache Efemache reopened this Nov 8, 2021
@Efemache
Copy link
Contributor Author

Efemache commented Nov 8, 2021

(closed by misclick)

@Deopster
Copy link
Owner

Deopster commented Nov 8, 2021

check out i fixed it

@Deopster
Copy link
Owner

Deopster commented Nov 8, 2021

published on main

@Efemache
Copy link
Contributor Author

Efemache commented Nov 8, 2021

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
Copy link
Owner

Deopster commented Nov 8, 2021 via email

@Efemache
Copy link
Contributor Author

Efemache commented Nov 9, 2021

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 :

  • " ... = windowMP()[2]" by " ... = windowMP()[0] + windowMP()[2]"
  • " ... = windowMP()[3]" by " ... = windowMP()[1] + windowMP()[3]"
  • " ... = windowMP()[3] - windowMP()[3] / 10 " by " ... = windowMP()[1] + windowMP()[3]* 0.9"
  • etc...

@Efemache
Copy link
Contributor Author

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
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants