mirror of
https://github.com/redstrate/Kawari.git
synced 2025-06-30 11:47:45 +00:00

* Implement the following actors/entities: -Inn Toy Chest actor, which simply says you haven't unlocked mini-games -Inn Glamour Dresser actor, which simply says you haven't unlocked the GD yet -Orchestrion, which is fully functional as long as you have songs unlocked Accompanying the orchestrion is the GM orchestrion command, with a caveat: -It allows you to learn one song at a time, but id 0 (aka "all) doesn't learn a single song for some unknown reason, so I've disabled it for now. * Run cargo fmt * Update USAGE.md How many times will I forget...
39 lines
1.1 KiB
Lua
39 lines
1.1 KiB
Lua
required_rank = GM_RANK_DEBUG
|
|
|
|
function onCommand(args, player)
|
|
local parts = split(args)
|
|
local argc = table.getn(parts)
|
|
local sender = "[unlockaetheryte] "
|
|
local usage = "\nThis command unlocks an aetheryte for the user.\nUsage: !unlockaetheryte <on/off> <id>"
|
|
|
|
if argc < 2 then
|
|
player:send_message(sender.."This command requires two parameters."..usage)
|
|
return
|
|
end
|
|
|
|
local on = parts[1]
|
|
|
|
if on == "on" then
|
|
on = 0
|
|
elseif on == "off" then
|
|
on = 1
|
|
else
|
|
player:send_message(sender.."Error parsing first parameter. Must be either of the words: 'on' or 'off'."..usage)
|
|
return
|
|
end
|
|
|
|
local id = tonumber(parts[2])
|
|
|
|
if not id then
|
|
id = parts[2]
|
|
if id == "all" then
|
|
id = 0
|
|
else
|
|
player:send_message(sender.."Error parsing id parameter. Must be an aetheryte id or the word 'all'."..usage)
|
|
return
|
|
end
|
|
end
|
|
|
|
player:unlock_aetheryte(on, id)
|
|
player:send_message(string.format("%s Aetheryte(s) %s had their unlocked status changed!", sender, id))
|
|
end
|