Lua functions

SpawnSetByDistance

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

Historical signature: SpawnSetByDistance(spawn, max_distance, variable, value)

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

Function: SpawnSetByDistance(spawn, max_distance, variable, value)

Description: Set a spawn setting on one or more spawns in a radius of the source.

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.
  • max_distance (int32) - Distance max_distance.
  • variable (int32) - Integer value variable.
  • value (int32) - Integer value value.

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.

SpawnSetByDistance(NPC, 15, "visual_state", 491)

Evidence: server/SpawnScripts/OutpostOverlord/evilgoblintent1.lua:29; binding EQ2Emu_lua_SpawnSetByDistance.

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