Skip to main content
ZeroBot developer documentation

Build scripts and routes with a clear view of the bot.

Practical guides and a Lua reference synchronized with the public core wrappers used by ZeroBot.

  • LuaJIT runtime
  • English + PortuguΓͺs
  • Version-aware notes
Choose a path

Go straight to the work you are doing.

Start with a feature guide or jump directly into the developer reference.

Recommended workflow

Keep scripts responsive and maintainable.

Use the high-level core modules, prefer events for incoming data, and guard version-specific payloads.

  1. 01

    Start from the core API

    The modules under Scripts/core are loaded automatically. Use their documented namespaces.

  2. 02

    Prefer events and timers

    React to data with Game events and schedule repeated work with Timer instead of blocking loops.

  3. 03

    Validate the target client

    Treat optional fields, client-version requirements, and OTServer behavior as explicit conditions.

Event-driven example
local active =
Enums.PreyTaskDataState.PREY_TASK_DATA_STATE_ACTIVE

local function onHuntingTasks(data)
if data.state == active then
print("slot", data.slotId, "kills", data.currentKills)
end
end

Game.registerEvent(
Game.Events.TASK_HUNTING_DATA,
onHuntingTasks
)
Useful references

The details developers usually need next.