Skip to content

Getting Started

Epitaph loads JRuby scripts from epitaph/scripts/**/*.rb. Each .rb file becomes a script feature you can enable and disable inside the client.

$script load
$script load my_script
$script reload my_script
$script unload my_script
$script loaded
$script list
$script folder

$script folder prints the exact scripts directory on your machine. Scripts can be referenced by file name, stem, or relative path under that directory.

script = {
name: "Example Script",
description: "Small example script",
category: "MISC",
on_enable: lambda do
client.message("Example Script enabled")
end,
on_disable: lambda do
client.message("Example Script disabled")
end
}

Wrong — top-level def methods are ignored by Epitaph:

def on_enable # does NOT work
...
end

Epitaph reads metadata from the first available source:

  • the value returned by the file
  • a global script

If any field is missing, the fallback is the file name for name, "Script feature" for description, and MISC for category.

These run regardless of enable state:

CallbackWhen
on_loadAfter the script is registered
on_unloadWhen the script is unloaded
on_enableWhen the feature is enabled
on_disableWhen the feature is disabled
get_info / on_get_infoWhen the client requests feature info text

Event callbacks like on_tick and on_render_2d only run while the script is enabled.

If any callback throws, Epitaph reports the error and callback name in chat, then disables the script to stop repeated failures.

Script names must be unique across all loaded features. If a name collides with an existing feature, loading fails.