[Package Index | Mudlib Index | Effect Index]
See also:
/std/basic/close_lock.c and setup_trap
.c
Written by ceres
.
int query_trap_armed()Get whether the trap is armed or not.
mixed * query_trap_data()Get data on the basic lock trap. Data is returned as a mixed array of stuff. This is really only used for the autoload. :)
string query_trap_description()Get the trap description text.
int query_trap_difficulty()Find out the difficulty of this trap.
mixed query_trap_effect()Get the trap effects.
mixed query_trap_message()Get the trap trigger messages
string query_trap_trigger()Get the trigger condition for this trap.
void set_trap_armed(int i)Set the trap as armed or disarmed.
void setup_trap(int difficulty, string trigger, string description, mixed message, mixed effect)This sets up a basic trap on a lock. The trap will be triggered when someone locks/unlocks/picks the lock (depending on trigger). If triggered the message will be displayed and the effect will be added to the player.
setup_trap(300, "pick", "Hidden inside the lock is a small ampule which, if touched by " "an unwary tool would trigger a puff of poisonous gas.", ({"A small cloud of gas puffs out of the safe.\n", "A small cloud of gas puffs out of the safe.\n"}), ({"/std/effects/poisons/poison_gas", 600}));