2012-03-18 14:34:39 +01:00
|
|
|
-- this file is loaded after all modules are loaded and initialized
|
2012-01-07 22:10:06 +01:00
|
|
|
-- you can place any custom user code here
|
|
|
|
|
2012-03-18 14:34:39 +01:00
|
|
|
Keyboard.bindKeyDown('Ctrl+R', Client.reloadScripts)
|
2012-04-11 10:05:27 +02:00
|
|
|
|
|
|
|
-- client usage report
|
|
|
|
local reportEvent
|
|
|
|
local reportMessage = g_app.getVersion() .. ";" .. g_app.getBuildRevision() .. ";" .. g_game.getProtocolVersion() .. ";" .. g_app.getBuildDate()
|
|
|
|
function reportClientUsage()
|
|
|
|
if g_game.isOnline() and EnterGame.host and (EnterGame.host:lower():find('trpgb') or EnterGame.host:lower():find('tibiarpgbrasil')) then
|
|
|
|
g_game.talk('!otc-report ' .. reportMessage)
|
|
|
|
end
|
|
|
|
removeEvent(reportEvent)
|
|
|
|
reportEvent = scheduleEvent(reportClientUsage, 5*60000)
|
|
|
|
end
|
|
|
|
connect(g_game, { onLogin = reportClientUsage } )
|