From 9f1c4f8d4a0148ead6c552f3eafa7d6eea8f906b Mon Sep 17 00:00:00 2001 From: discon-nected Date: Tue, 9 Apr 2019 06:20:07 +1200 Subject: [PATCH] added heal and new chat commands file --- mods/ws_core/chatcommands.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 mods/ws_core/chatcommands.lua diff --git a/mods/ws_core/chatcommands.lua b/mods/ws_core/chatcommands.lua new file mode 100644 index 0000000..fe145ea --- /dev/null +++ b/mods/ws_core/chatcommands.lua @@ -0,0 +1,14 @@ + +minetest.register_chatcommand("heal", { + description = "sets maxumum HP, thirst, breath and hunger vales", + privs = {fly = true}, + func = function(name) + local player = minetest.get_player_by_name(name) + thirst.set_player_thirst(name, 20) + hbhunger.heal(player) + inv = player:get_inventory() + player:set_hp(20) + player:set_breath(11) + return true, "you have beed healed" + end, +})