Proc:Trap

From SlothMUD Wiki
Revision as of 21:50, 25 April 2015 by Teker (Talk | contribs)

Jump to: navigation, search

Overview

The trap procedure allows builders to combine a single trigger with multiple effects. Some effects maybe be harmful, while others helpful. The settings for the trap are assigned via the setproc command.

Key Default Description
TRAP_INITIALCHARGES 0 The number of charges the trap has per zone reset. If this value is negative, the trap has infinite charges.


Triggers

The trap may only have one trigger which is set in the TRIGGER_TYPE key value.

Value Description
Generic Activates when players enter the room or perform a command.
MobileDeath Activates when a particular mobile is killed.
Password Activates when a player says a particular word.
PressurePlate Activates when the sum of the weights of all players/mobiles in the room reach a particular threshhold.


Trigger Settings

Global settings that may be applied to the trigger.

Key Default Description
TRIGGER_CHANCE 100 The percentage chance that the trigger will activate.
TRIGGER_MINPRIMELEVEL 0 The minimum prime level required to activate the trigger.
TRIGGER_MAXPRIMELEVEL 40 The maximum prime level allowed to activate the trigger.
TRIGGER_ACTIVATIONDRELAY 0 Approximate number of seconds to delay the effects after the trigger is activated. Note that setting this value allows for the player activating the trigger to escape - which means they may not be present for any of the effects.
TRIGGER_SPELLEXEMPTIONLIST No exemptions A colon (:) separated list of spells/skills that make the player exempt from activating the trigger.
TRIGGER_INCLUDEMOBILES 0 (FALSE) Indicates whether or not independant mobiles should be able to activate the trigger. If this value is left at zero, wandering mobiles will not activate the trap nor count toward cumulative activations such as pressure plate weights. Mobile followers (supplications, summoned undead, etc) are always able to activate the trigger unless their master's prime level falls outside the trigger's boundaries or unless the follower is affected by a spell in the spell exemption list.


MobileDeath

The mobiledeath trigger will activate if a particular mobile is killed in this room. It ignores most of the trigger settings including TRIGGER_MINPRIMELEVEL, TRIGGER_MAXPRIMTELEVEL, and TRIGGER_SPELLEXEMPTIONLIST.

Key Default Description
MOBILEDEATH_VNUM -1 Vnum of the mobile to react to.


Password

The password trigger will activate if a player says a particular word.

Key Default Description
PASSWORD_VALUE (none) The password.


PressurePlate

The pressureplate trigger activates when the weight of the applicable players and mobiles crosses a threshhold.

Key Default Description
PRESSUREPLATE_WEIGHT 0 The amount of weight needed to activate the trigger.


Effects

Note that if a the trap has a non-zero activation time and is set to only affect the person triggering the trap, the person may be gone and the trap may affect noone.

Damage

The damage effect does damage to the player/mobile activating the trigger or the entire room.

Key Default Description
DAMAGE_DICE 1 The number of dice used when calculating damage.
DAMAGE_DIESIZE 1 The size of the die or dice used when calculating damage.
DAMAGE_ADDITIONAL 0 An amount added (or subtracted) to the damage total.
DAMAGE_TYPE Undefined Type of damage done.
DAMAGE_AFFECTROOM 0 Boolean value determining whether everyone in the room takes damage.
DAMAGE_INCLUDEMOBILES 0 Boolean value determining whether unrelated mobiles take damage from the trap. If this value is left at zero, wandering mobiles will not take damage from the trap. Mobile followers (supplications, summoned undead, etc) will always take damage unless their master's prime level falls outside the trigger's boundaries or unless the follower is affected by a spell in the spell exemption list.
DAMAGE_ALLOWDEATH 0 Boolean value determining whether players/mobiles can be killed by the trap. By default the player/mobile will be taken down to 0 hit points and stunned. It is strongly recommended that this only be changed in the most harshest of areas.