Lua functions

SetLocationProximityFunction

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

Historical signature: SetLocationProximityFunction(zone, x, y, z, max_variation, in_range_function, leaving_range_function)

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

Function: SetLocationProximityFunction(zone, x, y, z, max_variation, in_range_function, leaving_range_function)

Description: Creates a ZoneScript proximity function for in range and leaving range respectively.

Parameters:

  • zone (Zone) - Zone object representing zone.
  • x (int32) - Integer value x.
  • y (int32) - Integer value y.
  • z (int32) - Integer value z.
  • max_variation (int32) - Integer value max_variation.
  • in_range_function (int32) - Distance in_range_function.
  • leaving_range_function (int32) - Distance leaving_range_function.

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.

SetLocationProximityFunction(zone, -36.14, -48, 762.94, 5, "EventPrep", "Leave")

Evidence: server/ZoneScripts/BloodSkullValleyMaulicsStronghold.lua:10; binding EQ2Emu_lua_SetLocationProximityFunction.

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