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

OTClient Problem in the walking system (auto walk) when there is an obstacle in front

joaobobalhao

Member
Joined
Aug 30, 2011
Messages
21
Reaction score
12
Hello Guys,
Tools:
I'm using 772 client (edubart otclient) with Nostalrius server (772)

Context:
If im walking with keyboard and there is an obstacle in front of me and I do not stop waiting a second or miliseconds before I send him to walk (click on a point on the map) the autowalking system cannot reach and it bugs.

Working example:
When I have the character stopped and click on the minimap or the map area (automatic walking) for him to go there, it works as shown in the video below:

My problem example:
When I'm walking (straight or diagonal) and I quickly click on the map for the character to continue walking (auto walking) and there is an obstacle right in front of him, he can't proceed and says he doesn't have space:

Note: It is as if the character was already in the SQM in front of the obstacle but OTClient thinks he is still a SQM behind and tries to go forward.

OTClient V8 working fine:

I noticed that in otclientv8 he doesn't do auto walking action right when I click, he has a delay to finish the current action and do the next one.

Why don't I use v8?
I would like to use otclient (edubart) because I would like to customize it and otclientv8 does not provide all the code to build

My attempts to fix:
I tried to rewrite the autoWalk method (localplayer.cpp) and also tried to update getStepDuration (creature.cpp) but I was unsuccessful to fix it.

Can anyone help me with this problem? =[
 
After a lot of studying the code and trying to fix it
I forced disable GameForceFirstAutoWalkStep on gameinterface.lua.


Hhere my contribution for those who suffer from the same problem:
File: game_interface/gameinterface.lua

Locate:
Lua:
function onGameStart()
  show() 
  -- open tibia has delay in auto walking
  if not g_game.isOfficialTibia() then
    g_game.enableFeature(GameForceFirstAutoWalkStep)
  else
    g_game.disableFeature(GameForceFirstAutoWalkStep)
  end
end

Replace to:
Lua:
function onGameStart()
  show()
  g_game.disableFeature(GameForceFirstAutoWalkStep) 
end

I hope to help someone =]
 
Back
Top