User Tools

Site Tools


lua:ch:addaffect

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
lua:ch:addaffect [2017/02/20 07:17] vodurlua:ch:addaffect [2024/07/11 18:34] (current) astark
Line 7: Line 7:
  
 Arguments: Arguments:
- 
 <code> <code>
 +
 where - As indicated, could be affects, immune, resist, or vuln. where - As indicated, could be affects, immune, resist, or vuln.
 type  - Skill name or "custom_affect" ( see skill_table ) type  - Skill name or "custom_affect" ( see skill_table )
Line 14: Line 14:
 duration - Integer. Duration in ticks, -1 for indefinite. duration - Integer. Duration in ticks, -1 for indefinite.
 location - What does it affect ( see apply_flags table ). location - What does it affect ( see apply_flags table ).
 +modifier - How much does it affect, i.e. skills -100)
 bitvector - Affect flag to add ( see affect_flags table ). bitvector - Affect flag to add ( see affect_flags table ).
 customtag - String. Custom name for the affect. This is what will show with 'affects' command. customtag - String. Custom name for the affect. This is what will show with 'affects' command.
 +
 </code> </code>
  
Line 21: Line 23:
  
 <code lua> <code lua>
 +--------------where--------type---------lvl--dur--location--mod--bitvec---custom-tag
 ch:addaffect("affects","custom_affect", 100, -1, "skills", -100, "none", "Irena's curse") ch:addaffect("affects","custom_affect", 100, -1, "skills", -100, "none", "Irena's curse")
 ch:addaffect("affects","custom_affect", 100, -1, "stats", -100, "none", "Irena's curse") ch:addaffect("affects","custom_affect", 100, -1, "stats", -100, "none", "Irena's curse")
 +
 </code> </code>
  
Line 29: Line 33:
 Special: Irena's curse : modifies all stats by -100 indefinitely (Lvl 100) Special: Irena's curse : modifies all stats by -100 indefinitely (Lvl 100)
                        : modifies all skills by -100 indefinitely (Lvl 100)                        : modifies all skills by -100 indefinitely (Lvl 100)
 +
 </code> </code>
  
Line 34: Line 39:
  
 <code> <code>
 +--------------where--------type------lvl--dur-loc--mod--bitv
 ch:addaffect( "affects", "paroxysm", 100, 1, "none", 0, "none") ch:addaffect( "affects", "paroxysm", 100, 1, "none", 0, "none")
 +
 </code> </code>
  
Line 40: Line 47:
 You are affected by the following spells: You are affected by the following spells:
 Ability: paroxysm       : modifies none by 0 for 1 hours (Lvl 99) Ability: paroxysm       : modifies none by 0 for 1 hours (Lvl 99)
 +
 </code> </code>
  
Line 45: Line 53:
  
 <code lua> <code lua>
 +-----------where-------type--------lvl--dur---bitv---customtag
 ​addaffect("vuln", "custom_affect", 100, 100, "fire", "Scorched skin") ​addaffect("vuln", "custom_affect", 100, 100, "fire", "Scorched skin")
 +
 </code> </code>
  
 <code> <code>
 Special: Scorched skin  : modifies none by 0 for 100 hours (Lvl 100) Special: Scorched skin  : modifies none by 0 for 100 hours (Lvl 100)
 +
 </code> </code>
  
  
lua/ch/addaffect.txt · Last modified: 2024/07/11 18:34 by astark