Old School Ops

Events

Every event an RF module can listen to, what fires each one, and every field a handler receives.

Applies to RF Online 4.55RF Online 4.15RF Online 1.5RF Online 2.2.3.2 · updated 2026-11-06
On this page
on = {
  monster_killed = function(m, ev)
    if ev.killer then rf.notice(ev.killer.id, "Nice kill: " .. ev.monster.name) end
  end,
},

An event is a notification: the thing has already happened, and the game never waits for a module. Each module has one worker that runs its events, timers, commands and messages one at a time, in order. A full queue (lua.event_queue) drops new events and counts them in %mod status.

An event is a snapshot. By the time a handler runs, the player may have logged out, so an action can fail. Running Modules shows how to catch that.

Notes on Particular Events

  • chat fires only for a line really sent. A line refused for any reason, by a chat gate or by the game, raises no event.
  • monster_spawned fires for every spawn and respawn while modules run. The server's first placement happens before they start.
  • player_command fires when a player types the prefix and a word no module declared as a command. Subscribe only if you mean to: while any module listens to it, every chat line starting with the prefix is consumed, declared command or not.
  • message is the event form of a declared message arriving.

Event Reference

auction_listed

An item was listed on the auction.

fieldtypenotes
playerplayerthe seller
itemitemwhat
pricenumberasking price
currencystringthe price's currency

chat

A chat line was sent.

fieldtypenotes
playerplayerwho
channelstringcircle, race, map, raceboss, racebosscry, guild, whisper, all or greeting
textstringthe line
targetstring or nilthe whisper target's name

chipwar_end

The Chip War closed.

No fields.

chipwar_result

The Chip War was decided.

fieldtypenotes
winnerstringthe winning race, or "" for none
reasonstringhow it was decided: stone_destroyed, time_up, keeper_destroyed or keeper_kept

chipwar_start

The Chip War opened.

No fields.

item_dropped

An item landed on the ground.

fieldtypenotes
itemitemwhat
sourcestring"monster" or "player"
monstermonster or nilthe monster that dropped it
playerplayer or nilthe thrower, or the loot owner
mapstringmap name
posposwhere
boxnumber or nilthe ground box, for rf.pickup; nil on a server without it

item_looted

A player picked an item up.

fieldtypenotes
playerplayerwho
itemitemwhat
mapstringmap name

level_up

A character gained a level.

fieldtypenotes
playerplayerwho
fromnumberprevious level
tonumbernew level

login

A character entered the world.

fieldtypenotes
playerplayerwho
firstbooltrue on the character's first ever entry

logout

A character left the world.

fieldtypenotes
playerplayerwho

message

A player's client sent one of this module's declared messages.

fieldtypenotes
playerplayerwho
messagestringthe declared message name
fieldstablethe decoded fields

monster_killed

A monster died.

fieldtypenotes
monstermonsterwhat
killerplayer or nilthe credited player, nil when none
mapstringmap name
posposwhere

monster_spawned

A monster entered the world.

fieldtypenotes
monstermonsterwhat
mapstringmap name
posposwhere

player_command

A player typed a module command after the player prefix.

fieldtypenotes
playerplayerwho
commandstringthe command name
argsstringthe rest of the line

pvp_kill

A player was killed by another player.

fieldtypenotes
killerplayerthe credited player
victimplayerwho died
mapstringmap name
posposwhere

upgrade

An enhance or upgrade attempt finished.

fieldtypenotes
playerplayerwho
itemitemthe item
successboolwhether it took
levelnumberthe item's upgrade level now

Payload Tables

tablefields
playeraccount, class, guild, id, level, map, name, race, staff
monstercode, name, serial
itemcode, count, name, uid
posx, y, z
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