Old School Ops

Settings and Commands

Declaring values an operator changes in game, and adding staff and player commands to a module.

Applies to RF Online 4.55RF Online 4.15RF Online 1.5RF Online 2.2.3.2 · updated 2026-11-06

Settings

A setting is a value an operator changes without editing the file.

settings = {
  bosses   = { kind = "set", of = "monster", default = { "01005" }, doc = "monster codes to announce" },
  channel  = { kind = "enum", values = { "world", "staff" }, default = "world" },
  max      = { kind = "int", min = 0, max = 1000000, default = 500 },
  rate     = { kind = "num", min = 0, default = 1.5 },
  on       = { kind = "bool", default = true },
  greeting = { kind = "text", max = 120, default = "Hello!" },
  lines    = { kind = "list", max = 32, default = { "first", "second" } },
}
kindvalue in Lua%mod set takes
booltrue or falseon, off, true, false, 1, 0
inta whole number; min and max bound it30
numa number; min and max bound it0.5
texta string; max bounds its lengththe rest of the line
enumone of valuesone of the values
liststrings in order; max bounds the counta, b, c or ["a","b"]
seta lookup table: m:setting("bosses")["01005"] is truea, b, c

A list typed with commas cannot hold an entry that contains a comma.

Checked Codes

A list or set may say of = "item", of = "monster" or of = "map". Every entry must then be a code this server knows, in any case, and the server stores it in the content's own spelling. The check runs when the file loads and on %mod set, and a wrong code is refused with the closest valid one. Without of, entries are free text.

Where Values Live

Read a setting with m:setting("name"). Values are stored in the game database, never in settings.ini. A value an operator set wins over the default in the file. A setting with nothing stored uses the default, so changing a default in the file changes it on the next reload.

%mod set pit_boss_alert quiet_seconds 300
%mod set pit_boss_alert bosses 01005,01006,06A13
%mod set global_notice messages First line,Second line

%mod set checks the value against the declaration and applies it at once. Every module also has a setting called enabled, which %mod enable and %mod disable change; you cannot declare your own.

Commands

commands = {
  { name = "bossalert test", level = 2, doc = "send a test notice",
    run = function(m, caller, arg) return "sent" end },
},
player_commands = {
  { name = "bosses", cooldown = 10, run = function(m, player, arg) return "Up: ..." end },
},

doc and help both hold a command's description. arg is the rest of the line, trimmed. A command answers by returning a string, which the caller sees as a system line, and an error in the command is answered the same way.

The caller table carries id (the character), name, account, level (the STAFF level, not the character level) and player, the full player table.

Staff Commands

Staff type %bossalert test some text, or %mod bossalert test some text.

  • level is the lowest staff level allowed: 1 Moderator, 2 Game Master, 3 Administrator, 4 Super Administrator. With no level, only level 4 may use it.
  • A name may be several words, and the longest matching name wins.
  • A name may not start with one of the server's own commands, or be the start of one (lv, gold, money, move, port, help, guild, chipwar, mod and the rest of %help). The load refuses it and names the clash.

Player Commands

Players type .bosses in any chat channel.

  • The prefix is lua.player_prefix, one to three punctuation characters, and never %.
  • A line that names a module command is consumed and never broadcast. Any other line is ordinary chat.
  • cooldown is seconds per character, 1 by default.
Something here wrong?

Out of date, incomplete, or assuming something it should not. Documentation errors are bugs, and this one arrives tagged and pointed at this page.

Top xp sources

How xp works
Loading…

Open the full search page