Lua functions

SetInCombat

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

Historical signature: SetInCombat(spawn, val)

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

Function: SetInCombat(spawn, val)

Description: Set's if the Spawn is in combat.

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.
  • val (bool) - Boolean flag val.

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.

SetInCombat(NPC, false)

Evidence: server/SpawnScripts/BrawlersDojo/afirstcircleadept.lua:51; binding EQ2Emu_lua_SetInCombat.

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