added heal and new chat commands file

This commit is contained in:
discon-nected 2019-04-09 06:20:07 +12:00 committed by GitHub
parent c1c4f2a788
commit 9f1c4f8d4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,
})