Add files via upload
parent
b295831c14
commit
e5b45921a4
|
@ -0,0 +1,31 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2021 Skandarella
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
Lincense for original Code (mobs redo + mobs_animal + mob_horse + mobs_npc): (MIT) Copyright (c) 2014 Krupnov Pavel and 2016 TenPlus1
|
||||
|
||||
Modified Code by Liil/Wilhelmine/Skandarella (c) 2021
|
||||
Textures, Models and Animation by Liil/Wilhelmine/Skandarella under (MIT) License (c) 2021
|
||||
|
||||
People Sounds by Liil/Wilhelmine/Skandarella. Animal Sounds + Environment are from freesound.org under Creative Commons License.
|
||||
Thanks to Baidonovan, Timtube, Qubodup, Egomassive, Travisneedham, Mrauralization, Gibarroule, Acclivity, Inspectorj, O-ciz,
|
||||
Lydmakeren, Shadeslayer99, Erokia, Filmscore, Anton, 15gpanskabokstefflova-nicola, Vataaa and Robinhood76
|
|
@ -0,0 +1,136 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.aboinstructor_drops = {
|
||||
"people:samwarrior"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:aboinstructor", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Instructor.b3d",
|
||||
textures = {
|
||||
{"textureaboinstructor.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_instructor",
|
||||
damage = "people_male5",
|
||||
death = "people_maledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:instructorgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"default:gold_ingot"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 50,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "people:emblemoftriumph" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.aboinstructor_drops or mobs.aboinstructor_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("NPC dropped you an item for honor!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Instructor stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Instructor will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:aboinstructor",
|
||||
nodes = {"default:junglewood"},
|
||||
neighbors = {"people:weaponstand"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:aboinstructor", S("Instructor Jungle"), "aaboinstructor.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:aboinstructor", "people:aboinstructor")
|
|
@ -0,0 +1,138 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.abominer_drops = {
|
||||
"default:copper_lump", "default:tin_lump", "default:iron_lump",
|
||||
"default:gold_lump", "default:diamond", "default:copper_lump",
|
||||
"default:iron_lump", "default:tin_lump", "default:copper_lump", "default:tin_lump", "default:iron_lump",
|
||||
"default:gold_lump"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:abominer", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Miner.b3d",
|
||||
textures = {
|
||||
{"textureabominer.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = { random = "people_miner",
|
||||
damage = "people_male5",
|
||||
death = "people_maledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:minergrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"farming:hemp_oil", "farming:hemp_leaf"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 100,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "farming:turkish_delight" or item:get_name() == "farming:garlic_bread" or item:get_name() == "farming:donut" or item:get_name() == "farming:donut_chocolate" or item:get_name() == "farming:donut_apple" or item:get_name() == "farming:porridge" or item:get_name() == "farming:jaffa_cake" or item:get_name() == "farming:apple_pie" or item:get_name() == "farming:spaghetti" or item:get_name() == "farming:burger" or item:get_name() == "farming:bibimbap" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.abominer_drops or mobs.abominer_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("NPC dropped you an item for food!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Miner stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Miner will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:abominer",
|
||||
nodes = {"default:junglewood"},
|
||||
neighbors = {"people:mineshaft"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:abominer", S("Miner Jungle"), "aabominer.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:abominer", "people:abominer")
|
|
@ -0,0 +1,136 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.afrfarmer_drops = {
|
||||
"people:dog", "people:goat", "people:dogfoodsack", "people:ridepig", "people:rideostrich"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:afrfarmer", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Medfarmer.b3d",
|
||||
textures = {
|
||||
{"textureafrfarmer.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_farmerm",
|
||||
damage = "people_male5",
|
||||
death = "people_maledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:farmergrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"default:coal_lump"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 50,
|
||||
walk_start = 300,
|
||||
walk_end = 400,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "default:gold_ingot" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.afrfarmer_drops or mobs.afrfarmer_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Farmer dropped you an item for gold!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Farmer stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Farmer will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:afrfarmer",
|
||||
nodes = {"default:acacia_wood"},
|
||||
neighbors = {"people:feeder"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:afrfarmer", S("Farmer Acacia"), "aafrfarmer.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:afrfarmer", "people:afrfarmer")
|
|
@ -0,0 +1,136 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.afrinstructor_drops = {
|
||||
"people:afrwarrior"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:afrinstructor", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Instructor.b3d",
|
||||
textures = {
|
||||
{"textureafrinstructor.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_instructor",
|
||||
damage = "people_male5",
|
||||
death = "people_maledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:instructorgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"default:gold_ingot"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 50,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "people:emblemoftriumph" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.afrinstructor_drops or mobs.afrinstructor_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("NPC dropped you an item for honor!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Instructor stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Instructor will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:afrinstructor",
|
||||
nodes = {"default:acacia_wood"},
|
||||
neighbors = {"people:weaponstand"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:afrinstructor", S("Instructor Acacia"), "aafrinstructor.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:afrinstructor", "people:afrinstructor")
|
|
@ -0,0 +1,146 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.afrsmith_drops = {
|
||||
"default:axe_steel", "default:axe_steel", "default:axe_steel",
|
||||
"default:axe_steel", "default:axe_mese", "default:axe_mese",
|
||||
"default:axe_diamond", "default:axe_diamond", "default:pick_bronze", "default:pick_bronze","default:pick_steel", "default:pick_steel","default:pick_mese", "default:pick_mese",
|
||||
"default:pick_diamond", "default:pick_diamond",
|
||||
"default:shovel_bronze", "default:shovel_bronze",
|
||||
"default:shovel_steel", "default:shovel_steel",
|
||||
"default:shovel_mese", "default:shovel_mese",
|
||||
"default:shovel_diamond", "default:shovel_diamond ",
|
||||
"default:sword_bronze", "default:sword_bronze", "default:sword_steel",
|
||||
"default:sword_steel", "default:sword_mese", "default:sword_mese",
|
||||
"default:sword_diamond", "default:sword_diamond"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:afrsmith", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Medsmith.b3d",
|
||||
textures = {
|
||||
{"textureafrsmith.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_smith",
|
||||
damage = "people_female5",
|
||||
death = "people_femaledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:smithgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"farming:turkish_delight", "farming:garlic_bread", "farming:donut", "farming:donut_chocolate", "farming:donut_apple", "farming:porridge", "farming:jaffa_cake", "farming:apple_pie", "farming:spaghetti", "farming:burger", "farming:bibimbap"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 100,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "default:gold_ingot" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.afrsmith_drops or mobs.afrsmith_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Blackmith dropped you an item for gold!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Blacksmith stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Blacksmith will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:afrsmith",
|
||||
nodes = {"default:acacia_wood"},
|
||||
neighbors = {"people:forge"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:afrsmith", S("Blacksmith Acacia"), "aafrsmith.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:afrsmith", "people:afrsmith")
|
|
@ -0,0 +1,133 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
-- Npc by TenPlus1
|
||||
|
||||
|
||||
mobs:register_mob("people:afrwarrior", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 8,
|
||||
attack_type = "dogshoot",
|
||||
dogshoot_switch = 1,
|
||||
dogshoot_count_max = 12, -- shoot for 10 seconds
|
||||
dogshoot_count2_max = 3, -- dogfight for 3 seconds
|
||||
shoot_interval = 1.5,
|
||||
arrow = "people:spearfly",
|
||||
shoot_offset = 2,
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 25,
|
||||
hp_max = 125,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Warrior.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"textureafrwarrior.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "people_warrior3",
|
||||
random = "people_warrior2",
|
||||
damage = "people_male5",
|
||||
death = "people_warrior",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 3,
|
||||
run_velocity = 4,
|
||||
jump = true,
|
||||
drops = { {name = "people:warriorgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {"farming:turkish_delight", "farming:garlic_bread", "farming:donut", "farming:donut_chocolate", "farming:donut_apple", "farming:porridge", "farming:jaffa_cake", "farming:apple_pie", "farming:spaghetti", "farming:burger", "farming:bibimbap"},
|
||||
view_range = 12,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_speed = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
shoot_start = 300,
|
||||
shoot_speed = 80,
|
||||
shoot_end = 400,
|
||||
},
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then return end
|
||||
|
||||
-- capture npc with net or lasso
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
-- protect npc with mobs:protector
|
||||
if mobs:protect(self, clicker) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
|
||||
|
||||
-- by right-clicking owner can switch npc between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Warrior stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Warrior will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("people:afrwarrior", S("Warrior Acacia"), "aafrwarrior.png" )
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:afrwarrior", "people:afrwarrior")
|
||||
|
||||
mobs:register_arrow("people:spearfly", {
|
||||
visual = "sprite",
|
||||
visual_size = {x=.5, y=.5},
|
||||
textures = {"spearfly.png"},
|
||||
velocity = 12,
|
||||
drop = true,
|
||||
|
||||
hit_player = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=13},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=13},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
end,
|
||||
})
|
|
@ -0,0 +1,136 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.aradoctor_drops = {
|
||||
"farming:hemp_leaf", "farming:hemp_oil", "farming:carrot_gold", "people:firsaidkit"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:aradoctor", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Doctor.b3d",
|
||||
textures = {
|
||||
{"texturearadoctor.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_female",
|
||||
damage = "people_female5",
|
||||
death = "people_femaledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:doctorgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"farming:mint_tea"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 50,
|
||||
walk_start = 300,
|
||||
walk_end = 400,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "default:gold_lump" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.aradoctor_drops or mobs.aradoctor_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Doctor dropped you an item for gold!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Doctor stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Doctor will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:aradoctor",
|
||||
nodes = {"default:acacia_wood"},
|
||||
neighbors = {"people:firstaidnode"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:aradoctor", S("Doctor Acacia"), "aaradoctor.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:aradoctor", "people:aradoctor")
|
|
@ -0,0 +1,138 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.araminer_drops = {
|
||||
"default:copper_lump", "default:tin_lump", "default:iron_lump",
|
||||
"default:gold_lump", "default:diamond", "default:copper_lump",
|
||||
"default:iron_lump", "default:tin_lump", "default:copper_lump", "default:tin_lump", "default:iron_lump",
|
||||
"default:gold_lump"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:araminer", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Miner.b3d",
|
||||
textures = {
|
||||
{"texturearaminer.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = { random = "people_miner",
|
||||
damage = "people_male5",
|
||||
death = "people_maledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:minergrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"farming:hemp_oil", "farming:hemp_leaf"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 100,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "farming:turkish_delight" or item:get_name() == "farming:garlic_bread" or item:get_name() == "farming:donut" or item:get_name() == "farming:donut_chocolate" or item:get_name() == "farming:donut_apple" or item:get_name() == "farming:porridge" or item:get_name() == "farming:jaffa_cake" or item:get_name() == "farming:apple_pie" or item:get_name() == "farming:spaghetti" or item:get_name() == "farming:burger" or item:get_name() == "farming:bibimbap" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.araminer_drops or mobs.araminer_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("NPC dropped you an item for food!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Miner stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Miner will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:araminer",
|
||||
nodes = {"default:acacia_wood"},
|
||||
neighbors = {"people:mineshaft"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:araminer", S("Miner Acacia"), "aaraminer.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:araminer", "people:araminer")
|
|
@ -0,0 +1,86 @@
|
|||
mobs:register_mob("people:aravillager", {
|
||||
stepheight = 2,
|
||||
type = "animal",
|
||||
passive = true,
|
||||
attack_type = "dogfight",
|
||||
group_attack = true,
|
||||
owner_loyal = true,
|
||||
attack_npcs = false,
|
||||
reach = 2,
|
||||
damage = 2,
|
||||
hp_min = 30,
|
||||
hp_max = 60,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Villager.b3d",
|
||||
textures = {
|
||||
{"texturearavillager.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_female2",
|
||||
damage = "people_female4",
|
||||
death = "people_femaledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1.5,
|
||||
run_velocity = 2.5,
|
||||
walk_chance = 10,
|
||||
runaway = true,
|
||||
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "people:pirate", "people:evilminer", "people:jealousminer", "people:hatefulminer", "people:plunderercrossbow", "people:plundererflask", "people:plundererstick"},
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
pushable = true,
|
||||
follow = {"farming:turkish_delight", "farming:garlic_bread", "farming:donut", "farming:donut_chocolate", "farming:donut_apple", "farming:porridge", "farming:jaffa_cake", "farming:apple_pie", "farming:spaghetti", "farming:burger", "farming:bibimbap"},
|
||||
view_range = 10,
|
||||
drops = { {name = "people:villagergrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
run_speed = 200,
|
||||
run_start = 300,
|
||||
run_end = 300,
|
||||
|
||||
die_start = 1, -- we dont have a specific death animation so we will
|
||||
die_end = 2, -- re-use 2 standing frames at a speed of 1 fps and
|
||||
die_speed = 1, -- have mob rotate when dying.
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 0, 5, 50, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:aravillager",
|
||||
nodes = {"default:acacia_wood"},
|
||||
neighbors = {"people:villagerbed"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:aravillager", ("Villager Acacia"), "aaravillager.png")
|
||||
|
||||
|
||||
mobs:alias_mob("people:aravillager", "people:aravillager") -- compatibility
|
|
@ -0,0 +1,20 @@
|
|||
minetest.register_node("people:bootynode", {
|
||||
description = "Booty",
|
||||
tiles = {
|
||||
"people_bootynode_top.png",
|
||||
"people_bootynode_bottom.png",
|
||||
"people_bootynode_right.png",
|
||||
"people_bootynode_left.png",
|
||||
"people_bootynode_back.png",
|
||||
"people_bootynode_front.png"
|
||||
},
|
||||
groups = {choppy = 2},
|
||||
drop = "default:gold_lump 1",
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "people:bootynode",
|
||||
burntime = 4,
|
||||
})
|
|
@ -0,0 +1,136 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.chindoctor_drops = {
|
||||
"farming:hemp_leaf", "farming:hemp_oil", "farming:carrot_gold", "people:firsaidkit"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:chindoctor", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Doctor.b3d",
|
||||
textures = {
|
||||
{"texturechindoctor.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_female",
|
||||
damage = "people_female5",
|
||||
death = "people_femaledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:doctorgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"farming:mint_tea"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 50,
|
||||
walk_start = 300,
|
||||
walk_end = 400,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "default:gold_lump" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.chindoctor_drops or mobs.chindoctor_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Doctor dropped you an item for gold!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Doctor stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Doctor will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:chindoctor",
|
||||
nodes = {"default:aspen_wood"},
|
||||
neighbors = {"people:firstaidnode"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:chindoctor", S("Doctor Aspen"), "achindoctor.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:chindoctor", "people:chindoctor")
|
|
@ -0,0 +1,136 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.chinfarmer_drops = {
|
||||
"people:dog", "people:goat", "people:dogfoodsack", "people:ridepig", "people:ridereindeer"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:chinfarmer", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Medfarmer2.b3d",
|
||||
textures = {
|
||||
{"texturechinfarmer.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_farmerf",
|
||||
damage = "people_female5",
|
||||
death = "people_femaledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:farmergrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"default:coal_lump"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 50,
|
||||
walk_start = 300,
|
||||
walk_end = 400,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "default:gold_ingot" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.chinfarmer_drops or mobs.chinfarmer_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Farmer dropped you an item for gold!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Farmer stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Farmer will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:chinfarmer",
|
||||
nodes = {"default:aspen_wood"},
|
||||
neighbors = {"people:feeder"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:chinfarmer", S("Farmer Aspen"), "achinfarmer.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:chinfarmer", "people:chinfarmer")
|
|
@ -0,0 +1,136 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.chininstructor_drops = {
|
||||
"people:ewewarrior"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:chininstructor", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Instructor.b3d",
|
||||
textures = {
|
||||
{"texturechininstructor.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_instructor",
|
||||
damage = "people_male5",
|
||||
death = "people_maledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:instructorgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"default:gold_ingot"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 50,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "people:emblemoftriumph" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.chininstructor_drops or mobs.chininstructor_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("NPC dropped you an item for honor!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Instructor stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Instructor will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:chininstructor",
|
||||
nodes = {"default:aspen_wood"},
|
||||
neighbors = {"people:weaponstand"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:chininstructor", S("Instructor Aspen"), "achininstructor.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:chininstructor", "people:chininstructor")
|
|
@ -0,0 +1,146 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.chinsmith_drops = {
|
||||
"default:axe_steel", "default:axe_steel", "default:axe_steel",
|
||||
"default:axe_steel", "default:axe_mese", "default:axe_mese",
|
||||
"default:axe_diamond", "default:axe_diamond", "default:pick_bronze", "default:pick_bronze","default:pick_steel", "default:pick_steel","default:pick_mese", "default:pick_mese",
|
||||
"default:pick_diamond", "default:pick_diamond",
|
||||
"default:shovel_bronze", "default:shovel_bronze",
|
||||
"default:shovel_steel", "default:shovel_steel",
|
||||
"default:shovel_mese", "default:shovel_mese",
|
||||
"default:shovel_diamond", "default:shovel_diamond ",
|
||||
"default:sword_bronze", "default:sword_bronze", "default:sword_steel",
|
||||
"default:sword_steel", "default:sword_mese", "default:sword_mese",
|
||||
"default:sword_diamond", "default:sword_diamond"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:chinsmith", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Medsmith.b3d",
|
||||
textures = {
|
||||
{"texturechinsmith.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_smith",
|
||||
damage = "people_male5",
|
||||
death = "people_maledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:smithgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"farming:turkish_delight", "farming:garlic_bread", "farming:donut", "farming:donut_chocolate", "farming:donut_apple", "farming:porridge", "farming:jaffa_cake", "farming:apple_pie", "farming:spaghetti", "farming:burger", "farming:bibimbap"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 100,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "default:gold_ingot" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.chinsmith_drops or mobs.chinsmith_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Blackmith dropped you an item for gold!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Blacksmith stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Blacksmith will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:chinsmith",
|
||||
nodes = {"default:aspen_wood"},
|
||||
neighbors = {"people:forge"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:chinsmith", S("Blacksmith Aspen"), "achinsmith.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:chinsmith", "people:chinsmith")
|
|
@ -0,0 +1,7 @@
|
|||
mobs
|
||||
default
|
||||
farming
|
||||
ethereal?
|
||||
xocean?
|
||||
fishing?
|
||||
hunger_ng?
|
|
@ -0,0 +1,3 @@
|
|||
Based on Mobs Redo.
|
||||
Adds the possibility to build living villages in your Minetest Game world.
|
||||
Trade items for random stuff from your villagers, recruit mounts and warriors.
|
|
@ -0,0 +1,149 @@
|
|||
mobs:register_mob("people:dog", {
|
||||
stay_near = {"people:dogfoodsack", 10},
|
||||
type = "animal",
|
||||
visual = "mesh",
|
||||
mesh = "Dog.b3d",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.5, 0.4},
|
||||
animation = {
|
||||
speed_normal = 100,
|
||||
stand_speed = 50,
|
||||
stand_start = 400,
|
||||
stand_end = 500,
|
||||
stand2_speed = 50,
|
||||
stand2_start = 250,
|
||||
stand2_end = 350,
|
||||
stand3_speed = 50,
|
||||
stand3_start = 400,
|
||||
stand3_end = 500,
|
||||
stand4_speed = 50,
|
||||
stand4_start = 500,
|
||||
stand4_end = 600,
|
||||
stand5_speed = 50,
|
||||
stand5_start = 500,
|
||||
stand5_end = 600,
|
||||
walk_start = 0,
|
||||
walk_end = 100,
|
||||
punch_start = 100,
|
||||
punch_end = 200,
|
||||
punch2_start = 100,
|
||||
punch2_end = 200,
|
||||
|
||||
die_start = 1, -- we dont have a specific death animation so we will
|
||||
die_end = 2, -- re-use 2 standing frames at a speed of 1 fps and
|
||||
die_speed = 1, -- have mob rotate when dying.
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
textures = {
|
||||
{"texturedog.png"}
|
||||
},
|
||||
fear_height = 3,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
jump_height = 6,
|
||||
fly = false,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 4,
|
||||
view_range = 10,
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
damage = 9,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npcs = false,
|
||||
pathfinding = true,
|
||||
group_attack = true,
|
||||
hp_min = 35,
|
||||
hp_max = 100,
|
||||
armor = 100,
|
||||
knock_back = 2,
|
||||
lava_damage = 5,
|
||||
fall_damage = 1,
|
||||
water_damage = 0,
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "people_dog4",
|
||||
random = "people_dog2",
|
||||
damage = "people_dog3",
|
||||
death = "people_dog5",
|
||||
distance = 10,
|
||||
},
|
||||
follow = {"mobs:meat_raw", "people:dogfood", "people:dogfood_cooked"},
|
||||
on_rightclick = function(self, clicker)
|
||||
if mobs:feed_tame(self, clicker, 6, true, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 30, 50, 100, false, nil) then return end
|
||||
|
||||
if clicker:get_wielded_item():is_empty() and clicker:get_player_name() == self.owner then
|
||||
if clicker:get_player_control().sneak then
|
||||
self.order = ""
|
||||
self.state = "walk"
|
||||
self.walk_velocity = 2
|
||||
self.stepheight = 2
|
||||
else
|
||||
if self.order == "follow" then
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self.walk_velocity = 2
|
||||
self.stepheight = 2
|
||||
else
|
||||
self.order = "follow"
|
||||
self.state = "walk"
|
||||
self.walk_velocity = 3
|
||||
self.stepheight = 2
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
mobs:register_egg("people:dog", "Dog", "adog.png")
|
||||
-- raw dogfood
|
||||
minetest.register_craftitem(":people:dogfood", {
|
||||
description = ("Dog Food"),
|
||||
inventory_image = "people_dogfood.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
groups = {food_meat_raw = 1, food_mutton_raw = 1, flammable = 2},
|
||||
})
|
||||
|
||||
-- cooked dogfood
|
||||
minetest.register_craftitem(":people:dogfood_cooked", {
|
||||
description = ("Cooked Dog Food"),
|
||||
inventory_image = "people_dogfood_cooked.png",
|
||||
on_use = minetest.item_eat(6),
|
||||
groups = {food_meat = 1, food_mutton = 1, flammable = 2},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "people:dogfood_cooked",
|
||||
recipe = "people:dogfood",
|
||||
cooktime = 5,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("people:dogfoodsack", {
|
||||
description = "Sack of Dog Food",
|
||||
tiles = {
|
||||
"people_dogfoodsack_top.png",
|
||||
"people_dogfoodsack_bottom.png",
|
||||
"people_dogfoodsack_right.png",
|
||||
"people_dogfoodsack_left.png",
|
||||
"people_dogfoodsack_back.png",
|
||||
"people_dogfoodsack_front.png"
|
||||
},
|
||||
groups = {crumbly = 3},
|
||||
drop = "people:dogfood 9",
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "people:dogfoodsack",
|
||||
recipe = {
|
||||
{"people:dogfood", "people:dogfood", "people:dogfood"},
|
||||
{"people:dogfood", "people:dogfood", "people:dogfood"},
|
||||
{"people:dogfood", "people:dogfood", "people:dogfood"},
|
||||
}
|
||||
})
|
|
@ -0,0 +1,74 @@
|
|||
mobs:register_mob("people:evilminer", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 2,
|
||||
damage = 9,
|
||||
hp_min = 55,
|
||||
hp_max = 85,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Miner.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"textureevilminer.png"},
|
||||
},
|
||||
sounds = {
|
||||
attack = "people_evilminer2",
|
||||
random = "people_evilminer4",
|
||||
damage = "people_evilminer",
|
||||
death = "people_evilminer3",
|
||||
distance = 15,
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
drops = {
|
||||
{name = "default:gold_lump", chance = 1, min = 1, max = 1},
|
||||
{name = "people:emblemoftriumph", chance = 7, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 100,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
view_range = 15,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed or tame
|
||||
if mobs:feed_tame(self, clicker, 4, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:evilminer",
|
||||
nodes = {"default:stone"},
|
||||
neighbors = {"default:stone_with_diamond", "default:mese"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
chance = 2, -- 15000
|
||||
min_height = -1000,
|
||||
max_height = -400,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:evilminer", ("Evil Miner"), "aevilminer.png")
|
|
@ -0,0 +1,138 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.eweminer_drops = {
|
||||
"default:copper_lump", "default:tin_lump", "default:iron_lump",
|
||||
"default:gold_lump", "default:diamond", "default:copper_lump",
|
||||
"default:iron_lump", "default:tin_lump", "default:copper_lump", "default:tin_lump", "default:iron_lump",
|
||||
"default:gold_lump"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:eweminer", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Miner.b3d",
|
||||
textures = {
|
||||
{"textureeweminer.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = { random = "people_miner",
|
||||
damage = "people_male5",
|
||||
death = "people_maledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:minergrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"farming:hemp_oil", "farming:hemp_leaf"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 100,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "farming:turkish_delight" or item:get_name() == "farming:garlic_bread" or item:get_name() == "farming:donut" or item:get_name() == "farming:donut_chocolate" or item:get_name() == "farming:donut_apple" or item:get_name() == "farming:porridge" or item:get_name() == "farming:jaffa_cake" or item:get_name() == "farming:apple_pie" or item:get_name() == "farming:spaghetti" or item:get_name() == "farming:burger" or item:get_name() == "farming:bibimbap" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.eweminer_drops or mobs.eweminer_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("NPC dropped you an item for food!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Miner stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Miner will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:eweminer",
|
||||
nodes = {"default:aspen_wood"},
|
||||
neighbors = {"people:mineshaft"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:eweminer", S("Miner Aspen"), "aeweminer.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:eweminer", "people:eweminer")
|
|
@ -0,0 +1,86 @@
|
|||
mobs:register_mob("people:ewevillager", {
|
||||
stepheight = 2,
|
||||
type = "animal",
|
||||
passive = true,
|
||||
attack_type = "dogfight",
|
||||
group_attack = true,
|
||||
owner_loyal = true,
|
||||
attack_npcs = false,
|
||||
reach = 2,
|
||||
damage = 2,
|
||||
hp_min = 30,
|
||||
hp_max = 60,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Villager.b3d",
|
||||
textures = {
|
||||
{"textureewevillager.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_female2",
|
||||
damage = "people_female4",
|
||||
death = "people_femaledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1.5,
|
||||
run_velocity = 2.5,
|
||||
walk_chance = 10,
|
||||
runaway = true,
|
||||
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "people:pirate", "people:evilminer", "people:jealousminer", "people:hatefulminer", "people:plunderercrossbow", "people:plundererflask", "people:plundererstick"},
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
pushable = true,
|
||||
follow = {"farming:turkish_delight", "farming:garlic_bread", "farming:donut", "farming:donut_chocolate", "farming:donut_apple", "farming:porridge", "farming:jaffa_cake", "farming:apple_pie", "farming:spaghetti", "farming:burger", "farming:bibimbap"},
|
||||
view_range = 10,
|
||||
drops = { {name = "people:villagergrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
run_speed = 200,
|
||||
run_start = 300,
|
||||
run_end = 300,
|
||||
|
||||
die_start = 1, -- we dont have a specific death animation so we will
|
||||
die_end = 2, -- re-use 2 standing frames at a speed of 1 fps and
|
||||
die_speed = 1, -- have mob rotate when dying.
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 0, 5, 50, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:ewevillager",
|
||||
nodes = {"default:aspen_wood"},
|
||||
neighbors = {"people:villagerbed"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:ewevillager", ("Villager Aspen"), "aewevillager.png")
|
||||
|
||||
|
||||
mobs:alias_mob("people:ewevillager", "people:ewevillager") -- compatibility
|
|
@ -0,0 +1,133 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
-- Npc by TenPlus1
|
||||
|
||||
|
||||
mobs:register_mob("people:ewewarrior", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 8,
|
||||
attack_type = "dogshoot",
|
||||
dogshoot_switch = 1,
|
||||
dogshoot_count_max = 12, -- shoot for 10 seconds
|
||||
dogshoot_count2_max = 3, -- dogfight for 3 seconds
|
||||
shoot_interval = 1.5,
|
||||
arrow = "people:spearfly",
|
||||
shoot_offset = 2,
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 25,
|
||||
hp_max = 125,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Warrior.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"textureewewarrior.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "people_warrior3",
|
||||
random = "people_warrior2",
|
||||
damage = "people_male5",
|
||||
death = "people_warrior",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 3,
|
||||
run_velocity = 4,
|
||||
jump = true,
|
||||
drops = { {name = "people:warriorgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {"farming:turkish_delight", "farming:garlic_bread", "farming:donut", "farming:donut_chocolate", "farming:donut_apple", "farming:porridge", "farming:jaffa_cake", "farming:apple_pie", "farming:spaghetti", "farming:burger", "farming:bibimbap"},
|
||||
view_range = 12,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_speed = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
shoot_start = 300,
|
||||
shoot_speed = 80,
|
||||
shoot_end = 400,
|
||||
},
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then return end
|
||||
|
||||
-- capture npc with net or lasso
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
-- protect npc with mobs:protector
|
||||
if mobs:protect(self, clicker) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
|
||||
|
||||
-- by right-clicking owner can switch npc between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Warrior stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Warrior will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("people:ewewarrior", S("Warrior Aspen"), "aewewarrior.png" )
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:ewewarrior", "people:ewewarrior")
|
||||
|
||||
mobs:register_arrow("people:spearfly", {
|
||||
visual = "sprite",
|
||||
visual_size = {x=.5, y=.5},
|
||||
textures = {"spearfly.png"},
|
||||
velocity = 12,
|
||||
drop = true,
|
||||
|
||||
hit_player = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=13},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=13},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
end,
|
||||
})
|
|
@ -0,0 +1,19 @@
|
|||
minetest.register_node("people:feeder", {
|
||||
description = "Feeder",
|
||||
visual_scale = 1,
|
||||
mesh = "Feeder.b3d",
|
||||
tiles = {"texturefeeder.png"},
|
||||
inventory_image = "afeeder.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.4, 0.4},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "people:feeder",
|
||||
burntime = 4,
|
||||
})
|
|
@ -0,0 +1,18 @@
|
|||
minetest.register_node("people:firstaidnode", {
|
||||
description = "First Aid Node",
|
||||
tiles = {
|
||||
"people_firstaidnode_top.png",
|
||||
"people_firstaidnode_bottom.png",
|
||||
"people_firstaidnode_right.png",
|
||||
"people_firstaidnode_left.png",
|
||||
"people_firstaidnode_back.png",
|
||||
"people_firstaidnode_front.png"
|
||||
},
|
||||
groups = {choppy = 2}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "people:firstaidnode",
|
||||
burntime = 4,
|
||||
})
|
|
@ -0,0 +1,32 @@
|
|||
minetest.register_node("people:forge", {
|
||||
description = "Anvil",
|
||||
visual_scale = 0.5,
|
||||
mesh = "Forge.b3d",
|
||||
tiles = {"textureforge.png"},
|
||||
inventory_image = "aforge.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.3, -0.3, -0.3, 0.3, 0.3, 0.3},
|
||||
--[[{-0.3, -0.3, -0.3, 0.3, 0.3, 0.3},
|
||||
{-0.3, -0.3, -0.3, 0.3, 0.3, 0.3}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.3, -0.3, -0.3, 0.3, 0.3, 0.3}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:steel_ingot",
|
||||
recipe = "people:forge",
|
||||
})
|
|
@ -0,0 +1,175 @@
|
|||
mobs:register_mob("people:goat", {
|
||||
stay_near = {"farming:straw", 10, "people:feeder", 10},
|
||||
stepheight = 3,
|
||||
type = "animal",
|
||||
passive = false,
|
||||
damage = 4,
|
||||
hp_min = 25,
|
||||
hp_max = 45,
|
||||
armor = 100,
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.5, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "Goat.b3d",
|
||||
textures = {
|
||||
{"texturegoat.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_goat",
|
||||
damage = "people_goat2",
|
||||
distance = 5,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
walk_chance = 10,
|
||||
runaway = true,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
pushable = true,
|
||||
drops = {
|
||||
{name = "people:mutton_raw", chance = 1, min = 1, max = 2},
|
||||
{name = "wool:white", chance = 1, min = 1, max = 2},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
speed_run = 80,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
|
||||
die_start = 1, -- we dont have a specific death animation so we will
|
||||
die_end = 2, -- re-use 2 standing frames at a speed of 1 fps and
|
||||
die_speed = 1, -- have mob rotate when dying.
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
follow = {
|
||||
"farming:wheat", "default:grass_1", "farming:barley",
|
||||
"farming:oat", "farming:rye"
|
||||
},
|
||||
view_range = 8,
|
||||
replace_rate = 10,
|
||||
replace_what = {
|
||||
{"group:grass", "air", -1},
|
||||
{"default:dirt_with_grass", "default:dirt", -2}
|
||||
},
|
||||
fear_height = 4,
|
||||
on_replace = function(self, pos, oldnode, newnode)
|
||||
|
||||
self.food = (self.food or 0) + 1
|
||||
|
||||
-- if sheep replaces 8x grass then it regrows wool
|
||||
if self.food >= 8 then
|
||||
|
||||
self.food = 0
|
||||
self.gotten = false
|
||||
|
||||
self.object:set_properties({
|
||||
textures = {"texturegoat.png"},
|
||||
mesh = "Goat.b3d",
|
||||
})
|
||||
end
|
||||
end,
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
--are we feeding?
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then
|
||||
|
||||
--if fed 7 times then sheep regrows wool
|
||||
if self.food and self.food > 6 then
|
||||
|
||||
self.gotten = false
|
||||
|
||||
self.object:set_properties({
|
||||
textures = {"texturegoat.png"},
|
||||
mesh = "Goat.b3d",
|
||||
})
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local itemname = item:get_name()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
--are we giving a haircut>
|
||||
if itemname == "mobs:shears" then
|
||||
|
||||
if self.gotten ~= false
|
||||
or self.child ~= false
|
||||
or name ~= self.owner
|
||||
or not minetest.get_modpath("wool") then
|
||||
return
|
||||
end
|
||||
|
||||
self.gotten = true -- shaved
|
||||
|
||||
local obj = minetest.add_item(
|
||||
self.object:get_pos(),
|
||||
ItemStack( "wool:white" )
|
||||
)
|
||||
|
||||
if obj then
|
||||
|
||||
obj:setvelocity({
|
||||
x = math.random(-1, 1),
|
||||
y = 5,
|
||||
z = math.random(-1, 1)
|
||||
})
|
||||
end
|
||||
|
||||
item:add_wear(650) -- 100 uses
|
||||
|
||||
clicker:set_wielded_item(item)
|
||||
|
||||
self.object:set_properties({
|
||||
textures = {"texturegoat2.png"},
|
||||
mesh = "Goat.b3d",
|
||||
})
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
|
||||
-- protect mod with mobs:protector item
|
||||
if mobs:protect(self, clicker) then return end
|
||||
|
||||
--are we capturing?
|
||||
if mobs:capture_mob(self, clicker, 30, 50, 100, false, nil) then return end
|
||||
end
|
||||
})
|
||||
|
||||
mobs:register_egg("people:goat", ("Goat"), "agoat.png")
|
||||
|
||||
mobs:alias_mob("people:goat", "people:goat") -- compatibility
|
||||
|
||||
-- raw mutton
|
||||
minetest.register_craftitem(":people:mutton_raw", {
|
||||
description = ("Raw Mutton"),
|
||||
inventory_image = "people_mutton_raw.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
groups = {food_meat_raw = 1, food_mutton_raw = 1, flammable = 2},
|
||||
})
|
||||
|
||||
-- cooked mutton
|
||||
minetest.register_craftitem(":people:mutton_cooked", {
|
||||
description = ("Cooked Mutton"),
|
||||
inventory_image = "people_mutton_cooked.png",
|
||||
on_use = minetest.item_eat(6),
|
||||
groups = {food_meat = 1, food_mutton = 1, flammable = 2},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "people:mutton_cooked",
|
||||
recipe = "people:mutton_raw",
|
||||
cooktime = 5,
|
||||
})
|
|
@ -0,0 +1,29 @@
|
|||
Guide:
|
||||
|
||||
First you should reach a certain level of strength in Minetest, best above stone tech level, if you are playing Single Player or without NPCs to fight for you.
|
||||
I recommend to use 3D Armor.
|
||||
Brace yourself for your first contact with the plunderers, normally they come in a pack of melee and range and you can only beat one of them,
|
||||
if you manage to separate a plunderer from the group.
|
||||
|
||||
If you are lucky you will be victorious and gain your first item for attracting people. This could be an Anvil, Weaponstand, Feeder, Villager Bed,
|
||||
Mineshaft or First Aid Node.
|
||||
|
||||
If you haven't build a building yet, now is the time to come, because you need a wooden floor to place your gathered items on.
|
||||
All 5 default wood types (apple, acacia, pine, aspen, jungle) are suitable for a building floor and will spawn different looking people.
|
||||
After your first citizen has spawned, he is trading with you, but wont stay near your building. You first have to “tame” him or her,
|
||||
every profession likes and needs different things:
|
||||
|
||||
Blacksmith: Farming Dishes
|
||||
Farmer: Coal Lumps
|
||||
Doctor: Mint Tea
|
||||
Miner: Hemp Oil + Hemp Leaves
|
||||
Instructor: Gold Ingot
|
||||
Warrior: Farming Dishes
|
||||
|
||||
After you satisfied your new resident, you can tell him or her to stay at place. If an enemy will raid your town and kill someone,
|
||||
you will find a wooden cross. You can burn it in the furnace, or bury the dead, but beware: Do not forget to bury the citizens
|
||||
in soil which provides the corpse the chance to rot, otherwise, a surprise will occur at night...
|
||||
|
||||
To be successful you need to mine a lot of gold and use the trading system wisely, because its based on chance.
|
||||
|
||||
There is some more stuff in this mod, but this will not be revealed here, the basics are enough to play successful, the rest should be discovered by yourself.
|
|
@ -0,0 +1,74 @@
|
|||
mobs:register_mob("people:hatefulminer", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 2,
|
||||
damage = 6,
|
||||
hp_min = 35,
|
||||
hp_max = 55,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Miner.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"texturehatefulminer.png"},
|
||||
},
|
||||
sounds = {
|
||||
attack = "people_evilminer2",
|
||||
random = "people_evilminer4",
|
||||
damage = "people_evilminer",
|
||||
death = "people_evilminer3",
|
||||
distance = 15,
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
drops = {
|
||||
{name = "default:iron_lump", chance = 1, min = 1, max = 1},
|
||||
{name = "people:emblemoftriumph", chance = 7, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 100,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
view_range = 15,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed or tame
|
||||
if mobs:feed_tame(self, clicker, 4, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:hatefulminer",
|
||||
nodes = {"default:stone"},
|
||||
neighbors = {"default:stone_with_iron", "default:stone_with_gold"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
chance = 2, -- 15000
|
||||
min_height = -300,
|
||||
max_height = -80,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:hatefulminer", ("Hateful Miner"), "ahatefulminer.png")
|
|
@ -0,0 +1,17 @@
|
|||
if minetest.get_modpath("hunger_ng") ~= nil then
|
||||
hunger_ng.add_hunger_data('people:mutton_raw', {
|
||||
satiates = 1.0,
|
||||
})
|
||||
hunger_ng.add_hunger_data('people:mutton_cooked', {
|
||||
satiates = 3.0,
|
||||
})
|
||||
hunger_ng.add_hunger_data('people:dogfood', {
|
||||
satiates = 1.0,
|
||||
})
|
||||
hunger_ng.add_hunger_data('people:dogfood_cooked', {
|
||||
satiates = 3.0,
|
||||
})
|
||||
hunger_ng.add_hunger_data('people:bandage', {
|
||||
heals = 20.0,
|
||||
})
|
||||
end
|
|
@ -0,0 +1,96 @@
|
|||
|
||||
-- Load support for intllib.
|
||||
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
|
||||
|
||||
local S = minetest.get_translator and minetest.get_translator("people") or
|
||||
dofile(path .. "intllib.lua")
|
||||
|
||||
mobs.intllib = S
|
||||
|
||||
|
||||
-- Check for custom mob spawn file
|
||||
local input = io.open(path .. "spawn.lua", "r")
|
||||
|
||||
if input then
|
||||
mobs.custom_spawn_animal = true
|
||||
input:close()
|
||||
input = nil
|
||||
end
|
||||
|
||||
|
||||
-- Animals
|
||||
dofile(path .. "goat.lua") --
|
||||
dofile(path .. "dog.lua") --
|
||||
dofile(path .. "hunger.lua") --
|
||||
dofile(path .. "forge.lua") --
|
||||
dofile(path .. "feeder.lua") --
|
||||
dofile(path .. "weaponstand.lua") --
|
||||
dofile(path .. "villagerbed.lua") --
|
||||
dofile(path .. "mineshaft.lua") --
|
||||
dofile(path .. "firstaidnode.lua") --
|
||||
dofile(path .. "bootynode.lua") --
|
||||
dofile(path .. "plunderercrossbow.lua") --
|
||||
dofile(path .. "pirate.lua") --
|
||||
dofile(path .. "plundererstick.lua") --
|
||||
dofile(path .. "plundererflask.lua") --
|
||||
dofile(path .. "spawnbooty.lua") --
|
||||
dofile(path .. "medsmith.lua") --
|
||||
dofile(path .. "afrsmith.lua") --
|
||||
dofile(path .. "norsmith.lua") --
|
||||
dofile(path .. "chinsmith.lua") --
|
||||
dofile(path .. "samsmith.lua") --
|
||||
dofile(path .. "medfarmer.lua") --
|
||||
dofile(path .. "norfarmer.lua") --
|
||||
dofile(path .. "samfarmer.lua") --
|
||||
dofile(path .. "afrfarmer.lua") --
|
||||
dofile(path .. "chinfarmer.lua") --
|
||||
dofile(path .. "medvillager.lua") --
|
||||
dofile(path .. "aravillager.lua") --
|
||||
dofile(path .. "papvillager.lua") --
|
||||
dofile(path .. "ewevillager.lua") --
|
||||
dofile(path .. "norvillager.lua") --
|
||||
dofile(path .. "medminer.lua") --
|
||||
dofile(path .. "araminer.lua") --
|
||||
dofile(path .. "abominer.lua") --
|
||||
dofile(path .. "eweminer.lua") --
|
||||
dofile(path .. "norminer.lua") --
|
||||
dofile(path .. "jealousminer.lua") --
|
||||
dofile(path .. "hatefulminer.lua") --
|
||||
dofile(path .. "evilminer.lua") --
|
||||
dofile(path .. "meddoctor.lua") --
|
||||
dofile(path .. "aradoctor.lua") --
|
||||
dofile(path .. "chindoctor.lua") --
|
||||
dofile(path .. "nordoctor.lua") --
|
||||
dofile(path .. "papdoctor.lua") --
|
||||
dofile(path .. "medwarrior.lua") --
|
||||
dofile(path .. "norwarrior.lua") --
|
||||
dofile(path .. "samwarrior.lua") --
|
||||
dofile(path .. "ewewarrior.lua") --
|
||||
dofile(path .. "afrwarrior.lua") --
|
||||
dofile(path .. "medinstructor.lua") --
|
||||
dofile(path .. "norinstructor.lua") --
|
||||
dofile(path .. "chininstructor.lua") --
|
||||
dofile(path .. "afrinstructor.lua") --
|
||||
dofile(path .. "aboinstructor.lua") --
|
||||
dofile(path .. "zombiedoctor.lua") --
|
||||
dofile(path .. "zombiesmith.lua") --
|
||||
dofile(path .. "zombievillager.lua") --
|
||||
dofile(path .. "zombiewarrior.lua") --
|
||||
dofile(path .. "zombiefarmer.lua") --
|
||||
dofile(path .. "zombieinstructor.lua") --
|
||||
dofile(path .. "zombieminer.lua") --
|
||||
dofile(path .. "ridepig.lua") --
|
||||
dofile(path .. "rideelephant.lua") --
|
||||
dofile(path .. "rideostrich.lua") --
|
||||
dofile(path .. "ridehorse.lua") --
|
||||
dofile(path .. "ridereindeer.lua") --
|
||||
dofile(path .. "rideox.lua") --
|
||||
|
||||
-- Load custom spawning
|
||||
if mobs.custom_spawn_animal then
|
||||
dofile(path .. "spawn.lua")
|
||||
end
|
||||
|
||||
|
||||
|
||||
print (S("[MOD] Mobs Redo Animals loaded"))
|
|
@ -0,0 +1,3 @@
|
|||
-- Support for the old multi-load method
|
||||
dofile(minetest.get_modpath("intllib").."/init.lua")
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
mobs:register_mob("people:jealousminer", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 2,
|
||||
damage = 4,
|
||||
hp_min = 15,
|
||||
hp_max = 25,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Miner.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"texturejealousminer.png"},
|
||||
},
|
||||
sounds = {
|
||||
attack = "people_evilminer2",
|
||||
random = "people_evilminer4",
|
||||
damage = "people_evilminer",
|
||||
death = "people_evilminer3",
|
||||
distance = 15,
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
drops = {
|
||||
{name = "default:copper_lump", chance = 1, min = 1, max = 1},
|
||||
{name = "people:emblemoftriumph", chance = 7, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 100,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
view_range = 15,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed or tame
|
||||
if mobs:feed_tame(self, clicker, 4, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:jealousminer",
|
||||
nodes = {"default:stone"},
|
||||
neighbors = {"default:stone_with_coal", "default:stone_with_copper"},
|
||||
min_light = 0,
|
||||
interval = 60,
|
||||
chance = 2, -- 15000
|
||||
min_height = -100,
|
||||
max_height = 0,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:jealousminer", ("Jealous Miner"), "ajealousminer.png")
|
|
@ -0,0 +1,188 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.meddoctor_drops = {
|
||||
"farming:hemp_leaf", "farming:hemp_oil", "farming:carrot_gold", "people:firsaidkit"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:meddoctor", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Doctor.b3d",
|
||||
textures = {
|
||||
{"texturemeddoctor.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_female",
|
||||
damage = "people_female5",
|
||||
death = "people_femaledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:doctorgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"farming:mint_tea"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 50,
|
||||
walk_start = 300,
|
||||
walk_end = 400,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "default:gold_lump" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.meddoctor_drops or mobs.meddoctor_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Doctor dropped you an item for gold!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Doctor stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Doctor will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:meddoctor",
|
||||
nodes = {"default:wood"},
|
||||
neighbors = {"people:firstaidnode"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:meddoctor", S("Doctor Apple"), "ameddoctor.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:meddoctor", "people:meddoctor")
|
||||
|
||||
minetest.register_node("people:firsaidkit", {
|
||||
description = "First Aid Kit",
|
||||
tiles = {
|
||||
"people_firsaidkit_top.png",
|
||||
"people_firsaidkit_bottom.png",
|
||||
"people_firsaidkit_right.png",
|
||||
"people_firsaidkit_left.png",
|
||||
"people_firsaidkit_back.png",
|
||||
"people_firsaidkit_front.png"
|
||||
},
|
||||
groups = {crumbly = 3},
|
||||
drop = "people:bandage 9",
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "people:firsaidkit",
|
||||
recipe = {
|
||||
{"people:bandage", "people:bandage", "people:bandage"},
|
||||
{"people:bandage", "people:bandage", "people:bandage"},
|
||||
{"people:bandage", "people:bandage", "people:bandage"},
|
||||
}
|
||||
})
|
||||
|
||||
-- bandage
|
||||
minetest.register_craftitem(":people:bandage", {
|
||||
description = ("Healing Bandage"),
|
||||
inventory_image = "people_bandage.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
groups = {food_meat_raw = 1, fleshy = 3, flammable = 2},
|
||||
})
|
||||
|
||||
minetest.register_node("people:doctorgrave", {
|
||||
description = "Grave",
|
||||
visual_scale = 1,
|
||||
mesh = "Grave.b3d",
|
||||
tiles = {"texturegrave.png"},
|
||||
inventory_image = "agrave.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.4, 0.4},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "people:doctorgrave",
|
||||
burntime = 6,
|
||||
})
|
|
@ -0,0 +1,157 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.medfarmer_drops = {
|
||||
"people:dog", "people:goat", "people:dogfoodsack", "people:ridepig", "people:rideox"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:medfarmer", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Medfarmer.b3d",
|
||||
textures = {
|
||||
{"texturemedfarmer.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_farmerm",
|
||||
damage = "people_male5",
|
||||
death = "people_maledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:farmergrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"default:coal_lump"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 50,
|
||||
walk_start = 300,
|
||||
walk_end = 400,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "default:gold_ingot" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.medfarmer_drops or mobs.medfarmer_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Farmer dropped you an item for gold!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Farmer stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Farmer will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:medfarmer",
|
||||
nodes = {"default:wood"},
|
||||
neighbors = {"people:feeder"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:medfarmer", S("Farmer Apple"), "amedfarmer.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:medfarmer", "people:medfarmer")
|
||||
|
||||
minetest.register_node("people:farmergrave", {
|
||||
description = "Grave",
|
||||
visual_scale = 1,
|
||||
mesh = "Grave.b3d",
|
||||
tiles = {"texturegrave.png"},
|
||||
inventory_image = "agrave.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.4, 0.4},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "people:farmergrave",
|
||||
burntime = 6,
|
||||
})
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.medinstructor_drops = {
|
||||
"people:medwarrior"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:medinstructor", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Instructor.b3d",
|
||||
textures = {
|
||||
{"texturemedinstructor.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_instructor",
|
||||
damage = "people_male5",
|
||||
death = "people_maledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:instructorgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"default:gold_ingot"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 50,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "people:emblemoftriumph" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.medinstructor_drops or mobs.medinstructor_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("NPC dropped you an item for honor!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Instructor stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Instructor will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:medinstructor",
|
||||
nodes = {"default:wood"},
|
||||
neighbors = {"people:weaponstand"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:medinstructor", S("Instructor Apple"), "amedinstructor.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:medinstructor", "people:medinstructor")
|
||||
|
||||
minetest.register_craftitem("people:emblemoftriumph", {
|
||||
description = S("Emblem of Triumph"),
|
||||
inventory_image = "people_emblemoftriumph.png",
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("people:instructorgrave", {
|
||||
description = "Grave",
|
||||
visual_scale = 1,
|
||||
mesh = "Grave.b3d",
|
||||
tiles = {"texturegrave.png"},
|
||||
inventory_image = "agrave.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.4, 0.4},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "people:instructorgrave",
|
||||
burntime = 6,
|
||||
})
|
|
@ -0,0 +1,158 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.medminer_drops = {
|
||||
"default:copper_lump", "default:tin_lump", "default:iron_lump",
|
||||
"default:gold_lump", "default:diamond", "default:copper_lump",
|
||||
"default:iron_lump", "default:tin_lump", "default:copper_lump", "default:tin_lump", "default:iron_lump",
|
||||
"default:gold_lump"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:medminer", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Miner.b3d",
|
||||
textures = {
|
||||
{"texturemedminer.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = { random = "people_miner",
|
||||
damage = "people_male5",
|
||||
death = "people_maledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:minergrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"farming:hemp_oil", "farming:hemp_leaf"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 100,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "farming:turkish_delight" or item:get_name() == "farming:garlic_bread" or item:get_name() == "farming:donut" or item:get_name() == "farming:donut_chocolate" or item:get_name() == "farming:donut_apple" or item:get_name() == "farming:porridge" or item:get_name() == "farming:jaffa_cake" or item:get_name() == "farming:apple_pie" or item:get_name() == "farming:spaghetti" or item:get_name() == "farming:burger" or item:get_name() == "farming:bibimbap" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.medminer_drops or mobs.medminer_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("NPC dropped you an item for food!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Miner stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Miner will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:medminer",
|
||||
nodes = {"default:wood"},
|
||||
neighbors = {"people:mineshaft"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:medminer", S("Miner Apple"), "amedminer.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:medminer", "people:medminer")
|
||||
|
||||
minetest.register_node("people:minergrave", {
|
||||
description = "Grave",
|
||||
visual_scale = 1,
|
||||
mesh = "Grave.b3d",
|
||||
tiles = {"texturegrave.png"},
|
||||
inventory_image = "agrave.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.4, 0.4},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "people:minergrave",
|
||||
burntime = 6,
|
||||
})
|
|
@ -0,0 +1,167 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.medsmith_drops = {
|
||||
"default:axe_steel", "default:axe_steel", "default:axe_steel",
|
||||
"default:axe_steel", "default:axe_mese", "default:axe_mese",
|
||||
"default:axe_diamond", "default:axe_diamond", "default:pick_bronze", "default:pick_bronze","default:pick_steel", "default:pick_steel","default:pick_mese", "default:pick_mese",
|
||||
"default:pick_diamond", "default:pick_diamond",
|
||||
"default:shovel_bronze", "default:shovel_bronze",
|
||||
"default:shovel_steel", "default:shovel_steel",
|
||||
"default:shovel_mese", "default:shovel_mese",
|
||||
"default:shovel_diamond", "default:shovel_diamond ",
|
||||
"default:sword_bronze", "default:sword_bronze", "default:sword_steel",
|
||||
"default:sword_steel", "default:sword_mese", "default:sword_mese",
|
||||
"default:sword_diamond", "default:sword_diamond"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:medsmith", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Medsmith.b3d",
|
||||
textures = {
|
||||
{"texturemedsmith.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_smith",
|
||||
damage = "people_female5",
|
||||
death = "people_femaledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:smithgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"farming:turkish_delight", "farming:garlic_bread", "farming:donut", "farming:donut_chocolate", "farming:donut_apple", "farming:porridge", "farming:jaffa_cake", "farming:apple_pie", "farming:spaghetti", "farming:burger", "farming:bibimbap"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 100,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "default:gold_ingot" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.medsmith_drops or mobs.medsmith_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Blackmith dropped you an item for gold!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Blacksmith stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Blacksmith will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:medsmith",
|
||||
nodes = {"default:wood"},
|
||||
neighbors = {"people:forge"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:medsmith", S("Blacksmith Apple"), "amedsmith.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:medsmith", "people:medsmith")
|
||||
|
||||
minetest.register_node("people:smithgrave", {
|
||||
description = "Grave",
|
||||
visual_scale = 1,
|
||||
mesh = "Grave.b3d",
|
||||
tiles = {"texturegrave.png"},
|
||||
inventory_image = "agrave.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.4, 0.4},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "people:smithgrave",
|
||||
burntime = 6,
|
||||
})
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
mobs:register_mob("people:medvillager", {
|
||||
stepheight = 2,
|
||||
type = "animal",
|
||||
passive = true,
|
||||
attack_type = "dogfight",
|
||||
group_attack = true,
|
||||
owner_loyal = true,
|
||||
attack_npcs = false,
|
||||
reach = 2,
|
||||
damage = 2,
|
||||
hp_min = 30,
|
||||
hp_max = 60,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Villager.b3d",
|
||||
textures = {
|
||||
{"texturemedvillager.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_female2",
|
||||
damage = "people_female4",
|
||||
death = "people_femaledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1.5,
|
||||
run_velocity = 2.5,
|
||||
walk_chance = 10,
|
||||
runaway = true,
|
||||
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "people:pirate", "people:evilminer", "people:jealousminer", "people:hatefulminer", "people:plunderercrossbow", "people:plundererflask", "people:plundererstick"},
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
pushable = true,
|
||||
follow = {"farming:turkish_delight", "farming:garlic_bread", "farming:donut", "farming:donut_chocolate", "farming:donut_apple", "farming:porridge", "farming:jaffa_cake", "farming:apple_pie", "farming:spaghetti", "farming:burger", "farming:bibimbap"},
|
||||
view_range = 10,
|
||||
drops = { {name = "people:villagergrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
run_speed = 200,
|
||||
run_start = 300,
|
||||
run_end = 300,
|
||||
|
||||
die_start = 1, -- we dont have a specific death animation so we will
|
||||
die_end = 2, -- re-use 2 standing frames at a speed of 1 fps and
|
||||
die_speed = 1, -- have mob rotate when dying.
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 0, 5, 50, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:medvillager",
|
||||
nodes = {"default:wood"},
|
||||
neighbors = {"people:villagerbed"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:medvillager", ("Villager Apple"), "amedvillager.png")
|
||||
|
||||
|
||||
mobs:alias_mob("people:medvillager", "people:medvillager") -- compatibility
|
||||
|
||||
minetest.register_node("people:villagergrave", {
|
||||
description = "Grave",
|
||||
visual_scale = 1,
|
||||
mesh = "Grave.b3d",
|
||||
tiles = {"texturegrave.png"},
|
||||
inventory_image = "agrave.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.4, 0.4},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "people:villagergrave",
|
||||
burntime = 6,
|
||||
})
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
-- Npc by TenPlus1
|
||||
|
||||
|
||||
mobs:register_mob("people:medwarrior", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 8,
|
||||
attack_type = "dogshoot",
|
||||
dogshoot_switch = 1,
|
||||
dogshoot_count_max = 12, -- shoot for 10 seconds
|
||||
dogshoot_count2_max = 3, -- dogfight for 3 seconds
|
||||
shoot_interval = 1.5,
|
||||
arrow = "people:spearfly",
|
||||
shoot_offset = 2,
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 25,
|
||||
hp_max = 125,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Warrior.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturemedwarrior.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "people_warrior3",
|
||||
random = "people_warrior2",
|
||||
damage = "people_male5",
|
||||
death = "people_warrior",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 3,
|
||||
run_velocity = 4,
|
||||
jump = true,
|
||||
drops = { {name = "people:warriorgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {"farming:turkish_delight", "farming:garlic_bread", "farming:donut", "farming:donut_chocolate", "farming:donut_apple", "farming:porridge", "farming:jaffa_cake", "farming:apple_pie", "farming:spaghetti", "farming:burger", "farming:bibimbap"},
|
||||
view_range = 12,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_speed = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
shoot_start = 300,
|
||||
shoot_speed = 80,
|
||||
shoot_end = 400,
|
||||
},
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then return end
|
||||
|
||||
-- capture npc with net or lasso
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
-- protect npc with mobs:protector
|
||||
if mobs:protect(self, clicker) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
|
||||
|
||||
-- by right-clicking owner can switch npc between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Warrior stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Warrior will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("people:medwarrior", S("Warrior Apple"), "amedwarrior.png" )
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:medwarrior", "people:medwarrior")
|
||||
|
||||
mobs:register_arrow("people:spearfly", {
|
||||
visual = "sprite",
|
||||
visual_size = {x=.5, y=.5},
|
||||
textures = {"spearfly.png"},
|
||||
velocity = 12,
|
||||
drop = true,
|
||||
|
||||
hit_player = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=13},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=13},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("people:warriorgrave", {
|
||||
description = "Grave",
|
||||
visual_scale = 1,
|
||||
mesh = "Grave.b3d",
|
||||
tiles = {"texturegrave.png"},
|
||||
inventory_image = "agrave.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.4, 0.4},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "people:warriorgrave",
|
||||
burntime = 6,
|
||||
})
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
minetest.register_node("people:mineshaft", {
|
||||
description = "Mineshaft",
|
||||
visual_scale = 1.0,
|
||||
mesh = "Mineshaft.b3d",
|
||||
tiles = {"texturemineshaft.png"},
|
||||
inventory_image = "amineshaft.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1, -0.5, -1, 1, -0.2, 1},
|
||||
--[[{-1, -0.5, -1, 1, -0.2, 1},
|
||||
{-1, -0.5, -1, 1, -0.2, 1}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1, -0.5, -1, 1, -0.2, 1}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "people:mineshaft",
|
||||
burntime = 8,
|
||||
})
|
|
@ -0,0 +1,136 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.nordoctor_drops = {
|
||||
"farming:hemp_leaf", "farming:hemp_oil", "farming:carrot_gold", "people:firsaidkit"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:nordoctor", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Doctor.b3d",
|
||||
textures = {
|
||||
{"texturenordoctor.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_female",
|
||||
damage = "people_female5",
|
||||
death = "people_femaledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:doctorgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"farming:mint_tea"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 50,
|
||||
walk_start = 300,
|
||||
walk_end = 400,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "default:gold_lump" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.nordoctor_drops or mobs.nordoctor_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Doctor dropped you an item for gold!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Doctor stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Doctor will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:nordoctor",
|
||||
nodes = {"default:acacia_wood"},
|
||||
neighbors = {"people:firstaidnode"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:nordoctor", S("Doctor Pine"), "anordoctor.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:nordoctor", "people:nordoctor")
|
|
@ -0,0 +1,136 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.norfarmer_drops = {
|
||||
"people:dog", "people:goat", "people:dogfoodsack", "people:ridepig", "people:ridehorse"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:norfarmer", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Medfarmer2.b3d",
|
||||
textures = {
|
||||
{"texturenorfarmer.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_farmerf",
|
||||
damage = "people_female5",
|
||||
death = "people_femaledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:farmergrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"default:coal_lump"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 50,
|
||||
walk_start = 300,
|
||||
walk_end = 400,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "default:gold_ingot" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.norfarmer_drops or mobs.norfarmer_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Farmer dropped you an item for gold!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Farmer stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Farmer will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:norfarmer",
|
||||
nodes = {"default:pine_wood"},
|
||||
neighbors = {"people:feeder"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:norfarmer", S("Farmer Pine"), "anorfarmer.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:norfarmer", "people:norfarmer")
|
|
@ -0,0 +1,136 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.norinstructor_drops = {
|
||||
"people:norwarrior"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:norinstructor", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Instructor.b3d",
|
||||
textures = {
|
||||
{"texturenorinstructor.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_instructor",
|
||||
damage = "people_male5",
|
||||
death = "people_maledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:instructorgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"default:gold_ingot"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 50,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "people:emblemoftriumph" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.norinstructor_drops or mobs.norinstructor_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("NPC dropped you an item for honor!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Instructor stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Instructor will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:norinstructor",
|
||||
nodes = {"default:pine_wood"},
|
||||
neighbors = {"people:weaponstand"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:norinstructor", S("Instructor Pine"), "anorinstructor.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:norinstructor", "people:norinstructor")
|
|
@ -0,0 +1,138 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.norminer_drops = {
|
||||
"default:copper_lump", "default:tin_lump", "default:iron_lump",
|
||||
"default:gold_lump", "default:diamond", "default:copper_lump",
|
||||
"default:iron_lump", "default:tin_lump", "default:copper_lump", "default:tin_lump", "default:iron_lump",
|
||||
"default:gold_lump"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:norminer", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Miner.b3d",
|
||||
textures = {
|
||||
{"texturenorminer.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = { random = "people_miner",
|
||||
damage = "people_male5",
|
||||
death = "people_maledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:minergrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"farming:hemp_oil", "farming:hemp_leaf"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 100,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "farming:turkish_delight" or item:get_name() == "farming:garlic_bread" or item:get_name() == "farming:donut" or item:get_name() == "farming:donut_chocolate" or item:get_name() == "farming:donut_apple" or item:get_name() == "farming:porridge" or item:get_name() == "farming:jaffa_cake" or item:get_name() == "farming:apple_pie" or item:get_name() == "farming:spaghetti" or item:get_name() == "farming:burger" or item:get_name() == "farming:bibimbap" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.norminer_drops or mobs.norminer_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("NPC dropped you an item for food!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Miner stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Miner will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:norminer",
|
||||
nodes = {"default:pine_wood"},
|
||||
neighbors = {"people:mineshaft"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:norminer", S("Miner Pine"), "anorminer.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:norminer", "people:norminer")
|
|
@ -0,0 +1,146 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.norsmith_drops = {
|
||||
"default:axe_steel", "default:axe_steel", "default:axe_steel",
|
||||
"default:axe_steel", "default:axe_mese", "default:axe_mese",
|
||||
"default:axe_diamond", "default:axe_diamond", "default:pick_bronze", "default:pick_bronze","default:pick_steel", "default:pick_steel","default:pick_mese", "default:pick_mese",
|
||||
"default:pick_diamond", "default:pick_diamond",
|
||||
"default:shovel_bronze", "default:shovel_bronze",
|
||||
"default:shovel_steel", "default:shovel_steel",
|
||||
"default:shovel_mese", "default:shovel_mese",
|
||||
"default:shovel_diamond", "default:shovel_diamond ",
|
||||
"default:sword_bronze", "default:sword_bronze", "default:sword_steel",
|
||||
"default:sword_steel", "default:sword_mese", "default:sword_mese",
|
||||
"default:sword_diamond", "default:sword_diamond"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:norsmith", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Medsmith2.b3d",
|
||||
textures = {
|
||||
{"texturenorsmith.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_smith",
|
||||
damage = "people_male5",
|
||||
death = "people_maledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:smithgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"farming:turkish_delight", "farming:garlic_bread", "farming:donut", "farming:donut_chocolate", "farming:donut_apple", "farming:porridge", "farming:jaffa_cake", "farming:apple_pie", "farming:spaghetti", "farming:burger", "farming:bibimbap"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 100,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "default:gold_ingot" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.norsmith_drops or mobs.norsmith_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Blackmith dropped you an item for gold!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Blacksmith stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Blacksmith will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:norsmith",
|
||||
nodes = {"default:pine_wood"},
|
||||
neighbors = {"people:forge"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:norsmith", S("Blacksmith Pine"), "anorsmith.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:norsmith", "people:norsmith")
|
|
@ -0,0 +1,86 @@
|
|||
mobs:register_mob("people:norvillager", {
|
||||
stepheight = 2,
|
||||
type = "animal",
|
||||
passive = true,
|
||||
attack_type = "dogfight",
|
||||
group_attack = true,
|
||||
owner_loyal = true,
|
||||
attack_npcs = false,
|
||||
reach = 2,
|
||||
damage = 2,
|
||||
hp_min = 30,
|
||||
hp_max = 60,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Villager.b3d",
|
||||
textures = {
|
||||
{"texturenorvillager.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_female2",
|
||||
damage = "people_female4",
|
||||
death = "people_femaledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1.5,
|
||||
run_velocity = 2.5,
|
||||
walk_chance = 10,
|
||||
runaway = true,
|
||||
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "people:pirate", "people:evilminer", "people:jealousminer", "people:hatefulminer", "people:plunderercrossbow", "people:plundererflask", "people:plundererstick"},
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
pushable = true,
|
||||
follow = {"farming:turkish_delight", "farming:garlic_bread", "farming:donut", "farming:donut_chocolate", "farming:donut_apple", "farming:porridge", "farming:jaffa_cake", "farming:apple_pie", "farming:spaghetti", "farming:burger", "farming:bibimbap"},
|
||||
view_range = 10,
|
||||
drops = { {name = "people:villagergrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
run_speed = 200,
|
||||
run_start = 300,
|
||||
run_end = 300,
|
||||
|
||||
die_start = 1, -- we dont have a specific death animation so we will
|
||||
die_end = 2, -- re-use 2 standing frames at a speed of 1 fps and
|
||||
die_speed = 1, -- have mob rotate when dying.
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 0, 5, 50, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:norvillager",
|
||||
nodes = {"default:pine_wood"},
|
||||
neighbors = {"people:villagerbed"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:norvillager", ("Villager Pine"), "anorvillager.png")
|
||||
|
||||
|
||||
mobs:alias_mob("people:norvillager", "people:norvillager") -- compatibility
|
|
@ -0,0 +1,133 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
-- Npc by TenPlus1
|
||||
|
||||
|
||||
mobs:register_mob("people:norwarrior", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 8,
|
||||
attack_type = "dogshoot",
|
||||
dogshoot_switch = 1,
|
||||
dogshoot_count_max = 12, -- shoot for 10 seconds
|
||||
dogshoot_count2_max = 3, -- dogfight for 3 seconds
|
||||
shoot_interval = 1.5,
|
||||
arrow = "people:spearfly",
|
||||
shoot_offset = 2,
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 25,
|
||||
hp_max = 125,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Warrior.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturenorwarrior.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "people_warrior3",
|
||||
random = "people_warrior2",
|
||||
damage = "people_male5",
|
||||
death = "people_warrior",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 3,
|
||||
run_velocity = 4,
|
||||
jump = true,
|
||||
drops = { {name = "people:warriorgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {"farming:turkish_delight", "farming:garlic_bread", "farming:donut", "farming:donut_chocolate", "farming:donut_apple", "farming:porridge", "farming:jaffa_cake", "farming:apple_pie", "farming:spaghetti", "farming:burger", "farming:bibimbap"},
|
||||
view_range = 12,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_speed = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
shoot_start = 300,
|
||||
shoot_speed = 80,
|
||||
shoot_end = 400,
|
||||
},
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then return end
|
||||
|
||||
-- capture npc with net or lasso
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
-- protect npc with mobs:protector
|
||||
if mobs:protect(self, clicker) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
|
||||
|
||||
-- by right-clicking owner can switch npc between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Warrior stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Warrior will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("people:norwarrior", S("Warrior Pine"), "anorwarrior.png" )
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:norwarrior", "people:norwarrior")
|
||||
|
||||
mobs:register_arrow("people:spearfly", {
|
||||
visual = "sprite",
|
||||
visual_size = {x=.5, y=.5},
|
||||
textures = {"spearfly.png"},
|
||||
velocity = 12,
|
||||
drop = true,
|
||||
|
||||
hit_player = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=13},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=13},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
end,
|
||||
})
|
|
@ -0,0 +1,136 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.papdoctor_drops = {
|
||||
"farming:hemp_leaf", "farming:hemp_oil", "farming:carrot_gold", "people:firsaidkit"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:papdoctor", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Doctor.b3d",
|
||||
textures = {
|
||||
{"texturepapdoctor.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_female",
|
||||
damage = "people_female5",
|
||||
death = "people_femaledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:doctorgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"farming:mint_tea"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 50,
|
||||
walk_start = 300,
|
||||
walk_end = 400,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "default:gold_lump" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.papdoctor_drops or mobs.papdoctor_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Doctor dropped you an item for gold!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Doctor stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Doctor will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:papdoctor",
|
||||
nodes = {"default:junglewood"},
|
||||
neighbors = {"people:firstaidnode"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:papdoctor", S("Doctor Jungle"), "apapdoctor.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:papdoctor", "people:apapdoctor")
|
|
@ -0,0 +1,86 @@
|
|||
mobs:register_mob("people:papvillager", {
|
||||
stepheight = 2,
|
||||
type = "animal",
|
||||
passive = true,
|
||||
attack_type = "dogfight",
|
||||
group_attack = true,
|
||||
owner_loyal = true,
|
||||
attack_npcs = false,
|
||||
reach = 2,
|
||||
damage = 2,
|
||||
hp_min = 30,
|
||||
hp_max = 60,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Villager.b3d",
|
||||
textures = {
|
||||
{"texturepapvillager.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_female2",
|
||||
damage = "people_female4",
|
||||
death = "people_femaledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1.5,
|
||||
run_velocity = 2.5,
|
||||
walk_chance = 10,
|
||||
runaway = true,
|
||||
runaway_from = {"animalworld:bear", "animalworld:crocodile", "animalworld:tiger", "animalworld:spider", "animalworld:spidermale", "animalworld:shark", "animalworld:hyena", "animalworld:kobra", "animalworld:monitor", "animalworld:snowleopard", "animalworld:volverine", "livingfloatlands:deinotherium", "livingfloatlands:carnotaurus", "livingfloatlands:lycaenops", "livingfloatlands:smilodon", "livingfloatlands:tyrannosaurus", "livingfloatlands:velociraptor", "people:pirate", "people:evilminer", "people:jealousminer", "people:hatefulminer", "people:plunderercrossbow", "people:plundererflask", "people:plundererstick"},
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
pushable = true,
|
||||
follow = {"farming:turkish_delight", "farming:garlic_bread", "farming:donut", "farming:donut_chocolate", "farming:donut_apple", "farming:porridge", "farming:jaffa_cake", "farming:apple_pie", "farming:spaghetti", "farming:burger", "farming:bibimbap"},
|
||||
view_range = 10,
|
||||
drops = { {name = "people:villagergrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 5,
|
||||
light_damage = 0,
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
run_speed = 200,
|
||||
run_start = 300,
|
||||
run_end = 300,
|
||||
|
||||
die_start = 1, -- we dont have a specific death animation so we will
|
||||
die_end = 2, -- re-use 2 standing frames at a speed of 1 fps and
|
||||
die_speed = 1, -- have mob rotate when dying.
|
||||
die_loop = false,
|
||||
die_rotate = true,
|
||||
},
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 0, 5, 50, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:papvillager",
|
||||
nodes = {"default:junglewood"},
|
||||
neighbors = {"people:villagerbed"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:papvillager", ("Villager Jungle"), "apapvillager.png")
|
||||
|
||||
|
||||
mobs:alias_mob("people:papvillager", "people:papvillager") -- compatibility
|
|
@ -0,0 +1,82 @@
|
|||
|
||||
mobs:register_mob("people:pirate", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
step_height = 2,
|
||||
fear_height = 4,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 2,
|
||||
damage = 9,
|
||||
hp_min = 35,
|
||||
hp_max = 75,
|
||||
armor = 100,
|
||||
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.95, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "Pirate.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"texturepirate.png"},
|
||||
},
|
||||
sounds = {
|
||||
attack = "people_plundererpirate",
|
||||
random = "people_plundererpirate2",
|
||||
damage = "people_plundererpirate3",
|
||||
death = "people_plundererpirate",
|
||||
distance = 15,
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 2,
|
||||
run_velocity = 4,
|
||||
walk_chance = 10,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
drops = {
|
||||
{name = "people:forge", chance = 7, min = 1, max = 1},
|
||||
{name = "people:feeder", chance = 7, min = 1, max = 1},
|
||||
{name = "people:mineshaft", chance = 7, min = 1, max = 1},
|
||||
{name = "people:villagerbed", chance = 7, min = 1, max = 1},
|
||||
{name = "people:weaponstand", chance = 7, min = 1, max = 1},
|
||||
{name = "people:firstaidnode", chance = 7, min = 1, max = 1},
|
||||
{name = "people:emblemoftriumph", chance = 7, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 100,
|
||||
stand_speed = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
-- 50-70 is slide/water idle
|
||||
},
|
||||
view_range = 15,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed or tame
|
||||
if mobs:feed_tame(self, clicker, 4, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:pirate",
|
||||
nodes = {"default:cobble", "default:mossycobble", "default:sandstonebrick"},
|
||||
neighbors = {"people:bootynode"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
active_object_count = 2,
|
||||
chance = 10, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:pirate", ("Pirate Plunderer"), "apirate.png")
|
|
@ -0,0 +1,105 @@
|
|||
|
||||
mobs:register_mob("people:plunderercrossbow", {
|
||||
-- animal, monster, npc
|
||||
type = "monster",
|
||||
-- aggressive, shoots shuriken
|
||||
passive = false,
|
||||
step_height = 2,
|
||||
fear_height = 4,
|
||||
damage = 7,
|
||||
attack_type = "shoot",
|
||||
shoot_interval = 2,
|
||||
arrow = "people:bolt",
|
||||
shoot_offset = 2,
|
||||
attacks_monsters = false,
|
||||
-- health & armor
|
||||
hp_min = 30, hp_max = 50, armor = 100,
|
||||
-- textures and model
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Plunderercrossbow.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"textureplunderercrossbow.png"},
|
||||
},
|
||||
visual_size = {x=1, y=1},
|
||||
-- sounds
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
shoot_attack = "people_plunderercrossbow2",
|
||||
random = "people_plunderercrossbow",
|
||||
damage = "people_plunderercrossbow3",
|
||||
distance = 15,
|
||||
},
|
||||
-- speed and jump
|
||||
walk_velocity = 2,
|
||||
run_velocity = 3,
|
||||
walk_chance = 10,
|
||||
jump = true,
|
||||
drops = {
|
||||
{name = "people:forge", chance = 7, min = 1, max = 1},
|
||||
{name = "people:feeder", chance = 7, min = 1, max = 1},
|
||||
{name = "people:mineshaft", chance = 7, min = 1, max = 1},
|
||||
{name = "people:villagerbed", chance = 7, min = 1, max = 1},
|
||||
{name = "people:weaponstand", chance = 7, min = 1, max = 1},
|
||||
{name = "people:firstaidnode", chance = 7, min = 1, max = 1},
|
||||
{name = "people:emblemoftriumph", chance = 7, min = 1, max = 1},
|
||||
},
|
||||
-- damaged by
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
fall_damage = 0,
|
||||
view_range = 15,
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 70, speed_run = 100,
|
||||
stand_speed = 50,
|
||||
stand_start = 0, stand_end = 100,
|
||||
walk_start = 100, walk_end = 200,
|
||||
run_start = 100, run_end = 200,
|
||||
shoot_start = 200, shoot_end = 300,
|
||||
speed_shoot = 55,
|
||||
},
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:plunderercrossbow",
|
||||
nodes = {"default:cobble", "default:mossycobble", "default:sandstonebrick"},
|
||||
neighbors = {"people:bootynode"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
active_object_count = 2,
|
||||
chance = 10, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:plunderercrossbow", "Plunderer with Crossbow", "aplunderercrossbow.png")
|
||||
|
||||
mobs:register_arrow("people:bolt", {
|
||||
visual = "sprite",
|
||||
visual_size = {x=.5, y=.5},
|
||||
textures = {"bolt.png"},
|
||||
velocity = 12,
|
||||
drop = true,
|
||||
|
||||
hit_player = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=13},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=13},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
end,
|
||||
})
|
|
@ -0,0 +1,105 @@
|
|||
|
||||
mobs:register_mob("people:plundererflask", {
|
||||
-- animal, monster, npc
|
||||
type = "monster",
|
||||
-- aggressive, shoots flasks
|
||||
passive = false,
|
||||
step_height = 2,
|
||||
fear_height = 4,
|
||||
damage = 8,
|
||||
attack_type = "shoot",
|
||||
shoot_interval = 1,
|
||||
arrow = "people:flask",
|
||||
shoot_offset = 2,
|
||||
attacks_monsters = false,
|
||||
-- health & armor
|
||||
hp_min = 20, hp_max = 40, armor = 100,
|
||||
-- textures and model
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Plundererflask.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"textureplundererflask.png"},
|
||||
},
|
||||
visual_size = {x=1, y=1},
|
||||
-- sounds
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
shoot_attack = "people_plundererflask2",
|
||||
random = "people_plundererflask",
|
||||
damage = "people_plundererflask3",
|
||||
distance = 15,
|
||||
},
|
||||
-- speed and jump
|
||||
walk_velocity = 2,
|
||||
run_velocity = 3,
|
||||
walk_chance = 10,
|
||||
jump = true,
|
||||
drops = {
|
||||
{name = "people:forge", chance = 7, min = 1, max = 1},
|
||||
{name = "people:feeder", chance = 7, min = 1, max = 1},
|
||||
{name = "people:mineshaft", chance = 7, min = 1, max = 1},
|
||||
{name = "people:villagerbed", chance = 7, min = 1, max = 1},
|
||||
{name = "people:weaponstand", chance = 7, min = 1, max = 1},
|
||||
{name = "people:firstaidnode", chance = 7, min = 1, max = 1},
|
||||
{name = "people:emblemoftriumph", chance = 7, min = 1, max = 1},
|
||||
},
|
||||
-- damaged by
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
fall_damage = 0,
|
||||
view_range = 15,
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 70, speed_run = 100,
|
||||
stand_speed = 50,
|
||||
stand_start = 0, stand_end = 100,
|
||||
walk_start = 100, walk_end = 200,
|
||||
run_start = 100, run_end = 200,
|
||||
shoot_start = 200, shoot_end = 300,
|
||||
speed_shoot = 55,
|
||||
},
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:plundererflask",
|
||||
nodes = {"default:cobble", "default:mossycobble", "default:sandstonebrick"},
|
||||
neighbors = {"people:bootynode"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
active_object_count = 2,
|
||||
chance = 10, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:plundererflask", "Plunderer with Flask", "aplundererflask.png")
|
||||
|
||||
mobs:register_arrow("people:flask", {
|
||||
visual = "sprite",
|
||||
visual_size = {x=.5, y=.5},
|
||||
textures = {"flask.png"},
|
||||
velocity = 12,
|
||||
drop = true,
|
||||
|
||||
hit_player = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=13},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=13},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
end,
|
||||
})
|
|
@ -0,0 +1,81 @@
|
|||
|
||||
mobs:register_mob("people:plundererstick", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
step_height = 2,
|
||||
fear_height = 4,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 3,
|
||||
damage = 7,
|
||||
hp_min = 25,
|
||||
hp_max = 65,
|
||||
armor = 100,
|
||||
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.95, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "Plundererstick.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"textureplundererstick.png"},
|
||||
},
|
||||
sounds = {
|
||||
attack = "people_plundererstick3",
|
||||
random = "people_plunderersick",
|
||||
damage = "people_plundererstick2",
|
||||
distance = 15,
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 2,
|
||||
run_velocity = 4,
|
||||
walk_chance = 10,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
drops = {
|
||||
{name = "people:forge", chance = 7, min = 1, max = 1},
|
||||
{name = "people:feeder", chance = 7, min = 1, max = 1},
|
||||
{name = "people:mineshaft", chance = 7, min = 1, max = 1},
|
||||
{name = "people:villagerbed", chance = 7, min = 1, max = 1},
|
||||
{name = "people:weaponstand", chance = 7, min = 1, max = 1},
|
||||
{name = "people:firstaidnode", chance = 7, min = 1, max = 1},
|
||||
{name = "people:emblemoftriumph", chance = 7, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 0,
|
||||
animation = {
|
||||
speed_normal = 100,
|
||||
stand_speed = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
-- 50-70 is slide/water idle
|
||||
},
|
||||
view_range = 15,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed or tame
|
||||
if mobs:feed_tame(self, clicker, 4, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:plundererstick",
|
||||
nodes = {"default:cobble", "default:mossycobble", "default:sandstonebrick"},
|
||||
neighbors = {"people:bootynode"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
active_object_count = 2,
|
||||
chance = 10, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:plundererstick", ("Plunderer with a Stick"), "aplundererstick.png")
|
|
@ -0,0 +1,226 @@
|
|||
|
||||
-- Load support for intllib.
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S = minetest.get_translator and minetest.get_translator("people") or
|
||||
dofile(MP .. "/intllib.lua")
|
||||
|
||||
-- 0.4.17 or 5.0 check
|
||||
local y_off = 20
|
||||
if minetest.features.object_independent_selectionbox then
|
||||
y_off = 10
|
||||
end
|
||||
|
||||
-- horse shoes (speed, jump, break, overlay texture)
|
||||
local shoes = {
|
||||
["people:horseshoe_steel"] = {7, 4, 2, "people_horseshoe_steelo.png"},
|
||||
["people:horseshoe_bronze"] = {7, 4, 4, "people_horseshoe_bronzeo.png"},
|
||||
["people:horseshoe_mese"] = {9, 5, 8, "people_horseshoe_meseo.png"},
|
||||
["people:horseshoe_diamond"] = {10, 6, 6, "people_horseshoe_diamondo.png"}
|
||||
}
|
||||
|
||||
-- rideable horse
|
||||
mobs:register_mob("people:rideelephant", {
|
||||
type = "animal",
|
||||
visual = "mesh",
|
||||
visual_size = {x = 1, y = 1},
|
||||
mesh = "Rideelephant.b3d",
|
||||
collisionbox = {-0.5, -0.01, -0.5, 0.5, 2, 0.5},
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
run_speed = 100,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_speed = 50,
|
||||
walk_start = 101,
|
||||
walk_end = 200,
|
||||
run_start = 101,
|
||||
run_end = 200,
|
||||
},
|
||||
textures = {
|
||||
{"texturerideelephant.png"},
|
||||
|
||||
},
|
||||
fear_height = 3,
|
||||
runaway = true,
|
||||
fly = false,
|
||||
walk_chance = 60,
|
||||
walk_velocity = 1.5,
|
||||
view_range = 10,
|
||||
follow = {
|
||||
"farming:wheat", "default:apple", "farming:oat",
|
||||
"farming:barley", "farming:corn"},
|
||||
passive = true,
|
||||
hp_min = 100,
|
||||
hp_max = 400,
|
||||
armor = 100,
|
||||
lava_damage = 5,
|
||||
fall_damage = 5,
|
||||
water_damage = 0,
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_elephant2",
|
||||
damage = "people_elephant",
|
||||
death = "people_elephant3",
|
||||
distance = 15,
|
||||
},
|
||||
drops = {
|
||||
{name = "mobs:leather", chance = 1, min = 0, max = 2}
|
||||
},
|
||||
|
||||
do_custom = function(self, dtime)
|
||||
|
||||
-- set needed values if not already present
|
||||
if not self.v2 then
|
||||
self.v2 = 0
|
||||
self.max_speed_forward = 5
|
||||
self.max_speed_reverse = 2
|
||||
self.accel = 6
|
||||
self.terrain_type = 3
|
||||
self.driver_attach_at = {x = 0, y = 23, z = -8}
|
||||
self.driver_eye_offset = {x = 0, y = 23, z = -0}
|
||||
end
|
||||
|
||||
-- if driver present allow control of horse
|
||||
if self.driver then
|
||||
|
||||
mobs.drive(self, "walk", "stand", false, dtime)
|
||||
|
||||
return false -- skip rest of mob functions
|
||||
end
|
||||
|
||||
return true
|
||||
end,
|
||||
|
||||
on_die = function(self, pos)
|
||||
|
||||
-- drop saddle when horse is killed while riding
|
||||
-- also detach from horse properly
|
||||
if self.driver then
|
||||
|
||||
minetest.add_item(pos, "mobs:saddle")
|
||||
|
||||
mobs.detach(self.driver, {x = 1, y = 0, z = 1})
|
||||
|
||||
self.saddle = nil
|
||||
end
|
||||
|
||||
-- drop any horseshoes added
|
||||
if self.shoed then
|
||||
minetest.add_item(pos, self.shoed)
|
||||
end
|
||||
|
||||
end,
|
||||
|
||||
do_punch = function(self, hitter)
|
||||
|
||||
-- don't cut the branch you're... ah, that's not about that
|
||||
if hitter ~= self.driver then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- make sure player is clicking
|
||||
if not clicker or not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
|
||||
-- feed, tame or heal horse
|
||||
if mobs:feed_tame(self, clicker, 10, true, true) then
|
||||
return
|
||||
end
|
||||
|
||||
-- applying protection rune
|
||||
if mobs:protect(self, clicker) then
|
||||
return
|
||||
end
|
||||
|
||||
local player_name = clicker:get_player_name()
|
||||
|
||||
-- make sure tamed horse is being clicked by owner only
|
||||
if self.tamed and self.owner == player_name then
|
||||
|
||||
local inv = clicker:get_inventory()
|
||||
local tool = clicker:get_wielded_item()
|
||||
local item = tool:get_name()
|
||||
|
||||
-- detatch player already riding horse
|
||||
if self.driver and clicker == self.driver then
|
||||
|
||||
mobs.detach(clicker, {x = 1, y = 0, z = 1})
|
||||
|
||||
-- add saddle back to inventory
|
||||
if inv:room_for_item("main", "mobs:saddle") then
|
||||
inv:add_item("main", "mobs:saddle")
|
||||
else
|
||||
minetest.add_item(clicker:get_pos(), "mobs:saddle")
|
||||
end
|
||||
|
||||
self.saddle = nil
|
||||
|
||||
-- attach player to horse
|
||||
elseif (not self.driver and not self.child
|
||||
and clicker:get_wielded_item():get_name() == "mobs:saddle")
|
||||
or self.saddle then
|
||||
|
||||
self.object:set_properties({stepheight = 1.1})
|
||||
mobs.attach(self, clicker)
|
||||
|
||||
-- take saddle from inventory
|
||||
if not self.saddle then
|
||||
inv:remove_item("main", "mobs:saddle")
|
||||
end
|
||||
|
||||
self.saddle = true
|
||||
end
|
||||
|
||||
-- apply horseshoes
|
||||
if item:find("people:horseshoe") then
|
||||
|
||||
-- drop any existing shoes
|
||||
if self.shoed then
|
||||
minetest.add_item(self.object:get_pos(), self.shoed)
|
||||
end
|
||||
|
||||
local speed = shoes[item][1]
|
||||
local jump = shoes[item][2]
|
||||
local reverse = shoes[item][3]
|
||||
local overlay = shoes[item][4]
|
||||
|
||||
self.max_speed_forward = speed
|
||||
self.jump_height = jump
|
||||
self.max_speed_reverse = reverse
|
||||
self.accel = speed
|
||||
self.shoed = item
|
||||
|
||||
-- apply horseshoe overlay to current horse texture
|
||||
if overlay then
|
||||
self.texture_mods = "^" .. overlay
|
||||
self.object:set_texture_mod(self.texture_mods)
|
||||
end
|
||||
|
||||
-- show horse speed and jump stats with shoes fitted
|
||||
minetest.chat_send_player(player_name,
|
||||
S("Horse shoes fitted -")
|
||||
.. S(" speed: ") .. speed
|
||||
.. S(" , jump height: ") .. jump
|
||||
.. S(" , stop speed: ") .. reverse)
|
||||
|
||||
tool:take_item()
|
||||
|
||||
clicker:set_wielded_item(tool)
|
||||
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- used to capture horse with magic lasso
|
||||
mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("people:rideelephant", S("Ridable Elephant"), "arideelephant.png")
|
||||
|
||||
|
|
@ -0,0 +1,227 @@
|
|||
|
||||
-- Load support for intllib.
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S = minetest.get_translator and minetest.get_translator("people") or
|
||||
dofile(MP .. "/intllib.lua")
|
||||
|
||||
-- 0.4.17 or 5.0 check
|
||||
local y_off = 20
|
||||
if minetest.features.object_independent_selectionbox then
|
||||
y_off = 10
|
||||
end
|
||||
|
||||
-- horse shoes (speed, jump, break, overlay texture)
|
||||
local shoes = {
|
||||
["people:horseshoe_steel"] = {7, 4, 2, "people_horseshoe_steelo.png"},
|
||||
["people:horseshoe_bronze"] = {7, 4, 4, "people_horseshoe_bronzeo.png"},
|
||||
["people:horseshoe_mese"] = {9, 5, 8, "people_horseshoe_meseo.png"},
|
||||
["people:horseshoe_diamond"] = {10, 6, 6, "people_horseshoe_diamondo.png"}
|
||||
}
|
||||
|
||||
-- rideable horse
|
||||
mobs:register_mob("people:ridehorse", {
|
||||
type = "animal",
|
||||
visual = "mesh",
|
||||
visual_size = {x = 1, y = 1},
|
||||
mesh = "Ridehorse.b3d",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.25, 0.4},
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
run_speed = 100,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 75,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
run_start = 200,
|
||||
run_end = 300,
|
||||
},
|
||||
textures = {
|
||||
{"textureridehorse.png"},
|
||||
|
||||
},
|
||||
fear_height = 3,
|
||||
runaway = true,
|
||||
fly = false,
|
||||
walk_chance = 60,
|
||||
walk_velocity = 1.5,
|
||||
view_range = 10,
|
||||
follow = {
|
||||
"farming:wheat", "default:apple", "farming:oat",
|
||||
"farming:barley", "farming:corn"},
|
||||
passive = true,
|
||||
hp_min = 50,
|
||||
hp_max = 120,
|
||||
armor = 100,
|
||||
lava_damage = 5,
|
||||
fall_damage = 5,
|
||||
water_damage = 1,
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_horse2",
|
||||
damage = "people_horse3",
|
||||
death = "people_horse",
|
||||
distance = 15,
|
||||
},
|
||||
drops = {
|
||||
{name = "mobs:leather", chance = 1, min = 0, max = 2}
|
||||
},
|
||||
|
||||
do_custom = function(self, dtime)
|
||||
|
||||
-- set needed values if not already present
|
||||
if not self.v2 then
|
||||
self.v2 = 0
|
||||
self.max_speed_forward = 6
|
||||
self.max_speed_reverse = 2
|
||||
self.accel = 6
|
||||
self.terrain_type = 3
|
||||
self.driver_attach_at = {x = 0, y = 14.2, z = -3}
|
||||
self.driver_eye_offset = {x = 0, y = 14.2, z = 0}
|
||||
end
|
||||
|
||||
-- if driver present allow control of horse
|
||||
if self.driver then
|
||||
|
||||
mobs.drive(self, "walk", "stand", false, dtime)
|
||||
|
||||
return false -- skip rest of mob functions
|
||||
end
|
||||
|
||||
return true
|
||||
end,
|
||||
|
||||
on_die = function(self, pos)
|
||||
|
||||
-- drop saddle when horse is killed while riding
|
||||
-- also detach from horse properly
|
||||
if self.driver then
|
||||
|
||||
minetest.add_item(pos, "mobs:saddle")
|
||||
|
||||
mobs.detach(self.driver, {x = 1, y = 0, z = 1})
|
||||
|
||||
self.saddle = nil
|
||||
end
|
||||
|
||||
-- drop any horseshoes added
|
||||
if self.shoed then
|
||||
minetest.add_item(pos, self.shoed)
|
||||
end
|
||||
|
||||
end,
|
||||
|
||||
do_punch = function(self, hitter)
|
||||
|
||||
-- don't cut the branch you're... ah, that's not about that
|
||||
if hitter ~= self.driver then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- make sure player is clicking
|
||||
if not clicker or not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
|
||||
-- feed, tame or heal horse
|
||||
if mobs:feed_tame(self, clicker, 10, true, true) then
|
||||
return
|
||||
end
|
||||
|
||||
-- applying protection rune
|
||||
if mobs:protect(self, clicker) then
|
||||
return
|
||||
end
|
||||
|
||||
local player_name = clicker:get_player_name()
|
||||
|
||||
-- make sure tamed horse is being clicked by owner only
|
||||
if self.tamed and self.owner == player_name then
|
||||
|
||||
local inv = clicker:get_inventory()
|
||||
local tool = clicker:get_wielded_item()
|
||||
local item = tool:get_name()
|
||||
|
||||
-- detatch player already riding horse
|
||||
if self.driver and clicker == self.driver then
|
||||
|
||||
mobs.detach(clicker, {x = 1, y = 0, z = 1})
|
||||
|
||||
-- add saddle back to inventory
|
||||
if inv:room_for_item("main", "mobs:saddle") then
|
||||
inv:add_item("main", "mobs:saddle")
|
||||
else
|
||||
minetest.add_item(clicker:get_pos(), "mobs:saddle")
|
||||
end
|
||||
|
||||
self.saddle = nil
|
||||
|
||||
-- attach player to horse
|
||||
elseif (not self.driver and not self.child
|
||||
and clicker:get_wielded_item():get_name() == "mobs:saddle")
|
||||
or self.saddle then
|
||||
|
||||
self.object:set_properties({stepheight = 1.1})
|
||||
mobs.attach(self, clicker)
|
||||
|
||||
-- take saddle from inventory
|
||||
if not self.saddle then
|
||||
inv:remove_item("main", "mobs:saddle")
|
||||
end
|
||||
|
||||
self.saddle = true
|
||||
end
|
||||
|
||||
-- apply horseshoes
|
||||
if item:find("people:horseshoe") then
|
||||
|
||||
-- drop any existing shoes
|
||||
if self.shoed then
|
||||
minetest.add_item(self.object:get_pos(), self.shoed)
|
||||
end
|
||||
|
||||
local speed = shoes[item][1]
|
||||
local jump = shoes[item][2]
|
||||
local reverse = shoes[item][3]
|
||||
local overlay = shoes[item][4]
|
||||
|
||||
self.max_speed_forward = speed
|
||||
self.jump_height = jump
|
||||
self.max_speed_reverse = reverse
|
||||
self.accel = speed
|
||||
self.shoed = item
|
||||
|
||||
-- apply horseshoe overlay to current horse texture
|
||||
if overlay then
|
||||
self.texture_mods = "^" .. overlay
|
||||
self.object:set_texture_mod(self.texture_mods)
|
||||
end
|
||||
|
||||
-- show horse speed and jump stats with shoes fitted
|
||||
minetest.chat_send_player(player_name,
|
||||
S("Horse shoes fitted -")
|
||||
.. S(" speed: ") .. speed
|
||||
.. S(" , jump height: ") .. jump
|
||||
.. S(" , stop speed: ") .. reverse)
|
||||
|
||||
tool:take_item()
|
||||
|
||||
clicker:set_wielded_item(tool)
|
||||
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- used to capture horse with magic lasso
|
||||
mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("people:ridehorse", S("Ridable Horse"), "aridehorse.png")
|
||||
|
|
@ -0,0 +1,222 @@
|
|||
|
||||
-- Load support for intllib.
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S = minetest.get_translator and minetest.get_translator("people") or
|
||||
dofile(MP .. "/intllib.lua")
|
||||
|
||||
-- 0.4.17 or 5.0 check
|
||||
local y_off = 20
|
||||
if minetest.features.object_independent_selectionbox then
|
||||
y_off = 10
|
||||
end
|
||||
|
||||
-- horse shoes (speed, jump, break, overlay texture)
|
||||
local shoes = {
|
||||
["people:horseshoe_steel"] = {7, 4, 2, "people_horseshoe_steelo.png"},
|
||||
["people:horseshoe_bronze"] = {7, 4, 4, "people_horseshoe_bronzeo.png"},
|
||||
["people:horseshoe_mese"] = {9, 5, 8, "people_horseshoe_meseo.png"},
|
||||
["people:horseshoe_diamond"] = {10, 6, 6, "people_horseshoe_diamondo.png"}
|
||||
}
|
||||
|
||||
-- rideable horse
|
||||
mobs:register_mob("people:rideostrich", {
|
||||
type = "animal",
|
||||
visual = "mesh",
|
||||
visual_size = {x = 1, y = 1},
|
||||
mesh = "Rideostrich.b3d",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.25, 0.4},
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
run_speed = 100,
|
||||
stand_start = 0,
|
||||
stand2_end = 200,
|
||||
stand2_start = 300,
|
||||
stand_end = 100,
|
||||
walk_speed = 75,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
run_start = 200,
|
||||
run_end = 300,
|
||||
},
|
||||
textures = {
|
||||
{"texturerideostrich.png"},
|
||||
|
||||
},
|
||||
fear_height = 3,
|
||||
runaway = true,
|
||||
fly = false,
|
||||
walk_chance = 60,
|
||||
walk_velocity = 3,
|
||||
view_range = 10,
|
||||
follow = {
|
||||
"farming:wheat", "default:apple", "farming:oat",
|
||||
"farming:barley", "farming:corn"},
|
||||
passive = true,
|
||||
hp_min = 25,
|
||||
hp_max = 55,
|
||||
armor = 100,
|
||||
lava_damage = 5,
|
||||
fall_damage = 5,
|
||||
water_damage = 1,
|
||||
makes_footstep_sound = true,
|
||||
drops = {
|
||||
{name = "mobs:leather", chance = 1, min = 0, max = 2}
|
||||
},
|
||||
|
||||
do_custom = function(self, dtime)
|
||||
|
||||
-- set needed values if not already present
|
||||
if not self.v2 then
|
||||
self.v2 = 0
|
||||
self.max_speed_forward = 9
|
||||
self.max_speed_reverse = 4
|
||||
self.accel = 6
|
||||
self.terrain_type = 3
|
||||
self.driver_attach_at = {x = 0, y = 11, z = -1.6}
|
||||
self.driver_eye_offset = {x = 0, y = 11, z = 0}
|
||||
end
|
||||
|
||||
-- if driver present allow control of horse
|
||||
if self.driver then
|
||||
|
||||
mobs.drive(self, "walk", "stand", false, dtime)
|
||||
|
||||
return false -- skip rest of mob functions
|
||||
end
|
||||
|
||||
return true
|
||||
end,
|
||||
|
||||
on_die = function(self, pos)
|
||||
|
||||
-- drop saddle when horse is killed while riding
|
||||
-- also detach from horse properly
|
||||
if self.driver then
|
||||
|
||||
minetest.add_item(pos, "mobs:saddle")
|
||||
|
||||
mobs.detach(self.driver, {x = 1, y = 0, z = 1})
|
||||
|
||||
self.saddle = nil
|
||||
end
|
||||
|
||||
-- drop any horseshoes added
|
||||
if self.shoed then
|
||||
minetest.add_item(pos, self.shoed)
|
||||
end
|
||||
|
||||
end,
|
||||
|
||||
do_punch = function(self, hitter)
|
||||
|
||||
-- don't cut the branch you're... ah, that's not about that
|
||||
if hitter ~= self.driver then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- make sure player is clicking
|
||||
if not clicker or not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
|
||||
-- feed, tame or heal horse
|
||||
if mobs:feed_tame(self, clicker, 10, true, true) then
|
||||
return
|
||||
end
|
||||
|
||||
-- applying protection rune
|
||||
if mobs:protect(self, clicker) then
|
||||
return
|
||||
end
|
||||
|
||||
local player_name = clicker:get_player_name()
|
||||
|
||||
-- make sure tamed horse is being clicked by owner only
|
||||
if self.tamed and self.owner == player_name then
|
||||
|
||||
local inv = clicker:get_inventory()
|
||||
local tool = clicker:get_wielded_item()
|
||||
local item = tool:get_name()
|
||||
|
||||
-- detatch player already riding horse
|
||||
if self.driver and clicker == self.driver then
|
||||
|
||||
mobs.detach(clicker, {x = 1, y = 0, z = 1})
|
||||
|
||||
-- add saddle back to inventory
|
||||
if inv:room_for_item("main", "mobs:saddle") then
|
||||
inv:add_item("main", "mobs:saddle")
|
||||
else
|
||||
minetest.add_item(clicker:get_pos(), "mobs:saddle")
|
||||
end
|
||||
|
||||
self.saddle = nil
|
||||
|
||||
-- attach player to horse
|
||||
elseif (not self.driver and not self.child
|
||||
and clicker:get_wielded_item():get_name() == "mobs:saddle")
|
||||
or self.saddle then
|
||||
|
||||
self.object:set_properties({stepheight = 1.1})
|
||||
mobs.attach(self, clicker)
|
||||
|
||||
-- take saddle from inventory
|
||||
if not self.saddle then
|
||||
inv:remove_item("main", "mobs:saddle")
|
||||
end
|
||||
|
||||
self.saddle = true
|
||||
end
|
||||
|
||||
-- apply horseshoes
|
||||
if item:find("people:horseshoe") then
|
||||
|
||||
-- drop any existing shoes
|
||||
if self.shoed then
|
||||
minetest.add_item(self.object:get_pos(), self.shoed)
|
||||
end
|
||||
|
||||
local speed = shoes[item][1]
|
||||
local jump = shoes[item][2]
|
||||
local reverse = shoes[item][3]
|
||||
local overlay = shoes[item][4]
|
||||
|
||||
self.max_speed_forward = speed
|
||||
self.jump_height = jump
|
||||
self.max_speed_reverse = reverse
|
||||
self.accel = speed
|
||||
self.shoed = item
|
||||
|
||||
-- apply horseshoe overlay to current horse texture
|
||||
if overlay then
|
||||
self.texture_mods = "^" .. overlay
|
||||
self.object:set_texture_mod(self.texture_mods)
|
||||
end
|
||||
|
||||
-- show horse speed and jump stats with shoes fitted
|
||||
minetest.chat_send_player(player_name,
|
||||
S("Horse shoes fitted -")
|
||||
.. S(" speed: ") .. speed
|
||||
.. S(" , jump height: ") .. jump
|
||||
.. S(" , stop speed: ") .. reverse)
|
||||
|
||||
tool:take_item()
|
||||
|
||||
clicker:set_wielded_item(tool)
|
||||
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- used to capture horse with magic lasso
|
||||
mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("people:rideostrich", S("Ridable Ostrich"), "arideostrich.png")
|
||||
|
||||
|
|
@ -0,0 +1,225 @@
|
|||
|
||||
-- Load support for intllib.
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S = minetest.get_translator and minetest.get_translator("people") or
|
||||
dofile(MP .. "/intllib.lua")
|
||||
|
||||
-- 0.4.17 or 5.0 check
|
||||
local y_off = 20
|
||||
if minetest.features.object_independent_selectionbox then
|
||||
y_off = 10
|
||||
end
|
||||
|
||||
-- horse shoes (speed, jump, break, overlay texture)
|
||||
local shoes = {
|
||||
["people:horseshoe_steel"] = {7, 4, 2, "people_horseshoe_steelo.png"},
|
||||
["people:horseshoe_bronze"] = {7, 4, 4, "people_horseshoe_bronzeo.png"},
|
||||
["people:horseshoe_mese"] = {9, 5, 8, "people_horseshoe_meseo.png"},
|
||||
["people:horseshoe_diamond"] = {10, 6, 6, "people_horseshoe_diamondo.png"}
|
||||
}
|
||||
|
||||
-- rideable horse
|
||||
mobs:register_mob("people:rideox", {
|
||||
type = "animal",
|
||||
visual = "mesh",
|
||||
visual_size = {x = 1, y = 1},
|
||||
mesh = "Rideox.b3d",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.25, 0.4},
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
run_speed = 100,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_speed = 75,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
run_start = 100,
|
||||
run_end = 200,
|
||||
},
|
||||
textures = {
|
||||
{"texturerideox.png"},
|
||||
|
||||
},
|
||||
fear_height = 3,
|
||||
runaway = true,
|
||||
fly = false,
|
||||
walk_chance = 60,
|
||||
walk_velocity = 1.5,
|
||||
view_range = 10,
|
||||
follow = {
|
||||
"farming:wheat", "default:apple", "farming:oat",
|
||||
"farming:barley", "farming:corn", "ethereal:banana_single", "farming:corn_cob", "farming:cabbage"},
|
||||
passive = true,
|
||||
hp_min = 100,
|
||||
hp_max = 250,
|
||||
armor = 100,
|
||||
lava_damage = 5,
|
||||
fall_damage = 5,
|
||||
water_damage = 1,
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_ox3",
|
||||
damage = "people_ox",
|
||||
death = "people_ox2",
|
||||
distance = 15,
|
||||
},
|
||||
drops = {
|
||||
{name = "mobs:leather", chance = 1, min = 0, max = 2}
|
||||
},
|
||||
|
||||
do_custom = function(self, dtime)
|
||||
|
||||
-- set needed values if not already present
|
||||
if not self.v2 then
|
||||
self.v2 = 0
|
||||
self.max_speed_forward = 4
|
||||
self.max_speed_reverse = 1
|
||||
self.accel = 6
|
||||
self.terrain_type = 3
|
||||
self.driver_attach_at = {x = 0, y = 9, z = -13}
|
||||
self.driver_eye_offset = {x = 0, y = 9, z = -10}
|
||||
end
|
||||
|
||||
-- if driver present allow control of horse
|
||||
if self.driver then
|
||||
|
||||
mobs.drive(self, "walk", "stand", false, dtime)
|
||||
|
||||
return false -- skip rest of mob functions
|
||||
end
|
||||
|
||||
return true
|
||||
end,
|
||||
|
||||
on_die = function(self, pos)
|
||||
|
||||
-- drop saddle when horse is killed while riding
|
||||
-- also detach from horse properly
|
||||
if self.driver then
|
||||
|
||||
minetest.add_item(pos, "mobs:saddle")
|
||||
|
||||
mobs.detach(self.driver, {x = 1, y = 0, z = 1})
|
||||
|
||||
self.saddle = nil
|
||||
end
|
||||
|
||||
-- drop any horseshoes added
|
||||
if self.shoed then
|
||||
minetest.add_item(pos, self.shoed)
|
||||
end
|
||||
|
||||
end,
|
||||
|
||||
do_punch = function(self, hitter)
|
||||
|
||||
-- don't cut the branch you're... ah, that's not about that
|
||||
if hitter ~= self.driver then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- make sure player is clicking
|
||||
if not clicker or not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
|
||||
-- feed, tame or heal horse
|
||||
if mobs:feed_tame(self, clicker, 10, true, true) then
|
||||
return
|
||||
end
|
||||
|
||||
-- applying protection rune
|
||||
if mobs:protect(self, clicker) then
|
||||
return
|
||||
end
|
||||
|
||||
local player_name = clicker:get_player_name()
|
||||
|
||||
-- make sure tamed horse is being clicked by owner only
|
||||
if self.tamed and self.owner == player_name then
|
||||
|
||||
local inv = clicker:get_inventory()
|
||||
local tool = clicker:get_wielded_item()
|
||||
local item = tool:get_name()
|
||||
|
||||
-- detatch player already riding horse
|
||||
if self.driver and clicker == self.driver then
|
||||
|
||||
mobs.detach(clicker, {x = 1, y = 0, z = 1})
|
||||
|
||||
-- add saddle back to inventory
|
||||
if inv:room_for_item("main", "mobs:saddle") then
|
||||
inv:add_item("main", "mobs:saddle")
|
||||
else
|
||||
minetest.add_item(clicker:get_pos(), "mobs:saddle")
|
||||
end
|
||||
|
||||
self.saddle = nil
|
||||
|
||||
-- attach player to horse
|
||||
elseif (not self.driver and not self.child
|
||||
and clicker:get_wielded_item():get_name() == "mobs:saddle")
|
||||
or self.saddle then
|
||||
|
||||
self.object:set_properties({stepheight = 1.1})
|
||||
mobs.attach(self, clicker)
|
||||
|
||||
-- take saddle from inventory
|
||||
if not self.saddle then
|
||||
inv:remove_item("main", "mobs:saddle")
|
||||
end
|
||||
|
||||
self.saddle = true
|
||||
end
|
||||
|
||||
-- apply horseshoes
|
||||
if item:find("people:horseshoe") then
|
||||
|
||||
-- drop any existing shoes
|
||||
if self.shoed then
|
||||
minetest.add_item(self.object:get_pos(), self.shoed)
|
||||
end
|
||||
|
||||
local speed = shoes[item][1]
|
||||
local jump = shoes[item][2]
|
||||
local reverse = shoes[item][3]
|
||||
local overlay = shoes[item][4]
|
||||
|
||||
self.max_speed_forward = speed
|
||||
self.jump_height = jump
|
||||
self.max_speed_reverse = reverse
|
||||
self.accel = speed
|
||||
self.shoed = item
|
||||
|
||||
-- apply horseshoe overlay to current horse texture
|
||||
if overlay then
|
||||
self.texture_mods = "^" .. overlay
|
||||
self.object:set_texture_mod(self.texture_mods)
|
||||
end
|
||||
|
||||
-- show horse speed and jump stats with shoes fitted
|
||||
minetest.chat_send_player(player_name,
|
||||
S("Horse shoes fitted -")
|
||||
.. S(" speed: ") .. speed
|
||||
.. S(" , jump height: ") .. jump
|
||||
.. S(" , stop speed: ") .. reverse)
|
||||
|
||||
tool:take_item()
|
||||
|
||||
clicker:set_wielded_item(tool)
|
||||
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- used to capture horse with magic lasso
|
||||
mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("people:rideox", S("Ridable Ox"), "arideox.png")
|
||||
|
|
@ -0,0 +1,221 @@
|
|||
|
||||
-- Load support for intllib.
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S = minetest.get_translator and minetest.get_translator("people") or
|
||||
dofile(MP .. "/intllib.lua")
|
||||
|
||||
-- 0.4.17 or 5.0 check
|
||||
local y_off = 20
|
||||
if minetest.features.object_independent_selectionbox then
|
||||
y_off = 10
|
||||
end
|
||||
|
||||
-- horse shoes (speed, jump, break, overlay texture)
|
||||
local shoes = {
|
||||
["people:horseshoe_steel"] = {7, 4, 2, "people_horseshoe_steelo.png"},
|
||||
["people:horseshoe_bronze"] = {7, 4, 4, "people_horseshoe_bronzeo.png"},
|
||||
["people:horseshoe_mese"] = {9, 5, 8, "people_horseshoe_meseo.png"},
|
||||
["people:horseshoe_diamond"] = {10, 6, 6, "people_horseshoe_diamondo.png"}
|
||||
}
|
||||
|
||||
-- rideable horse
|
||||
mobs:register_mob("people:ridepig", {
|
||||
type = "animal",
|
||||
visual = "mesh",
|
||||
visual_size = {x = 1, y = 1},
|
||||
mesh = "Ridepig.b3d",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.25, 0.4},
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
run_speed = 100,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_speed = 75,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
run_start = 200,
|
||||
run_end = 300,
|
||||
},
|
||||
textures = {
|
||||
{"textureridepig.png"},
|
||||
|
||||
},
|
||||
fear_height = 3,
|
||||
runaway = true,
|
||||
fly = false,
|
||||
walk_chance = 60,
|
||||
view_range = 10,
|
||||
follow = {"default:apple", "farming:potato", "ethereal:banana_bread", "farming:melon_slice", "farming:carrot", "farming:seed_rice", "farming:corn"},
|
||||
passive = true,
|
||||
hp_min = 60,
|
||||
hp_max = 100,
|
||||
armor = 100,
|
||||
lava_damage = 5,
|
||||
fall_damage = 5,
|
||||
water_damage = 1,
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_pig",
|
||||
damage = "people_pig2",
|
||||
death = "people_pig3",
|
||||
distance = 15,
|
||||
},
|
||||
drops = {
|
||||
{name = "mobs:leather", chance = 1, min = 0, max = 2}
|
||||
},
|
||||
|
||||
do_custom = function(self, dtime)
|
||||
|
||||
-- set needed values if not already present
|
||||
if not self.v2 then
|
||||
self.v2 = 0
|
||||
self.max_speed_forward = 4
|
||||
self.max_speed_reverse = 2
|
||||
self.accel = 6
|
||||
self.terrain_type = 3
|
||||
self.driver_attach_at = {x = 0, y = 11, z = -2}
|
||||
self.driver_eye_offset = {x = 0, y = 11, z = 0}
|
||||
end
|
||||
|
||||
-- if driver present allow control of horse
|
||||
if self.driver then
|
||||
|
||||
mobs.drive(self, "walk", "stand", false, dtime)
|
||||
|
||||
return false -- skip rest of mob functions
|
||||
end
|
||||
|
||||
return true
|
||||
end,
|
||||
|
||||
on_die = function(self, pos)
|
||||
|
||||
-- drop saddle when horse is killed while riding
|
||||
-- also detach from horse properly
|
||||
if self.driver then
|
||||
|
||||
minetest.add_item(pos, "mobs:saddle")
|
||||
|
||||
mobs.detach(self.driver, {x = 1, y = 0, z = 1})
|
||||
|
||||
self.saddle = nil
|
||||
end
|
||||
|
||||
-- drop any horseshoes added
|
||||
if self.shoed then
|
||||
minetest.add_item(pos, self.shoed)
|
||||
end
|
||||
|
||||
end,
|
||||
|
||||
do_punch = function(self, hitter)
|
||||
|
||||
-- don't cut the branch you're... ah, that's not about that
|
||||
if hitter ~= self.driver then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- make sure player is clicking
|
||||
if not clicker or not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
|
||||
-- feed, tame or heal horse
|
||||
if mobs:feed_tame(self, clicker, 10, true, true) then
|
||||
return
|
||||
end
|
||||
|
||||
-- applying protection rune
|
||||
if mobs:protect(self, clicker) then
|
||||
return
|
||||
end
|
||||
|
||||
local player_name = clicker:get_player_name()
|
||||
|
||||
-- make sure tamed horse is being clicked by owner only
|
||||
if self.tamed and self.owner == player_name then
|
||||
|
||||
local inv = clicker:get_inventory()
|
||||
local tool = clicker:get_wielded_item()
|
||||
local item = tool:get_name()
|
||||
|
||||
-- detatch player already riding horse
|
||||
if self.driver and clicker == self.driver then
|
||||
|
||||
mobs.detach(clicker, {x = 1, y = 0, z = 1})
|
||||
|
||||
-- add saddle back to inventory
|
||||
if inv:room_for_item("main", "mobs:saddle") then
|
||||
inv:add_item("main", "mobs:saddle")
|
||||
else
|
||||
minetest.add_item(clicker:get_pos(), "mobs:saddle")
|
||||
end
|
||||
|
||||
self.saddle = nil
|
||||
|
||||
-- attach player to horse
|
||||
elseif (not self.driver and not self.child
|
||||
and clicker:get_wielded_item():get_name() == "mobs:saddle")
|
||||
or self.saddle then
|
||||
|
||||
self.object:set_properties({stepheight = 1.1})
|
||||
mobs.attach(self, clicker)
|
||||
|
||||
-- take saddle from inventory
|
||||
if not self.saddle then
|
||||
inv:remove_item("main", "mobs:saddle")
|
||||
end
|
||||
|
||||
self.saddle = true
|
||||
end
|
||||
|
||||
-- apply horseshoes
|
||||
if item:find("people:horseshoe") then
|
||||
|
||||
-- drop any existing shoes
|
||||
if self.shoed then
|
||||
minetest.add_item(self.object:get_pos(), self.shoed)
|
||||
end
|
||||
|
||||
local speed = shoes[item][1]
|
||||
local jump = shoes[item][2]
|
||||
local reverse = shoes[item][3]
|
||||
local overlay = shoes[item][4]
|
||||
|
||||
self.max_speed_forward = speed
|
||||
self.jump_height = jump
|
||||
self.max_speed_reverse = reverse
|
||||
self.accel = speed
|
||||
self.shoed = item
|
||||
|
||||
-- apply horseshoe overlay to current horse texture
|
||||
if overlay then
|
||||
self.texture_mods = "^" .. overlay
|
||||
self.object:set_texture_mod(self.texture_mods)
|
||||
end
|
||||
|
||||
-- show horse speed and jump stats with shoes fitted
|
||||
minetest.chat_send_player(player_name,
|
||||
S("Horse shoes fitted -")
|
||||
.. S(" speed: ") .. speed
|
||||
.. S(" , jump height: ") .. jump
|
||||
.. S(" , stop speed: ") .. reverse)
|
||||
|
||||
tool:take_item()
|
||||
|
||||
clicker:set_wielded_item(tool)
|
||||
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- used to capture horse with magic lasso
|
||||
mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("people:ridepig", S("Ridable Pig"), "aridepig.png")
|
|
@ -0,0 +1,218 @@
|
|||
|
||||
-- Load support for intllib.
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S = minetest.get_translator and minetest.get_translator("people") or
|
||||
dofile(MP .. "/intllib.lua")
|
||||
|
||||
-- 0.4.17 or 5.0 check
|
||||
local y_off = 20
|
||||
if minetest.features.object_independent_selectionbox then
|
||||
y_off = 10
|
||||
end
|
||||
|
||||
-- horse shoes (speed, jump, break, overlay texture)
|
||||
local shoes = {
|
||||
["people:horseshoe_steel"] = {7, 4, 2, "people_horseshoe_steelo.png"},
|
||||
["people:horseshoe_bronze"] = {7, 4, 4, "people_horseshoe_bronzeo.png"},
|
||||
["people:horseshoe_mese"] = {9, 5, 8, "people_horseshoe_meseo.png"},
|
||||
["people:horseshoe_diamond"] = {10, 6, 6, "people_horseshoe_diamondo.png"}
|
||||
}
|
||||
|
||||
-- rideable horse
|
||||
mobs:register_mob("people:ridereindeer", {
|
||||
type = "animal",
|
||||
visual = "mesh",
|
||||
visual_size = {x = 1, y = 1},
|
||||
mesh = "Ridereindeer.b3d",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.25, 0.4},
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
run_speed = 100,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 75,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
run_start = 200,
|
||||
run_end = 300,
|
||||
},
|
||||
textures = {
|
||||
{"textureridereindeer.png"},
|
||||
|
||||
},
|
||||
fear_height = 3,
|
||||
runaway = true,
|
||||
fly = false,
|
||||
walk_chance = 50,
|
||||
walk_velocity = 1.5,
|
||||
view_range = 5,
|
||||
follow = {"default:apple", "default:permafrost_with_moss", "ethereal:snowygrass", "ethereal:crystalgrass", "default:dry_shrub ", "default:grass_1", "ethereal:dry_shrub", "farming:seed_wheat", "farming:seed_rye", "default:junglegrass"},
|
||||
passive = true,
|
||||
hp_min = 35,
|
||||
hp_max = 75,
|
||||
armor = 100,
|
||||
lava_damage = 5,
|
||||
fall_damage = 5,
|
||||
water_damage = 0,
|
||||
makes_footstep_sound = true,
|
||||
drops = {
|
||||
{name = "mobs:leather", chance = 1, min = 0, max = 2}
|
||||
},
|
||||
|
||||
do_custom = function(self, dtime)
|
||||
|
||||
-- set needed values if not already present
|
||||
if not self.v2 then
|
||||
self.v2 = 0
|
||||
self.max_speed_forward = 5
|
||||
self.max_speed_reverse = 3
|
||||
self.accel = 6
|
||||
self.terrain_type = 3
|
||||
self.driver_attach_at = {x = 0, y = 11.4, z = -4.5}
|
||||
self.driver_eye_offset = {x = 0, y = 11.4, z = 0}
|
||||
end
|
||||
|
||||
-- if driver present allow control of horse
|
||||
if self.driver then
|
||||
|
||||
mobs.drive(self, "walk", "stand", false, dtime)
|
||||
|
||||
return false -- skip rest of mob functions
|
||||
end
|
||||
|
||||
return true
|
||||
end,
|
||||
|
||||
on_die = function(self, pos)
|
||||
|
||||
-- drop saddle when horse is killed while riding
|
||||
-- also detach from horse properly
|
||||
if self.driver then
|
||||
|
||||
minetest.add_item(pos, "mobs:saddle")
|
||||
|
||||
mobs.detach(self.driver, {x = 1, y = 0, z = 1})
|
||||
|
||||
self.saddle = nil
|
||||
end
|
||||
|
||||
-- drop any horseshoes added
|
||||
if self.shoed then
|
||||
minetest.add_item(pos, self.shoed)
|
||||
end
|
||||
|
||||
end,
|
||||
|
||||
do_punch = function(self, hitter)
|
||||
|
||||
-- don't cut the branch you're... ah, that's not about that
|
||||
if hitter ~= self.driver then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- make sure player is clicking
|
||||
if not clicker or not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
|
||||
-- feed, tame or heal horse
|
||||
if mobs:feed_tame(self, clicker, 10, true, true) then
|
||||
return
|
||||
end
|
||||
|
||||
-- applying protection rune
|
||||
if mobs:protect(self, clicker) then
|
||||
return
|
||||
end
|
||||
|
||||
local player_name = clicker:get_player_name()
|
||||
|
||||
-- make sure tamed horse is being clicked by owner only
|
||||
if self.tamed and self.owner == player_name then
|
||||
|
||||
local inv = clicker:get_inventory()
|
||||
local tool = clicker:get_wielded_item()
|
||||
local item = tool:get_name()
|
||||
|
||||
-- detatch player already riding horse
|
||||
if self.driver and clicker == self.driver then
|
||||
|
||||
mobs.detach(clicker, {x = 1, y = 0, z = 1})
|
||||
|
||||
-- add saddle back to inventory
|
||||
if inv:room_for_item("main", "mobs:saddle") then
|
||||
inv:add_item("main", "mobs:saddle")
|
||||
else
|
||||
minetest.add_item(clicker:get_pos(), "mobs:saddle")
|
||||
end
|
||||
|
||||
self.saddle = nil
|
||||
|
||||
-- attach player to horse
|
||||
elseif (not self.driver and not self.child
|
||||
and clicker:get_wielded_item():get_name() == "mobs:saddle")
|
||||
or self.saddle then
|
||||
|
||||
self.object:set_properties({stepheight = 1.1})
|
||||
mobs.attach(self, clicker)
|
||||
|
||||
-- take saddle from inventory
|
||||
if not self.saddle then
|
||||
inv:remove_item("main", "mobs:saddle")
|
||||
end
|
||||
|
||||
self.saddle = true
|
||||
end
|
||||
|
||||
-- apply horseshoes
|
||||
if item:find("people:horseshoe") then
|
||||
|
||||
-- drop any existing shoes
|
||||
if self.shoed then
|
||||
minetest.add_item(self.object:get_pos(), self.shoed)
|
||||
end
|
||||
|
||||
local speed = shoes[item][1]
|
||||
local jump = shoes[item][2]
|
||||
local reverse = shoes[item][3]
|
||||
local overlay = shoes[item][4]
|
||||
|
||||
self.max_speed_forward = speed
|
||||
self.jump_height = jump
|
||||
self.max_speed_reverse = reverse
|
||||
self.accel = speed
|
||||
self.shoed = item
|
||||
|
||||
-- apply horseshoe overlay to current horse texture
|
||||
if overlay then
|
||||
self.texture_mods = "^" .. overlay
|
||||
self.object:set_texture_mod(self.texture_mods)
|
||||
end
|
||||
|
||||
-- show horse speed and jump stats with shoes fitted
|
||||
minetest.chat_send_player(player_name,
|
||||
S("Horse shoes fitted -")
|
||||
.. S(" speed: ") .. speed
|
||||
.. S(" , jump height: ") .. jump
|
||||
.. S(" , stop speed: ") .. reverse)
|
||||
|
||||
tool:take_item()
|
||||
|
||||
clicker:set_wielded_item(tool)
|
||||
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- used to capture horse with magic lasso
|
||||
mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("people:ridereindeer", S("Ridable Reindeer"), "aridereindeer.png")
|
|
@ -0,0 +1,136 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.samfarmer_drops = {
|
||||
"people:dog", "people:goat", "people:dogfoodsack", "people:ridepig", "people:rideelephant"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:samfarmer", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Medfarmer2.b3d",
|
||||
textures = {
|
||||
{"texturesamfarmer.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_farmerf",
|
||||
damage = "people_female5",
|
||||
death = "people_femaledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:farmergrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"default:coal_lump"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 50,
|
||||
walk_start = 300,
|
||||
walk_end = 400,
|
||||
punch_speed = 100,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "default:gold_ingot" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.samfarmer_drops or mobs.samfarmer_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Farmer dropped you an item for gold!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Farmer stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Farmer will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:samfarmer",
|
||||
nodes = {"default:junglewood"},
|
||||
neighbors = {"people:feeder"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:samfarmer", S("Farmer Jungle"), "asamfarmer.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:samfarmer", "people:samfarmer")
|
|
@ -0,0 +1,146 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
|
||||
mobs.samsmith_drops = {
|
||||
"default:axe_steel", "default:axe_steel", "default:axe_steel",
|
||||
"default:axe_steel", "default:axe_mese", "default:axe_mese",
|
||||
"default:axe_diamond", "default:axe_diamond", "default:pick_bronze", "default:pick_bronze","default:pick_steel", "default:pick_steel","default:pick_mese", "default:pick_mese",
|
||||
"default:pick_diamond", "default:pick_diamond",
|
||||
"default:shovel_bronze", "default:shovel_bronze",
|
||||
"default:shovel_steel", "default:shovel_steel",
|
||||
"default:shovel_mese", "default:shovel_mese",
|
||||
"default:shovel_diamond", "default:shovel_diamond ",
|
||||
"default:sword_bronze", "default:sword_bronze", "default:sword_steel",
|
||||
"default:sword_steel", "default:sword_mese", "default:sword_mese",
|
||||
"default:sword_diamond", "default:sword_diamond"
|
||||
}
|
||||
|
||||
mobs:register_mob("people:samsmith", {
|
||||
type = "npc",
|
||||
passive = true,
|
||||
damage = 5,
|
||||
attack_type = "dogfight",
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
reach = 2,
|
||||
attack_monsters = true,
|
||||
attack_animals = false,
|
||||
attack_npc = false,
|
||||
hp_min = 25,
|
||||
hp_max = 35,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Medsmith2.b3d",
|
||||
textures = {
|
||||
{"texturesamsmith.png"},
|
||||
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
random = "people_smith",
|
||||
damage = "people_male5",
|
||||
death = "people_maledeath",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 2,
|
||||
stepheight = 1,
|
||||
fear_height = 2,
|
||||
jump = true,
|
||||
jump_height = 3,
|
||||
drops = { {name = "people:smithgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 1,
|
||||
lava_damage = 3,
|
||||
light_damage = 0,
|
||||
follow = {"default:diamond"},
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
-- model animation
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
stand2_start = 100,
|
||||
stand2_end = 200,
|
||||
walk_speed = 100,
|
||||
walk_start = 200,
|
||||
walk_end = 300,
|
||||
punch_speed = 100,
|
||||
punch_start = 300,
|
||||
punch_end = 400,
|
||||
},
|
||||
-- right clicking with raw meat will give Igor more health
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
-- right clicking with gold lump drops random item from mobs.npc_drops
|
||||
if item:get_name() == "default:gold_ingot" then
|
||||
|
||||
if not mobs.is_creative(name) then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
pos.y = pos.y + 0.5
|
||||
|
||||
local drops = self.samsmith_drops or mobs.samsmith_drops
|
||||
|
||||
minetest.add_item(pos, {
|
||||
name = drops[math.random(1, #drops)]
|
||||
})
|
||||
|
||||
minetest.chat_send_player(name, S("Blackmith dropped you an item for gold!"))
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- if owner switch between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Blacksmith stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
minetest.chat_send_player(name, S("Blacksmith will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:samsmith",
|
||||
nodes = {"default:junglewood"},
|
||||
neighbors = {"people:forge"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
chance = 1, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
})
|
||||
end
|
||||
-- register spawn egg
|
||||
mobs:register_egg("people:samsmith", S("Blacksmith Jungle"), "asamsmith.png")
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:samsmith", "people:samsmith")
|
|
@ -0,0 +1,133 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
-- Npc by TenPlus1
|
||||
|
||||
|
||||
mobs:register_mob("people:samwarrior", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 8,
|
||||
attack_type = "dogshoot",
|
||||
dogshoot_switch = 1,
|
||||
dogshoot_count_max = 12, -- shoot for 10 seconds
|
||||
dogshoot_count2_max = 3, -- dogfight for 3 seconds
|
||||
shoot_interval = 1.5,
|
||||
arrow = "people:spearfly",
|
||||
shoot_offset = 2,
|
||||
attacks_monsters = true,
|
||||
attack_npcs = false,
|
||||
owner_loyal = true,
|
||||
pathfinding = true,
|
||||
hp_min = 25,
|
||||
hp_max = 125,
|
||||
armor = 100,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "Warrior.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"texturesamwarrior.png"},
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {
|
||||
attack = "people_warrior3",
|
||||
random = "people_warrior2",
|
||||
damage = "people_male5",
|
||||
death = "people_warrior",
|
||||
distance = 10,
|
||||
},
|
||||
walk_velocity = 3,
|
||||
run_velocity = 4,
|
||||
jump = true,
|
||||
drops = { {name = "people:warriorgrave", chance = 1, min = 1, max = 1},
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 2,
|
||||
light_damage = 0,
|
||||
follow = {"farming:turkish_delight", "farming:garlic_bread", "farming:donut", "farming:donut_chocolate", "farming:donut_apple", "farming:porridge", "farming:jaffa_cake", "farming:apple_pie", "farming:spaghetti", "farming:burger", "farming:bibimbap"},
|
||||
view_range = 12,
|
||||
owner = "",
|
||||
order = "follow",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 100,
|
||||
walk_speed = 100,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
punch_start = 200,
|
||||
punch_end = 300,
|
||||
shoot_start = 300,
|
||||
shoot_speed = 80,
|
||||
shoot_end = 400,
|
||||
},
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed to heal npc
|
||||
if mobs:feed_tame(self, clicker, 8, true, true) then return end
|
||||
|
||||
-- capture npc with net or lasso
|
||||
if mobs:capture_mob(self, clicker, nil, 5, 80, false, nil) then return end
|
||||
|
||||
-- protect npc with mobs:protector
|
||||
if mobs:protect(self, clicker) then return end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local name = clicker:get_player_name()
|
||||
|
||||
|
||||
|
||||
-- by right-clicking owner can switch npc between follow and stand
|
||||
if self.owner and self.owner == name then
|
||||
|
||||
if self.order == "follow" then
|
||||
|
||||
self.attack = nil
|
||||
self.order = "stand"
|
||||
self.state = "stand"
|
||||
self:set_animation("stand")
|
||||
self:set_velocity(0)
|
||||
|
||||
minetest.chat_send_player(name, S("Warrior stands still."))
|
||||
else
|
||||
self.order = "follow"
|
||||
|
||||
minetest.chat_send_player(name, S("Warrior will follow you."))
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
mobs:register_egg("people:samwarrior", S("Warrior Jungle"), "asamwarrior.png" )
|
||||
|
||||
-- compatibility
|
||||
mobs:alias_mob("people:samwarrior", "people:samwarrior")
|
||||
|
||||
mobs:register_arrow("people:spearfly", {
|
||||
visual = "sprite",
|
||||
visual_size = {x=.5, y=.5},
|
||||
textures = {"spearfly.png"},
|
||||
velocity = 12,
|
||||
drop = true,
|
||||
|
||||
hit_player = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=13},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_mob = function(self, player)
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
damage_groups = {fleshy=13},
|
||||
}, nil)
|
||||
end,
|
||||
|
||||
hit_node = function(self, pos, node)
|
||||
end,
|
||||
})
|
Binary file not shown.
After Width: | Height: | Size: 548 KiB |
|
@ -0,0 +1,16 @@
|
|||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:cobble","default:mossycobble"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0,
|
||||
scale = 0.1,
|
||||
spread = {x = 50, y = 50, z = 50},
|
||||
seed = 50,
|
||||
octaves = 3,
|
||||
persist = 1,
|
||||
},
|
||||
y_max = 1000,
|
||||
y_min = -25,
|
||||
decoration = "people:bootynode"
|
||||
})
|
|
@ -0,0 +1,32 @@
|
|||
minetest.register_node("people:villagerbed", {
|
||||
description = "Villager Bed",
|
||||
visual_scale = 1.0,
|
||||
mesh = "Villagerbed.b3d",
|
||||
tiles = {"texturevillagerbed.png"},
|
||||
inventory_image = "avillagerbed.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1, -0.5, -0.5, 0.9, 0.5, 0.5},
|
||||
--[[{-1, -0.5, -0.5, 0.9, 0.5, 0.5},
|
||||
{-1, -0.5, -0.5, 0.9, 0.5, 0.5}]]
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-1, -0.5, -0.5, 0.9, 0.5, 0.5}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "people:villagerbed",
|
||||
burntime = 6,
|
||||
})
|
|
@ -0,0 +1,19 @@
|
|||
minetest.register_node("people:weaponstand", {
|
||||
description = "Weaponstand",
|
||||
visual_scale = 1,
|
||||
mesh = "Weaponstand.b3d",
|
||||
tiles = {"textureweaponstand.png"},
|
||||
inventory_image = "aweaponstand.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
drawtype = "mesh",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 0.4, 0.4},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:steel_ingot",
|
||||
recipe = "people:weaponstand",
|
||||
})
|
|
@ -0,0 +1,77 @@
|
|||
mobs:register_mob("people:zombiedoctor", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
step_height = 2,
|
||||
fear_height = 4,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 2,
|
||||
damage = 5,
|
||||
hp_min = 35,
|
||||
hp_max = 75,
|
||||
armor = 100,
|
||||
collisionbox = {-0.5, -0.01, -0.5, 0.5, 1.3, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "Zombie.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"texturezombie.png"},
|
||||
},
|
||||
sounds = {
|
||||
attack = "people_zombie4",
|
||||
random = "people_zombie",
|
||||
damage = "people_zombie2",
|
||||
death = "people_zombie3",
|
||||
distance = 15,
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
walk_chance = 10,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 2,
|
||||
animation = {
|
||||
speed_normal = 60,
|
||||
stand_speed = 50,
|
||||
stand_start = 300,
|
||||
stand_end = 400,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
walk2_start = 200,
|
||||
walk2_end = 300,
|
||||
punch_start = 0,
|
||||
punch_end = 100,
|
||||
-- 50-70 is slide/water idle
|
||||
},
|
||||
view_range = 150,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed or tame
|
||||
if mobs:feed_tame(self, clicker, 4, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:zombiedoctor",
|
||||
nodes = {"default:cobble", "default:mossycobble", "default:sandstonebrick", "default:dirt_with_snow", "default:dry_dirt", "default:dry_dirt_with_dry_grass", "default:permafrost", "default:permafrost", "default:sand", "default:desert_sand", "default:silver_sand", "default:gravel", "default:snowblock", "default:ice", "default:cave:ice", "default:desert_stone", "default:sandstone", "default:silver_sandstone"},
|
||||
neighbors = {"people:doctorgrave"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
active_object_count = 1,
|
||||
chance = 10, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
day_toggle = false
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:zombiedoctor", ("Zombie"), "azombie.png")
|
|
@ -0,0 +1,77 @@
|
|||
mobs:register_mob("people:zombiefarmer", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
step_height = 2,
|
||||
fear_height = 4,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 2,
|
||||
damage = 5,
|
||||
hp_min = 35,
|
||||
hp_max = 75,
|
||||
armor = 100,
|
||||
collisionbox = {-0.5, -0.01, -0.5, 0.5, 1.3, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "Zombie.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"texturezombie.png"},
|
||||
},
|
||||
sounds = {
|
||||
attack = "people_zombie4",
|
||||
random = "people_zombie",
|
||||
damage = "people_zombie2",
|
||||
death = "people_zombie3",
|
||||
distance = 15,
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
walk_chance = 10,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 2,
|
||||
animation = {
|
||||
speed_normal = 60,
|
||||
stand_speed = 50,
|
||||
stand_start = 300,
|
||||
stand_end = 400,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
walk2_start = 200,
|
||||
walk2_end = 300,
|
||||
punch_start = 0,
|
||||
punch_end = 100,
|
||||
-- 50-70 is slide/water idle
|
||||
},
|
||||
view_range = 150,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed or tame
|
||||
if mobs:feed_tame(self, clicker, 4, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:zombiefarmer",
|
||||
nodes = {"default:cobble", "default:mossycobble", "default:sandstonebrick", "default:dirt_with_snow", "default:dry_dirt", "default:dry_dirt_with_dry_grass", "default:permafrost", "default:permafrost", "default:sand", "default:desert_sand", "default:silver_sand", "default:gravel", "default:snowblock", "default:ice", "default:cave:ice", "default:desert_stone", "default:sandstone", "default:silver_sandstone"},
|
||||
neighbors = {"people:farmergrave"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
active_object_count = 1,
|
||||
chance = 10, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
day_toggle = false
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:zombiefarmer", ("Zombie"), "azombie.png")
|
|
@ -0,0 +1,77 @@
|
|||
mobs:register_mob("people:zombieinstructor", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
step_height = 2,
|
||||
fear_height = 4,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 2,
|
||||
damage = 5,
|
||||
hp_min = 35,
|
||||
hp_max = 75,
|
||||
armor = 100,
|
||||
collisionbox = {-0.5, -0.01, -0.5, 0.5, 1.3, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "Zombie.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"texturezombie.png"},
|
||||
},
|
||||
sounds = {
|
||||
attack = "people_zombie4",
|
||||
random = "people_zombie",
|
||||
damage = "people_zombie2",
|
||||
death = "people_zombie3",
|
||||
distance = 15,
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
walk_chance = 10,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 2,
|
||||
animation = {
|
||||
speed_normal = 60,
|
||||
stand_speed = 50,
|
||||
stand_start = 300,
|
||||
stand_end = 400,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
walk2_start = 200,
|
||||
walk2_end = 300,
|
||||
punch_start = 0,
|
||||
punch_end = 100,
|
||||
-- 50-70 is slide/water idle
|
||||
},
|
||||
view_range = 150,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed or tame
|
||||
if mobs:feed_tame(self, clicker, 4, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:zombieinstructor",
|
||||
nodes = {"default:cobble", "default:mossycobble", "default:sandstonebrick", "default:dirt_with_snow", "default:dry_dirt", "default:dry_dirt_with_dry_grass", "default:permafrost", "default:permafrost", "default:sand", "default:desert_sand", "default:silver_sand", "default:gravel", "default:snowblock", "default:ice", "default:cave:ice", "default:desert_stone", "default:sandstone", "default:silver_sandstone"},
|
||||
neighbors = {"people:instructorgrave"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
active_object_count = 1,
|
||||
chance = 10, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
day_toggle = false
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:zombieinstructor", ("Zombie"), "azombie.png")
|
|
@ -0,0 +1,77 @@
|
|||
mobs:register_mob("people:zombieminer", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
step_height = 2,
|
||||
fear_height = 4,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 2,
|
||||
damage = 5,
|
||||
hp_min = 35,
|
||||
hp_max = 75,
|
||||
armor = 100,
|
||||
collisionbox = {-0.5, -0.01, -0.5, 0.5, 1.3, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "Zombie.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"texturezombie.png"},
|
||||
},
|
||||
sounds = {
|
||||
attack = "people_zombie4",
|
||||
random = "people_zombie",
|
||||
damage = "people_zombie2",
|
||||
death = "people_zombie3",
|
||||
distance = 15,
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
walk_chance = 10,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 2,
|
||||
animation = {
|
||||
speed_normal = 60,
|
||||
stand_speed = 50,
|
||||
stand_start = 300,
|
||||
stand_end = 400,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
walk2_start = 200,
|
||||
walk2_end = 300,
|
||||
punch_start = 0,
|
||||
punch_end = 100,
|
||||
-- 50-70 is slide/water idle
|
||||
},
|
||||
view_range = 150,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed or tame
|
||||
if mobs:feed_tame(self, clicker, 4, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:zombieminer",
|
||||
nodes = {"default:cobble", "default:mossycobble", "default:sandstonebrick", "default:dirt_with_snow", "default:dry_dirt", "default:dry_dirt_with_dry_grass", "default:permafrost", "default:permafrost", "default:sand", "default:desert_sand", "default:silver_sand", "default:gravel", "default:snowblock", "default:ice", "default:cave:ice", "default:desert_stone", "default:sandstone", "default:silver_sandstone"},
|
||||
neighbors = {"people:minergrave"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
active_object_count = 1,
|
||||
chance = 10, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
day_toggle = false
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:zombieminer", ("Zombie"), "azombie.png")
|
|
@ -0,0 +1,77 @@
|
|||
mobs:register_mob("people:zombiesmith", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
step_height = 2,
|
||||
fear_height = 4,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 2,
|
||||
damage = 5,
|
||||
hp_min = 35,
|
||||
hp_max = 75,
|
||||
armor = 100,
|
||||
collisionbox = {-0.5, -0.01, -0.5, 0.5, 1.3, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "Zombie.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"texturezombie.png"},
|
||||
},
|
||||
sounds = {
|
||||
attack = "people_zombie4",
|
||||
random = "people_zombie",
|
||||
damage = "people_zombie2",
|
||||
death = "people_zombie3",
|
||||
distance = 15,
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
walk_chance = 10,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 2,
|
||||
animation = {
|
||||
speed_normal = 60,
|
||||
stand_speed = 50,
|
||||
stand_start = 300,
|
||||
stand_end = 400,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
walk2_start = 200,
|
||||
walk2_end = 300,
|
||||
punch_start = 0,
|
||||
punch_end = 100,
|
||||
-- 50-70 is slide/water idle
|
||||
},
|
||||
view_range = 150,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed or tame
|
||||
if mobs:feed_tame(self, clicker, 4, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:zombiesmith",
|
||||
nodes = {"default:cobble", "default:mossycobble", "default:sandstonebrick", "default:dirt_with_snow", "default:dry_dirt", "default:dry_dirt_with_dry_grass", "default:permafrost", "default:permafrost", "default:sand", "default:desert_sand", "default:silver_sand", "default:gravel", "default:snowblock", "default:ice", "default:cave:ice", "default:desert_stone", "default:sandstone", "default:silver_sandstone"},
|
||||
neighbors = {"people:smithgrave"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
active_object_count = 1,
|
||||
chance = 10, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
day_toggle = false
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:zombiesmith", ("Zombie"), "azombie.png")
|
|
@ -0,0 +1,77 @@
|
|||
mobs:register_mob("people:zombievillager", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
step_height = 2,
|
||||
fear_height = 4,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 2,
|
||||
damage = 5,
|
||||
hp_min = 35,
|
||||
hp_max = 75,
|
||||
armor = 100,
|
||||
collisionbox = {-0.5, -0.01, -0.5, 0.5, 1.3, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "Zombie.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"texturezombie.png"},
|
||||
},
|
||||
sounds = {
|
||||
attack = "people_zombie4",
|
||||
random = "people_zombie",
|
||||
damage = "people_zombie2",
|
||||
death = "people_zombie3",
|
||||
distance = 15,
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
walk_chance = 10,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 2,
|
||||
animation = {
|
||||
speed_normal = 60,
|
||||
stand_speed = 50,
|
||||
stand_start = 300,
|
||||
stand_end = 400,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
walk2_start = 200,
|
||||
walk2_end = 300,
|
||||
punch_start = 0,
|
||||
punch_end = 100,
|
||||
-- 50-70 is slide/water idle
|
||||
},
|
||||
view_range = 150,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed or tame
|
||||
if mobs:feed_tame(self, clicker, 4, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:zombievillager",
|
||||
nodes = {"default:cobble", "default:mossycobble", "default:sandstonebrick", "default:dirt_with_snow", "default:dry_dirt", "default:dry_dirt_with_dry_grass", "default:permafrost", "default:permafrost", "default:sand", "default:desert_sand", "default:silver_sand", "default:gravel", "default:snowblock", "default:ice", "default:cave:ice", "default:desert_stone", "default:sandstone", "default:silver_sandstone"},
|
||||
neighbors = {"people:villagergrave"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
active_object_count = 1,
|
||||
chance = 10, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
day_toggle = false
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:zombievillager", ("Zombie"), "azombie.png")
|
|
@ -0,0 +1,77 @@
|
|||
mobs:register_mob("people:zombiewarrior", {
|
||||
type = "monster",
|
||||
passive = false,
|
||||
step_height = 2,
|
||||
fear_height = 4,
|
||||
attack_type = "dogfight",
|
||||
attack_animals = true,
|
||||
reach = 2,
|
||||
damage = 5,
|
||||
hp_min = 35,
|
||||
hp_max = 75,
|
||||
armor = 100,
|
||||
collisionbox = {-0.5, -0.01, -0.5, 0.5, 1.3, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "Zombie.b3d",
|
||||
visual_size = {x = 1.0, y = 1.0},
|
||||
textures = {
|
||||
{"texturezombie.png"},
|
||||
},
|
||||
sounds = {
|
||||
attack = "people_zombie4",
|
||||
random = "people_zombie",
|
||||
damage = "people_zombie2",
|
||||
death = "people_zombie3",
|
||||
distance = 15,
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
walk_chance = 10,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
drops = {
|
||||
},
|
||||
water_damage = 0,
|
||||
lava_damage = 4,
|
||||
light_damage = 2,
|
||||
animation = {
|
||||
speed_normal = 60,
|
||||
stand_speed = 50,
|
||||
stand_start = 300,
|
||||
stand_end = 400,
|
||||
walk_start = 100,
|
||||
walk_end = 200,
|
||||
walk2_start = 200,
|
||||
walk2_end = 300,
|
||||
punch_start = 0,
|
||||
punch_end = 100,
|
||||
-- 50-70 is slide/water idle
|
||||
},
|
||||
view_range = 150,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- feed or tame
|
||||
if mobs:feed_tame(self, clicker, 4, false, true) then return end
|
||||
if mobs:protect(self, clicker) then return end
|
||||
if mobs:capture_mob(self, clicker, 5, 50, 80, false, nil) then return end
|
||||
end,
|
||||
})
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "people:zombiewarrior",
|
||||
nodes = {"default:cobble", "default:mossycobble", "default:sandstonebrick", "default:dirt_with_snow", "default:dry_dirt", "default:dry_dirt_with_dry_grass", "default:permafrost", "default:permafrost", "default:sand", "default:desert_sand", "default:silver_sand", "default:gravel", "default:snowblock", "default:ice", "default:cave:ice", "default:desert_stone", "default:sandstone", "default:silver_sandstone"},
|
||||
neighbors = {"people:warriorgrave"},
|
||||
min_light = 0,
|
||||
interval = 30,
|
||||
active_object_count = 1,
|
||||
chance = 10, -- 15000
|
||||
min_height = -25,
|
||||
max_height = 1000,
|
||||
day_toggle = false
|
||||
})
|
||||
end
|
||||
|
||||
mobs:register_egg("people:zombiewarrior", ("Zombie"), "azombie.png")
|
Loading…
Reference in New Issue