UODiamondCodex

Race Event

A mounted racing minigame. Each player is given a colored ostard (zostrich) mount they follow on foot; the first three ostards to cross the finish line win placement prizes. Racers cannot be blocked by each other (collision is disabled) so the field stays moving.

Source: server/scripts/UOD/Events/Race Event.scp

How to run it

The script provides step-tiles and a finish tile; there is no GM menu or scheduler in this file, so a GM stages the race by placing/enabling the tiles and directing players onto the start pad.

Command / Trigger Effect
Step on i_race_setplayer (Get ready for the race!) Equips a random-colored race robe (i_robe_race), teleports the player to the start 5987,288, spawns a c_ostard_zostrich matching the robe color, and transfers that ostard to the player.
Step on i_race_end (finish tile) by an ostard Awards placement (1st/2nd/3rd/…) to the ostard's owner and teleports the winner to a podium spot.
Dclick i_race_end as GM Resets the finish tile's placement counter (more=0).
Step on i_race_winning (checkpoint) by an ostard Announces the current leader once (tag.winning).
Dclick i_race_winning Resets its tag.winning flag.

Note: i_race_setplayer and i_race_end/i_race_winning are placed in-world; their exact map positions (beyond the hardcoded start 5987,288 and podium spots) are set by the GM. The finish/checkpoint tiles react to the ostard's step, not the player's.

How it plays

  • A racer steps on the start pad, receives a color-coded ostard, and follows it. The e_race event disables personal-space collision (@personalspace forces argn1=1) and keeps the racer's stamina topped up so racers can't stall each other.
  • The ostard is a normal follower; e_dontmount prevents players from mounting it (dclick is refused) — you race alongside/behind it, not on it.
  • i_race_winning acts as a mid-course checkpoint that broadcasts who is currently leading (the owner of the first ostard to reach it).
  • Finish (i_race_end): the first ostard to step on it wins 1st place, the second 2nd, the third 3rd, then subsequent finishers are just moved aside. Each finisher's owner is teleported to a distinct podium coordinate (1st 5976,280, 2nd 5978,280, 3rd 5980,280, others 5984,280), the race robe is consumed, and the ostard is removed. Placement is tracked by the tile's more value.
  • Reward: every finishing ostard grants i_gold,100 to its owner (serv.newitem i_gold,100). Placement is announced to all clients.

Key definitions

Type Name Purpose
EVENTS e_race Disables collision and refills stamina for racers.
EVENTS e_dontmount Prevents mounting the race ostard.
ITEMDEF i_robe_race Random-colored robe identifying each racer/ostard pairing.
ITEMDEF i_race_setplayer (i_rune_alchem_6) Start pad: equips robe, teleports to 5987,288, spawns and transfers the ostard.
ITEMDEF i_race_end (i_rune_alchem_6) Finish line; awards 1st/2nd/3rd placement (tracked in more).
ITEMDEF i_race_winning (i_rune_alchem_6) Mid-race checkpoint that announces the current leader.
CHARDEF c_ostard_zostrich The race mount (spawned per player, color-matched to the robe).
Coords start 5987,288; podium 5976/5978/5980/5984,280 Race staging and finish/podium positions.