You are viewing an old version of this page. Return to the latest version.
No categories assigned
LUA:AddProc
- Last edited 4 years ago by Vlash Nytefall
LUA Functions: AddProc()
Adds a proc to the given entity with the given chance to go off
Syntax
AddProc(param1, param2, param3, [param4], [param5])
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), param5 (int8)
- param4 is the item adding the proc
- param5 if set to 1 this proc applies to all spell targets (if used in spellscript)
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
- 15 PROC_TYPE_DAMAGED
- 16 PROC_TYPE_DAMAGED_MELEE
- 17 PROC_TYPE_DAMAGED_MAGIC
- 18 PROC_TYPE_RANGED_ATTACK
- 19 PROC_TYPE_RANGED_DEFENSE