• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Trying to do a World2Screen function

kuhi

Premium User
Premium User
Joined
Aug 26, 2012
Messages
197
Solutions
1
Reaction score
79
Location
x64dbg
GitHub
Kuhicop
Hello, anyone knows how OtClient converts WndProc XY to the client XYZ coordinates?

I'm trying to make a function to convert XYZ from tibia to XY to screen coordinates (World2Screen).

For now, the way I know to achieve it would be by finding the viewmatrix and angles like any ESP. Or also I've found the function transformPositionTo2D in mapview.cpp

I'm not sure how to proceed and maybe there's someone with experience in this subject that could throw some light :)
 
What exactly are you trying to achieve? Looks like you are overthinking this. What angles? There are no angles in Tibia. This is 2D rendering, not 3D, There is no Z position either.
 
What exactly are you trying to achieve? Looks like you are overthinking this. What angles? There are no angles in Tibia. This is 2D rendering, not 3D, There is no Z position either.
For example, you have brown mushrooms in arrow slot, how to know it's screen coordinates?
 
You have widgets system, with root on very bottom, You know root size, oords etc, root has children with position, which can be relative to parent. You have go through widget tree and find final position. Brown mushrooms in arrow slot is in fact UIItem located somewhere in the widget tree.
 
UIWidget::getPosition()

E.g., brownMushroomsItemWidget:getPosition()
 
Do you want to read it from Lua, C++ or from BOT (other application)?
from my bot GitHub - Kuhicop/Tibia-OpenGL-Imgui: Learning to make a Tibia bot (https://github.com/Kuhicop/Tibia-OpenGL-Imgui)
Gesior you are a legend <3
Post automatically merged:

UIWidget::getPosition()

E.g., brownMushroomsItemWidget:getPosition()
ok I think I got the getPosition() function I will play a bit with widgets to see what I can get :)
1655821034587.png
Thank you <3
 
Last edited:
Back
Top