mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
Added new features to the options.
* Added 'enable smart walk' and 'show connection ping' options. * Minor tidy ups.
This commit is contained in:
@@ -154,22 +154,27 @@ end
|
||||
|
||||
function smartWalk()
|
||||
local dir
|
||||
if g_keyboard.isKeyPressed('Up') and g_keyboard.isKeyPressed('Left') then
|
||||
dir = NorthWest
|
||||
elseif g_keyboard.isKeyPressed('Up') and g_keyboard.isKeyPressed('Right') then
|
||||
dir = NorthEast
|
||||
elseif g_keyboard.isKeyPressed('Down') and g_keyboard.isKeyPressed('Left') then
|
||||
dir = SouthWest
|
||||
elseif g_keyboard.isKeyPressed('Down') and g_keyboard.isKeyPressed('Right') then
|
||||
dir = SouthEast
|
||||
elseif g_keyboard.isKeyPressed('Up') then
|
||||
dir = North
|
||||
elseif g_keyboard.isKeyPressed('Down') then
|
||||
dir = South
|
||||
elseif g_keyboard.isKeyPressed('Left') then
|
||||
dir = West
|
||||
elseif g_keyboard.isKeyPressed('Right') then
|
||||
dir = East
|
||||
if Options.getOption('smartWalk') then
|
||||
if g_keyboard.isKeyPressed('Up') and g_keyboard.isKeyPressed('Left') then
|
||||
dir = NorthWest
|
||||
elseif g_keyboard.isKeyPressed('Up') and g_keyboard.isKeyPressed('Right') then
|
||||
dir = NorthEast
|
||||
elseif g_keyboard.isKeyPressed('Down') and g_keyboard.isKeyPressed('Left') then
|
||||
dir = SouthWest
|
||||
elseif g_keyboard.isKeyPressed('Down') and g_keyboard.isKeyPressed('Right') then
|
||||
dir = SouthEast
|
||||
end
|
||||
end
|
||||
if not dir then
|
||||
if g_keyboard.isKeyPressed('Up') then
|
||||
dir = North
|
||||
elseif g_keyboard.isKeyPressed('Down') then
|
||||
dir = South
|
||||
elseif g_keyboard.isKeyPressed('Left') then
|
||||
dir = West
|
||||
elseif g_keyboard.isKeyPressed('Right') then
|
||||
dir = East
|
||||
end
|
||||
end
|
||||
|
||||
if Options.getOption('walkBooster') then
|
||||
|
Reference in New Issue
Block a user