1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-07-10 07:57:46 +00:00
kawari/resources/scripts/commands/gm/Collect.lua
The Dax 3b6fcb7ba1 Extend the Lua API:
-Implement GM command collect (subtracts gil from player), but the ingame command's params are unknown, Lua only
-Implement GM command inspect, but the IPC opcode for it is different than GMCommand and is thus far unimplemented, Lua only
-The Lua API can now access all of the player's inventory (read-only)
2025-07-01 13:06:49 -04:00

12 lines
375 B
Lua

required_rank = GM_RANK_DEBUG
command_sender = "[collect] "
function onCommand(args, player)
local amount = tonumber(args[1])
if player.gil >= amount then
player:remove_gil(amount)
printf(player, "Collected %s gil.", amount)
else
printf(player, "Player does not have that much gil to take! They only possess %s.", player.gil)
end
end