mirror of
https://github.com/redstrate/Kawari.git
synced 2025-07-10 16:07:45 +00:00

-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)
12 lines
375 B
Lua
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
|