Difference between revisions of "Proc:Self Destruct"
From SlothMUD Wiki
(Created page with "= Overview = The self_destruct procedure allows builders to create mobiles that self destruct when certain conditions occur. Any items on the mobile are placed in room 10 (R...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 14: | Line 14: | ||
EMPTY_ROOM - No mortal PCs in the room<br/> | EMPTY_ROOM - No mortal PCs in the room<br/> | ||
EMPTY_AREA - No mortal PCs in the area<br/> | EMPTY_AREA - No mortal PCs in the area<br/> | ||
+ | AREA_RESET - Area reset trigger<br/> | ||
|- | |- | ||
| DELAY_SECONDS | | DELAY_SECONDS | ||
Line 47: | Line 48: | ||
− | [[Category: | + | [[Category:Building]] |
+ | [[Category:Mobile Procedures]] |
Latest revision as of 19:56, 23 August 2018
Overview
The self_destruct procedure allows builders to create mobiles that self destruct when certain conditions occur. Any items on the mobile are placed in room 10 (RAID Junk Room) when the mobile is destroyed.
Here is a list of keys that the procedure will use:
Key | Default | Description |
---|---|---|
TRIGGERS | <none> | A colon separated list of the triggers that will cause the mobile to self destruct. Supported values are: EMPTY_ROOM - No mortal PCs in the room |
DELAY_SECONDS | 0 | The amount of time that the trigger must be activated before the mobile is destroyed. The game checks the trigger state approximately every 10 seconds. |
TRIGGER_STARTED_ROOM_MSG | No message. | The message that is displayed to players in the room when the mobile's trigger is first activated. Given the current list of supported triggers, this is only something than an immortal or familiar might see. |
TRIGGER_STOPPED_ROOM_MSG | No message. | The message that is displayed to players in the room when the mobile's trigger is first deactivated. This would be when a player renters a room or area that was previously empty. |
DESTRUCT_ROOM_MSG | No message. | The message that is displayed to players in the room when the mobile is destroyed. Given the current list of supported triggers, this is only something than an immortal or familiar might see. |
Example
addproc <mobile> self_destruct setproc <mobile> # TRIGGERS EMPTY_ROOM setproc <mobile> # DELAY_SECONDS 60 setproc <mobile> # TRIGGER_STARTED_ROOM_MSG $n looks around nervously. setproc <mobile> # TRIGGER_STOPPED_ROOM_MSG $n lets out a sigh of relief. setproc <mobile> # DESTRUCT_ROOM_MSG $n explodes into a cloud of dust. setproc <mobile> # PROC_ENABLED 1