zombies4test/tankzombie/init.lua

131 lines
2.5 KiB
Lua
Raw Normal View History

2023-01-29 19:25:14 +03:00
-- Sound :
-- https://freesound.org/people/missozzy/sounds/169985/
-- https://freesound.org/people/zglar/sounds/232289/
2023-01-23 04:13:39 +03:00
local zombienods = {
"default:dirt",
"default:dirt_with_rainforest",
"default:dirt_with_grass",
"default:dirt_with_dry_grass",
"default:dry_dirt_with_dry_grass",
"default:dirt_with_coniferous_litter",
"default:stone",
"default:ice",
"default:snowblock",
"default:dirt_with_snow",
"default:sand",
"default:desert_sand",
"default:desert_stone",
"default:stone",
"default:desert_stone",
--"default:cobble",
"default:ice",
"default:gravel",
}
---- SKULL SWORD ------------------------------------------------------------------------------------------------------
mobs:register_mob("tankzombie:tankzombie", {
2023-01-27 22:07:50 +03:00
--nametag = "Tank Zombie" ,
2023-01-23 04:13:39 +03:00
type = "monster",
passive = false,
attack_type = "dogfight",
2023-01-24 19:55:52 +03:00
--attack_animals = true,
2023-01-23 04:13:39 +03:00
pathfinding = true,
reach = 5,
2023-01-27 22:07:50 +03:00
damage = 12,
hp_min = 250,
hp_max = 250,
2023-01-23 04:13:39 +03:00
armor = 80,
collisionbox = {-0.4, 0, -0.4, 0.4, 3.0, 0.4},
visual = "mesh",
mesh = "zombietank.b3d",
--rotate = 180,
textures = {
{"tankzombiex.png"},
--{""},
},
--glow = 4,
--blood_texture = " ",
makes_footstep_sound = true,
sounds = {
2023-01-29 19:25:14 +03:00
random ="missozzy",
2023-01-23 04:13:39 +03:00
--attack = "zombie_hit",
2023-01-29 19:25:14 +03:00
death = "roar ",
2023-01-23 04:13:39 +03:00
},
walk_velocity = 1,
run_velocity = 3,
2023-01-29 19:25:14 +03:00
jump_height = 15,
2023-01-27 22:07:50 +03:00
stepheight = 1.7,
2023-01-23 04:13:39 +03:00
floats = 0,
view_range = 35,
drops = {
2023-01-27 22:07:50 +03:00
{name = "default:diamondblock", chance = 2, min = 1, max = 1},
2023-01-23 04:13:39 +03:00
},
water_damage = 0,
2023-01-29 19:25:14 +03:00
lava_damage = 0,
2023-01-23 04:13:39 +03:00
light_damage = 0,
2023-01-29 19:25:14 +03:00
immune_to = {
{"fortification:wirefence", -10} ,
{"fortification:barbed_wire", -10} ,
{"fortification:punji_sticks", -10} ,
},
2023-01-23 04:13:39 +03:00
animation = {
speed_normal = 15,
stand_start = 0,
stand_end = 80,
walk_start = 100,
walk_end = 180,
run_speed = 45,
run_start = 100,
run_end = 180,
punch_speed = 25,
punch_start = 200,
punch_end = 250,
die_start = 260,
die_end = 380,
},
2023-01-29 19:25:14 +03:00
on_die = function(self, pos) -- POSIÇÃO
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?
end
end
end
2023-01-23 04:13:39 +03:00
--custom_attack = function()
--end,
})
mobs:spawn({
name = "tankzombie:tankzombie",
nodes = hunternods,
min_light = 0,
max_light = 7, -- 14
2023-01-27 22:07:50 +03:00
chance = 16000,
2023-01-23 04:13:39 +03:00
min_height = 0,
max_height = 200,
--max_height = 200,
active_object_count =1,
})
2023-01-25 15:47:20 +03:00
mobs:register_egg("tankzombie:tankzombie", "Tank Zombie", "zombies_egg.png", 0)
2023-01-23 04:13:39 +03:00