• 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!

Cancel walk (while holding an arrow key) when you press another arrow key (without releasing the previous arrow key)

Terotrificy

Veteran OT User
Joined
Oct 18, 2020
Messages
401
Solutions
13
Reaction score
254
Location
Santiago, Chile.
Hi, i'm using Edubart Otclient 7.72 and i'm trying to make it work like Tibia Client 7.72.

Using Otclient:

Right now, if i'm holding down a key direction i.e up arrow (1) and i press any other key direction i.e left arrow (2). (without releasing the up key arrow (1)), as soon as i release the left key arrow (2), i keep walking to north (1).

Using Tibia Client:

This behaviour is different in Tibia Client tho, if i hold down a key arrow (1) and press another key arrow (2) without releasing the previous (1), the character walks 1 sqm to the last key arrow direction (2) and stops.

I guess in this .cpp should be the trick to make it happen, although i haven't managed to see where it sends the info to keep the character moving while holding down a key.

Anybody willing to help me?

Tibia Client:

Otclient:
 
If you want to change the behavior of your movement keys, you need to look for a place where the walk is being called, not at the walk method itself.
To do so, google grep if you are on Linux or "find all references" if you are using Visual Studio.

Anyway, the repo you are referring to is 5 years old - you will be way better off applying these few commits from this repo in any, more up-to-date one.
If for some reason you don't want to use OTCv8, try these:
Otland fork
Mehah's OTC
 
If you want to change the behavior of your movement keys, you need to look for a place where the walk is being called, not at the walk method itself.
To do so, google grep if you are on Linux or "find all references" if you are using Visual Studio.

Anyway, the repo you are referring to is 5 years old - you will be way better off applying these few commits from this repo in any, more up-to-date one.
If for some reason you don't want to use OTCv8, try these:
Otland fork
Mehah's OTC
Thank you very much! are the otclientv8 sources availables to compile btw?
 
Thank you very much! are the otclientv8 sources availables to compile btw?
Only Developers version, it's a version without optimization but allows you to create your own features and PR them. After they get merged they end up in the release version (the one that you cannot compile yourself if you don't have paid access).

But changes like you mentioned don't even require you to recompile - you can do it purely in Lua there.
 
Back
Top