Lua functions

GetSpell

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

Historical signature: GetSpell(spell_id, spell_tier, custom_lua_script)

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

Function: GetSpell(spell_id, spell_tier, custom_lua_script)

Description: Gets a spell object reference by spell_id, spell_tier and can supply a custom lua script to run.

Parameters:

  • spell_id (uint32) - Integer value spell_id.
  • spell_tier (uint8) - Integer value spell_tier.
  • custom_lua_script (string) - String custom_lua_script.

Returns: Spell object reference.

Checked example

Active call in a local runtime Lua script. The custom Lua script name defaults to empty. This is a contextual call pattern, not a tested standalone script.

local reviveSicknessSpell = GetSpell(5162, 1)

Evidence: server/Spells/Commoner/BattleReprieveRecovery.lua:19; binding EQ2Emu_lua_GetSpell.

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