2023-02-02 16:48:14 +03:00
|
|
|
minetest.register_craftitem("itemx:walkietalkie", {
|
2023-01-23 04:13:39 +03:00
|
|
|
description = " Walkie Talkie",
|
|
|
|
inventory_image = "walkietalkie.png",
|
|
|
|
on_use = function() -- msg (player)
|
|
|
|
--minetest.chat_send_all ("HELP ME ,PLEASE...")
|
|
|
|
minetest.sound_play("Walkietalkiesoundeffect", {
|
|
|
|
pos = pos,
|
|
|
|
gain = 1.0,
|
|
|
|
max_hear_distance = 5,
|
|
|
|
})
|
|
|
|
end,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-24 19:55:52 +03:00
|
|
|
---- MEDIC : ( Não tem craft )
|
2023-01-23 04:13:39 +03:00
|
|
|
|
2023-02-02 16:48:14 +03:00
|
|
|
minetest.register_craftitem("itemx:bandaid", {
|
2023-01-23 04:13:39 +03:00
|
|
|
description = "Band aid\n".. core.colorize("#ff0000", "+ 2 of blood"),
|
|
|
|
inventory_image = "band_aid.png",
|
|
|
|
on_use = function(itemstack, user, pointed_thing)
|
|
|
|
local hp = user:get_hp()
|
|
|
|
if hp ~= 20 then
|
|
|
|
user:set_hp(hp + 2)
|
|
|
|
itemstack:take_item()
|
|
|
|
end
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
|
2023-02-02 16:48:14 +03:00
|
|
|
minetest.register_craftitem("itemx:medicalkit", {
|
2023-01-27 22:07:50 +03:00
|
|
|
description = "Medical Kit\n".. core.colorize("#ff0000", "+ 20 of blood"),
|
2023-01-23 04:13:39 +03:00
|
|
|
inventory_image = "medic_kit.png",
|
|
|
|
on_use = function(itemstack, user, pointed_thing)
|
|
|
|
local hp = user:get_hp()
|
|
|
|
if hp ~= 20 then
|
2023-01-27 22:07:50 +03:00
|
|
|
user:set_hp(hp + 20)
|
2023-01-23 04:13:39 +03:00
|
|
|
itemstack:take_item()
|
|
|
|
end
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|