Old School Ops

Examples

The complete modules that ship in scripts/modules/examples, what each one shows, and which version has it.

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

Every release ships complete modules in scripts/modules/examples, using real codes from that version's own content. The server never loads that folder. To run one, copy it up into scripts/modules and type %mod reload. Each file's opening comment says how to use it.

Each version's files are written separately, so a file with the same name can differ, and its codes never carry from one version to another.

The Modules

fileshowson
global_notice.luarotating announcements, every and daily timers, multi-word staff commandsevery version
staff_presence.luaa login and logout notice for staff, and a .staff player commandevery version
level_bonus.luaa one-time mailed reward at chosen levels, with a m:char bag as the paid-once guardevery version
pit_boss_alert.luaspawn and kill announcements for a set of bosses, a player or staff command, what is already standing at startevery version
new_player_informer.luaa first-login welcome, a starter kit by mailevery version
autoloot.luaa player command with per-character choicesevery version
auction_max_price.luaa fail-closed auction gate, with a table cached in memory for the gateevery version
pvp_penalty.luaa griefing record, a damage gateevery version
cash_regen.luacash on a timer, milestone rewards, batching work with m:afterevery version
enhance_notify.luaannouncing high upgrades from the upgrade eventevery version
chipwar_reward.luapaying the Chip War's winners in batchesevery version
item_history.luaa custom property on individual items, with an enhancement recordevery version
item_property.luaa custom property on individual items, with a player commandevery version
boss_hud.luatwo new messages, out and in, for GoMMO ClientDragonborn, Age of Patron
new_message.luaa new outbound and inbound messageGolden Age, 1.5

Recipes

Announce a boss. Listen to monster_spawned, compare ev.monster.code with a set setting declared of = "monster", and throttle with a top-level table. pit_boss_alert.lua is the whole pattern.

Pay something once. Keep a flag in a character bag and check it before paying. level_bonus.lua does this:

local bag = m:char(ev.player)
if not bag:get("paid_" .. ev.to) then
  bag:set("paid_" .. ev.to, true)
  rf.mail(ev.player.id, { title = "Level reward", items = { { code = code, count = 1 } } })
end

Cap auction prices. Declare a fail-closed auction_list gate that reads a limit you keep in a top-level table, because a gate cannot touch custom tables. auction_max_price.lua is this.

Do a lot of work. A handler has a budget, so do a batch and schedule the rest:

local function pay(m, ids, from)
  for i = from, math.min(from + 19, #ids) do
    pcall(rf.give_currency, ids[i], "dalant", 1000, "reward")
  end
  if from + 20 <= #ids then
    m:after(0.5, function(m) pay(m, ids, from + 20) end)
  end
end

chipwar_reward.lua and cash_regen.lua both work this way.

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