Difference between revisions of "Proc:Trap"

From WikiName
Jump to: navigation, search
Line 145: Line 145:
 
| 0
 
| 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.
 
| 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.
 +
|-
 +
| DAMAGE_MESSAGE_ACTOR
 +
| No message
 +
| Message shown to the player receiving damage.
 +
|-
 +
| DAMAGE_MESSAGE_ROOM
 +
| No message
 +
| Message shown to the room for the player receiving damage.
 +
|}
 +
 +
 +
== DoorState ==
 +
 +
The doorstate effect can change the states of up to 100 doors.  The effect automatically sets both sides of the door to match.  In the table below, the key name uses #### to represent the virtual number of the room containing the door and XXXX to represent the direction of the door in that room.
 +
 +
{|class="abilitiestable" border="0" cellspacing="0" cellpadding="0"
 +
! Key !! Default !! Description
 +
|-
 +
| DOORSTATE_####_XXXX_STATE
 +
| none
 +
| Sets the door's state to either "OPEN", "CLOSED", or "LOCKED".
 +
|-
 +
| DOORSTATE_####_XXXX_MESSAGE_UNLOCKING
 +
| No message
 +
| Message sent to the room if the effect causes the door to unlock.
 +
|-
 +
| DOORSTATE_####_XXXX_MESSAGE_OPENING
 +
| No message
 +
| Message sent to the room if the effect causes the door to open.
 +
|-
 +
| DOORSTATE_####_XXXX_MESSAGE_CLOSING
 +
| No message
 +
| Message sent to the room if the effect causes the door to close.
 +
|-
 +
| DOORSTATE_####_XXXX_MESSAGE_LOCKING
 +
| No message
 +
| Message sent to the room if the effect causes the door to lock.
 
|}
 
|}
  

Revision as of 22:01, 25 April 2015

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.
DAMAGE_MESSAGE_ACTOR No message Message shown to the player receiving damage.
DAMAGE_MESSAGE_ROOM No message Message shown to the room for the player receiving damage.


DoorState

The doorstate effect can change the states of up to 100 doors. The effect automatically sets both sides of the door to match. In the table below, the key name uses #### to represent the virtual number of the room containing the door and XXXX to represent the direction of the door in that room.

Key Default Description
DOORSTATE_####_XXXX_STATE none Sets the door's state to either "OPEN", "CLOSED", or "LOCKED".
DOORSTATE_####_XXXX_MESSAGE_UNLOCKING No message Message sent to the room if the effect causes the door to unlock.
DOORSTATE_####_XXXX_MESSAGE_OPENING No message Message sent to the room if the effect causes the door to open.
DOORSTATE_####_XXXX_MESSAGE_CLOSING No message Message sent to the room if the effect causes the door to close.
DOORSTATE_####_XXXX_MESSAGE_LOCKING No message Message sent to the room if the effect causes the door to lock.