Skip to content

prompt

Asks a player for a line of text and runs a function with what it typed.

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

prompt.ask(player, callback) -> boolean

Asks the player for a line of text, typed in the journal line; the function gets the text, up to 128 characters without the spaces around it, or nil when the player escaped, typed only spaces, was asked something else or left. Say what to type first with mobile.message. False for an NPC or a player not in the world.

ParameterTypeDefault
playerinteger
callbackfunction

Returns boolean.

prompt.cancel(player) -> boolean

Stops waiting for the player's text; false for an NPC or a player not in the world.

ParameterTypeDefault
playerinteger

Returns boolean.

Made with ❤️ by Tom

Buy me a coffee