lua:ch:addaffect
This is an old revision of the document!
Syntax:
addaffect( where["affects"], type, level, duration, location, modifier, bitvector )
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"], "custom_affect", level, duration, bitvector, customtag )
Arguments:
where - As indicated, could be affects, immune, resist, or vuln. type - Skill name or "custom_affect" ( see skill_table ) level - Integer. duration - Integer. Duration in ticks, -1 for indefinite. location - What does it affect ( see apply_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.
Example1:
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")
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)
Example2:
ch:addaffect( "affects", "paroxysm", 100, 1, "none", 0, "none")
You are affected by the following spells: Ability: paroxysm : modifies none by 0 for 1 hours (Lvl 99)
Example 3:
addaffect("vuln", "custom_affect", 100, 100, "fire", "Scorched skin")
Special: Scorched skin : modifies none by 0 for 100 hours (Lvl 100)
lua/ch/addaffect.1459716749.txt.gz · Last modified: 2016/04/03 20:52 (external edit)