mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-12-17 23:27:11 +01:00
fix items, map, protocls
This commit is contained in:
19
800OTClient/modules/game_bot/functions/tools.lua
Normal file
19
800OTClient/modules/game_bot/functions/tools.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
local context = G.botContext
|
||||
|
||||
context.encode = function(data, indent) return json.encode(data, indent or 2) end
|
||||
context.decode = function(text) local status, result = pcall(function() return json.decode(text) end) if status then return result end return {} end
|
||||
|
||||
context.displayGeneralBox = function(title, message, buttons, onEnterCallback, onEscapeCallback)
|
||||
local box = displayGeneralBox(title, message, buttons, onEnterCallback, onEscapeCallback)
|
||||
box.botWidget = true
|
||||
return box
|
||||
end
|
||||
|
||||
context.doScreenshot = function(filename)
|
||||
g_app.doScreenshot(filename)
|
||||
end
|
||||
context.screenshot = context.doScreenshot
|
||||
|
||||
context.getVersion = function()
|
||||
return g_app.getVersion()
|
||||
end
|
||||
Reference in New Issue
Block a user