Closed mathiconical closed 1 year ago
Looks like I need to calculate like I did to get the correctly monster bar. Going to fix it this weekend.
@mathiconical
[BOTTOM/RIGHT EDGES]
When trying to get target creature by right/bottom edge, looks like the creature do not appear in battle list and the creature bar isnt in hud anymore it means, there is no way to have this bug in right/bottom edge. So the final decision by PyTibia will be "you are not attacking monsters", you can see below:
[LEFT EDGE]
When creature is almost crossing limit, I think PyTibia can parse since the count of red border around monster should be 50+, so in below image example, everything will works fine:
When cross is more deep like image below, I think PyTibia can take target creature by horizontal borders since the sum of red horizontal borders could be (64(border size) 4(gap)) 2(lines) = 512pixels for 1080p resolution and (32(border size) 2(gap)) 2(lines) = 128pixels for 720p resolution.
A more deep cross. You can see images and response by PyTibia, still possible to take target creature:
[('Sandcrawler', 'monster', True, [0, 2], [33269, 32291, 7], [248, 180])]
A 2x more deep cross. You can see images and response by PyTibia, still possible to take target creature:
[('Sandcrawler', 'monster', True, [0, 2], [33269, 32291, 7], [248, 180])]
A 3x more deep cross. You can see images and response by PyTibia, still possible to take target creature:
[('Sandcrawler', 'monster', True, [0, 2], [33268, 32291, 7], [248, 180])]
The last example is a rare
exception, will occurs only when:
[Conclusion]
Sometimes will fail because a tree or any object can hide the "red border around monster" and there is nothing to do, you can see examples below:
[Solutions]
@lucasmonstro Very useful solutions, working perfectly now.
@mathiconical I'm going to: -- calculate with fewer pixels for 720p resolutions -- since creature is in the edge, I need to check all monsters to reduce pixels count
Done!
Describe the bug When the creature goes to out of bounds of HUD the bot cant keep find them.
To Reproduce Steps to reproduce the behavior:
Screenshots
Desktop (please complete the following information):