Skip to content

Guild & Union Functions


gObjTargetGuildWarCheck(lpObj, lpTarget)

Checks if two players are opponents in a guild war.

  • Returns: boolean
if gObjTargetGuildWarCheck(player, target) then
    LogAdd(LOG_RED, "Guild war opponents!")
end

gObjGuildWarEnd(guildA, guildB, result)

Ends a guild war between two guilds.

  • Parameters:
    • guildA (string): First guild name.
    • guildB (string): Second guild name.
    • result (integer): War result (1 = guild A wins, 2 = guild B wins).
gObjGuildWarEnd(guildA, guildB, 1)

gObjGuildWarProc(lpObj)

Processes guild war tick logic for the player.

  • Returns: void

gObjGuildWarCheck(lpObj, lpTarget)

Checks if two players are in the same guild war.

  • Returns: boolean

gObjGuildWarMasterClose(lpObj)

Closes the guild war master dialog for the player.

  • Returns: void

gObjGuildWarItemGive(lpObj, lpTarget)

Distributes guild war reward items to the winner.

  • Returns: void

gObjGetGuildUnionNumber(lpObj)

Returns the guild union number for the player.

  • Returns: integer — Union number, or 0 if not in a union.
local unionNum = gObjGetGuildUnionNumber(player)

gObjGetGuildUnionName(lpObj)

Returns the guild union name.

  • Returns: string — Union name, or empty string if not in a union.
local unionName = gObjGetGuildUnionName(player)

gObjCheckRival(lpObj, lpTarget)

Checks if two players are rivals (opposing guilds/unions).

  • Returns: boolean
if gObjCheckRival(player, target) then
    LogAdd(LOG_RED, "Rival players!")
end

gObjGetRelationShip(lpObj, lpTarget)

Returns the relationship type between two players.

  • Returns: integer — Relationship type (0 = none, 1 = ally, 2 = rival).
local rel = gObjGetRelationShip(player, target)

gObjNotifyUpdateUnionV1(lpObj)

Sends union update notification to nearby players (basic version).

  • Returns: void

gObjNotifyUpdateUnionV2(lpObj)

Sends union update notification to nearby players (extended version with guild marks).

  • Returns: void

gObjUnionUpdateProc(lpObj)

Processes pending union data updates for the player.

  • Returns: void