This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
triggers:oprog [2014/12/24 03:50] vodur created |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== ObjProgs ====== | ||
- | |||
- | Obj progs are attached in oedit with addoprog command. | ||
- | |||
- | Obj progs are always lua scripts. | ||
- | |||
- | ^Argument ^Type ^Note | | ||
- | |obj |[[http://rooflez.com/wiki/index.php?n=Main.OBJProperties|OBJ]] |the object to whom the script is attached | | ||
- | |obj2 |[[http://rooflez.com/wiki/index.php?n=Main.OBJProperties|OBJ]] |see table | | ||
- | |ch1 |[[http://rooflez.com/wiki/index.php?n=Main.CHProperties|CH]] |see table | | ||
- | |ch2 |[[http://rooflez.com/wiki/index.php?n=Main.CHProperties|CH]] |see table | | ||
- | |trigger |string |see table | | ||
- | |trigtype |string |see table | | ||
- | |||
- | ^[[http://rooflez.com/wiki/index.php?n=Main.ObjProgs#|trigtype | ||
- | {{http://rooflez.com/wiki/pub/sortable/none.gif?nolink&}} | ||
- | ]] ^[[http://rooflez.com/wiki/index.php?n=Main.ObjProgs#|obj | ||
- | {{http://rooflez.com/wiki/pub/sortable/none.gif?nolink&}} | ||
- | ]] ^[[http://rooflez.com/wiki/index.php?n=Main.ObjProgs#|obj2 | ||
- | {{http://rooflez.com/wiki/pub/sortable/none.gif?nolink&}} | ||
- | ]] ^[[http://rooflez.com/wiki/index.php?n=Main.ObjProgs#|ch1 | ||
- | {{http://rooflez.com/wiki/pub/sortable/none.gif?nolink&}} | ||
- | ]] ^[[http://rooflez.com/wiki/index.php?n=Main.ObjProgs#|ch2 | ||
- | {{http://rooflez.com/wiki/pub/sortable/none.gif?nolink&}} | ||
- | ]] ^[[http://rooflez.com/wiki/index.php?n=Main.ObjProgs#|trigger | ||
- | {{http://rooflez.com/wiki/pub/sortable/none.gif?nolink&}} | ||
- | ]] ^[[http://rooflez.com/wiki/index.php?n=Main.ObjProgs#|Phrase type | ||
- | {{http://rooflez.com/wiki/pub/sortable/none.gif?nolink&}} | ||
- | ]] ^[[http://rooflez.com/wiki/index.php?n=Main.ObjProgs#|Description | ||
- | {{http://rooflez.com/wiki/pub/sortable/none.gif?nolink&}} | ||
- | ]] | | ||
- | |[[http://rooflez.com/wiki/index.php?n=Main.OprogGive|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 | | ||
- | |[[http://rooflez.com/wiki/index.php?n=Main.OprogLook|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). | | ||
- | |[[http://rooflez.com/wiki/index.php?n=Main.TimerTrigger|timer]] |obj |none |none |none |none |number(seconds interval) |Fires at an interval of x seconds (provided as phrase) | | ||
- | |||
- | |[[http://rooflez.com/wiki/index.php?n=Main.ObjProgs#|(%%*%%)If trigger fires, command is prevented from going through unless 'return true' in the script. | ||
- | {{http://rooflez.com/wiki/pub/sortable/none.gif?nolink&}} | ||
- | ]] | | ||
- | |||
- | \\ | ||