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

C++ Where to find right click & left click in sources [walking with mouse]

Obito

0x1337
Joined
Feb 17, 2011
Messages
351
Solutions
8
Reaction score
151
Location
Egypt
Hello where to find the responsible codes for walking with mouse clicks in the source files?
 
Solution
When you left-click, the client generates a list of directions to move your character to that tile, sends that list to the server, and then the server will attempt to walk that list: otland/forgottenserver (https://github.com/otland/forgottenserver/blob/a880956e6e7d0cebd6eba996e4cda10fe2fc554f/src/protocolgame.cpp#L738-L768)

When you right-click, the client should only give you context menu; as far as I know, you can't right-click to walk unless you select the "Use" option from the context menu that is shown. If the item is usable, and you're too far away, it will then attempt to walk to that item:otland/forgottenserver...
Are you referring to the client (OTC) or the server (TFS)?
I'm using the tfs
Post automatically merged:

Are you referring to the client (OTC) or the server (TFS)?
My sources bugged in right click when i right click multiple times the character back to the opposite direction which make some annoying here is some video to explain more"the bug "
 
Last edited:
When you left-click, the client generates a list of directions to move your character to that tile, sends that list to the server, and then the server will attempt to walk that list: otland/forgottenserver (https://github.com/otland/forgottenserver/blob/a880956e6e7d0cebd6eba996e4cda10fe2fc554f/src/protocolgame.cpp#L738-L768)

When you right-click, the client should only give you context menu; as far as I know, you can't right-click to walk unless you select the "Use" option from the context menu that is shown. If the item is usable, and you're too far away, it will then attempt to walk to that item:otland/forgottenserver (https://github.com/otland/forgottenserver/blob/a880956e6e7d0cebd6eba996e4cda10fe2fc554f/src/game.cpp#L2111-L2136)

I do see the "You cannot use this object." message in your video, so it shouldn't be getting past that if-statement.

Hopefully that's enough information to get you started.
 
Solution
When you left-click, the client generates a list of directions to move your character to that tile, sends that list to the server, and then the server will attempt to walk that list: otland/forgottenserver (https://github.com/otland/forgottenserver/blob/a880956e6e7d0cebd6eba996e4cda10fe2fc554f/src/protocolgame.cpp#L738-L768)

When you right-click, the client should only give you context menu; as far as I know, you can't right-click to walk unless you select the "Use" option from the context menu that is shown. If the item is usable, and you're too far away, it will then attempt to walk to that item:otland/forgottenserver (https://github.com/otland/forgottenserver/blob/a880956e6e7d0cebd6eba996e4cda10fe2fc554f/src/game.cpp#L2111-L2136)

I do see the "You cannot use this object." message in your video, so it shouldn't be getting past that if-statement.

Hopefully that's enough information to get you started.
Thanks very much for the useful information sir.
 
hello i need help with othire distribution, i need remove right click walking character, someone help me?, or block this in otclient
 
Back
Top