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

Hotkeys

But you must add it to console.lua to function enableChat() or disableChat() (where you use bind function).
Because you want this only when chat is distabled, so you must delete this functions from interface.lua.
Now your binds functions from disableChat() is empty/do nothing.

So I need to...

function enableChat()
g_keyboard.unbindKeyPress("Shift+W")
g_keyboard.unbindKeyPress("Shift+D")
g_keyboard.unbindKeyPress("Shift+S")
g_keyboard.unbindKeyPress("Shift+A")

and

function disableChat()
g_keyboard.bindKeyPress('Shift+W', function() g_game.turn(North) changeWalkDir(North) end, gameRootPanel)
g_keyboard.bindKeyPress('Shift+D', function() g_game.turn(East) changeWalkDir(East) end, gameRootPanel)
g_keyboard.bindKeyPress('Shift+S', function() g_game.turn(South) changeWalkDir(South) end, gameRootPanel)
g_keyboard.bindKeyPress('Shift+A', function() g_game.turn(West) changeWalkDir(West) end, gameRootPanel)

and remove the lines:

g_keyboard.bindKeyPress('Shift+W', function() g_game.turn(North) changeWalkDir(North) end, gameRootPanel)
g_keyboard.bindKeyPress('Shift+D', function() g_game.turn(East) changeWalkDir(East) end, gameRootPanel)
g_keyboard.bindKeyPress('Shift+S', function() g_game.turn(South) changeWalkDir(South) end, gameRootPanel)
g_keyboard.bindKeyPress('Shift+A', function() g_game.turn(West) changeWalkDir(West) end, gameRootPanel)

from interface.lua to only work on console.lua?
 
I think so.
Yeah, it works!!!
Thank you again, haha.

I think I'm starting to understand how the scripts work, thank you soooooooo so much. Really!

Could you still helping me if I ask how I can make disable chat be default? And when players need to write something they would need to press Enter and write what they need, and when pressing Enter again the message get sent and chat back to "disable"? I would need to remove that box that works with a function to enable/disable chat I guess.
 
Back
Top