added heal and new chat commands file
This commit is contained in:
parent
c1c4f2a788
commit
9f1c4f8d4a
14
mods/ws_core/chatcommands.lua
Normal file
14
mods/ws_core/chatcommands.lua
Normal 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,
|
||||||
|
})
|
Loading…
x
Reference in New Issue
Block a user