cssrumi / tibia-bot

0 stars 0 forks source link

Tibia Global #1

Closed Warlockx closed 2 years ago

Warlockx commented 2 years ago

This is not working on global right? since tibia lets you take some screenshots with winapi, then blocks it. Been trying to find a way to hook the game engine like OBS does, but it seems like you need to inject a dll and communicate with pipe.

cssrumi commented 2 years ago

I've tested that on ots only. In case of problems with winapi you can switch grabber to Pil version (PilApplicationGrabber) and then try it :) maybe it will work. There is a lot of magins that has to be fixed. I will try to make it easly switchable in next versions. I have a plan of grabbing OBS window but I'm working on cave bot currently.

Warlockx commented 2 years ago

im starting to build mine in linux, since there's no prevention from taking screenshots there, but nice project, just seems like theres alot of overhead with those manager classes like attrs, but maybe I'm wrong.

cssrumi commented 2 years ago

Maybe if you would create thousands of them then it could have some overhead, but here its not the case. Most of the time they are created once so there is not so much of that. In case of classes that are created multiple times and contains strict fields I would recommend using slots. https://www.attrs.org/en/stable/glossary.html#term-slotted-classes I used that for player state. https://github.com/cssrumi/tibia-bot/blob/master/src/ctx/player.py

cssrumi commented 2 years ago

Look at https://www.attrs.org/en/stable/overview.html#what-attrs-is-not :) so if you like attr.s classes then it's worth using them.