UODiamondCodex

FFA (Free-For-All) Tournament

An automated last-man-standing PvP arena. Players type a command to join, are stripped of their gear (safely stored in their bank) and re-equipped with a standardized loadout, then fight in a randomly generated fenced arena until one player remains.

Source: server/scripts/UOD/Events/UOD - Event FFA.scp

How to run it

The FFA is primarily self-running: the timer stone i_stone_ffa_timer fires every 28800 seconds (8 hours) and calls f_startautoffa on the management object 04001805a. A GM can also trigger it manually by invoking that function on the management object, or by dclicking the manual stone i_stone_ffa.

Command / Trigger Effect
.ffajoin (player speech/command → FUNCTION ffajoin) Player joins the current FFA if one is open (tag.ffaon==1). Blocked while mounted or already in another event (e_goto, e_maze, e_britainpvp).
.nextffa (FUNCTION nextffa) Tells the player how many minutes until the next automated FFA (reads timer of object 04001fe81).
f_startautoffa on 04001805a (auto every 8h, or GM-invoked) Regenerates the arena, opens a 5-minute join window with countdown broadcasts, then starts the fight.
i_stone_ffa dclick / f_startautoffa Manual start hook.

Note: .ffajoin and .nextffa are [FUNCTION] blocks, so they are callable as player . commands. There is no in-script GM dialog/menu; control is via the management object and its timer.

How it plays

  • On start, f_startautoffa runs f_generate_arena (random rocks/obstacles) and broadcasts a join invitation to all clients. Players have 5 minutes to join (TIMERF=300,f_start_ffa; join flag tag.ffaon closes at 280s).
  • f_ffa_join teleports the player into the arena at a random point around rand(5253,5273),rand(1750,1777),0, unequips all their gear into a teal backpack placed in their bank (layer 21), and hands out a fixed loadout: weapons (bow, mace, kryss, dagger, axe, viking sword, hammer pick), heater shield, 30 great heal + 30 total mana potions, 100 bandages, 100 arrows, 20 flamestrike scrolls, two tm_bag_of_magic, mana crystals, a full spellbook, and full platemail (attr=010, colored).
  • Many spells are disabled (@spellcast blocks a long list including field spells, summons, gate, mark/recall, etc.) and hiding/stealth skills are blocked.
  • Win condition: last participant alive. On each death, ffa_checkwinner counts remaining non-GM e_ffa players; when it returns 2 (the dier plus one survivor), the survivor is declared winner via ffa_win and all clients are notified.
  • On death or logout the player is restored (endevent returns their gear from layer 21, s_dispel, full stats) and sent back to tag.ffafrom. Death also gives a participation item: i_random_loot_1 plus a colored trophy (0139b).
  • PvP points: each kill grants the killer +1 duelpvppoints; the victim loses 1 (floored at 0).

Rewards (winner, via ffa_win)

  • A bank check (i_check) worth players * 1000 gold.
  • A colored winner trophy (0139b).
  • Random loot scaled by participant count: i_random_loot_1 (<5 players), i_random_loot_2 (<10), else i_random_loot_3.

Key definitions

Type Name Purpose
EVENTS e_ffa Per-player event script: death/logout handling, spell/skill restrictions, click label.
FUNCTION ffajoin, f_ffa_join Player join entry point and the actual join/setup routine.
FUNCTION ffa_checkwinner Counts remaining non-GM participants.
FUNCTION ffa_win, endevent Award winner / restore a player's gear and stats.
FUNCTION f_startautoffa, f_start_ffa Open join window / begin the fight.
FUNCTION f_generate_arena, f_ffa_remove, togglefenceffa Random arena generation and fence toggling.
FUNCTION nextffa Report time to next event.
ITEMDEF i_stone_ffa_timer (i_gravestone_4) Auto-runs the event every 8h.
ITEMDEF i_stone_ffa Manual management stone.
Object UID 04001805a FFA management object (holds tag.ffaon, tag.players).
Object UID 04001fe81 Countdown/timer object read by nextffa.
Region approx. 5253-5273 x 1750-1777 (Felucca coords) FFA arena.