Lua functions

KillSpawnByDistance

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

Historical signature: KillSpawnByDistance(spawn, max_distance, include_players, send_packet)

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

Function: KillSpawnByDistance(spawn, max_distance, include_players, send_packet)

Description:

Kill's spawns in the distance radius around the Spawn (Entity based, NPC, Player, Bot). The include_players is false by default, as-is send_packet.

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.
  • max_distance (float) - Float value max_distance.
  • include_players (uint8) - Integer value include_players.
  • send_packet (uint8) - Integer value send_packet.

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.

KillSpawnByDistance(NPC, 20, 0, 0)

Evidence: server/SpawnScripts/FrostfangSea/qst_scourgeson_x2_rygorr_tent.lua:47; binding EQ2Emu_lua_KillSpawnByDistance.

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