Hello there has been a long time since I posted here. I am not even sure anyone is still online these days.
I wanted to share a mini tutorial with you how to work with Tibia on Linux.
Tools needed:
1. Cheat engine server (https://www.cheatengine.org/downloads.php)
2. Virtualbox, virtualmanager or vmwareplayer( I prefer virtual manager) with a working windows installation
3. On the windows VM install cheatengine.
Alternatively, you can install cheatengine using wine, but you still need cheat engine server to interact with the client.
If you have not heard of WinApps I recommend you to cheat it out, then you can run windows apps "natively" on Linux with a backend VM.
Let's find an address we start easy by finding player experience.
I will not use any pointers can or anything, the method I use seems to work quite well.
https://imgur.com/Vklj1h1
These steps should be very easy for anyone to follow.
Next right click on that address and click "Find out what writes to this address"
Then kill a monster to gain some experience you we see some result in my case I got this.
https://imgur.com/edFmdrS
Next, add the address value of the RDI in my case it is 084091C8 to the address list.
We have now an address at 84091C8 that holds the value 26812944 but this "key" is unique so if we find that key in memory we can easily find the player experience address. (keep in mind that these keys changes on client updates)
Please verify this by searching for a new value in cheat engine and enter the value 26812944.
https://imgur.com/Lq3jHZ3
So with this logic we can implement a memory scanner in our favorite language(i have two versions one in java and one in c
https://gitlab.klusbert.xyz/klusbert...p-memory-linux
https://gitlab.klusbert.xyz/klusbert/java-memory
The java version seems a bit faster and is more updated including lighthack using battlelist.
The battle list reader is however not perfect, I had some trouble navigating through the tree structure but it seems to work so I will leave it for now.
Here is a sample of code that should help you understand how I find these addresses in memory.Code:@Override public void scan(MemoryScanner _memoryScanner, Map<AddressIdentifier, Long> addresses) { List<Long> result = _memoryScanner.scanInt(26812944, true); if (result.size() != 1) { System.out.println("Error finding player Experience address"); } long baseAddress = result.get(0); addresses.put(AddressIdentifier.PLAYER_EXPERIENCE, baseAddress + 0x28); }
The reason why I left the C# project is that I can't find any easy way to create a UI with c# in Linux. Monodevelop crashes for me without any error code and programmatically create UI is not my cup of tea.
Any tips is appreciated
I thought of going with Python since I used it in a deep learning course but Python gives me rashes.
I tried to create a model that was able to identify creatures from the screen, if you want you can check that project here. https://colab.research.google.com/dr...YBOX5S-JoKvrFZ