Lua functions

AddProcExt

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

Historical signature: AddProcExt(Spawn, ProcType, DamageType, Chance, HPRatio, BelowHealth, TargetHealth, Item, UseAllSpellTargets)

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

Function: AddProcExt(Spawn, ProcType, DamageType, Chance, HPRatio, BelowHealth, TargetHealth, Item, UseAllSpellTargets)

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

Parameters:

  • Spawn: Spawn - The spawn or entity involved.
  • ProcType: int8 - See ProcType options
  • DamageType: int8 - See DamageType options
  • Chance: float - Floating point value.
  • HPRatio: int8 - Small integer or boolean flag.
  • BelowHealth: bool - Use HPRatio against health lower than if false (default). Otherwise if health is higher when true.
  • TargetHealth: bool - Use Target's Health for formula, default is false (use self Spawn health). Otherwise when true use Target's health.
  • Item: Item - An item reference.
  • UseAllSpellTargets: int8 - By default 0 (false) use just Spawn, otherwise use all Spell Targets.

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.

AddProcExt(Target, 3, 0, 100.0, 0, false, false, nil, 0, 7)

Evidence: server/Spells/ClassicRefresh/Fighter/Warrior/Berserker/Destruction-2551400.lua:16; binding EQ2Emu_lua_AddProcExt.

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