lucasmonstrox / PyTibia

🤖 Fastest Tibia PixelBot. A great bot for Auto, Cavebot, Healing, Macro, Refill, Targeting and Training!
MIT License
266 stars 62 forks source link

[BUG] - Positions are None #83

Open TS-Yaloshi opened 1 year ago

TS-Yaloshi commented 1 year ago

Describe the bug image

The positions are None, which results in a TypeError None. The screenshot is all zero.

To Reproduce Select Tibia window in the app. Click on Play.

Expected behavior It detects the tabs correctly.

kaybenot commented 1 year ago

This issue also happens to me

Gopal-Kshetri commented 1 year ago

yes, happened similar on mine too. image

lucasmonstrox commented 1 year ago

@TS-Yaloshi can you give me a screenshot?

TS-Yaloshi commented 1 year ago

A screenshot of what exactly? I posted one of the program in debug mode. The error is similar to Gopal-Kshetri's screenshot.

Gopal-Kshetri commented 1 year ago

From what I have deduced so far is, battleye causes the screenshots of the game to be black after 2 minutes or so of logging in. Due to this we get the above error of return None. The screenshot taken are black.

Have you considered this issue and tackled in your code? @lucasmonstrox

thiagoretes commented 1 year ago

If the problem is related to BattleEye you should create a projection of the window using OBS Studio. Although I'm not sure if the latest version of OBS will work. Probably version 24~26 are better.

Gopal-Kshetri commented 1 year ago

yeah, I tried that but the pytibia project doesn't detect anything other than the game window hence unable to give the obs projection as an input to the project.

thiagoretes commented 1 year ago

Well, after looking into the code it needs some refactoring to be able to grab screen from OBS and inject input into Tibia window. Currently Lucas is doing all the tasks in his own OT, that's why it's not ready for use with OBS.