Oth
Raw hook handles, hook threads and trampoline calls.
Installs a low-level function hook.
local handle = oth.hook(print, function(...) return end)
print(handle)
Removes a hook.
local handle = oth.hook(print, function() end)
oth.unhook(handle)
Returns the root callback or original thread.
local handle = oth.hook(print, function() end)
print(oth.get_root_callback(handle))
print(oth.get_original_thread(handle))
Checks hook state.
local handle = oth.hook(print, function() end)
print(oth.is_hook_thread(handle), oth.is_hooked(print))
Reads or replaces a hook.
local handle = oth.hook(print, function() end)
print(oth.get_hook(print))
oth.replace_hook(print, function() end)
Calls through a trampoline.
trampoline_call(print, "hello from the trampoline")
Advanced. Prefer the closure and metamethod APIs unless raw hook control is required.
Checks the call stack for executor or game frames. Filter is a combination of e, g and b.
print(checkcallstack("b"))
print(checkcallstack("e", 1))