Lua functions

ModifyMaxHP

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

Historical signature: ModifyMaxHP(spawn, value)

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

Function: ModifyMaxHP(spawn, value)

Description: Sets the Maximum HP of the Spawn to the value provided.

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.
  • value (sint32) - 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.

ModifyMaxHP(NPC, math.floor(hp))

Evidence: server/SpawnScripts/Generic/NPCModule.lua:352; binding EQ2Emu_lua_ModifyMaxHP.

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