diff --git a/azarmor/init.lua b/azarmor/init.lua new file mode 100644 index 0000000..8206fc1 --- /dev/null +++ b/azarmor/init.lua @@ -0,0 +1,37 @@ +armor:register_armor("zarmor:hat_head", { + description = "Hat", + inventory_image = "inv_hat.png", + groups = {armor_head=1, armor_heal=6, armor_use=300, + physics_speed=-0.02, physics_gravity=0.02}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2}, +}) + +armor:register_armor("zarmor:Jacket_torso", { + description = "Jacket", + inventory_image = "inv_Jacket.png", + groups = {armor_torso=1, armor_heal=6, armor_use=300, + physics_speed=-0.05, physics_gravity=0.05}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2}, +}) + + +armor:register_armor("zarmor:jeanspants_legs", { + description = "jeans pants", + inventory_image = "inv_jeanspants.png", + groups = {armor_legs=1, armor_heal=6, armor_use=300, + physics_speed=-0.04, physics_gravity=0.04}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2}, +}) + + +armor:register_armor("zarmor:tennis_feet", { + description = "Tennis", + inventory_image = "inv_tennis.png", + groups = {armor_feet=1, armor_heal=6, armor_use=300, + physics_speed=-0.02, physics_gravity=0.02}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2}, +}) \ No newline at end of file diff --git a/azarmor/mod.conf b/azarmor/mod.conf new file mode 100644 index 0000000..ba42de8 --- /dev/null +++ b/azarmor/mod.conf @@ -0,0 +1,2 @@ +name = zarmor +depends = default , 3d_armor \ No newline at end of file diff --git a/azarmor/textures/inv_Jacket.png b/azarmor/textures/inv_Jacket.png new file mode 100644 index 0000000..7b5ba81 Binary files /dev/null and b/azarmor/textures/inv_Jacket.png differ diff --git a/azarmor/textures/inv_hat.png b/azarmor/textures/inv_hat.png new file mode 100644 index 0000000..394b1dd Binary files /dev/null and b/azarmor/textures/inv_hat.png differ diff --git a/azarmor/textures/inv_jeanspants.png b/azarmor/textures/inv_jeanspants.png new file mode 100644 index 0000000..fe9bb71 Binary files /dev/null and b/azarmor/textures/inv_jeanspants.png differ diff --git a/azarmor/textures/inv_tennis.png b/azarmor/textures/inv_tennis.png new file mode 100644 index 0000000..d300680 Binary files /dev/null and b/azarmor/textures/inv_tennis.png differ diff --git a/azarmor/textures/zarmor_Jacket_torso.png b/azarmor/textures/zarmor_Jacket_torso.png new file mode 100644 index 0000000..65a4aed Binary files /dev/null and b/azarmor/textures/zarmor_Jacket_torso.png differ diff --git a/azarmor/textures/zarmor_Jacket_torso_preview.png b/azarmor/textures/zarmor_Jacket_torso_preview.png new file mode 100644 index 0000000..58dc884 Binary files /dev/null and b/azarmor/textures/zarmor_Jacket_torso_preview.png differ diff --git a/azarmor/textures/zarmor_hat_head.png b/azarmor/textures/zarmor_hat_head.png new file mode 100644 index 0000000..5d55a2b Binary files /dev/null and b/azarmor/textures/zarmor_hat_head.png differ diff --git a/azarmor/textures/zarmor_hat_head_preview.png b/azarmor/textures/zarmor_hat_head_preview.png new file mode 100644 index 0000000..7190513 Binary files /dev/null and b/azarmor/textures/zarmor_hat_head_preview.png differ diff --git a/azarmor/textures/zarmor_jeanspants_legs.png b/azarmor/textures/zarmor_jeanspants_legs.png new file mode 100644 index 0000000..2e309ee Binary files /dev/null and b/azarmor/textures/zarmor_jeanspants_legs.png differ diff --git a/azarmor/textures/zarmor_jeanspants_legs_preview.png b/azarmor/textures/zarmor_jeanspants_legs_preview.png new file mode 100644 index 0000000..63c2c53 Binary files /dev/null and b/azarmor/textures/zarmor_jeanspants_legs_preview.png differ diff --git a/azarmor/textures/zarmor_tennis_feet.png b/azarmor/textures/zarmor_tennis_feet.png new file mode 100644 index 0000000..f57e263 Binary files /dev/null and b/azarmor/textures/zarmor_tennis_feet.png differ diff --git a/azarmor/textures/zarmor_tennis_feet_preview.png b/azarmor/textures/zarmor_tennis_feet_preview.png new file mode 100644 index 0000000..65ce9a5 Binary files /dev/null and b/azarmor/textures/zarmor_tennis_feet_preview.png differ diff --git a/changex/init.lua b/changex/init.lua index 71655c8..287a174 100644 --- a/changex/init.lua +++ b/changex/init.lua @@ -21,5 +21,282 @@ walkable = false, +-- DOORS SOUND : =============================================================== +-- sounds door : https://freesound.org/people/utsuru/sounds/183450/ ( by:utsuru) +minetest.override_item ("doors:door_wood_a",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, +}) +minetest.override_item ("doors:door_wood_b",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, +}) + + + +minetest.override_item ("doors:door_wood_c",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, +}) + + + +minetest.override_item ("doors:door_wood_d",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, +}) + + +-- GLASS +minetest.override_item ("default:glass",{ + on_destruct = function(pos) + minetest.sound_play("crack_glass", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + + +--- DOOR GLASS + +minetest.override_item ("doors:door_glass_a",{ + on_destruct = function(pos) + minetest.sound_play("crack_glass", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + + minetest.override_item ("doors:door_glass_b",{ + on_destruct = function(pos) + minetest.sound_play("crack_glass", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + minetest.override_item ("doors:door_glass_c",{ + on_destruct = function(pos) + minetest.sound_play("crack_glass", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + minetest.override_item ("doors:door_glass_d",{ + on_destruct = function(pos) + minetest.sound_play("crack_glass", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + + + --- SUPORTE A OUTRAS DOORS : ========================================================== + + if minetest.get_modpath("moretrapdoors") then + + minetest.override_item ("doors:pine_door_a",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + + minetest.override_item ("doors:pine_door_b",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + minetest.override_item ("doors:pine_door_c",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + + minetest.override_item ("doors:pine_door_d",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + +-- aspen +minetest.override_item ("doors:aspen_doors_a",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + + minetest.override_item ("doors:aspen_doors_b",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + minetest.override_item ("doors:aspen_doors_c",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + minetest.override_item ("doors:aspen_doors_d",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + -- acacia + minetest.override_item ("doors:acacia_door_a",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + minetest.override_item ("doors:acacia_door_b",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + minetest.override_item ("doors:acacia_door_c",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + minetest.override_item ("doors:acacia_door_d",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + -- Jungle + minetest.override_item ("doors:jungle_door_a",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + minetest.override_item ("doors:jungle_door_b",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + minetest.override_item ("doors:jungle_door_c",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + minetest.override_item ("doors:jungle_door_d",{ + on_destruct = function(pos) + minetest.sound_play("crack_door", { + pos = pos, + gain = 1.0, + max_hear_distance = 5, + }) + end, + }) + + +end \ No newline at end of file diff --git a/changex/mod.conf b/changex/mod.conf index 92a4e84..b134dae 100644 --- a/changex/mod.conf +++ b/changex/mod.conf @@ -1,2 +1,3 @@ name = changex -depends = default +depends = default +optional_depends = doors ,moretrapdoors diff --git a/changex/sounds/crack_door.ogg b/changex/sounds/crack_door.ogg new file mode 100644 index 0000000..14eaaae Binary files /dev/null and b/changex/sounds/crack_door.ogg differ diff --git a/changex/sounds/crack_glass.ogg b/changex/sounds/crack_glass.ogg new file mode 100644 index 0000000..b6cc9e8 Binary files /dev/null and b/changex/sounds/crack_glass.ogg differ diff --git a/deco/init.lua b/deco/init.lua index 356c820..1a0b129 100644 --- a/deco/init.lua +++ b/deco/init.lua @@ -2,7 +2,7 @@ minetest.register_node("deco:stopsign", { description = "stop sign", drawtype = "mesh", mesh = "stopsign.obj", - isual_size = {x=1, y=1}, + --visual_size = {x=1, y=1}, --inventory_image = "", --wield_image = "stop_sign.png", tiles = {"stop_sign.png"}, @@ -46,7 +46,7 @@ minetest.register_node("deco:trashcan", { description = "trashcan", drawtype = "mesh", mesh = "trashcan.obj", - isual_size = {x=1, y=1}, + --visual_size = {x=1, y=1}, --inventory_image = "", wield_image = "trashcan.png", tiles = {"trashcan.png"}, @@ -99,7 +99,7 @@ minetest.register_node("deco:vendingmachine", { description = "Vending machine", drawtype = "mesh", mesh = "vending_machine.obj", - isual_size = {x=1, y=1}, + --visual_size = {x=1, y=1}, --inventory_image = "", --wield_image = "monitor.png", tiles = {"vending_machine.png"}, @@ -124,6 +124,10 @@ minetest.register_node("deco:vendingmachine", { type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, 1.4, 0.5}, }, + + on_rightclick = function(pos, node, player, itemstack, pointed_thing) + minetest.chat_send_player(player:get_player_name(), "This machine is empty!") + end, }) @@ -141,11 +145,12 @@ minetest.register_craft({ ------ CRaFT ---- RADIO : +--- Sound : https://freesound.org/people/arialfa07/sounds/516618/ minetest.register_node("deco:radio", { description = "Radio", drawtype = "mesh", mesh = "radio.obj", - isual_size = {x=1, y=1}, + --visual_size = {x=1, y=1}, --inventory_image = "", tiles = {"radio.png"}, paramtype = "light", @@ -168,6 +173,15 @@ minetest.register_node("deco:radio", { type = "fixed", fixed = {-0.3, -0.5, -0.3, 0.3, 0.2, 0.3}, }, + + on_rightclick = function(pos, node, player, itemstack, pointed_thing) + -- Play a sound to the player at the node position + minetest.sound_play("radioo", { + pos = pos, + gain = 1.0, + max_hear_distance = 10, + }) + end, }) @@ -189,7 +203,7 @@ minetest.register_node("deco:table", { description = "Table", drawtype = "mesh", mesh = "table.obj", - isual_size = {x=1, y=1}, + --visual_size = {x=1, y=1}, --inventory_image = "", tiles = {"table.png"}, paramtype = "light", @@ -233,7 +247,7 @@ minetest.register_node("deco:computer", { description = "Computer", drawtype = "mesh", mesh = "computer.obj", - isual_size = {x=1, y=1}, + --visual_size = {x=1, y=1}, --inventory_image = "", tiles = {"computerr.png"}, paramtype = "light", @@ -249,7 +263,7 @@ minetest.register_node("deco:computer", { selection_box = { type = "fixed", -- esqueda,altura,tras..,direita ,negativo aumenta para baixo, positivo aumenta para cima - fixed = {-0.4, -0.5, -0.4, 0.4, 0.1, 0.4}, + fixed = {-0.4, -0.5, -0.001, 0.4, 0.1, 0.15}, }, node_box = { @@ -257,6 +271,10 @@ minetest.register_node("deco:computer", { fixed = {-0.4, -0.5, -0.4, 0.4, 0.5, 0.4}, }, + on_rightclick = function(pos, node, player, itemstack, pointed_thing) + local formspec = "size[8,8;]image[-0.9,-0.3;12,11;pc.png]" + minetest.show_formspec(player:get_player_name(), "mymod:img_formspec", formspec) -- falta a imagem + end }) @@ -277,7 +295,7 @@ minetest.register_node("deco:armchair", { description = "Armchair", drawtype = "mesh", mesh = "armchair.obj", - isual_size = {x=1, y=1}, + --visual_size = {x=1, y=1}, --inventory_image = "", tiles = {"armchair.png"}, paramtype = "light", @@ -300,7 +318,37 @@ minetest.register_node("deco:armchair", { type = "fixed", fixed = {-0.4, -0.5, -0.4, 0.4, -0.1, 0.4}, }, - + + --[[ + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + + for _, player in ipairs(minetest.get_connected_players()) do + minetest.chat_send_player(player:get_player_name(), "punch the armchair to get up!") + end + + clicker:set_physics_override({ + gravity = 0, + jump = 0, + speed = 0, + }) + clicker:set_eye_offset({x = 0, y = -3, z = 0}, {x = 0, y = 0, z = 0}) + clicker:set_animation({x=81,y=160}, 0, 0) + minetest.after(0.1, function() + clicker:set_pos({x=pos.x, y=pos.y-0.5, z=pos.z}) + end) + end, + + on_punch = function(pos, node, puncher) + puncher:set_physics_override({ + gravity = 1, + jump = 1, + speed = 1, + }) + puncher:set_eye_offset({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0}) + puncher:set_animation({x=1,y=80}, 0, 0) + end, + + ]] }) @@ -320,7 +368,7 @@ minetest.register_node("deco:shelving", { description = "Shelving", drawtype = "mesh", mesh = "shelving.obj", - isual_size = {x=1, y=1}, + --visual_size = {x=1, y=1}, --inventory_image = "", tiles = {"shalving.png"}, paramtype = "light", @@ -364,7 +412,7 @@ minetest.register_node("deco:medicinebox", { description = "Medicine Box", drawtype = "mesh", mesh = "medicine_box.obj", - isual_size = {x=1, y=1}, + --visual_size = {x=1, y=1}, --inventory_image = "", tiles = {"medicine_box.png"}, paramtype = "light", @@ -415,7 +463,7 @@ minetest.register_node("deco:trafficcone", { description = "Traffic Cone", drawtype = "mesh", mesh = "traffic_cone.obj", - isual_size = {x=1, y=1}, + --visual_size = {x=1, y=1}, --inventory_image = "", tiles = {"traffic_cone.png"}, paramtype = "light", @@ -575,6 +623,7 @@ minetest.register_node("deco:cardboardbox", { -- Foods: + --[[ { items = {'foodx:canned_beans'}, rarity = 2, @@ -584,7 +633,7 @@ minetest.register_node("deco:cardboardbox", { items = {'foodx:canned_tomato'}, rarity = 1, }, - + ]] -- Bullets : @@ -770,3 +819,78 @@ minetest.register_craft({ ------ CRaFT } }) ]] + + + +---- BEDS : +minetest.register_node("deco:dirtybeds", { + description = "Dirty beds", + drawtype = "mesh", + mesh = "bedx.obj", + --visual_size = {x=1, y=1}, + --inventory_image = "", + tiles = {"bedx.png"}, + paramtype = "light", + paramtype2 = "facedir", + --on_place = minetest.rotate_node, + sunlight_propagates = true, + walkable = true, + floodable = false, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + --drop = " ", + sounds = default.node_sound_wood_defaults(), + + selection_box = { + type = "fixed", + -- esqueda,altura,tras..,direita ,negativo aumenta para baixo, positivo aumenta para cima + fixed = {-0.5, -0.5, -0.5, 0.5, -0.01, 1.5}, + }, + + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.01, 1.5}, + }, + + on_rightclick = function(pos, node, player, itemstack, pointed_thing) + + minetest.chat_send_player(player:get_player_name(), "That bed is contaminated, you can't sleep in it!") + + end, + + +}) + + + +---- VASES : +minetest.register_node("deco:vases", { + description = "Vases", + drawtype = "mesh", + mesh = "vases.obj", + --visual_size = {x=1, y=1}, + --inventory_image = "", + tiles = {"vases.png"}, + paramtype = "light", + paramtype2 = "facedir", + --on_place = minetest.rotate_node, + sunlight_propagates = true, + walkable = true, + floodable = false, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + --drop = " ", + sounds = default.node_sound_wood_defaults(), + + selection_box = { + type = "fixed", + -- esqueda,altura,tras..,direita ,negativo aumenta para baixo, positivo aumenta para cima + fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + }, + + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + }, + + + +}) \ No newline at end of file diff --git a/deco/mod.conf b/deco/mod.conf index 52dddde..eea3204 100644 --- a/deco/mod.conf +++ b/deco/mod.conf @@ -1,2 +1,2 @@ name = deco -depends = default , foodx , rangedweapons +depends = default , foodx , rangedweapons , player_api diff --git a/deco/models/bedx.mtl b/deco/models/bedx.mtl new file mode 100644 index 0000000..d5fc968 --- /dev/null +++ b/deco/models/bedx.mtl @@ -0,0 +1,4 @@ +# Made in Blockbench 4.7.1 +newmtl m_a7718c50-5473-416a-9c73-58e66dc4c77a +map_Kd bedx.png +newmtl none \ No newline at end of file diff --git a/deco/models/bedx.obj b/deco/models/bedx.obj new file mode 100644 index 0000000..065411e --- /dev/null +++ b/deco/models/bedx.obj @@ -0,0 +1,49 @@ +# Made in Blockbench 4.7.1 +mtllib bedx.mtl + +o cube +v 0.5 0 1.5 +v 0.5 0 -0.5 +v 0.5 -0.5 1.5 +v 0.5 -0.5 -0.5 +v -0.5 0 -0.5 +v -0.5 0 1.5 +v -0.5 -0.5 -0.5 +v -0.5 -0.5 1.5 +vt 0.5 0.875 +vt 0.75 0.875 +vt 0.75 0.75 +vt 0.5 0.75 +vt 0 0.5 +vt 0.5 0.5 +vt 0.5 0.375 +vt 0 0.375 +vt 0.5 0.75 +vt 0.75 0.75 +vt 0.75 0.625 +vt 0.5 0.625 +vt 0.5 1 +vt 1 1 +vt 1 0.875 +vt 0.5 0.875 +vt 0.25 0.5 +vt 0 0.5 +vt 0 1 +vt 0.25 1 +vt 0.5 1 +vt 0.25 1 +vt 0.25 0.5 +vt 0.5 0.5 +vn 0 0 -1 +vn 1 0 0 +vn 0 0 1 +vn -1 0 0 +vn 0 1 0 +vn 0 -1 0 +usemtl m_a7718c50-5473-416a-9c73-58e66dc4c77a +f 4/4/1 7/3/1 5/2/1 2/1/1 +f 3/8/2 4/7/2 2/6/2 1/5/2 +f 8/12/3 3/11/3 1/10/3 6/9/3 +f 7/16/4 8/15/4 6/14/4 5/13/4 +f 6/20/5 1/19/5 2/18/5 5/17/5 +f 7/24/6 4/23/6 3/22/6 8/21/6 \ No newline at end of file diff --git a/deco/models/vases.bbmodel b/deco/models/vases.bbmodel new file mode 100644 index 0000000..df81e5f --- /dev/null +++ b/deco/models/vases.bbmodel @@ -0,0 +1 @@ +{"meta":{"format_version":"4.5","model_format":"free","box_uv":false},"name":"vases","model_identifier":"","visible_box":[1,1,0],"variable_placeholders":"","variable_placeholder_buttons":[],"timeline_setups":[],"unhandled_root_fields":{},"resolution":{"width":64,"height":64},"elements":[{"name":"cube","box_uv":false,"rescale":false,"locked":false,"from":[-7,-8,-7],"to":[6,5,7],"autouv":0,"color":3,"origin":[0,0,0],"faces":{"north":{"uv":[0,32,13,45],"texture":0},"east":{"uv":[16,0,30,13],"texture":0},"south":{"uv":[13,40,26,53],"texture":0},"west":{"uv":[16,13,30,26],"texture":0},"up":{"uv":[29,40,16,26],"texture":0},"down":{"uv":[42,26,29,40],"texture":0}},"type":"cube","uuid":"14512edd-f61a-9b30-a006-0d89f343b8f6"},{"name":"cube","box_uv":false,"rescale":false,"locked":false,"from":[-8,4,-8],"to":[7,8,8],"autouv":0,"color":3,"origin":[0,0,0],"faces":{"north":{"uv":[26,40,42,44],"texture":0},"east":{"uv":[42,26,58,30],"texture":0},"south":{"uv":[42,30,58,34],"texture":0},"west":{"uv":[42,34,58,38],"texture":0},"up":{"uv":[16,16,0,0],"texture":0},"down":{"uv":[16,16,0,32],"texture":0}},"type":"cube","uuid":"81118a51-9044-a072-f3bc-f1fd05be3249"},{"name":"cube","box_uv":false,"rescale":false,"locked":false,"from":[-10,8,0],"to":[9,30,0],"autouv":0,"color":3,"origin":[0,0,0],"faces":{"north":{"uv":[30,13,43,26],"texture":0},"east":{"uv":[0,0,0,13],"texture":0},"south":{"uv":[43,13,30,26],"texture":0},"west":{"uv":[0,0,0,13],"texture":0},"up":{"uv":[13,0,0,0],"texture":0},"down":{"uv":[13,0,0,0],"texture":0}},"type":"cube","uuid":"d17816fe-f89f-2ff6-8d2b-458872651bca"},{"name":"cube","box_uv":false,"rescale":false,"locked":false,"from":[-10,8,0],"to":[9,30,0],"autouv":0,"color":3,"rotation":[0,-89.99999502168694,-3.348884030750612e-7],"origin":[0,0,0],"faces":{"north":{"uv":[30,13,43,26],"texture":0},"east":{"uv":[0,0,0,13],"texture":0},"south":{"uv":[43,13,30,26],"texture":0},"west":{"uv":[0,0,0,13],"texture":0},"up":{"uv":[13,0,0,0],"texture":0},"down":{"uv":[13,0,0,0],"texture":0}},"type":"cube","uuid":"b8c39999-9084-87a4-1c03-923051ea455b"}],"outliner":["14512edd-f61a-9b30-a006-0d89f343b8f6","d17816fe-f89f-2ff6-8d2b-458872651bca","b8c39999-9084-87a4-1c03-923051ea455b","81118a51-9044-a072-f3bc-f1fd05be3249"],"textures":[{"path":"C:\\Users\\KuacGraxa\\Nextcloud\\blender\\dungeons\\cape\\vases.png","name":"vases.png","folder":"block","namespace":"","id":"0","particle":false,"render_mode":"default","render_sides":"auto","frame_time":1,"frame_order_type":"loop","frame_order":"","frame_interpolate":false,"visible":true,"mode":"bitmap","saved":true,"uuid":"37b0ccb5-1e4f-0e00-f6e0-b5c731fddc79","relative_path":"../vases.png","source":"data:image/png;base64,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"}]} \ No newline at end of file diff --git a/deco/models/vases.mtl b/deco/models/vases.mtl new file mode 100644 index 0000000..dd6e51a --- /dev/null +++ b/deco/models/vases.mtl @@ -0,0 +1,4 @@ +# Made in Blockbench 4.7.1 +newmtl m_37b0ccb5-1e4f-0e00-f6e0-b5c731fddc79 +map_Kd vases.png +newmtl none \ No newline at end of file diff --git a/deco/models/vases.obj b/deco/models/vases.obj new file mode 100644 index 0000000..e282b21 --- /dev/null +++ b/deco/models/vases.obj @@ -0,0 +1,187 @@ +# Made in Blockbench 4.7.1 +mtllib vases.mtl + +o cube +v 0.375 0.3125 0.4375 +v 0.375 0.3125 -0.4375 +v 0.375 -0.5 0.4375 +v 0.375 -0.5 -0.4375 +v -0.4375 0.3125 -0.4375 +v -0.4375 0.3125 0.4375 +v -0.4375 -0.5 -0.4375 +v -0.4375 -0.5 0.4375 +vt 0 0.5 +vt 0.203125 0.5 +vt 0.203125 0.296875 +vt 0 0.296875 +vt 0.25 1 +vt 0.46875 1 +vt 0.46875 0.796875 +vt 0.25 0.796875 +vt 0.203125 0.375 +vt 0.40625 0.375 +vt 0.40625 0.171875 +vt 0.203125 0.171875 +vt 0.25 0.796875 +vt 0.46875 0.796875 +vt 0.46875 0.59375 +vt 0.25 0.59375 +vt 0.453125 0.375 +vt 0.25 0.375 +vt 0.25 0.59375 +vt 0.453125 0.59375 +vt 0.65625 0.59375 +vt 0.453125 0.59375 +vt 0.453125 0.375 +vt 0.65625 0.375 +vn 0 0 -1 +vn 1 0 0 +vn 0 0 1 +vn -1 0 0 +vn 0 1 0 +vn 0 -1 0 +usemtl m_37b0ccb5-1e4f-0e00-f6e0-b5c731fddc79 +f 4/4/1 7/3/1 5/2/1 2/1/1 +f 3/8/2 4/7/2 2/6/2 1/5/2 +f 8/12/3 3/11/3 1/10/3 6/9/3 +f 7/16/4 8/15/4 6/14/4 5/13/4 +f 6/20/5 1/19/5 2/18/5 5/17/5 +f 7/24/6 4/23/6 3/22/6 8/21/6 +o cube +v 0.4375 0.5 0.5 +v 0.4375 0.5 -0.5 +v 0.4375 0.25 0.5 +v 0.4375 0.25 -0.5 +v -0.5 0.5 -0.5 +v -0.5 0.5 0.5 +v -0.5 0.25 -0.5 +v -0.5 0.25 0.5 +vt 0.40625 0.375 +vt 0.65625 0.375 +vt 0.65625 0.3125 +vt 0.40625 0.3125 +vt 0.65625 0.59375 +vt 0.90625 0.59375 +vt 0.90625 0.53125 +vt 0.65625 0.53125 +vt 0.65625 0.53125 +vt 0.90625 0.53125 +vt 0.90625 0.46875 +vt 0.65625 0.46875 +vt 0.65625 0.46875 +vt 0.90625 0.46875 +vt 0.90625 0.40625 +vt 0.65625 0.40625 +vt 0.25 0.75 +vt 0 0.75 +vt 0 1 +vt 0.25 1 +vt 0.25 0.75 +vt 0 0.75 +vt 0 0.5 +vt 0.25 0.5 +vn 0 0 -1 +vn 1 0 0 +vn 0 0 1 +vn -1 0 0 +vn 0 1 0 +vn 0 -1 0 +usemtl m_37b0ccb5-1e4f-0e00-f6e0-b5c731fddc79 +f 12/28/7 15/27/7 13/26/7 10/25/7 +f 11/32/8 12/31/8 10/30/8 9/29/8 +f 16/36/9 11/35/9 9/34/9 14/33/9 +f 15/40/10 16/39/10 14/38/10 13/37/10 +f 14/44/11 9/43/11 10/42/11 13/41/11 +f 15/48/12 12/47/12 11/46/12 16/45/12 +o cube +v 0.5625 1.875 0 +v 0.5625 1.875 0 +v 0.5625 0.5 0 +v 0.5625 0.5 0 +v -0.625 1.875 0 +v -0.625 1.875 0 +v -0.625 0.5 0 +v -0.625 0.5 0 +vt 0.46875 0.796875 +vt 0.671875 0.796875 +vt 0.671875 0.59375 +vt 0.46875 0.59375 +vt 0 1 +vt 0 1 +vt 0 0.796875 +vt 0 0.796875 +vt 0.671875 0.796875 +vt 0.46875 0.796875 +vt 0.46875 0.59375 +vt 0.671875 0.59375 +vt 0 1 +vt 0 1 +vt 0 0.796875 +vt 0 0.796875 +vt 0.203125 1 +vt 0 1 +vt 0 1 +vt 0.203125 1 +vt 0.203125 1 +vt 0 1 +vt 0 1 +vt 0.203125 1 +vn 0 0 -1 +vn 1 0 0 +vn 0 0 1 +vn -1 0 0 +vn 0 1 0 +vn 0 -1 0 +usemtl m_37b0ccb5-1e4f-0e00-f6e0-b5c731fddc79 +f 20/52/13 23/51/13 21/50/13 18/49/13 +f 19/56/14 20/55/14 18/54/14 17/53/14 +f 24/60/15 19/59/15 17/58/15 22/57/15 +f 23/64/16 24/63/16 22/62/16 21/61/16 +f 22/68/17 17/67/17 18/66/17 21/65/17 +f 23/72/18 20/71/18 19/70/18 24/69/18 +o cube +v 5.983367168393983e-8 1.875 0.5624999999999978 +v 5.983367168393983e-8 1.875 0.5624999999999978 +v 5.179692696977156e-8 0.4999999999999998 0.5624999999999978 +v 5.179692696977156e-8 0.4999999999999998 0.5624999999999978 +v -4.334577413667162e-8 1.875 -0.6249999999999977 +v -4.334577413667162e-8 1.875 -0.6249999999999977 +v -5.1382518850839887e-8 0.5000000000000004 -0.6249999999999977 +v -5.1382518850839887e-8 0.5000000000000004 -0.6249999999999977 +vt 0.46875 0.796875 +vt 0.671875 0.796875 +vt 0.671875 0.59375 +vt 0.46875 0.59375 +vt 0 1 +vt 0 1 +vt 0 0.796875 +vt 0 0.796875 +vt 0.671875 0.796875 +vt 0.46875 0.796875 +vt 0.46875 0.59375 +vt 0.671875 0.59375 +vt 0 1 +vt 0 1 +vt 0 0.796875 +vt 0 0.796875 +vt 0.203125 1 +vt 0 1 +vt 0 1 +vt 0.203125 1 +vt 0.203125 1 +vt 0 1 +vt 0 1 +vt 0.203125 1 +vn 0.9999999999999962 -5.844905260405698e-9 -8.68879543869383e-8 +vn 8.68879543869383e-8 -5.07851861662108e-16 0.9999999999999962 +vn -0.9999999999999962 5.844905260405698e-9 8.68879543869383e-8 +vn -8.68879543869383e-8 5.07851861662108e-16 -0.9999999999999962 +vn 5.8449052604057195e-9 1 -8.493418847481753e-26 +vn -5.8449052604057195e-9 -1 8.493418847481753e-26 +usemtl m_37b0ccb5-1e4f-0e00-f6e0-b5c731fddc79 +f 28/76/19 31/75/19 29/74/19 26/73/19 +f 27/80/20 28/79/20 26/78/20 25/77/20 +f 32/84/21 27/83/21 25/82/21 30/81/21 +f 31/88/22 32/87/22 30/86/22 29/85/22 +f 30/92/23 25/91/23 26/90/23 29/89/23 +f 31/96/24 28/95/24 27/94/24 32/93/24 \ No newline at end of file diff --git a/deco/sounds/radioo.ogg b/deco/sounds/radioo.ogg new file mode 100644 index 0000000..780d034 Binary files /dev/null and b/deco/sounds/radioo.ogg differ diff --git a/deco/textures/bedx.png b/deco/textures/bedx.png new file mode 100644 index 0000000..fd8ff82 Binary files /dev/null and b/deco/textures/bedx.png differ diff --git a/deco/textures/pc.png b/deco/textures/pc.png new file mode 100644 index 0000000..7edfe07 Binary files /dev/null and b/deco/textures/pc.png differ diff --git a/deco/textures/pc.png~ b/deco/textures/pc.png~ new file mode 100644 index 0000000..d640464 Binary files /dev/null and b/deco/textures/pc.png~ differ diff --git a/deco/textures/vases.png b/deco/textures/vases.png new file mode 100644 index 0000000..9734332 Binary files /dev/null and b/deco/textures/vases.png differ diff --git a/doctorzombie/init.lua b/doctorzombie/init.lua index 70b70f4..c08d69b 100644 --- a/doctorzombie/init.lua +++ b/doctorzombie/init.lua @@ -1,3 +1,6 @@ + + + local climb_node = { "default:ladder_wood" ,"default:ladder_steel"} local zombienods = { @@ -22,7 +25,6 @@ local zombienods = { "nodex:whiteblock", } ----- SKULL SWORD ------------------------------------------------------------------------------------------------------ mobs:register_mob("doctorzombie:doctorzombie", { --nametag = "Doctor Zombie" , @@ -35,8 +37,8 @@ mobs:register_mob("doctorzombie:doctorzombie", { pathfinding = true, reach = 3, damage = 3, - hp_min = 10, - hp_max = 10, + hp_min = 100, + hp_max = 100, armor = 100, collisionbox = {-0.4, 0, -0.4, 0.4, 1.8, 0.4}, visual = "mesh", @@ -56,7 +58,7 @@ mobs:register_mob("doctorzombie:doctorzombie", { walk_velocity = 1, run_velocity = 4, jump_height = 2, - stepheight = 1.2, + stepheight = 1.1, floats = 0, view_range = 35, drops = { @@ -88,22 +90,91 @@ mobs:register_mob("doctorzombie:doctorzombie", { do_custom = function(self, dtime) - local pos = self.object:get_pos() -- consegue sua propia posição - local vel = {x=0, y=0.2, z=0} -- deveria ser velocidade hehe - local face = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}) -- bloco que estar em sua frente - - - for i,v in ipairs (climb_node) do - if face.name == v then -- se o bloco em sua frente é escadas - - self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 - self.object:set_velocity(vel) -- velocidade, não eficiente :/ - - + local pos = self.object:get_pos() -- consegue sua propia posição + local face = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}) -- bloco que estar em sua frente + local face2 = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1}) + local face3 = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z}) + local face4 = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z}) + --local ladders = {"default:ladder_wood","default:ladder_steel" } + + --for i,v in ipairs (climb_node) do + if face.name == "default:ladder_wood" or face.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + + if face2.name == "default:ladder_wood" or face2.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + + if face3.name == "default:ladder_wood" or face3.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + + if face4.name == "default:ladder_wood" or face4.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + --end + + + -- BREACK DOOR : + + for _,players in pairs(minetest.get_objects_inside_radius(pos,5)) do + + if players:is_player() then + + local door_pos = minetest.find_node_near(pos, 1, { + "doors:door_wood_a" , + "doors:door_wood_b", + "doors:door_wood_c", + "doors:door_wood_d", + "default:glass", + "doors:door_glass_a", + "doors:door_glass_b", + "doors:door_glass_c", + "doors:door_glass_d", + "doors:pine_door_a", + "doors:pine_door_b", + "doors:pine_door_c", + "doors:pine_door_d", + "doors:aspen_doors_a", + "doors:aspen_doors_b", + "doors:aspen_doors_c", + "doors:aspen_doors_d", + "doors:acacia_door_a", + "doors:acacia_door_b", + "doors:acacia_door_c", + "doors:acacia_door_d", + "doors:jungle_door_a", + "doors:jungle_door_b", + "doors:jungle_door_c", + "doors:jungle_door_d" + + + }) + + if door_pos ~= nil then + + minetest.after(3, function() -- remover depois de 2 segundos + minetest.remove_node(door_pos) + end) + + else + + end + end end - end - end + + + }) @@ -123,3 +194,4 @@ mobs:spawn({ mobs:register_egg("doctorzombie:doctorzombie", "Doctor Zombie", "zombies_egg.png", 0) + diff --git a/doctorzombie/mod.conf b/doctorzombie/mod.conf index 2020f58..8db276f 100644 --- a/doctorzombie/mod.conf +++ b/doctorzombie/mod.conf @@ -1,3 +1,3 @@ name = doctorzombie -depends = default, mobs ,itemx +depends = default, mobs ,itemx ,doors diff --git a/doctorzombie/sounds/crack_door.ogg b/doctorzombie/sounds/crack_door.ogg new file mode 100644 index 0000000..14eaaae Binary files /dev/null and b/doctorzombie/sounds/crack_door.ogg differ diff --git a/lumberjackzombie/init.lua b/lumberjackzombie/init.lua index 361f1eb..6e86ab9 100644 --- a/lumberjackzombie/init.lua +++ b/lumberjackzombie/init.lua @@ -5,7 +5,6 @@ local zombienods = { } ----- SKULL SWORD ------------------------------------------------------------------------------------------------------ mobs:register_mob("lumberjackzombie:lumberjackzombie", { --nametag = "Lumberjack Zombie" , @@ -39,7 +38,7 @@ mobs:register_mob("lumberjackzombie:lumberjackzombie", { walk_velocity = 1, run_velocity = 3, jump_height = 2, - stepheight = 1.5, + stepheight = 1.1, floats = 0, view_range = 35, drops = { @@ -65,6 +64,91 @@ mobs:register_mob("lumberjackzombie:lumberjackzombie", { die_start = 280, die_end = 300, }, + + do_custom = function(self, dtime) + + + local pos = self.object:get_pos() -- consegue sua propia posição + local face = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}) -- bloco que estar em sua frente + local face2 = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1}) + local face3 = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z}) + local face4 = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z}) + --local ladders = {"default:ladder_wood","default:ladder_steel" } + + --for i,v in ipairs (climb_node) do + if face.name == "default:ladder_wood" or face.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + + if face2.name == "default:ladder_wood" or face2.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + + if face3.name == "default:ladder_wood" or face3.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + + if face4.name == "default:ladder_wood" or face4.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + --end + + + -- BREACK DOOR : + + for _,players in pairs(minetest.get_objects_inside_radius(pos,5)) do + + if players:is_player() then + + local door_pos = minetest.find_node_near(pos, 1, { + "doors:door_wood_a" , + "doors:door_wood_b", + "doors:door_wood_c", + "doors:door_wood_d", + "default:glass", + "doors:door_glass_a", + "doors:door_glass_b", + "doors:door_glass_c", + "doors:door_glass_d", + "doors:pine_door_a", + "doors:pine_door_b", + "doors:pine_door_c", + "doors:pine_door_d", + "doors:aspen_doors_a", + "doors:aspen_doors_b", + "doors:aspen_doors_c", + "doors:aspen_doors_d", + "doors:acacia_door_a", + "doors:acacia_door_b", + "doors:acacia_door_c", + "doors:acacia_door_d", + "doors:jungle_door_a", + "doors:jungle_door_b", + "doors:jungle_door_c", + "doors:jungle_door_d" + }) + + if door_pos ~= nil then + + minetest.after(3, function() -- remover depois de 2 segundos + minetest.remove_node(door_pos) + end) + + else + + end + end + end + end + }) diff --git a/minerzombie/init.lua b/minerzombie/init.lua index 28cac73..8bb1788 100644 --- a/minerzombie/init.lua +++ b/minerzombie/init.lua @@ -9,9 +9,6 @@ local zombienods = { } - ----- SKULL SWORD ------------------------------------------------------------------------------------------------------ - mobs:register_mob("minerzombie:minerzombie", { --nametag = "Miner Zombie" , type = "monster", @@ -70,6 +67,12 @@ mobs:register_mob("minerzombie:minerzombie", { die_start = 280, die_end = 300, }, + +--[[ +on_die = function(self, pos) + + end + ]] }) diff --git a/nodex/init.lua b/nodex/init.lua index 5316677..c4dedef 100644 --- a/nodex/init.lua +++ b/nodex/init.lua @@ -61,7 +61,7 @@ minetest.register_node("nodex:greenblock", { tiles = {"green_node.png"}, paramtype2 = "facedir", groups = {cracky = 3}, - drop = "nodex:green_node", + drop = "nodex:greenblock", sounds = default.node_sound_stone_defaults() }) diff --git a/runner/init.lua b/runner/init.lua index 0b9e12e..76353d0 100644 --- a/runner/init.lua +++ b/runner/init.lua @@ -20,7 +20,6 @@ local zombienods = { "nodex:road3", } ----- SKULL SWORD ------------------------------------------------------------------------------------------------------ mobs:register_mob("runner:runner", { --nametag = "Runner Zombie" , @@ -56,7 +55,7 @@ mobs:register_mob("runner:runner", { walk_velocity = 2, run_velocity = 8, jump_height = 2, - stepheight = 1.7, + stepheight = 1.1, floats = 0, view_range = 35, drops = { @@ -86,21 +85,87 @@ mobs:register_mob("runner:runner", { do_custom = function(self, dtime) - local pos = self.object:get_pos() -- consegue sua propia posição - local vel = {x=0, y=0.2, z=0} -- deveria ser velocidade hehe - local face = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}) -- bloco que estar em sua frente - - for i,v in ipairs (climb_node) do - if face.name == v then -- se o bloco em sua frente é escadas - - self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 - self.object:set_velocity(vel) -- velocidade, não eficiente :/ - - - end + local pos = self.object:get_pos() -- consegue sua propia posição + local face = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}) -- bloco que estar em sua frente + local face2 = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1}) + local face3 = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z}) + local face4 = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z}) + --local ladders = {"default:ladder_wood","default:ladder_steel" } + + --for i,v in ipairs (climb_node) do + if face.name == "default:ladder_wood" or face.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + + if face2.name == "default:ladder_wood" or face2.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + + if face3.name == "default:ladder_wood" or face3.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + + if face4.name == "default:ladder_wood" or face4.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + --end + - end + -- BREACK DOOR : + + for _,players in pairs(minetest.get_objects_inside_radius(pos,5)) do + + if players:is_player() then + + local door_pos = minetest.find_node_near(pos, 1, { + "doors:door_wood_a" , + "doors:door_wood_b", + "doors:door_wood_c", + "doors:door_wood_d", + "default:glass", + "doors:door_glass_a", + "doors:door_glass_b", + "doors:door_glass_c", + "doors:door_glass_d", + "doors:pine_door_a", + "doors:pine_door_b", + "doors:pine_door_c", + "doors:pine_door_d", + "doors:aspen_doors_a", + "doors:aspen_doors_b", + "doors:aspen_doors_c", + "doors:aspen_doors_d", + "doors:acacia_door_a", + "doors:acacia_door_b", + "doors:acacia_door_c", + "doors:acacia_door_d", + "doors:jungle_door_a", + "doors:jungle_door_b", + "doors:jungle_door_c", + "doors:jungle_door_d" + }) + + if door_pos ~= nil then + + minetest.after(3, function() -- remover depois de 2 segundos + minetest.remove_node(door_pos) + end) + + else + + end + end + end end + }) diff --git a/runner/mod.conf b/runner/mod.conf index 865e08a..6f4978a 100644 --- a/runner/mod.conf +++ b/runner/mod.conf @@ -1,3 +1,3 @@ name = runner -depends = default, mobs +depends = default, mobs diff --git a/spitterzombie/init.lua b/spitterzombie/init.lua index 5f42af7..841c95f 100644 --- a/spitterzombie/init.lua +++ b/spitterzombie/init.lua @@ -20,9 +20,31 @@ local zombienods = { } + function poison_part (pos) --- PARTICULAS + + minetest.add_particlespawner({ + amount = 5, + time = 0.1, + minpos = pos, + maxpos = pos, + minvel = {x = dir.x - 1, y = dir.y, z = dir.z - 1}, + maxvel = {x = dir.x + 1, y = dir.y, z = dir.z + 1}, + minacc = {x = 0, y = -5, z = 0}, + maxacc = {x = 0, y = -9, z = 0}, + minexptime = 1, + maxexptime = 1, + minsize = 1, + maxsize = 2, + texture = "stamina_poison_particle.png" + }) + + +end + ----- ACID ===================================================================== --- Particules : +--[[ function gas(pos) --- PARTICULAS @@ -80,6 +102,8 @@ minetest.register_node("spitterzombie:acid", { end, }) +]] + ---- VOMITER ZOMBIE ============================================================ mobs:register_mob("spitterzombie:spitterzombie", { @@ -161,9 +185,56 @@ mobs:register_arrow("spitterzombie:spitter_arrow", { hit_player = function(self, player) - local pp = player:get_pos() -- Pos player + -- Quando estar de armadura , o escudo bloquei parte do dano causado por evenenamento - minetest.set_node(pp, {name = "spitterzombie:acid"}) + minetest.chat_send_player(player:get_player_name(), "You are poisoned!") -- msg para p player + + local count = 15 -- Contagem de tempo do dano era 15 + local delay = 1 -- Intervaloe entre danos + + local function countdown() + if count > 0 then -- Se o contador ainda não chegou a 0 + + ---------- PARTICULAS : + local pos = player:get_pos() + local dir = player:get_look_dir() -- direção em que o jogador está olhando + local distance = 1 -- distância a partir da cabeça do jogador + local front_player = { + x = pos.x + (dir.x * distance), + y = pos.y + (dir.y * distance) + 1.5, -- altura da cabeça do jogador + z = pos.z + (dir.z * distance) + } + + minetest.add_particlespawner({ + amount = 3, -- quantidade de particulas + time = 2, -- quanto tempo geradas + minpos = front_player, + maxpos = front_player, + minvel = {x = -0.1, y = 0.1, z = -0.1}, -- velocidade das particulas + maxvel = {x = 0.1, y = 0.3, z = 0.1}, + minacc = {x = 0, y = -0.1, z = 0}, -- acelaração das particulas , direção + maxacc = {x = 0, y = -0.2, z = 0}, + minexptime = 0, -- tempo de vida da particula + maxexptime = 0.5, -- tempo de vida da particula + minsize = 1, + maxsize = 2, + collisiondetection = true, + collision_removal = true, + object_collision = false, + vertical = false, + texture = "poison_particle.png", + }) + + --- DANO : + player:set_hp(player:get_hp() - 1) + count = count - 1 -- Decrementar o contador + minetest.after(delay, countdown) -- Chamar a função novamente após um atraso + + --else + end + end + + minetest.after(delay, countdown) -- Iniciar a contagem regressiva end, diff --git a/spitterzombie/textures/acid.png~ b/spitterzombie/textures/acid.png~ deleted file mode 100644 index 9615671..0000000 Binary files a/spitterzombie/textures/acid.png~ and /dev/null differ diff --git a/spitterzombie/textures/gas.png~ b/spitterzombie/textures/gas.png~ deleted file mode 100644 index 8420ed4..0000000 Binary files a/spitterzombie/textures/gas.png~ and /dev/null differ diff --git a/spitterzombie/textures/heart_poison.png b/spitterzombie/textures/heart_poison.png new file mode 100644 index 0000000..c9f2dda Binary files /dev/null and b/spitterzombie/textures/heart_poison.png differ diff --git a/spitterzombie/textures/poison_particle.png b/spitterzombie/textures/poison_particle.png new file mode 100644 index 0000000..d239e74 Binary files /dev/null and b/spitterzombie/textures/poison_particle.png differ diff --git a/structures/schematics/cabin.mts b/structures/schematics/cabin.mts index 929e129..1a8e660 100644 Binary files a/structures/schematics/cabin.mts and b/structures/schematics/cabin.mts differ diff --git a/structures/schematics/hospital.mts b/structures/schematics/hospital.mts index 3372f9d..9f23557 100644 Binary files a/structures/schematics/hospital.mts and b/structures/schematics/hospital.mts differ diff --git a/structures/schematics/nhotel.mts b/structures/schematics/nhotel.mts index 8b1944b..9c9d650 100644 Binary files a/structures/schematics/nhotel.mts and b/structures/schematics/nhotel.mts differ diff --git a/structures/schematics/road.mts b/structures/schematics/road.mts new file mode 100644 index 0000000..d3ec7f7 Binary files /dev/null and b/structures/schematics/road.mts differ diff --git a/structures/textures/vases_brown.png~ b/structures/textures/vases_brown.png~ deleted file mode 100644 index 3788eca..0000000 Binary files a/structures/textures/vases_brown.png~ and /dev/null differ diff --git a/structures/textures/white_vase.png~ b/structures/textures/white_vase.png~ deleted file mode 100644 index 61cf95a..0000000 Binary files a/structures/textures/white_vase.png~ and /dev/null differ diff --git a/stuffx/init.lua b/stuffx/init.lua index 1a37be0..96c230a 100644 --- a/stuffx/init.lua +++ b/stuffx/init.lua @@ -3,9 +3,10 @@ minetest.register_on_newplayer(function(player) player:get_inventory():add_item('main','toolx:baseball_bat') player:get_inventory():add_item('main','foodx:canned_tomato 8') player:get_inventory():add_item('main','itemx:walkietalkie') - --player:get_inventory():add_item('main','') - --player:get_inventory():add_item('main','') - --player:get_inventory():add_item('main','') - --player:get_inventory():add_item('main','') + player:get_inventory():add_item('main','zarmor:hat_head') + player:get_inventory():add_item('main','zarmor:Jacket_torso') + player:get_inventory():add_item('main','zarmor:jeanspants_legs') + player:get_inventory():add_item('main','zarmor:tennis_feet') + player:get_inventory():add_item('main','itemx:bandaid') end) diff --git a/stuffx/mod.conf b/stuffx/mod.conf index e7d51d1..c7c3f7a 100644 --- a/stuffx/mod.conf +++ b/stuffx/mod.conf @@ -1,2 +1,2 @@ name = stuffx -depends = default +depends = default ,itemx,zarmor,foodx,toolx diff --git a/survivorzombie/init.lua b/survivorzombie/init.lua index 8422315..55aab17 100644 --- a/survivorzombie/init.lua +++ b/survivorzombie/init.lua @@ -60,7 +60,7 @@ mobs:register_mob("survivorzombie:survivorzombie", { walk_velocity = 1, run_velocity = 3, jump_height = 2, - stepheight = 1.2, + stepheight = 1.1, floats = 0, view_range = 35, drops = { @@ -90,20 +90,85 @@ mobs:register_mob("survivorzombie:survivorzombie", { do_custom = function(self, dtime) - local pos = self.object:get_pos() -- consegue sua propia posição - local vel = {x=0, y=0.2, z=0} -- deveria ser velocidade hehe - local face = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}) -- bloco que estar em sua frente - - for i,v in ipairs (climb_node) do - if face.name == v then -- se o bloco em sua frente é escadas - - self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 - self.object:set_velocity(vel) -- velocidade, não eficiente :/ - - - end + local pos = self.object:get_pos() -- consegue sua propia posição + local face = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}) -- bloco que estar em sua frente + local face2 = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1}) + local face3 = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z}) + local face4 = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z}) + --local ladders = {"default:ladder_wood","default:ladder_steel" } + + --for i,v in ipairs (climb_node) do + if face.name == "default:ladder_wood" or face.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + + if face2.name == "default:ladder_wood" or face2.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + + if face3.name == "default:ladder_wood" or face3.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + + if face4.name == "default:ladder_wood" or face4.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + --end + - end + -- BREACK DOOR : + + for _,players in pairs(minetest.get_objects_inside_radius(pos,5)) do + + if players:is_player() then + + local door_pos = minetest.find_node_near(pos, 1, { + "doors:door_wood_a" , + "doors:door_wood_b", + "doors:door_wood_c", + "doors:door_wood_d", + "default:glass", + "doors:door_glass_a", + "doors:door_glass_b", + "doors:door_glass_c", + "doors:door_glass_d", + "doors:pine_door_a", + "doors:pine_door_b", + "doors:pine_door_c", + "doors:pine_door_d", + "doors:aspen_doors_a", + "doors:aspen_doors_b", + "doors:aspen_doors_c", + "doors:aspen_doors_d", + "doors:acacia_door_a", + "doors:acacia_door_b", + "doors:acacia_door_c", + "doors:acacia_door_d", + "doors:jungle_door_a", + "doors:jungle_door_b", + "doors:jungle_door_c", + "doors:jungle_door_d" + }) + + if door_pos ~= nil then + + minetest.after(3, function() -- remover depois de 2 segundos + minetest.remove_node(door_pos) + end) + + else + + end + end + end end }) diff --git a/tankzombie/init.lua b/tankzombie/init.lua index d75e371..960211a 100644 --- a/tankzombie/init.lua +++ b/tankzombie/init.lua @@ -32,7 +32,7 @@ mobs:register_mob("tankzombie:tankzombie", { passive = false, attack_type = "dogfight", --attack_animals = true, - pathfinding = true, + pathfinding = 1, reach = 5, damage = 12, hp_min = 250, @@ -40,7 +40,8 @@ mobs:register_mob("tankzombie:tankzombie", { armor = 60, collisionbox = {-0.4, 0, -0.4, 0.4, 3.0, 0.4}, visual = "mesh", - mesh = "zombietank.b3d", + mesh = "ztank.b3d", + visual_size = {x=12, y=12}, --rotate = 180, textures = { {"tankzombiex.png"}, @@ -88,13 +89,17 @@ mobs:register_mob("tankzombie:tankzombie", { punch_speed = 25, punch_start = 200, punch_end = 250, - --die_speed = 20, + die_speed = 15, die_start = 260, - die_end = 380, + die_end = 399, + }, + --[[ on_die = function(self, pos) -- POSIÇÃO + + self.object:set_animation({x=260, y=380}, 20, 0) for _,players in pairs(minetest.get_objects_inside_radius(pos,64)) do -- CONSEGUIR RADIUS ( POSIÇÃO ,64 NODES?) if players:is_player() then -- SE PLAYER awards.unlock(players:get_player_name(), "tank") -- DESBLOQUEAR CONQUISTAS? @@ -103,6 +108,10 @@ mobs:register_mob("tankzombie:tankzombie", { end --custom_attack = function() --end, + + ]] + + }) -- ADICIONANDO ATAQUE QUE MUDA O POSIÇÃO @@ -113,6 +122,8 @@ minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch, end) + + mobs:spawn({ name = "tankzombie:tankzombie", nodes = hunternods, diff --git a/tankzombie/mod.conf b/tankzombie/mod.conf index 89bb726..3ba2722 100644 --- a/tankzombie/mod.conf +++ b/tankzombie/mod.conf @@ -1,3 +1,4 @@ name = tankzombie -depends = default, mobs , +depends = default, mobs + diff --git a/tankzombie/models/zombietank.b3d b/tankzombie/models/zombietank.b3d index a452820..0539260 100644 Binary files a/tankzombie/models/zombietank.b3d and b/tankzombie/models/zombietank.b3d differ diff --git a/tankzombie/models/ztank.b3d b/tankzombie/models/ztank.b3d new file mode 100644 index 0000000..781dea7 Binary files /dev/null and b/tankzombie/models/ztank.b3d differ diff --git a/walkingzombie/init.lua b/walkingzombie/init.lua index 159a860..e4235a5 100644 --- a/walkingzombie/init.lua +++ b/walkingzombie/init.lua @@ -20,6 +20,9 @@ local zombienods = { "nodex:road3", } + +local zdoors = { } + ---- SKULL SWORD ------------------------------------------------------------------------------------------------------ mobs:register_mob("walkingzombie:walkingzombie", { @@ -56,7 +59,7 @@ mobs:register_mob("walkingzombie:walkingzombie", { walk_velocity = 1, run_velocity = 3, jump_height = 2, - stepheight = 1.2, + stepheight = 1.1, floats = 0, view_range = 35, drops = { @@ -86,20 +89,85 @@ mobs:register_mob("walkingzombie:walkingzombie", { do_custom = function(self, dtime) - local pos = self.object:get_pos() -- consegue sua propia posição - local vel = {x=0, y=0.2, z=0} -- deveria ser velocidade hehe - local face = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}) -- bloco que estar em sua frente - - for i,v in ipairs (climb_node) do - if face.name == v then -- se o bloco em sua frente é escadas - - self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 - self.object:set_velocity(vel) -- velocidade, não eficiente :/ - - - end + local pos = self.object:get_pos() -- consegue sua propia posição + local face = minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}) -- bloco que estar em sua frente + local face2 = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1}) + local face3 = minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z}) + local face4 = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z}) + --local ladders = {"default:ladder_wood","default:ladder_steel" } + + --for i,v in ipairs (climb_node) do + if face.name == "default:ladder_wood" or face.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + + if face2.name == "default:ladder_wood" or face2.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + + if face3.name == "default:ladder_wood" or face3.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + + if face4.name == "default:ladder_wood" or face4.name == "default:ladder_steel" then -- se o bloco em sua frente é escadas + + self.object:set_pos({x=pos.x, y=pos.y+1, z=pos.z}) -- enquanto o bloco for escadas y+1 + self.object:set_velocity({x=0, y=-5, z=0}) -- velocidade, não eficiente :/ + end + --end + - end + -- BREACK DOOR : + + for _,players in pairs(minetest.get_objects_inside_radius(pos,5)) do + + if players:is_player() then + + local door_pos = minetest.find_node_near(pos, 1, { + "doors:door_wood_a" , + "doors:door_wood_b", + "doors:door_wood_c", + "doors:door_wood_d", + "default:glass", + "doors:door_glass_a", + "doors:door_glass_b", + "doors:door_glass_c", + "doors:door_glass_d", + "doors:pine_door_a", + "doors:pine_door_b", + "doors:pine_door_c", + "doors:pine_door_d", + "doors:aspen_doors_a", + "doors:aspen_doors_b", + "doors:aspen_doors_c", + "doors:aspen_doors_d", + "doors:acacia_door_a", + "doors:acacia_door_b", + "doors:acacia_door_c", + "doors:acacia_door_d", + "doors:jungle_door_a", + "doors:jungle_door_b", + "doors:jungle_door_c", + "doors:jungle_door_d" + }) + + if door_pos ~= nil then + + minetest.after(3, function() -- remover depois de 2 segundos + minetest.remove_node(door_pos) + end) + + else + + end + end + end end })