No categories assigned

LUA:AddProc


LUA:AllFunctions - AddProc

Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker


Adds a proc to the given entity with the given chance to go of

Syntax

AddProc(param1, param2, param3, [opt param1], [opt param2])

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 - opt param1 (item), opt param2 (int8)
opt param1 is the item adding the proc
opt param2 if set to 1 this proc applies to all spell targets (if used in spellscript)

Example

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