1
0
EQ2Emu/docs/lua_functions/GetAlignment.md

28 lines
943 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### 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`.
**Example:**
```lua
-- From ItemScripts/ForgeryFreeportCitizenshipPapers.lua
function Faction(Item,Player)
Freeport = GetFactionAmount(Player, 11)
Freeport_Add = (10000-Freeport)
Freeport = GetFactionAmount(Player, 12)
Freeport_Add = (-20000-Freeport)
Neriak = GetFactionAmount(Player, 13)
Kelethin = GetFactionAmount(Player, 14)
Halas = GetFactionAmount(Player, 16)
Gorowyn = GetFactionAmount(Player, 17)
alignment = GetAlignment(Player)
if Freeport <10000 and Freeport >=0 then ChangeFaction(Player, 11, Freeport_Add)
elseif Freeport <0 then ChangeFaction(Player, 11, (Freeport*-1))
Faction(Item,Player)
end
```