User Tools

Site Tools


triggers:oprog

This is an old revision of the document!


ObjProgs

Obj progs are attached in oedit with addoprog command.

Obj progs are always lua scripts.

Argument Type Note
obj OBJ the object to whom the script is attached
obj2 OBJ see table
ch1 CH see table
ch2 CH see table
trigger string see table
trigtype string see table
trigtype obj obj2 ch1 ch2 trigger type Description
give* obj none giver receiver none number(%chance)
drop* obj none dropper none none number(%chance)
eat* obj none eater none none number(%chance)
quaff* obj none eater none none number(%chance)
sacrifice* obj none saccer none none number(%chance)
wear* obj none wearer none none number(%chance)
remove* obj none remover none none number(%chance)
spell* obj none caster none spell name string(spell name or *) Triggers when the object itself is target of spell
speech obj none speaker none full speech text string(keyword or *) If in inventory, fires on speech of character holding it, if in room, fires on speech of anyone in room
try obj none tryer none full try text string(phrase or *) If in inventory, fires on try of character holding it, if in room, fires on try of anyone in room
put* obj container putter none none number(%chance) oprog goes on the object that is being put, not a container.
get* obj container getter none none number(%chance) oprog goes on the object that is being get, not a container.
rand obj none none none none number(%chance) Checks every tick
greet obj none ch none none number(%chance) No vis check
look* obj none looker none look argument string(phrase or *) Triggered on look or examine
lore* obj none lorer none none number(%chance)
enter* obj none enterer none none number(%chance) When player enters the object (portal)
unlock* obj none unlocker none none number(%chance) When player unlocks an object (container only)
open* obj none opener none none number(%chance) When player opens an object (container only)
sit* obj none sitter none none number(%chance) When player sits on an object (furniture only)
wake* obj none waker none none number(%chance) When a player wakes/stands from sitting/resting/sleeping on object (furniture only)
fight obj none wearer enemy none number(%chance) Checked every round of a fight. Only checked for worn/wielded items.
prehit* obj none hitter victim damage number(%chance) Checked on weapon before successful hit.
hit obj none hitter victim none number(%chance) Checks on weapon after successful hit (and after other effects such as weapon flag, stance, behead, etc).
timer obj none none none none number(seconds interval) Fires at an interval of x seconds (provided as phrase)
(*)If trigger fires, command is prevented from going through unless 'return true' in the script.


triggers/oprog.1419393454.txt.gz ยท Last modified: 2014/12/24 03:57 by vodur