Skip to content

help

What the help gump needs from the server: the wait and the pause of the I am stuck button, the starting city nearest to a character, and the queue of the requests for the game masters (create, list, take, answer, close). The module does not check who calls it: a script that is for the staff checks world.is_staff first.

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

help.answer(id, staff, text) -> boolean

Answers the request in the name of the game master and closes it: the player reads the answer at once, or at its next login when it is offline (cut at 128 characters). False for an unknown or closed request, an empty answer, and a staff not in the world.

ParameterTypeDefault
idinteger
staffinteger
textstring

Returns boolean.

help.can_page(player) -> table

Whether the player may ask for a game master now, as { ok } when it may, or { ok = false, reason, seconds } when it may not: reason is open (it has a request open or taken) or wait (it asked too soon; seconds is how long to wait), and reason is gone for a player not in the world.

ParameterTypeDefault
playerinteger

Returns table.

help.close(id, staff) -> boolean

Closes the request with no answer, in the name of the game master. False for an unknown or closed request and for a staff not in the world.

ParameterTypeDefault
idinteger
staffinteger

Returns boolean.

help.create_page(player, kind, text) -> table

Makes a request for the game masters in the name of the player, of a HelpPageKindType and with a line of text (cut at 128 characters), and tells the game masters in the world. It gives { id } with the number of the request, or { reason, seconds } when none was made: reason is open (the player has a request open or taken), wait (it asked too soon; seconds is how long to wait), text (the text is empty or the kind is none of the four) or gone (the player is not in the world).

ParameterTypeDefault
playerinteger
kindnumber
textstring

Returns table.

help.nearest_city(serial) -> table?

The starting city of data/starting_cities.toml nearest to the character, on the map it stands on, as { town, x, y, z, map } (map is the MapType number, for mobile.teleport). When no city is on that map it is the first city of the file. Nil when the mobile is not in the world or the file has no city.

ParameterTypeDefault
serialinteger

Returns table?.

help.page(id) -> table?

One request for the game masters by its number, in the shape of help.pages, closed ones included; nil when there is none.

ParameterTypeDefault
idinteger

Returns table?.

help.pages() -> table

The requests for the game masters that are open or taken, the oldest first, as an array of { id, player, name, account, kind, status, text, taken_by, answer, age_seconds, map, x, y, z, online }: kind is a HelpPageKindType, status a HelpPageStatusType, map the MapType number where the player asked, online whether the player is in the world.

Returns table.

help.settings() -> table

The settings of ultima.help as { wait_seconds, cooldown_minutes }: the seconds a character must stand still before I am stuck moves it, and the minutes before it can ask again (0 for no pause).

Returns table.

help.take(id, staff) -> boolean

Marks the request as taken by the game master, whose name it keeps; a request taken by another can be taken over. False for an unknown or closed request, and for a staff not in the world.

ParameterTypeDefault
idinteger
staffinteger

Returns boolean.

help.waiting() -> integer

How many requests for the game masters are open or taken.

Returns integer.

Made with ❤️ by Tom

Buy me a coffee