You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "LUA:AddWard"
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
| − | = | + | {{LUAFunction |
| − | Adds a ward with the given amount | + | |Name = AddWard |
| − | + | |Description = Adds a ward with the given amount | |
| − | == | + | |Param1 = in32 |
| − | + | |Param1Desc = is the amount of the ward | |
| − | + | |OptionalParam1 = bool | |
| − | + | |OptionalParam1Desc = is if we want to keep the spell active or remove it when the ward is depleted | |
| − | + | |OptionalParam2 = int8 | |
| − | + | |OptionalParam2Desc = is the type of ward | |
| − | + | |OptionalParam3 = int8 | |
| − | + | |OptionalParam3Desc = is the damage type to absorb if ward type is magical | |
| − | + | |Example = | |
| − | |||
| − | |||
| − | |||
<pre> | <pre> | ||
function cast(Caster, Target) | function cast(Caster, Target) | ||
| Line 19: | Line 16: | ||
end | end | ||
</pre> | </pre> | ||
| + | |ExampleDesc = Adds a ward that will absorb 25 damage | ||
| + | |Notes = Can only be used in a spell script | ||
| − | + | The ward will be applied to the targets of the spell that uses this spell script | |
| − | == | + | === Ward Type === |
| − | |||
| − | + | 0 - all | |
| + | |||
| + | 1 - physical | ||
| − | + | 2 - magical | |
damage type is the magical damage to absorb | damage type is the magical damage to absorb | ||
| + | }} | ||
Latest revision as of 12:07, 30 January 2021
LUA:AllFunctions - AddWard
Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker
Adds a ward with the given amount
Syntax
AddWard(param1, [opt param1], [opt param2], [opt param3])
Parameters
- Required - param1 (in32)
- param1 is the amount of the ward
- Optional - opt param1 (bool), opt param2 (int8), opt param3 (int8)
- opt param1 is if we want to keep the spell active or remove it when the ward is depleted
- opt param2 is the type of ward
- opt param3 is the damage type to absorb if ward type is magical
Example
function cast(Caster, Target)
AddWard(25)
end
Adds a ward that will absorb 25 damage
Notes
Can only be used in a spell script
The ward will be applied to the targets of the spell that uses this spell script
Ward Type
0 - all
1 - physical
2 - magical
damage type is the magical damage to absorb