User Tools

Site Tools


triggers:oprog

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
triggers:oprog [2017/06/08 01:35]
bobble
triggers:oprog [2019/03/23 22:13] (current)
vodur
Line 9: Line 9:
 |ch1|[[:​lua:​ch:​members|CH]]|see table| |ch1|[[:​lua:​ch:​members|CH]]|see table|
 |ch2|[[:​lua:​ch:​members|CH]]|see table| |ch2|[[:​lua:​ch:​members|CH]]|see table|
 +|text1|string|see table|
 |trigger|string|see table| |trigger|string|see table|
 |trigtype|string|see table| |trigtype|string|see table|
Line 14: Line 15:
 The actual object to which the script is attached can be referenced in the script through '​**obj**'​ global variable (type [[:​lua:​obj:​members|OBJ]]). The actual object to which the script is attached can be referenced in the script through '​**obj**'​ global variable (type [[:​lua:​obj:​members|OBJ]]).
  
-^trigtype^obj2^ch1^ch2^trigger^Phrase type^Description| +^trigtype^obj2^ch1^ch2^text1^trigger^Phrase type^Description| 
-|[[:​triggers:​oprog:​give|give]]<​nowiki>​*</​nowiki>​|none|giver|receiver|none|number(%chance)| ​  | +|[[:​triggers:​oprog:​give|give]]<​nowiki>​*</​nowiki>​|none|giver|receiver|none|none|number(%chance)| ​  | 
-|drop<​nowiki>​*</​nowiki>​|none|dropper|none|none|number(%chance)| ​  | +|drop<​nowiki>​*</​nowiki>​|none|dropper|none|none|none|number(%chance)| ​  | 
-|eat<​nowiki>​*</​nowiki>​|none|eater|none|none|number(%chance)| ​  | +|eat<​nowiki>​*</​nowiki>​|none|eater|none|none|none|number(%chance)| ​  | 
-|drink<​nowiki>​*</​nowiki>​|none|drinker|none|none|number(%chance)| ​  | +|drink<​nowiki>​*</​nowiki>​|none|drinker|none|none|none|number(%chance)| ​  | 
-|quaff<​nowiki>​*</​nowiki>​|none|eater|none|none|number(%chance)| ​  | +|quaff<​nowiki>​*</​nowiki>​|none|eater|none|none|none|number(%chance)| ​  | 
-|sacrifice<​nowiki>​*</​nowiki>​|none|saccer|none|none|number(%chance)| ​  | +|sacrifice<​nowiki>​*</​nowiki>​|none|saccer|none|none|none|number(%chance)| ​  | 
-|wear<​nowiki>​*</​nowiki>​|none|wearer|none|none|number(%chance)| ​  | +|wear<​nowiki>​*</​nowiki>​|none|wearer|none|none|none|number(%chance)| ​  | 
-|remove<​nowiki>​*</​nowiki>​|none|remover|none|none|number(%chance)| ​  | +|remove<​nowiki>​*</​nowiki>​|none|remover|none|none|none|number(%chance)| ​  | 
-|spell<​nowiki>​*</​nowiki>​|none|caster|none|spell name|string(spell name or <​nowiki>​*</​nowiki>​)|Triggers when the object itself is target of spell| +|spell<​nowiki>​*</​nowiki>​|none|caster|none|none|spell name|string(spell name or <​nowiki>​*</​nowiki>​)|Triggers when the object itself is target of spell| 
-|speech|none|speaker|none|full speech text|string(keyword or <​nowiki>​*</​nowiki>​)|If in inventory, fires on speech of character holding it, if in room, fires on speech of anyone in room| +|speech|none|speaker|none|none|full speech text|string(keyword or <​nowiki>​*</​nowiki>​)|If in inventory, fires on speech of character holding it, if in room, fires on speech of anyone in room| 
-|try|none|tryer|none|full try text|string(phrase or <​nowiki>​*</​nowiki>​)|If in inventory, fires on try of character holding it, if in room, fires on try of anyone in room| +|try|none|tryer|none|none|full try text|string(phrase or <​nowiki>​*</​nowiki>​)|If in inventory, fires on try of character holding it, if in room, fires on try of anyone in room| 
-|put<​nowiki>​*</​nowiki>​|container|putter|none|none|number(%chance)|oprog goes on the object that is being put, not a container.| +|put<​nowiki>​*</​nowiki>​|container|putter|none|none|none|number(%chance)|oprog goes on the object that is being put, not a container.| 
-|get<​nowiki>​*</​nowiki>​|container|getter|none|none|number(%chance)|oprog goes on the object that is being get, not a container.| +|get<​nowiki>​*</​nowiki>​|container|getter|none|none|none|number(%chance)|oprog goes on the object that is being get, not a container.| 
-|merge<​nowiki>​*</​nowiki>​|second object|merger|none|none|number(%chance)| ​  \\ Triggers when object is merged. Return false to prevent the merge from completing. \\   \\ When player does a merge, the first object is checked for merge trigger and if it has one, its prog is run. If the first script returns false then the merge is canceled and the second object is not checked for merge trigger. If the first object didn't have a trigger or the prog returns true then the second object is checked for trigger prog is run if it has one. If the second trigger returns false then the merge is canceled, otherwise if it has no merge trigger or the prog returns true the the merge will succeed.| +|merge<​nowiki>​*</​nowiki>​|second object|merger|none|none|none|number(%chance)| ​  \\ Triggers when object is merged. Return false to prevent the merge from completing. \\   \\ When player does a merge, the first object is checked for merge trigger and if it has one, its prog is run. If the first script returns false then the merge is canceled and the second object is not checked for merge trigger. If the first object didn't have a trigger or the prog returns true then the second object is checked for trigger prog is run if it has one. If the second trigger returns false then the merge is canceled, otherwise if it has no merge trigger or the prog returns true the the merge will succeed.| 
-|  rand|  none|  none|  none|  none|  number(%chance)| ​ Checks every tick| +|  rand|  none|  none|  none|  none|  none|  number(%chance)| ​ Checks every tick| 
-|  greet| ​ none|  ch|  none|  none|  number(%chance)| ​ No vis check. \\ See [[:​triggers:​enterandexit|enter and exit triggers]].| +|  greet| ​ none|  ch|  none|  none|  none|  number(%chance)| ​ No vis check. \\ See [[:​triggers:​enterandexit|enter and exit triggers]].| 
-|  [[:​triggers:​oprog:​look|look]]<​nowiki>​*</​nowiki>​| ​ none|  looker| ​ none|  look argument| ​ string(phrase or <​nowiki>​*</​nowiki>​)| ​ Triggered on look or examine| +|  [[:​triggers:​oprog:​look|look]]<​nowiki>​*</​nowiki>​| ​ none|  looker|  none|  none|  look argument| ​ string(phrase or <​nowiki>​*</​nowiki>​)| ​ Triggered on look or examine| 
-|  lore<​nowiki>​*</​nowiki>​| ​ none|  lorer| ​ none|  none|  number(%chance)| ​  | +|  lore<​nowiki>​*</​nowiki>​| ​ none|  lorer|  none|  none|  none|  number(%chance)| ​  | 
-|move<​nowiki>​*</​nowiki>​|none|mover|none|none|number(%chance)|Triggers when object is in the inventory or equipped by a player and the player moves. Return true allows movement, return false prevents it. \\ See [[:​triggers:​enterandexit|enter and exit triggers]].| +|move<​nowiki>​*</​nowiki>​|none|mover|none|none|none|number(%chance)|Triggers when object is in the inventory or equipped by a player and the player moves. Return true allows movement, return false prevents it. \\ See [[:​triggers:​enterandexit|enter and exit triggers]].| 
-|enter<​nowiki>​*</​nowiki>​|none|enterer|none|none|number(%chance)|When player enters the object (portal). \\ See [[:​triggers:​enterandexit|enter and exit triggers]].| +|enter<​nowiki>​*</​nowiki>​|none|enterer|none|none|none|number(%chance)|When player enters the object (portal). \\ See [[:​triggers:​enterandexit|enter and exit triggers]].| 
-|unlock<​nowiki>​*</​nowiki>​|none|unlocker|none|none|number(%chance)|When player unlocks an object (container only)| +|unlock<​nowiki>​*</​nowiki>​|none|unlocker|none|none|none|number(%chance)|When player unlocks an object (container only)| 
-|open<​nowiki>​*</​nowiki>​|none|opener|none|none|number(%chance)|When player opens an object (container only)| +|open<​nowiki>​*</​nowiki>​|none|opener|none|none|none|number(%chance)|When player opens an object (container only)| 
-|sit<​nowiki>​*</​nowiki>​|none|sitter|none|none|number(%chance)|When player sits on an object (furniture only)| +|sit<​nowiki>​*</​nowiki>​|none|sitter|none|none|none|number(%chance)|When player sits on an object (furniture only)| 
-|rest<​nowiki>​*</​nowiki>​|none|rester|none|none|number(%chance)|When player rests on an object (furniture only)| +|rest<​nowiki>​*</​nowiki>​|none|rester|none|none|none|number(%chance)|When player rests on an object (furniture only)| 
-|sleep<​nowiki>​*</​nowiki>​|none|sleeper|none|none|number(%chance)|When player sleeps on an object (furniture only)| +|sleep<​nowiki>​*</​nowiki>​|none|sleeper|none|none|none|number(%chance)|When player sleeps on an object (furniture only)| 
-|wake<​nowiki>​*</​nowiki>​|none|waker|none|none|number(%chance)|When a player wakes/​stands from sitting/​resting/​sleeping on object (furniture only)| +|wake<​nowiki>​*</​nowiki>​|none|waker|none|none|none|number(%chance)|When a player wakes/​stands from sitting/​resting/​sleeping on object (furniture only)| 
-|fight|none|wearer|enemy|none|number(%chance)|Checked every round of a fight. Only checked for worn/​wielded items.| +|fight|none|wearer|enemy|none|none|number(%chance)|Checked every round of a fight. Only checked for worn/​wielded items.| 
-|death|none|killer|victim|none|number(%chance)|Triggers when object is in inventory or equipped by killer. Checked when victim is killed by the killer.| +|death|none|killer|victim|none|none|number(%chance)|Triggers when object is in inventory or equipped by killer. Checked when victim is killed by the killer.| 
-|prehit<​nowiki>​*</​nowiki>​|none|hitter|victim|damage|number(%chance)|Checked on weapon before successful hit.| +|prehit<​nowiki>​*</​nowiki>​|none|hitter|victim|none|damage|number(%chance)|Checked on weapon before successful hit.| 
-|hit|none|hitter|victim|none|number(%chance)|Checks on weapon after successful hit (and after other effects such as weapon flag, stance, behead, etc). Checks on gloves when fighting unarmed.| +|hit|none|hitter|victim|none|none|number(%chance)|Checks on weapon after successful hit (and after other effects such as weapon flag, stance, behead, etc). Checks on gloves when fighting unarmed.| 
-|[[:​triggers:​timer|timer]]|none|none|none|none|number(seconds interval)|Fires at an interval of x seconds (provided as phrase)| +|[[:​triggers:​timer|timer]]|none|none|none|none|none|number(seconds interval)|Fires at an interval of x seconds (provided as phrase)| 
-|command|none|commander|none|command name|string(command name)| ​  |+|command|none|commander|none|command arguments|command name|string(command name)| ​  |
  
 |(<​nowiki>​*</​nowiki>​)If trigger fires, command is prevented from going through unless '​return true' in the script.| |(<​nowiki>​*</​nowiki>​)If trigger fires, command is prevented from going through unless '​return true' in the script.|
triggers/oprog.txt · Last modified: 2019/03/23 22:13 by vodur