diff --git a/Readme.txt b/Readme.txt new file mode 100644 index 0000000..e69de29 diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..cbfbcdb --- /dev/null +++ b/depends.txt @@ -0,0 +1,2 @@ +default +mobs \ No newline at end of file diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..826a2e0 --- /dev/null +++ b/init.lua @@ -0,0 +1,512 @@ + +-- dmobs by D00Med + +mobs:register_mob("dmobs:panda", { + type = "animal", + passive = false, + reach = 1, + damage = 2, + attack_type = "dogfight", + hp_min = 12, + hp_max = 22, + armor = 130, + collisionbox = {-0.4, -0.5, -0.4, 0.4, 0.5, 0.4}, + visual = "mesh", + mesh = "panda.b3d", + textures = { + {"dmobs_panda.png"}, + }, + blood_texture = "mobs_blood.png", + visual_size = {x=2, y=2}, + makes_footstep_sound = true, + walk_velocity = 0.5, + run_velocity = 1, + jump = true, + drops = { + {name = "mobs:meat_raw", chance = 1, min = 1, max = 1}, + }, + water_damage = 0, + lava_damage = 2, + light_damage = 0, + replace_rate = 10, + replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "ethereal:bamboo"}, + replace_with = "air", + follow = {"default:papyrus"}, + view_range = 14, + animation = { + speed_normal = 5, + speed_run = 10, + walk_start = 3, + walk_end = 13, + stand_start = 20, + stand_end = 26, + run_start = 3, + run_end = 13, + + }, + on_rightclick = function(self, clicker) + + if mobs:feed_tame(self, clicker, 8, true, true) then + return + end + + mobs:capture_mob(self, clicker, 0, 5, 50, false, nil) + end, +}) + +mobs:register_spawn("dmobs:panda", {"default:dirt_with_grass","ethereal:bamboo_dirt"}, 20, 10, 15000, 2, 31000) + +mobs:register_egg("dmobs:panda", "Panda", "default_papyrus.png", 1) + +mobs:register_mob("dmobs:fox", { + type = "monster", + attacks_monsters = true, + reach = 1, + damage = 2, + attack_type = "dogfight", + hp_min = 42, + hp_max = 52, + armor = 130, + collisionbox = {-0.4, -0.6, -0.4, 0.3, 0.3, 0.3}, + runaway = true, + visual = "mesh", + mesh = "fox.b3d", + textures = { + {"dmobs_fox.png"}, + }, + blood_texture = "mobs_blood.png", + visual_size = {x=1.5, y=1.5}, + makes_footstep_sound = true, + walk_velocity = 1, + run_velocity = 2.5, + jump = true, + drops = { + {name = "mobs:meat_raw", chance = 1, min = 1, max = 1}, + }, + water_damage = 0, + lava_damage = 2, + light_damage = 0, + replace_rate = 10, + replace_what = {"farming:wheat_5", "default:fence_wood", "default:grass_5", "default:dirt_with_grass"}, + replace_with = "air", + follow = {"mobs:meat_raw"}, + view_range = 14, + animation = { + speed_normal = 6, + speed_run = 15, + walk_start = 25, + walk_end = 35, + stand_start = 51, + stand_end = 60, + run_start = 1, + run_end = 16, + punch_start = 36, + punch_end = 51, + + }, + on_rightclick = function(self, clicker) + + if mobs:feed_tame(self, clicker, 8, true, true) then + return + end + + mobs:capture_mob(self, clicker, 0, 5, 50, false, nil) + end, +}) + +mobs:register_spawn("dmobs:fox", {"default:dirt_with_grass","default:dirt"}, 20, 10, 15000, 2, 31000) + +mobs:register_egg("dmobs:fox", "Fox", "wool_orange.png", 1) + +mobs:register_mob("dmobs:hedgehog", { + type = "animal", + passive = true, + hp_min = 12, + hp_max = 22, + armor = 130, + collisionbox = {-0.1, -0.1, -0.2, 0.2, 0.2, 0.2}, + visual = "mesh", + mesh = "hedgehog.b3d", + textures = { + {"dmobs_hedgehog.png"}, + }, + blood_texture = "mobs_blood.png", + visual_size = {x=2, y=2}, + makes_footstep_sound = true, + walk_velocity = 0.5, + run_velocity = 1, + jump = true, + water_damage = 2, + lava_damage = 2, + light_damage = 0, + view_range = 14, + follow = {"farming:bread"}, + animation = { + speed_normal = 5, + speed_run = 10, + walk_start = 1, + walk_end = 10, + stand_start = 1, + stand_end = 10, + run_start = 1, + run_end = 10, + + }, + on_rightclick = function(self, clicker) + + if mobs:feed_tame(self, clicker, 8, true, true) then + return + end + + mobs:capture_mob(self, clicker, 0, 5, 50, false, nil) + end, +}) + +mobs:register_spawn("dmobs:hedgehog", {"default:dirt_with_grass","default:pine_needles"}, 20, 10, 15000, 2, 31000) + +mobs:register_egg("dmobs:hedgehog", "Hedgehog", "wool_brown.png", 1) + +mobs:register_mob("dmobs:owl", { + type = "animal", + passive = true, + hp_min = 12, + hp_max = 22, + armor = 130, + collisionbox = {-0.3, -0.5, -0.3, 0.2, 0.2, 0.2}, + visual = "mesh", + mesh = "owl.b3d", + textures = { + {"dmobs_owl.png"}, + }, + blood_texture = "mobs_blood.png", + visual_size = {x=2, y=2}, + makes_footstep_sound = false, + walk_velocity = 0, + run_velocity = 0, + jump = false, + water_damage = 2, + lava_damage = 2, + light_damage = 0, + view_range = 1, + do_custom = function(self) + local daytime = minetest.get_timeofday()*24000 + if daytime <=6000 then + self.object:set_properties({ + textures = {"dmobs_owl_awake.png"}, + mesh = "owl.b3d", + }) + elseif daytime >=6000 then + self.object:set_properties({ + textures = {"dmobs_owl.png"}, + mesh = "owl.b3d", + }) + end + end, + animation = { + speed_normal = 1, + walk_start = 1, + walk_end = 50, + + }, +}) + +mobs:register_spawn("dmobs:owl", {"default:leaves","default:tree"}, 20, 10, 15000, 2, 31000) + +mobs:register_egg("dmobs:owl", "Owl", "default_tree.png", 1) + + +mobs:register_mob("dmobs:elephant", { + type = "animal", + passive = false, + reach = 1, + damage = 2, + attack_type = "dogfight", + hp_min = 12, + hp_max = 22, + armor = 130, + collisionbox = {-0.9, -1.2, -0.9, 0.9, 0.9, 0.9}, + visual = "mesh", + mesh = "elephant.b3d", + textures = { + {"dmobs_elephant.png"}, + }, + blood_texture = "mobs_blood.png", + visual_size = {x=2.5, y=2.5}, + makes_footstep_sound = true, + walk_velocity = 0.5, + run_velocity = 1, + jump = false, + water_damage = 2, + lava_damage = 2, + light_damage = 0, + replace_rate = 10, + replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "ethereal:bamboo"}, + replace_with = "air", + follow = {"farming:wheat"}, + view_range = 14, + drops = { + {name = "mobs:meat_raw", chance = 1, min = 1, max = 1}, + }, + animation = { + speed_normal = 5, + speed_run = 10, + walk_start = 3, + walk_end = 19, + stand_start = 20, + stand_end = 30, + run_start = 3, + run_end = 19, + + }, + on_rightclick = function(self, clicker) + + if mobs:feed_tame(self, clicker, 8, true, true) then + return + end + + mobs:capture_mob(self, clicker, 0, 5, 50, false, nil) + end, +}) + +mobs:register_spawn("dmobs:elephant", {"default:dirt_with_dry_grass","default:desert_sand"}, 20, 10, 15000, 2, 31000) + +mobs:register_egg("dmobs:elephant", "Elephant", "default_dry_grass.png", 1) + +mobs:register_mob("dmobs:orc", { + type = "monster", + passive = false, + reach = 1, + damage = 2, + attack_type = "dogfight", + hp_min = 12, + hp_max = 22, + armor = 130, + collisionbox = {-0.4, -1.3, -0.4, 0.4, 1, 0.4}, + visual = "mesh", + mesh = "orc.b3d", + textures = { + {"dmobs_orc.png"}, + }, + blood_texture = "mobs_blood.png", + visual_size = {x=3, y=3}, + makes_footstep_sound = true, + drops = { + {name = "mobs:meat_raw", chance = 1, min = 1, max = 1}, + }, + walk_velocity = 1, + run_velocity = 2, + jump = true, + water_damage = 0, + lava_damage = 2, + light_damage = 0, + view_range = 14, + animation = { + speed_normal = 10, + speed_run = 20, + walk_start = 2, + walk_end = 18, + stand_start = 30, + stand_end = 40, + run_start = 2, + run_end = 18, + punch_start = 20, + punch_end = 30, + + }, +}) + +mobs:register_spawn("dmobs:orc", {"default:snow","default:snow_block", "default:desert_sand"}, 20, 10, 15000, 2, 31000) + +mobs:register_egg("dmobs:orc", "Orc", "default_desert_sand.png", 1) + +mobs:register_mob("dmobs:ogre", { + type = "monster", + passive = false, + reach = 1, + damage = 4, + attack_type = "dogfight", + hp_min = 22, + hp_max = 32, + armor = 130, + collisionbox = {-0.6, -1.3, -0.6, 0.6, 1.5, 0.6}, + visual = "mesh", + mesh = "ogre.b3d", + textures = { + {"dmobs_ogre.png"}, + }, + blood_texture = "mobs_blood.png", + visual_size = {x=3.5, y=3.5}, + makes_footstep_sound = true, + drops = { + {name = "mobs:meat_raw", chance = 1, min = 1, max = 1}, + }, + walk_velocity = 1, + run_velocity = 2, + jump = true, + rotate = 180, + water_damage = 0, + lava_damage = 2, + light_damage = 0, + view_range = 14, + animation = { + speed_normal = 10, + speed_run = 20, + walk_start = 3, + walk_end = 38, + stand_start = 40, + stand_end = 70, + run_start = 3, + run_end = 38, + punch_start = 70, + punch_end = 100, + + }, +}) + +mobs:register_spawn("dmobs:ogre", {"default:snow","default:dirt_with_dry_grass", "default:desert_sand"}, 20, 10, 15000, 2, 31000) + +mobs:register_egg("dmobs:ogre", "Ogre", "default_desert_sand.png", 1) + +mobs:register_mob("dmobs:dragon", { + type = "monster", + passive = false, + attacks_monsters = true, + damage = 8, + reach = 2, + attack_type = "shoot", + shoot_interval = 2.5, + arrow = "dmobs:fire", + shoot_offset = 1, + hp_min = 30, + hp_max = 45, + armor = 80, + collisionbox = {-0.6, -0.9, -0.6, 0.6, 0.6, 0.6}, + visual = "mesh", + mesh = "dragon_new.b3d", + textures = { + {"dmobs_dragon.png"}, + {"dmobs_dragon2.png"}, + {"dmobs_dragon3.png"}, + {"dmobs_dragon4.png"}, + }, + blood_texture = "mobs_blood.png", + visual_size = {x=3, y=3}, + makes_footstep_sound = true, + sounds = { + shoot_attack = "mobs_fireball", + }, + walk_velocity = 3, + run_velocity = 5, + jump = true, + fly = true, + drops = { + {name = "mobs:lava_orb", chance = 1, min = 1, max = 1}, + }, + fall_speed = 0, + stepheight = 10, + water_damage = 2, + lava_damage = 0, + light_damage = 0, + view_range = 20, + animation = { + speed_normal = 10, + speed_run = 20, + walk_start = 1, + walk_end = 22, + stand_start = 1, + stand_end = 22, + run_start = 1, + run_end = 22, + punch_start = 22, + punch_end = 47, + }, +}) + +mobs:spawn_specific("dmobs:dragon", {"air"}, {"default:stone"}, 20, 10, 300, 15000, 2, -100, 11000) + +mobs:register_egg("dmobs:dragon", "Dragon", "default_apple.png", 1) + +--Thanks to Tenplus1 +mobs:register_arrow("dmobs:fire", { + visual = "sprite", + visual_size = {x = 0.5, y = 0.5}, + textures = {"dmobs_fire.png"}, + velocity = 8, + tail = 1, -- enable tail + tail_texture = "dmobs_fire.png", + + hit_player = function(self, player) + player:punch(self.object, 1.0, { + full_punch_interval = 1.0, + damage_groups = {fleshy = 8}, + }, nil) + end, + + hit_mob = function(self, player) + player:punch(self.object, 1.0, { + full_punch_interval = 1.0, + damage_groups = {fleshy = 8}, + }, nil) + end, + + hit_node = function(self, pos, node) + mobs:explosion(pos, 2, 1, 1) + end, +}) + +mobs:register_mob("dmobs:badger", { + type = "animal", + passive = false, + reach = 1, + damage = 2, + attack_type = "dogfight", + hp_min = 12, + hp_max = 22, + armor = 130, + collisionbox = {-0.3, -0.15, -0.3, 0.3, 0.4, 0.3}, + visual = "mesh", + mesh = "badger.b3d", + textures = { + {"dmobs_badger.png"}, + }, + blood_texture = "mobs_blood.png", + visual_size = {x=2, y=2}, + makes_footstep_sound = true, + walk_velocity = 0.7, + run_velocity = 1, + jump = true, + drops = { + {name = "mobs:meat_raw", chance = 1, min = 1, max = 1}, + }, + water_damage = 0, + lava_damage = 2, + light_damage = 0, + follow = {"mobs:meat_raw"}, + view_range = 14, + animation = { + speed_normal = 12, + speed_run = 18, + walk_start = 34, + walk_end = 58, + stand_start = 1, + stand_end = 30, + run_start = 34, + run_end = 58, + punch_start = 60, + punch_end = 80, + + }, + on_rightclick = function(self, clicker) + + if mobs:feed_tame(self, clicker, 8, true, true) then + return + end + + mobs:capture_mob(self, clicker, 0, 5, 50, false, nil) + end, +}) + +mobs:register_spawn("dmobs:badger", {"default:dirt_with_grass","default:dirt"}, 20, 10, 15000, 2, 31000) + +mobs:register_egg("dmobs:badger", "Badger", "default_obsidian.png", 1) + diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..15d3fd8 --- /dev/null +++ b/license.txt @@ -0,0 +1,25 @@ + + +License for Code +---------------- + +Copyright (C) 2016 D00Med + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +License for Textures, Models and Sounds +--------------------------------------- + +CC-BY-SA 3.0 UNPORTED. Created by D00Med diff --git a/models/badger.b3d b/models/badger.b3d new file mode 100644 index 0000000..14a8600 Binary files /dev/null and b/models/badger.b3d differ diff --git a/models/dragon_new.b3d b/models/dragon_new.b3d new file mode 100644 index 0000000..7c86b0b Binary files /dev/null and b/models/dragon_new.b3d differ diff --git a/models/elephant.b3d b/models/elephant.b3d new file mode 100644 index 0000000..b39a7fa Binary files /dev/null and b/models/elephant.b3d differ diff --git a/models/fox.b3d b/models/fox.b3d new file mode 100644 index 0000000..bf7f2b0 Binary files /dev/null and b/models/fox.b3d differ diff --git a/models/hedgehog.b3d b/models/hedgehog.b3d new file mode 100644 index 0000000..0c8be42 Binary files /dev/null and b/models/hedgehog.b3d differ diff --git a/models/ogre.b3d b/models/ogre.b3d new file mode 100644 index 0000000..abd6fbe Binary files /dev/null and b/models/ogre.b3d differ diff --git a/models/orc.b3d b/models/orc.b3d new file mode 100644 index 0000000..cb621cf Binary files /dev/null and b/models/orc.b3d differ diff --git a/models/owl.b3d b/models/owl.b3d new file mode 100644 index 0000000..f256bb3 Binary files /dev/null and b/models/owl.b3d differ diff --git a/models/panda.b3d b/models/panda.b3d new file mode 100644 index 0000000..f89cb5f Binary files /dev/null and b/models/panda.b3d differ diff --git a/textures/dmobs_badger.png b/textures/dmobs_badger.png new file mode 100644 index 0000000..8029c3d Binary files /dev/null and b/textures/dmobs_badger.png differ diff --git a/textures/dmobs_dragon.png b/textures/dmobs_dragon.png new file mode 100644 index 0000000..24861cf Binary files /dev/null and b/textures/dmobs_dragon.png differ diff --git a/textures/dmobs_dragon2.png b/textures/dmobs_dragon2.png new file mode 100644 index 0000000..8f33f2c Binary files /dev/null and b/textures/dmobs_dragon2.png differ diff --git a/textures/dmobs_dragon3.png b/textures/dmobs_dragon3.png new file mode 100644 index 0000000..23a9c7d Binary files /dev/null and b/textures/dmobs_dragon3.png differ diff --git a/textures/dmobs_dragon4.png b/textures/dmobs_dragon4.png new file mode 100644 index 0000000..ae2e99d Binary files /dev/null and b/textures/dmobs_dragon4.png differ diff --git a/textures/dmobs_elephant.png b/textures/dmobs_elephant.png new file mode 100644 index 0000000..03ee4c5 Binary files /dev/null and b/textures/dmobs_elephant.png differ diff --git a/textures/dmobs_fire.png b/textures/dmobs_fire.png new file mode 100644 index 0000000..af9d073 Binary files /dev/null and b/textures/dmobs_fire.png differ diff --git a/textures/dmobs_fox.png b/textures/dmobs_fox.png new file mode 100644 index 0000000..0a055a4 Binary files /dev/null and b/textures/dmobs_fox.png differ diff --git a/textures/dmobs_hedgehog.png b/textures/dmobs_hedgehog.png new file mode 100644 index 0000000..0e28129 Binary files /dev/null and b/textures/dmobs_hedgehog.png differ diff --git a/textures/dmobs_ogre.png b/textures/dmobs_ogre.png new file mode 100644 index 0000000..b809560 Binary files /dev/null and b/textures/dmobs_ogre.png differ diff --git a/textures/dmobs_orc.png b/textures/dmobs_orc.png new file mode 100644 index 0000000..41c46d0 Binary files /dev/null and b/textures/dmobs_orc.png differ diff --git a/textures/dmobs_owl.png b/textures/dmobs_owl.png new file mode 100644 index 0000000..0d1bba1 Binary files /dev/null and b/textures/dmobs_owl.png differ diff --git a/textures/dmobs_owl_awake.png b/textures/dmobs_owl_awake.png new file mode 100644 index 0000000..7cdf2f9 Binary files /dev/null and b/textures/dmobs_owl_awake.png differ diff --git a/textures/dmobs_panda.png b/textures/dmobs_panda.png new file mode 100644 index 0000000..f1a247a Binary files /dev/null and b/textures/dmobs_panda.png differ