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

* Reimplement !unlockaction in Lua Rebased on upstream master * Unlockaction: display the action id that was unlocked * Reimplement GM speed in Lua * Fix warnings and errors * Run cargo fmt * Reimplement GM wireframe in Lua * Reimplement GM invis command, with a caveat It can't toggle the invis state yet, and I'm not sure where to update it. * Lua invis: add the gm_invisible toggle, but it still doesn't revert back to false... * Reimplement GM aetheryte in Lua, with a caveat It's seemingly not working right now though: it doesn't add any new aetherytes to the teleport menu. But I can't get the command `//gm aetheryte on X` to do it either, so it's possible Kawari isn't responding correctly? Either way this needs further testing. * Lua invis: add the forgotten Lua file * Reimplement GM teri in Lua Also add a TODO for UnlockAetheryte * Make comment in lua.rs more useful * Run cargo fmt again * Teri: range check the territory ID * Update USAGE.md to reflect the new commands Rebased on upstream master * Clarify unlockaetheryte USAGE and in-script usage * Refactor UnlockAetheryte.lua, and make ToggleInvisibility actually work properly. I opted to create a Task for this, because sticking it in kawari-world.rs felt like a hack to me. * Run cargo fmt for hopefully the last time today * Move lua.ra:toggle_invisibility down with the other queued tasks * Fix spaces in USAGE.md, remove stray rebase message
22 lines
774 B
Lua
22 lines
774 B
Lua
required_rank = GM_RANK_DEBUG
|
|
|
|
function onCommand(args, player)
|
|
local parts = split(args)
|
|
local argc = table.getn(parts)
|
|
local sender = "[teri] "
|
|
local usage = "\nThis command moves the user to a new zone/territory.\nUsage: !teri <id>"
|
|
|
|
if argc == 0 then
|
|
player:send_message(sender.."A territory id is required to use this command."..usage)
|
|
end
|
|
|
|
local id = tonumber(parts[1])
|
|
|
|
if not id or id < 0 or id > 65535 then -- Must be in range of unsigned 16-bit value
|
|
player:send_message(sender.."Error parsing territory id! Make sure your input is an integer between 0 and 65535."..usage)
|
|
return
|
|
end
|
|
|
|
player:change_territory(id)
|
|
player:send_message(string.format("%s Changing territory to %s.", sender, id))
|
|
end
|