-
Notifications
You must be signed in to change notification settings - Fork 0
Lua API
ESTONlA edited this page Sep 6, 2026
·
5 revisions
htf.on("fish_hooked", function(fish_name)
end)Register one callback per event per Lua mod. Registering the same event again replaces that mod's previous callback.
htf.command("reward", function(args)
htf.money(50)
end)Commands are typed by the host as /reward. args is a one-indexed Lua table containing words after the command.
htf.after(5, function()
htf.chat("Five seconds passed.")
end)
htf.every(60, function()
htf.chat("Minute check.")
end)htf.chat("Hello crew")
htf.money(100)htf.chat broadcasts a prefixed game chat message. htf.money awards shared money and only acts while hosting.
local score = tonumber(htf.get_data("score", "0"))
score = score + 1
htf.set_data("score", tostring(score))Values are strings. Use Lua tonumber and tostring for numeric values.
if htf.is_host() then
htf.log("Host is active")
end