Skip to content

npcguild

Takes members for the guild of a trade, as a guildmaster does.

Source: src/Moongate.Server.Ultima/Modules/NpcGuildModule.cs

npcguild.is_join_payment(npc, item) -> boolean

Whether the item dropped on the NPC is the price of joining its guild: the NPC is a guildmaster and the item a pile of exactly 500 gold. Such a drop is about the guild alone, so a script answers it with npcguild.join and no lesson is paid with it.

ParameterTypeDefault
npcinteger
iteminteger

Returns boolean.

npcguild.join(npc, giver, item) -> boolean

Takes the gold item the player dropped on the guildmaster as the price of joining its guild: a pile of exactly 500 gold from a player who is in no guild and meets the requirements. True when the player joined, which is what an on_drag_drop answers; false for anything else, and the gold goes back.

ParameterTypeDefault
npcinteger
giverinteger
iteminteger

Returns boolean.

npcguild.member(player) -> string?

The guild the player belongs to, as a lowercase name such as blacksmiths; nil for a player in none, an NPC or a serial that is no mobile.

ParameterTypeDefault
playerinteger

Returns string?.

npcguild.of(npc) -> string?

The guild the NPC takes members for, as a lowercase name such as blacksmiths, thieves or mages, from the npc_guild of its mobile template; nil for an NPC that is no guildmaster or a serial that is no NPC.

ParameterTypeDefault
npcinteger

Returns string?.

npcguild.quote(npc, player) -> boolean

Has the guildmaster tell the player the price of joining its guild, 500 gold, or why it cannot: already a member, in another guild, or the requirements of the thieves not met (no kills, Stealing 60.0). False when nothing was told as a price.

ParameterTypeDefault
npcinteger
playerinteger

Returns boolean.

npcguild.resign(npc, player) -> boolean

Lets the player leave the guild of the guildmaster, no sooner than a week after joining. The guildmaster says why not: the player is not a member of its guild, or joined too lately. True when the player left.

ParameterTypeDefault
npcinteger
playerinteger

Returns boolean.

Made with ❤️ by Tom

Buy me a coffee