guild
The player guilds held by their guildstones: the roster, the fealty, the wars and the alliances.
Source: src/Moongate.Server.Ultima/Modules/GuildModule.cs
Functions
Section titled “Functions”allies
Section titled “allies”guild.allies(guild) -> tableThe guilds the guild is allied with, as a list of { id, name }; an empty list for a serial that is no guild.
| Parameter | Type | Default |
|---|---|---|
guild | integer |
Returns table.
break_alliance
Section titled “break_alliance”guild.break_alliance(guild, other) -> booleanEnds the alliance of the two guilds at once, whichever side asks; false when they are not allied.
| Parameter | Type | Default |
|---|---|---|
guild | integer | |
other | integer |
Returns boolean.
create
Section titled “create”guild.create(player, name) -> anyMakes a guild of the name, at most 32 characters, with the player as its founder and the initials of the name as its abbreviation: returns the serial of the guild, or the string bad_name, duplicate or already_member (the player is in a guild already).
| Parameter | Type | Default |
|---|---|---|
player | integer | |
name | string |
Returns any.
declare_alliance
Section titled “declare_alliance”guild.declare_alliance(guild, other) -> booleanDeclares an alliance with the other guild, which lives when that guild declares back; false when a serial is no guild or is the same one.
| Parameter | Type | Default |
|---|---|---|
guild | integer | |
other | integer |
Returns boolean.
declare_war
Section titled “declare_war”guild.declare_war(guild, other) -> booleanDeclares a war on the other guild, which begins when that guild declares back; false when a serial is no guild or is the same one.
| Parameter | Type | Default |
|---|---|---|
guild | integer | |
other | integer |
Returns boolean.
declared_alliance
Section titled “declared_alliance”guild.declared_alliance(guild, other) -> booleanWhether the guild has declared an alliance on the other, offered or live: its own word, whichever the other said.
| Parameter | Type | Default |
|---|---|---|
guild | integer | |
other | integer |
Returns boolean.
declared_war
Section titled “declared_war”guild.declared_war(guild, other) -> booleanWhether the guild has declared war on the other, offered or live: its own word, whichever the other said.
| Parameter | Type | Default |
|---|---|---|
guild | integer | |
other | integer |
Returns boolean.
guild.eject(guild, player) -> booleanTakes the member out of the guild by the will of its leader; false when the player is in none or is the leader.
| Parameter | Type | Default |
|---|---|---|
guild | integer | |
player | integer |
Returns boolean.
guild.get(guild) -> table?The guild of a serial, as { id, name, abbreviation, charter, website, hue, founded_at }; nil for a serial that is no guild.
| Parameter | Type | Default |
|---|---|---|
guild | integer |
Returns table?.
is_member
Section titled “is_member”guild.is_member(player, guild) -> booleanWhether the player is a member of the guild of the serial; false for a player in none.
| Parameter | Type | Default |
|---|---|---|
player | integer | |
guild | integer |
Returns boolean.
leader
Section titled “leader”guild.leader(guild) -> integer?The serial of the leader of the guild, the member the most fealty points to; nil for a serial that is no guild.
| Parameter | Type | Default |
|---|---|---|
guild | integer |
Returns integer?.
make_peace
Section titled “make_peace”guild.make_peace(guild, other) -> booleanEnds the war of the two guilds at once, whichever side asks; false when they are not at war.
| Parameter | Type | Default |
|---|---|---|
guild | integer | |
other | integer |
Returns boolean.
member
Section titled “member”guild.member(player) -> table?The membership of the player, as { title, fealty, joined_at }; nil for a player in no guild or a serial that is no mobile.
| Parameter | Type | Default |
|---|---|---|
player | integer |
Returns table?.
guild.of(player) -> table?The guild the player is a member of, as { id, name, abbreviation, charter, website, hue, founded_at }; nil for a player in no guild, an NPC or a serial that is no mobile.
| Parameter | Type | Default |
|---|---|---|
player | integer |
Returns table?.
recruit
Section titled “recruit”guild.recruit(guild, player) -> booleanTakes the player in the guild; false when it already is a member of one or the serial is no guild.
| Parameter | Type | Default |
|---|---|---|
guild | integer | |
player | integer |
Returns boolean.
resign
Section titled “resign”guild.resign(player) -> booleanTakes the player out of its guild; false when it is in none. The last member out dissolves the guild.
| Parameter | Type | Default |
|---|---|---|
player | integer |
Returns boolean.
roster
Section titled “roster”guild.roster(guild) -> tableThe roster of the guild as a list of { player, name, title, fealty, joined_at, online }, the leader first; an empty list for a serial that is no guild.
| Parameter | Type | Default |
|---|---|---|
guild | integer |
Returns table.
set_charter
Section titled “set_charter”guild.set_charter(guild, charter) -> booleanWrites what the guild is about, at most 128 characters; false when the serial is no guild.
| Parameter | Type | Default |
|---|---|---|
guild | integer | |
charter | string |
Returns boolean.
set_fealty
Section titled “set_fealty”guild.set_fealty(player, member) -> booleanMakes the member back the other one for leader; false when the other is no member of its guild or is itself.
| Parameter | Type | Default |
|---|---|---|
player | integer | |
member | integer |
Returns boolean.
set_hue
Section titled “set_hue”guild.set_hue(guild, hue) -> booleanSets the hue the speech of the guild's members is shown in; false when the serial is no guild.
| Parameter | Type | Default |
|---|---|---|
guild | integer | |
hue | integer |
Returns boolean.
set_title
Section titled “set_title”guild.set_title(guild, player, title) -> booleanGives the member a title, at most 20 characters; false when the player is no member of the guild.
| Parameter | Type | Default |
|---|---|---|
guild | integer | |
player | integer | |
title | string |
Returns boolean.
set_website
Section titled “set_website”guild.set_website(guild, website) -> booleanWrites where the guild lives outside the game, at most 128 characters; false when the serial is no guild.
| Parameter | Type | Default |
|---|---|---|
guild | integer | |
website | string |
Returns boolean.
guild.wars(guild) -> tableThe guilds the guild is at war with, as a list of { id, name }; an empty list for a serial that is no guild.
| Parameter | Type | Default |
|---|---|---|
guild | integer |
Returns table.
Made with ❤️ by Tom
