You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "LUA:AddSpellBonus"
(Created page with "= LUA Functions: AddSpellBonus() = Adds to the stats of the given spawn. ==== Syntax ==== AddSpellBonus(param1, param2, param3) ==== Parameters ==== ; Required - ''param1'' (...") |
|||
| Line 4: | Line 4: | ||
==== Syntax ==== | ==== Syntax ==== | ||
| − | AddSpellBonus(param1, param2, param3) | + | AddSpellBonus(param1, param2, param3, [...]) |
| Line 12: | Line 12: | ||
: ''param2'' is the type (id) of the stat | : ''param2'' is the type (id) of the stat | ||
: ''param3'' is the amount to add | : ''param3'' is the amount to add | ||
| + | ; Optional - ''...'' (int32) | ||
| + | : ''...'' is a list of class id's that the bonus can apply to | ||
| Line 26: | Line 28: | ||
== Notes == | == Notes == | ||
If used in a spell script the target param (''param1'') will be overwritten with the spells targets. | If used in a spell script the target param (''param1'') will be overwritten with the spells targets. | ||
| + | |||
| + | To give a buff to all but fighters it would be AddSpellBonus(Target, 0, 12, 11, 21, 31), 11 is priests, 21 is mages, and 31 is scouts | ||
Revision as of 15:19, 16 January 2014
LUA Functions: AddSpellBonus()
Adds to the stats of the given spawn.
Syntax
AddSpellBonus(param1, param2, param3, [...])
Parameters
- Required - param1 (Spawn), param2 (int16), param3 (sint32)
- param1 is the spawn to receive the stat boost
- param2 is the type (id) of the stat
- param3 is the amount to add
- Optional - ... (int32)
- ... is a list of class id's that the bonus can apply to
Usage
function cast(Caster, Target)
AddSpellBonus(Caster, 0, 12)
end
Adds 12 str to the caster.
Notes
If used in a spell script the target param (param1) will be overwritten with the spells targets.
To give a buff to all but fighters it would be AddSpellBonus(Target, 0, 12, 11, 21, 31), 11 is priests, 21 is mages, and 31 is scouts