Script Registration #

Low-level core.script.registerScript — prefer sdk2.Register:submit().

core.script.registerScript #

core.script.registerScript(def)

Register script table with engine.

Field Type Description
name string Script display name
icon string Menu icon (UTF-8)
tick function(self, enemy) Per-frame combat callback
menu function() ImGui settings panel
draw function() Overlay draw (non-blocking)
message function() Async worker thread
core.script.registerScript({
    name = "My Script",
    icon = "\xef\x93\xbe",
    tick = function(self, enemy)
        print(getLocalFrameAdvantage())
    end,
    menu = function()
        core.menu.Text("Settings")
    end,
})
1
2
3
4
5
6
7
8
9
10

core.script.isload #

core.script.isload(name)

Returns true if script name exists and is not loaded yet (first menu pass).

if core.script.isload("My Script") then
    -- first menu frame: load saved config defaults
end
1
2
3