2
0
mirror of https://github.com/OTCv8/otclientv8.git synced 2025-04-30 19:29:21 +02:00
2021-04-07 21:31:27 +00:00

19 lines
675 B
Lua

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