User Tools

Site Tools


triggers:rprog

RoomProgs

Room progs are attached in redit with addrprog command.

Room progs are always lua scripts.

Argument Type Note
ch1 CH see table
ch2 CH see table
obj1 OBJ see table
obj2 OBJ see table
text1 string see table
trigger string see table
trigtype string see table

The actual room to which the script is attached can be referenced in the script through 'room' global variable (type ROOM).

trigtype ch1 ch2 obj1 obj2 text1 trigger Phrase type Description
enter enterer none none none none none number(%chance) Fires when player enters the room.
See enter and exit triggers.
*exit exiter none none none none none number(%chance) Fires when player exits the room.
See enter and exit triggers.
*move enterer none none none none direction name string(direction name or “*”) Fires when a player attemps to move in given direction. Exit does not have to exist.
See enter and exit triggers.
*open opener none none none none direction name string(direction name or “*”) Fires when a player opens given door.
*close closer none none none none direction name string(direction name or “*”) Fires when a player closes given door.
*unlock unlocker none none none none direction name string(direction name or “*”) Fires when a player unlocks given door.
*lock locker none none none none direction name string(direction name or “*”) Fires when a player locks given door.
timer none none none none none none number(seconds interval) Fires at an interval of x seconds (provided as phrase)
*look looker none none none none none number(%chance) Fires when player would see the room desc.
try tryer none none none none none string(phrase or *) Fires when player in room used try command.
connect connecter none none none none none number(%chance) Fires when player connects in room. Does not fire on reconnect.
*prereset none none none none none none number(%chance) Fires directly before the room resets.
postreset none none none none none none number(%chance) Fires directly after the room resets.
*command commander none none none command argument command name string(command name) Fires when player uses the given command.
(*)If trigger fires, command is prevented from going through unless 'return true' in the script.

When recalling, order of trigger processing is: rexit then exit then recall


triggers/rprog.txt · Last modified: 2015/09/27 20:06 by vodur