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
Next revision
Previous revision
lua:ch:addaffect [2014/12/27 08:09] vodurlua:ch:addaffect [2024/07/11 18:34] (current) astark
Line 1: Line 1:
 Syntax: Syntax:
  
-addaffect( where["affects"], type,                                           level, duration, location, modifier, bitvector ) \\ +addaffect( where<"affects">, type, level, duration, location, modifier, bitvector )\\ 
-addaffect( where["affects"], "custom_affect",                         level, duration, location, modifier, bitvector, customtag ) \\ +addaffect( where<"affects">, "custom_affect", level, duration, location, modifier, bitvector, customtag )\\ 
-addaffect( where["immune"|"resist"|"vuln"], type,                   level, duration, bitvector )\\ +addaffect( where<"immune"|"resist"|"vuln">, type, level, duration, bitvector )\\ 
-addaffect( where["immune"|"resist"|"vuln"], "custom_affect", level, duration, bitvector, customtag )+addaffect( where<"immune"|"resist"|"vuln">, "custom_affect", level, duration, bitvector, customtag )
  
 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 ) 
-  level - Integer. +level - Integer. 
-  duration - Integer. Duration in ticks, -1 for indefinite. +duration - Integer. Duration in ticks, -1 for indefinite. 
-  bitvector - Affect flag to add ( see affect_flags table ). +location - What does it affect ( see apply_flags table ). 
-  customtag - String. Custom name for the affect. This is what will show with 'affects' command.+modifier - How much does it affect, i.e. skills -100) 
 +bitvector - Affect flag to add ( see affect_flags table ). 
 +customtag - String. Custom name for the affect. This is what will show with 'affects' command. 
 </code> </code>
  
 Example1: Example1:
  
-ch:addaffect("affects","custom_affect", 100, -1, "skills", -100, "none", "Irena's curse")\\+<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, "stats", -100, "none", "Irena's curse") ch:addaffect("affects","custom_affect", 100, -1, "stats", -100, "none", "Irena's curse")
  
-You are affected by the following spells: \\ +</code>
-Special: Irena's curse : modifies all stats by -100 indefinitely (Lvl 100)+
  
 <code> <code>
-: modifies all skills by -100 indefinitely (Lvl 100)+You are affected by the following spells: 
 +Special: Irena's curse : modifies all stats by -100 indefinitely (Lvl 100) 
 +                       : modifies all skills by -100 indefinitely (Lvl 100) 
 </code> </code>
  
 Example2: Example2:
 +
 +<code>
 +--------------where--------type------lvl--dur-loc--mod--bitv
 +ch:addaffect( "affects", "paroxysm", 100, 1, "none", 0, "none")
 +
 +</code>
 +
 +<code>
 +You are affected by the following spells:
 +Ability: paroxysm       : modifies none by 0 for 1 hours (Lvl 99)
 +
 +</code>
 +
 +Example 3:
 +
 +<code lua>
 +-----------where-------type--------lvl--dur---bitv---customtag
 +​addaffect("vuln", "custom_affect", 100, 100, "fire", "Scorched skin")
 +
 +</code>
 +
 +<code>
 +Special: Scorched skin  : modifies none by 0 for 100 hours (Lvl 100)
 +
 +</code>
 +
  
lua/ch/addaffect.1419667781.txt.gz · Last modified: 2014/12/27 08:09 by vodur