2012-07-24 07:30:08 +02:00
|
|
|
function init()
|
2012-07-26 13:18:49 +02:00
|
|
|
g_keyboard.bindKeyDown('Ctrl+R', toggleMount, gameRootPanel)
|
2012-07-15 13:49:28 +02:00
|
|
|
end
|
|
|
|
|
2012-07-24 07:30:08 +02:00
|
|
|
function terminate()
|
2012-07-26 13:18:49 +02:00
|
|
|
g_keyboard.unbindKeyDown('Ctrl+R', gameRootPanel)
|
2012-07-15 13:49:28 +02:00
|
|
|
end
|
|
|
|
|
2012-07-24 07:30:08 +02:00
|
|
|
function toggleMount()
|
2012-07-26 13:18:49 +02:00
|
|
|
if g_game.getFeature(GamePlayerMounts) then
|
|
|
|
g_game.mount(not g_game.isMounted())
|
|
|
|
end
|
2012-07-15 13:49:28 +02:00
|
|
|
end
|
|
|
|
|
2012-07-24 07:30:08 +02:00
|
|
|
function dismount()
|
2012-07-26 13:18:49 +02:00
|
|
|
if g_game.getFeature(GamePlayerMounts) then
|
|
|
|
g_game.mount(false)
|
|
|
|
end
|
2012-07-15 16:28:15 +02:00
|
|
|
end
|