@ -1,4 +1,4 @@
WALK_AUTO_REPEAT_DELAY = 8 0
WALK_AUTO_REPEAT_DELAY = 15 0
gameRootPanel = nil
gameRootPanel = nil
gameMapPanel = nil
gameMapPanel = nil
@ -14,7 +14,7 @@ bottomSplitter = nil
lastWalkDir = nil
lastWalkDir = nil
arrowKeys = {
arrowKeys = {
[ North ] = " Up " ,
[ North ] = ' Up ' ,
[ South ] = ' Down ' ,
[ South ] = ' Down ' ,
[ East ] = ' Right ' ,
[ East ] = ' Right ' ,
[ West ] = ' Left ' ,
[ West ] = ' Left ' ,
@ -182,7 +182,6 @@ function tryLogout()
end
end
function smartWalk ( defaultDir )
function smartWalk ( defaultDir )
--[[ TODO: Add walk event stack ]]
local rebindKey = false
local rebindKey = false
local lastKey = arrowKeys [ lastWalkDir ]
local lastKey = arrowKeys [ lastWalkDir ]
@ -229,11 +228,7 @@ function smartWalk(defaultDir)
g_game.forceWalk ( dir )
g_game.forceWalk ( dir )
end
end
else
else
--if g_game.getLocalPlayer():canWalk(dir) then
g_game.walk ( dir )
g_game.walk ( dir )
--else
--end
end
end
if rebindKey then
if rebindKey then
@ -284,7 +279,7 @@ function onUseWith(clickedWidget, mousePosition)
if clickedWidget : getClassName ( ) == ' UIMap ' then
if clickedWidget : getClassName ( ) == ' UIMap ' then
local tile = clickedWidget : getTile ( mousePosition )
local tile = clickedWidget : getTile ( mousePosition )
if tile then
if tile then
g_game.useWith ( selectedThing , tile : getTopMultiUseThing ( ) )
g_game.useWith ( selectedThing , tile : getTopMultiUseThing ( false ) )
end
end
elseif clickedWidget : getClassName ( ) == ' UIItem ' and not clickedWidget : isVirtual ( ) then
elseif clickedWidget : getClassName ( ) == ' UIItem ' and not clickedWidget : isVirtual ( ) then
g_game.useWith ( selectedThing , clickedWidget : getItem ( ) )
g_game.useWith ( selectedThing , clickedWidget : getItem ( ) )