Lua functions

Charm

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

Historical signature: Charm(…) via current binding

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

Function: Charm(owner, pet)

Description:

Uses the current spell to charm an NPC as the supplied entity's pet. Requires a valid spell context and eligible entity/NPC arguments.

Parameters:

  • owner (Spawn) - Entity receiving the charmed pet.
  • pet (Spawn) - NPC to charm.

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.

Charm(Player, whelp)

Evidence: server/SpawnScripts/Butcherblock/qsttalvraesbowl.lua:36; binding EQ2Emu_lua_Charm.

Current registration: WorldServer/Lua/LuaInterface.cpp.