1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-06-30 11:47:45 +00:00
kawari/resources/scripts/commands/debug/Festival.lua
The Dax 0f7e068ba3 Further reduce boilerplate in various scripts
-Introduce a printf helper command which can print the sending command's name for you,
and treats the message as a format string if additional params follow
2025-06-26 07:47:05 -04:00

18 lines
642 B
Lua

-- A list of festival ids can be found in Hyperborea's source tree:
-- https://github.com/kawaii/Hyperborea/blob/main/Hyperborea/festivals.yaml
required_rank = GM_RANK_DEBUG
sender = "[festival] "
function onCommand(args, player)
local parts = split(args)
local argc = #parts
local usage = "\nUsage: !festival <id1> <id2> <id3> <id4>"
local id1 = tonumber(parts[1]) or 0
local id2 = tonumber(parts[2]) or 0
local id3 = tonumber(parts[3]) or 0
local id4 = tonumber(parts[4]) or 0
player:set_festival(id1, id2, id3, id4)
printf(player, "Festival(s) changed to %s, %s, %s and %s.", id1, id2, id3, id4)
end