mirror of
https://github.com/emagi/eq2emu
synced 2026-08-12 18:23:04 -04:00
525 B
525 B
Function: GetFactionID(spawn)
Description: Gets the faction_id of the current Spawn.
Parameters:
spawn(Spawn) - Spawn object representingspawn.
Returns: UInt32 faction_id of the Spawn.
Example:
-- From SpawnScripts/Caves/GuardBelaire.lua
function InRange(NPC, Spawn)
if GetFactionAmount(Spawn,11)>=5000 then
if GetLevel(Spawn) ==8 or GetLevel(Spawn)==9 then
ClassCheck(NPC,Spawn)
end
end
if GetFactionID(Spawn) ==1 then
Attack(NPC,Spawn)
end
end