Every file in scripts/encounters attaches a boss fight to one monster code: phases at health thresholds, timed abilities, adds, a shield, an enrage timer, and rewards paid by contribution.
Copy _template.lua to a new name to start one. A file whose name begins with _ is never loaded.
An encounter runs wherever its monster is alive: its normal world placement, a dungeon wave, or the encounter's own field spawn.
The Parts
| key | what it does |
|---|---|
boss | the monster code the script attaches to (required; one script per code) |
field | optional open-world spawn: map, at = dummy("x") or at(x, y, z), respawn = { min =, max = } seconds, announce_spawn, announce_kill ({killer} is the killer's name). Both notices go to every player |
leash | how far the boss may be dragged from where the fight began before it resets (0 = never) |
enrage | after after seconds the boss hits damage times and moves speed times harder |
loot | mode contribution (the top top damage dealers with at least min_share of the damage), last_hit or party (the killer's party) |
lockout | period daily, weekly (reset_day, default Monday) or none; reset_hour is server-local |
phases | listed from full health down; phase 1 is hp = 100, and each later one starts when the boss's health percent falls to its hp |
reward | paid when the boss dies: exp, dalant, gold, items = { { code, count, chance, to = top/all/one } } |
A character who took this boss's reward in a lockout period is locked out: they can neither hurt the boss nor be hurt by it, its abilities pass them by, and they are told once when the lockout resets.
Phases
A phase may carry abilities, adds (spawned as it begins), shield = { absorb, until_adds_dead }, message, and reward (paid when the phase ends; chest = true drops its items on the ground for their owner instead of into the bag).
Abilities
An ability does exactly one thing, every every seconds, the first time after first:
skill = "<skill or force code>"on atarget(top, random, nearest, farthest, self, all)pulse = { radius, damage, effect }buff = { attack, defense, speed, seconds }summon = { monster, count, radius }heal = <fraction of max HP>teleport = "random_player"or"spawn"
Hooks
on_start(fight), on_phase(fight, n), on_win(fight) and on_wipe(fight) go on the encounter, and on_enter(fight) on a phase. The fight handle offers hp(), phase(), elapsed(), message(text), cast(code, target), spawn{monster=, count=, radius=}, heal(fraction), enrage(), players(), set(k, v) and get(k).
Checking and Reloading
A broken script is skipped with a message naming the file and what to fix, and the server carries on. Scripts reload with reload-content from GoMMO Manager, which resets any fight in progress.
Where the Versions Differ
| version | a boss's guards | what the client draws |
|---|---|---|
| Dragonborn | A pit boss keeps its guards; the script layers on top. | A skill from the boss's own special list draws as the monster's own attack does. Any other code is sent the same way and may not draw. A pulse reaching more than 32 players is sent as several hit messages. |
| Age of Patron | This server does not spawn a monster's own guards, so a boss's company comes from adds and summon. | A pulse reaching more than 32 players is sent as several hit messages. |
| RF Online 1.5, Golden Age | A pit boss keeps its guards; the script layers on top. |