You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "LUA:AddProc"
| Line 41: | Line 41: | ||
:11 PROC_TYPE_HEALING | :11 PROC_TYPE_HEALING | ||
:12 PROC_TYPE_BENEFICIAL | :12 PROC_TYPE_BENEFICIAL | ||
| + | :13 PROC_TYPE_DEATH | ||
| + | :14 PROC_TYPE_KILL | ||
Revision as of 21:09, 21 January 2014
LUA Functions: AddProc()
Adds a proc to the given entity with the given chance to go off
Syntax
AddProc(param1, param2, param3, [param4])
Parameters
- Required - param1 (Spawn), param2 (int8), param3 (float)
- param1 is the entity who will be getting the proc
- param2 is the type of proc we are adding
- param3 is the chance the proc has to go off
- Optional - param4 (Item)
- param4 is the item adding the proc
Usage
function equipped(Item, Player)
AddProc(Player, 1, 8.5, Item)
end
When an item with this script is equipped the player will get an offensive proc with a 8.5% chance to go off
Notes
This can only be used on an Entity
This function can only be used in an item or spell script, if used in an item script then the item param must be set
- Types
- 1 PROC_TYPE_OFFENSIVE
- 2 PROC_TYPE_DEFENSIVE
- 3 PROC_TYPE_PHYSICAL_OFFENSIVE
- 4 PROC_TYPE_PHYSICAL_DEFENSIVE
- 5 PROC_TYPE_MAGICAL_OFFENSIVE
- 6 PROC_TYPE_MAGICAL_DEFENSIVE
- 7 PROC_TYPE_BLOCK
- 8 PROC_TYPE_PARRY
- 9 PROC_TYPE_RIPOSTE
- 10 PROC_TYPE_EVADE
- 11 PROC_TYPE_HEALING
- 12 PROC_TYPE_BENEFICIAL
- 13 PROC_TYPE_DEATH
- 14 PROC_TYPE_KILL