Skip to content

hue_picker

Shows a player the client's hue picker and runs a function with the hue it picked.

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

hue_picker.open(player, graphic, callback) -> boolean

Shows the player the client's hue picker with a graphic (0 to 65535) in it; the function gets the hue picked, from 2 to 1001, or nil when the picker ended without an answer: another picker took its place or the player left. A player that closes the picker sends nothing, so the function may never run: check again in it what was true when the picker opened. A picker a script replaces is told nil on the next turn of the game loop. False for a graphic out of range, an NPC or a player not in the world.

ParameterTypeDefault
playerinteger
graphicinteger
callbackfunction

Returns boolean.

Made with ❤️ by Tom

Buy me a coffee