Lua functions

SetServerControlFlag

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

Historical signature: SetServerControlFlag(spawn, param, param_value, value)

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

Function: SetServerControlFlag(spawn, param, param_value, value)

Description: Tie to the control effect types found in https://github.com/emagi/eq2emu/blob/main/docs/data_types/control_effect_types.md

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.
  • param (int32) - Integer value param.
  • param_value (int32) - Integer value param_value.
  • value (int32) - Integer value value.

Returns: None.

Connection lifetime: Each player or group-member connection resolved by this function is retained through the native call. A disconnect or reconnect during a callback cannot destroy that retained connection or switch the ongoing call to a replacement. A later Lua call resolves the current connection. This does not extend the lifetime of unrelated spawn or item userdata.

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.

SetServerControlFlag(Target, 5, 1, 1)

Evidence: server/Spells/ClassicRefresh/Fighter/Brawler/FeignDeath-2551690.lua:13; binding EQ2Emu_lua_SetServerControlFlag.

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