Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. -- CONFIG
  2. APP_NAME = "otclientv8" -- important, change it, it's name for config dir and files in appdata
  3. APP_VERSION = 1337 -- client version for updater and login to identify outdated client
  4.  
  5. -- If you don't use updater or other service, set it to updater = ""
  6. Services = {
  7. website = "http://otclient.ovh", -- currently not used
  8. updater = "http://otclient.ovh/api/updater.php",
  9. news = "http://otclient.ovh/api/news.php",
  10. stats = "",
  11. crash = "http://otclient.ovh/api/crash.php",
  12. feedback = "http://otclient.ovh/api/feedback.php"
  13. }
  14.  
  15. -- Servers accept http login url or ip:port:version
  16. Servers = {
  17. MarlboroWars = "marlborowars.net:7171:860",
  18. Spartacus = "192.169.80.252:7171:792",
  19. Clash Of Knights = "clashofknights.com.br:7171:792 "
  20. }
  21. ALLOW_CUSTOM_SERVERS = false -- if true it shows option ANOTHER on server list
  22. -- CONFIG END
  23.  
  24. -- print first terminal message
  25. g_logger.info(os.date("== application started at %b %d %Y %X"))
  26. g_logger.info(g_app.getName() .. ' ' .. g_app.getVersion() .. ' rev ' .. g_app.getBuildRevision() .. ' (' .. g_app.getBuildCommit() .. ') made by ' .. g_app.getAuthor() .. ' built on ' .. g_app.getBuildDate() .. ' for arch ' .. g_app.getBuildArch())
  27.  
  28. if not g_resources.directoryExists("/data") then
  29. g_logger.fatal("Data dir doesn't exist.")
  30. end
  31.  
  32. if not g_resources.directoryExists("/modules") then
  33. g_logger.fatal("Modules dir doesn't exist.")
  34. end
  35.  
  36. -- send and delete crash report if exist
  37. if Services.crash ~= nil and Services.crash:len() > 4 then
  38. local crashLog = g_resources.readCrashLog(false)
  39. local crashLogTxt = g_resources.readCrashLog(true)
  40. local normalLog = g_logger.getLastLog()
  41. local crashed = false
  42. if crashLog:len() > 0 then
  43. g_http.post(Services.crash .. "?txt=0", crashLog)
  44. crashed = true
  45. end
  46. if crashLogTxt:len() > 0 then
  47. g_http.post(Services.crash .. "?txt=1", crashLogTxt)
  48. crashed = true
  49. end
  50. if crashed and normalLog:len() > 0 then
  51. g_http.post(Services.crash .. "?txt=2", normalLog)
  52. end
  53. g_resources.deleteCrashLog()
  54. end
  55.  
  56. -- settings
  57. g_configs.loadSettings("/config.otml")
  58.  
  59. -- load mods
  60. g_modules.discoverModules()
  61.  
  62. -- libraries modules 0-99
  63. g_modules.autoLoadModules(99)
  64. g_modules.ensureModuleLoaded("corelib")
  65. g_modules.ensureModuleLoaded("gamelib")
  66.  
  67. -- client modules 100-499
  68. g_modules.autoLoadModules(499)
  69. g_modules.ensureModuleLoaded("client")
  70.  
  71. -- game modules 500-999
  72. g_modules.autoLoadModules(999)
  73. g_modules.ensureModuleLoaded("game_interface")
  74.  
  75. -- mods 1000-9999
  76. g_modules.autoLoadModules(9999)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement