Skip to content

Metatable:Guild

Stefan A. Brannfjell edited this page Jun 22, 2020 · 8 revisions

No description available at the moment.

Available methods:

addMember(player)
addRank(id, name, level)
getId()
getMembersOnline()
getMotd()
getName()
getRankById(id)
getRankByLevel(level)
removeMember(player)
setMotd(motd)
getBankBalance()
setBankBalance()
getOwnerGUID()


addMember(player)

Description: N/A
Parameters:

  • player - No description
Returns: N/A
Example:
local guild = Guild(...)
guild:addMember(some_userdata)

Added in version: 1.0


addRank(id, name, level)

Description: N/A
Parameters:

  • id - No description
  • name - No description
  • level - No description
Returns: N/A
Example:
local guild = Guild(...)
guild:addRank(some_id, some_name, 1)

Added in version: 1.0


getId()

Description: N/A
Parameters: None
Returns: N/A
Example:

local guild = Guild(...)
guild:getId()

Added in version: 1.0


getMembersOnline()

Description: N/A
Parameters: None
Returns: N/A
Example:

local guild = Guild(...)
guild:getMembersOnline()

Added in version: 1.0


getMotd()

Description: N/A
Parameters: None
Returns: N/A
Example:

local guild = Guild(...)
guild:getMotd()

Added in version: 1.0


getName()

Description: N/A
Parameters: None
Returns: N/A
Example:

local guild = Guild(...)
guild:getName()

Added in version: 1.0


getRankById(id)

Description: N/A
Parameters:

  • id - No description
Returns: N/A
Example:
local guild = Guild(...)
guild:getRankById(some_id)

Added in version: 1.0


getRankByLevel(level)

Description: N/A
Parameters:

  • level - No description
Returns: N/A
Example:
local guild = Guild(...)
guild:getRankByLevel(1)

Added in version: 1.0


removeMember(player)

Description: N/A
Parameters:

  • player - No description
Returns: N/A
Example:
local guild = Guild(...)
guild:removeMember(some_userdata)

Added in version: 1.0


setMotd(motd)

Description: N/A
Parameters:

  • motd - No description
Returns: N/A
Example:
local guild = Guild(...)
guild:setMotd(any_string)

Added in version: 1.0


getBankBalance()

Description: Get bank balance (gold coins stored up in the guild).
Parameters: None
Returns: int - balance
Example:

local guild = Guild(...)
guild:getBankBalance()

Added in version: 1.4 #2214


setBankBalance(newBalance)

Description: Set bank balance.
Parameters: (Number) new bank balance
Returns: bool true or nil
Example:

local guild = Guild(...)
local rent = 2000
guild:setBankBalance(guild:getBankBalance() - rent)

Added in version: 1.4 #2214


getOwnerGUID()

Description: Get the player GUID number that is the guild leader of this guild.
Parameters: None
Returns: int - player:guid
Example:

local player = Player(...)
local guild = player:getGuild()
if guild and player:getGUID() == guild:getOwnerGUID() then
    print("Player: " .. player:getName() .. " is the Guild Leader of: " .. guild:getName())
end

Added in version: 1.4 #2214

Clone this wiki locally