mirror of
https://github.com/edubart/otclient.git
synced 2025-10-16 20:43:26 +02:00
Implement rule violations, closes #218
This commit is contained in:
@@ -1,9 +1,28 @@
|
||||
function init()
|
||||
g_keyboard.bindKeyDown('Ctrl+R', toggleMount, gameRootPanel)
|
||||
connect(g_game, {
|
||||
onGameStart = online,
|
||||
onGameEnd = offline
|
||||
})
|
||||
if g_game.isOnline() then online() end
|
||||
end
|
||||
|
||||
function terminate()
|
||||
g_keyboard.unbindKeyDown('Ctrl+R', gameRootPanel)
|
||||
disconnect(g_game, {
|
||||
onGameStart = online,
|
||||
onGameEnd = offline
|
||||
})
|
||||
end
|
||||
|
||||
function online()
|
||||
if g_game.getFeature(GamePlayerMounts) then
|
||||
g_keyboard.bindKeyDown('Ctrl+R', toggleMount)
|
||||
end
|
||||
end
|
||||
|
||||
function offline()
|
||||
if g_game.getFeature(GamePlayerMounts) then
|
||||
g_keyboard.unbindKeyDown('Ctrl+R')
|
||||
end
|
||||
end
|
||||
|
||||
function toggleMount()
|
||||
|
Reference in New Issue
Block a user