register { "heal [<amount:int>]", run = function(ctx) local amount = ctx.args.amount or 4 ctx.player:heal(amount) ctx.player:sendMessage("Healed " .. amount .. " HP") end, }
The playground needs JavaScript and WebAssembly to run Lua in the browser.