Lua functions

AddControlEffect

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

Historical signature: AddControlEffect(Spawn, Type, OnlyAddSpawn)

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

Function: AddControlEffect(Spawn, Type, OnlyAddSpawn)

Description: Apply a Control Effect to a Spawn, this includes Mesmerize, Stun, Root, so on.

Parameters:

  • Spawn: Spawn - The spawn or entity involved.
  • Type: UInt8 - Control Effect Type
  • OnlyAddSpawn: Boolean (Optional) - False by default, set to True will only apply Control Effect to Spawn. Otherwise if Spell all Spawn Targets will apply control effect.

Returns: None.

Notes:

  • See CONTROL_EFFECT_TYPE defines for more details.

Checked example

Active call in a local runtime Lua script. The third flag defaults to false. This is a contextual call pattern, not a tested standalone script.

AddControlEffect(Target, 3)

Evidence: server/Spells/AA/DazingBash.lua:18; binding EQ2Emu_lua_AddControlEffect.

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