Lua functions

AddProc

Registered in this checkout as EQ2Emu_lua_AddProc; implementation found at WorldServer/Lua/LuaFunctions.cpp:9498.

Historical signature: AddProc(Spawn, Type, Chance, Item, UseAllSpellTargets)

Parameter and behavior details in the historical explanation are under review against the current implementation.

Function: AddProc(Spawn, Type, Chance, Item, UseAllSpellTargets)

Description: Add's a proc for a Spell and calls function proc when proc succeeds.

Parameters:

  • Spawn: Spawn - The spawn or entity involved.
  • Type: int8 - See PROC_TYPE defines.
  • Chance: float - Chance of proc 1-100.
  • Item: Item - An item reference.
  • UseAllSpellTargets: int8 - Default is 0, when set to 1 all spell targets will apply the proc not the Spawn

Returns: None.

Checked example

Active call in a local runtime Lua script. Argument count matches current fixed C++ readers. This is a contextual call pattern, not a tested standalone script.

AddProc(Target, 15, 5, nil, 1)

Evidence: server/Spells/Commoner/CripplingShroud.lua:14; binding EQ2Emu_lua_AddProc.

Current registration: WorldServer/Lua/LuaInterface.cpp. Historical explanation: EQ2Emu Lua documentation.