Monster Defense
A cooperative tower-defense style event. Waves of monsters spawn at a start point and march along a fixed path toward an end point. Players (armed from free dispensers) must kill them before any monster reaches the end. There are 20 escalating levels; letting a single monster through loses the event for everyone.
Source: server/scripts/UOD/Events/UOD - Monster Defense.scp
How to run it
A GM controls the event through the i_md_stone control stone (ID=i_gravestone_7), which opens the md_stone menu on double-click. Players join by stepping on a join tile.
| Command / Menu button | Effect |
|---|---|
Dclick i_md_stone |
Opens the md_stone GM menu. |
START |
Counts players in the region into tag.player, sets tag.level=1, and starts the spawn timer on the management stone (mdstone = 040049b68) after a 10-second warning. |
STOP |
Runs end_event: removes all NPCs in the region and resets the stone's level/number/player tags. |
LOST |
Plays the lose sound, notifies players, and sends everyone back with a participation prize (md_goback 1). |
WIN |
Plays the win sound, notifies players, and sends everyone back with the winning prize (md_goback 2). |
RESET |
Placeholder (only says "allo"); no effect. |
Step on i_md_player_start (Join the event!) |
Teleports the player to 5127,511,7, adds e_monsterdefense, and equips a marker item. |
Note:
LOSTis normally triggered automatically when a monster reaches the end tile (i_defense_end@step→end_event), but the menu buttons let a GM force a win/loss/stop.
How it plays
- Spawning / waves: on
START,mdstone(040049b68) spawnsc_defense_level_<level>NPCs at the start pointmdstart(04004c409). Monster HP scales with level and player count:maxhits = level * players * 8. Each level spawns21 - levelmonsters before advancing (so higher levels have fewer but tougher monsters), with a 30-second breather between levels. - The path: each monster equips
i_defense_move, which repeatedly runs it in a fixed direction (dir=4, south) alongi_md_pathtiles toward the end. Players are blocked from walking on the monster path and the start/end tiles (moveback). - Levels 1-20: each level is a different creature (
c_defense_level_1reaper …c_defense_level_20snake; see table below). Level 20 is the Final Level with doubled HP. Higher-level monsters (15+) are immune to poison (@spelleffect argn 20). - Lose condition: if any monster steps on the end tile
i_defense_end(mdend=04004c1e2), everyone loses — "A MONSTER GOT TO THE END!!" — andend_eventfires. - Win condition: surviving all 20 waves (the GM confirms with the
WINbutton, which awards the winning prize). - Gear: the arena has free dispenser items (dclick to receive, capped): mana potions, arrows, vanquishing bow / elven bow, full spellbook, vanq viking sword / kryss / mace, reagent bags (
tm_bag_of_magic), and lavabombs. Many spells are disabled (e_monsterdefense@spellcast), and players cannot be hurt (@gethitreturns 1); death just refreshes the player. - Exit / rewards (
md_goback→md_goback_go, after a random 1-30s delay): removese_monsterdefense, sends the player tojail4with 100 gold and a duped prize —mdlose(040046f18) for participation ormdwin(040046f6f) for a win.
Monster levels
| Levels 1-10 | Levels 11-20 |
|---|---|
| 1 Reaper, 2 Red Dragon, 3 Daemon, 4 Titan, 5 Ettin, 6 Ogre, 7 Troll, 8 Ophidian Queen, 9 Terathan Matriarch, 10 Gargoyle | 11 Harpy, 12 Giant Scorpion, 13 Giant Toad, 14 Blade Spirit, 15 Liche, 16 Gazer, 17 Mongbat, 18 Pig, 19 Slime, 20 Snake (Final, 2× HP) |
Key definitions
| Type | Name | Purpose |
|---|---|---|
| DEFNAME | monster_defense |
Maps the key UIDs: mdstone 040049b68, mdstart 04004c409, mdend 04004c1e2, mdwin 040046f6f, mdlose 040046f18. |
| ITEMDEF | i_md_stone |
GM control stone → md_stone menu; also the spawn timer engine. |
| MENU | md_stone |
START / STOP / WIN / LOST / RESET controls. |
| ITEMDEF | i_md_player_start |
Join tile (teleports to 5127,511,7, adds e_monsterdefense). |
| ITEMDEF | i_md_path, i_defense_start, i_defense_end, i_defense_move |
Path/boundary tiles and the monster auto-walk equip. |
| EVENTS | e_monsterdefense |
Player-side rules: spell restrictions, invulnerability, lavabomb handling. |
| EVENTS | e_defense_level |
Monster death FX and cleanup. |
| CHARDEF | c_defense_level_1 … c_defense_level_20 |
The 20 wave creatures. |
| FUNCTION | end_event, md_goback, md_goback_go |
Teardown and player return/reward. |
| ITEMDEF | i_defense_mana/arrow/bow/elven/spellbook/sword/kryss/mace/regs/explo |
Free gear dispensers. |
| Region | around 5127,511,7 |
Monster Defense arena. |