Lua functions

GetAlignment

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

Historical signature: GetAlignment(Player)

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

Function: GetAlignment(Player)

Description: Returns the alignment of the player character – typically Good, Neutral, or Evil in EQ2. Alignment often affects starting city and some quest options.

Parameters:

  • spawn (Spawn) - Spawn object representing spawn.

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.

alignment = GetAlignment(Player)

Evidence: server/ItemScripts/ForgeryFreeportCitizenshipPapers.lua:182; binding EQ2Emu_lua_GetAlignment.

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