Lua functions

GetModelType

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

Historical signature: GetModelType(spawn)

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

Function: GetModelType(spawn)

Description: Get the model type of the current spawn, see https://eq2emu.com/index.php/developers/references Game Models / Model IDs by client version for the ID list.

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.

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.

Model = GetModelType(NPC)

Evidence: server/SpawnScripts/Generic/MonsterCallouts/HighwaymanAntonica.lua:44; binding EQ2Emu_lua_GetModelType.

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