This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
triggers:rprog [2014/12/24 04:06] vodur created |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== RoomProgs ====== | ||
- | |||
- | Room progs are attached in redit with addrprog command. | ||
- | |||
- | Room progs are always lua scripts. | ||
- | |||
- | ^Argument ^Type ^Note | | ||
- | |room |[[:lua:area:members|AREA]] |the area to whom the script is attached | | ||
- | |ch1 |[[:lua:ch:members|CH]] |see table | | ||
- | |ch2 |[[:lua:ch:members|CH]] |see table | | ||
- | |obj1 |[[:lua:obj:members|OBJ]] |see table | | ||
- | |obj2 |[[:lua:obj:members|OBJ]] |see table | | ||
- | |text1 |string |see table | | ||
- | |trigger |string |see table | | ||
- | |trigtype |string |see table | | ||
- | |||
- | ^trigtype ^room ^ch1 ^ch2 ^obj1 ^obj2 ^text1 ^trigger ^Phrase type ^Description | | ||
- | |enter |room |enterer |none |none |none |none |none |number(%chance) |Fires when player enters the room | | ||
- | |%%*%%exit |room |exiter |none |none |none |none |none |number(%chance) |Fires when player exits the room | | ||
- | |%%*%%move |room |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. | | ||
- | |%%*%%open |room |opener |none |none |none |none |direction name |string(direction name or "%%*%%") |Fires when a player opens given door. | | ||
- | |%%*%%close |room |closer |none |none |none |none |direction name |string(direction name or "%%*%%") |Fires when a player closes given door. | | ||
- | |%%*%%unlock |room |unlocker |none |none |none |none |direction name |string(direction name or "%%*%%") |Fires when a player unlocks given door. | | ||
- | |%%*%%lock |room |locker |none |none |none |none |direction name |string(direction name or "%%*%%") |Fires when a player locks given door. | | ||
- | |[[:triggers:timer|timer]] |room |none |none |none |none |none |none |number(seconds interval) |Fires at an interval of x seconds (provided as phrase) | | ||
- | |%%*%%look |room |looker |none |none |none |none |none |number(%chance) |Fires when player would see the room desc. | | ||
- | |try |room |tryer |none |none |none |none |none |string(phrase or %%*%%) |Fires when player in room used try command. | | ||
- | |%%*%%command |room |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 | ||