init.lua 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. -- Obsidian Sword
  2. minetest.register_tool("ebitems:sword_obsidian", {
  3. wield_scale = {x=1.5,y=1.5,z=2.5},
  4. description = "Obsidian Sword",
  5. inventory_image = "obsidian_sword.png",
  6. tool_capabilities = {
  7. full_punch_interval = 0.7,
  8. max_drop_level=1,
  9. groupcaps={
  10. snappy={times={[1]=1.90, [2]=0.90, [3]=0.30}, uses=80, maxlevel=3},
  11. },
  12. damage_groups = {fleshy=12},
  13. },
  14. sound = {breaks = "default_tool_breaks"},
  15. groups = {sword = 1}
  16. })
  17. -- Luva
  18. if minetest.global_exists("armor") and armor.elements then
  19. table.insert(armor.elements, "hand")
  20. end
  21. if minetest.get_modpath("3d_armor") then
  22. armor:register_armor("ebitems:glove_glove", {
  23. description = "Glove",
  24. inventory_image = "ebitems_inv_glove_glove.png",
  25. groups = {
  26. armor_hand=2,
  27. armor_heal=2,
  28. armor_use=40,
  29. physics_speed=0.5,
  30. physics_jump=0.5
  31. },
  32. })
  33. end
  34. -- TROFÉIS :
  35. minetest.register_node("ebitems:frostyqueen_trophy", {
  36. description = "Frosty Queen Trophy",
  37. drawtype = "mesh",
  38. paramtype = "light",
  39. paramtype2 = "facedir",
  40. mesh = "frostyqueen_trofeu.obj",
  41. tiles = {"frostyqueen_trofeu.png"} ,
  42. wield_scale = {x=1, y=1, z=1},
  43. groups = {dig_immediate=3},
  44. -- CAIXA DE COLISÃO :
  45. selection_box = {
  46. type = "fixed", -- fica no formato da caixa se ajustado
  47. fixed = {
  48. {-0.5, -0.5, -0.25, 0.5, 0.5, 0.5},
  49. },
  50. },
  51. })
  52. minetest.register_node("ebitems:crazymushrrom_trophy", {
  53. description = "Crazy Mushrrom Trophy",
  54. drawtype = "mesh",
  55. paramtype = "light",
  56. paramtype2 = "facedir",
  57. mesh = "crazymushrrom_trofeu.obj",
  58. tiles = {"crazymushrrom_trofeu.png"} ,
  59. wield_scale = {x=1, y=1, z=1},
  60. groups = {dig_immediate=3},
  61. -- CAIXA DE COLISÃO :
  62. selection_box = {
  63. type = "fixed", -- fica no formato da caixa se ajustado
  64. fixed = {
  65. {-0.5, -0.5, -0.25, 0.5, 0.5, 0.5},
  66. },
  67. },
  68. })
  69. minetest.register_node("ebitems:heated_trophy", {
  70. description = "Heated Trophy",
  71. drawtype = "mesh",
  72. paramtype = "light",
  73. paramtype2 = "facedir",
  74. mesh = "heated_trofeu.obj",
  75. tiles = {"heated_trofeu.png"} ,
  76. wield_scale = {x=1, y=1, z=1},
  77. groups = {dig_immediate=3},
  78. -- CAIXA DE COLISÃO :
  79. selection_box = {
  80. type = "fixed", -- fica no formato da caixa se ajustado
  81. fixed = {
  82. {-0.5, -0.5, -0.25, 0.5, 0.5, 0.5},
  83. },
  84. },
  85. })
  86. -- == Cura ==
  87. ---- ITENS ------------------------------------------------------------------------------
  88. -- Sound : https://freesound.org/people/craigglenday/sounds/517173/
  89. minetest.register_craftitem("ebitems:miraclehealing", {
  90. description = "Miracle Healing ",
  91. inventory_image = "miraclehealing.png",
  92. groups = {vessel = 1},
  93. on_use = function(itemstack, user, pointed_thing,pos) -- função para recuperar vida simples
  94. local hp = user:get_hp() -- usuario consegue o valor atual de sua vida
  95. if hp ~= 20 then -- comparando vida
  96. user:set_hp(hp + 10) -- atribuindo mais 10 de vida
  97. --itemstack:take_item( )
  98. end
  99. minetest.sound_play("bebendo", {
  100. pos = pos,
  101. gain = 1.0,
  102. max_hear_distance = 5,
  103. })
  104. local pos = user:getpos()
  105. --[[
  106. --Causa muito lag no servidor. Mais tarde melhirarei a performance, mas por enquanto eh melhir desativar.
  107. for i=1,30 do
  108. minetest.add_particle({
  109. pos = pos,
  110. acceleration = 0,
  111. velocity = {x =math.random(-3,3),y=math.random(-3,3),z=math.random(-3,3)},
  112. -- x ou y ,ou z = random (-3 right , 3 left )
  113. size = 2,
  114. expirationtime = 2.0,
  115. collisiondetection = false,
  116. vertical = false,
  117. texture = "curam.png",
  118. glow = 8,
  119. })
  120. end
  121. --]]
  122. return "vessels:glass_bottle"
  123. end
  124. })
  125. minetest.register_craft({
  126. output = "ebitems:miraclehealing 3",
  127. recipe = {
  128. {"", "default:diamond", ""},
  129. {"ethereal:illumishroom", "default:apple", "ethereal:illumishroom"},
  130. {"", "vessels:glass_bottle", ""}
  131. }
  132. })