structures and quests

master
D00Med 2017-01-27 10:16:31 +10:00
parent 91203d33ec
commit 632745f210
11 changed files with 177 additions and 6 deletions

View File

@ -14,6 +14,24 @@ minetest.register_craftitem("hyrule_mapgen:village_spawner", {
local pos = pointed_thing.above
minetest.place_schematic({x=pos.x, y=pos.y-1, z=pos.z}, minetest.get_modpath("hyrule_mapgen").."/schematics/village.mts", 0, {}, true)
local obj = minetest.env:add_entity({x=pos.x+14, y=pos.y+2, z=pos.z+24}, "mobs_npc:shopkeeper")
local obj2 = minetest.env:add_entity({x=pos.x+3, y=pos.y+3, z=pos.z+9}, "mobs_npc:npc_custom")
local npc2 = obj2:get_luaentity()
npc2.text = "I'll trade you something cool for a 'weird beard'"
npc2.reward_text = "Thanks!'"
npc2.item = "hyruletools:gameboy"
npc2.reward_item = "mobs_loz:weird_beard"
npc2.skin = "mobs_npc_toby109tt.png"
npc2.zdir = -1
local obj3 = minetest.env:add_entity({x=pos.x+13, y=pos.y+3, z=pos.z+7}, "mobs_npc:npc_custom")
local npc3 = obj3:get_luaentity()
npc3.text = "I heard there is a strange land deep underground..."
npc3.skin = "mobs_npc_old.png"
local obj4 = minetest.env:add_entity({x=pos.x+17, y=pos.y+3, z=pos.z+5}, "mobs_npc:npc")
local obj5 = minetest.env:add_entity({x=pos.x+7, y=pos.y+3, z=pos.z+12}, "mobs_npc:npc")
itemstack:take_item()
return itemstack
end,
@ -578,6 +596,34 @@ minetest.override_item("default:stone_with_gold", {
--new nodes
minetest.register_node("hyrule_mapgen:logpile", {
description = "Log Pile",
tiles = {
"default_tree.png^[transformR90",
"default_tree.png^[transformR90",
"default_tree.png^[transformR90",
"default_tree.png^[transformR90",
"default_tree_top.png",
"default_tree_top.png"
},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.4375, -0.5, -0.0625, -0.125, 0.5}, -- NodeBox1
{0.0625, -0.4375, -0.5, 0.5, -0.125, 0.5}, -- NodeBox2
{0.125, -0.5, -0.5, 0.4375, -0.0625, 0.5}, -- NodeBox3
{-0.4375, -0.5, -0.5, -0.125, -0.0625, 0.5}, -- NodeBox4
{-0.125, -0.0625, -0.5, 0.1875, 0.375, 0.5}, -- NodeBox5
{-0.1875, 0, -0.5, 0.25, 0.3125, 0.5}, -- NodeBox6
}
},
groups = {choppy=3, oddly_breakable_by_hand=1, flammable=1, falling_node=1},
drop = "default:tree 3",
})
minetest.register_node("hyrule_mapgen:bigmush", {
description = "Big Mushroom",
drawtype = "plantlike",
@ -1781,6 +1827,15 @@ minetest.register_node("hyrule_mapgen:magnblock", {
groups = {cracky=7, magnetic=1}
})
minetest.register_node("hyrule_mapgen:flameblock", {
description = "Flame Block (almost unbreakeable)",
tiles = {
"hyrule_mapgen_flameblock.png"
},
groups = {cracky=7, flammable=1}
})
minetest.register_node("hyrule_mapgen:subrosian_stone", {
description = "Subrosian Stone",
tiles = {

View File

@ -1663,7 +1663,7 @@ end)
--villages
local village_rarity = 100000
local village_rarity = 5000
minetest.register_on_generated(function(minp, maxp)
if maxp.y < -1 or maxp.y > 21000 then
@ -1753,19 +1753,30 @@ minetest.register_on_generated(function(minp, maxp)
for n = 1, #grass2 do
if math.random(1, village_rarity) == 1 then
local pos = {x = grass2[n].x, y = grass2[n].y, z = grass2[n].z }
local num = math.random(1,3)
local num = math.random(1,6)
minetest.chat_send_all(""..num)
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == "air" then
minetest.place_schematic(pos, minetest.get_modpath("hyrule_mapgen").."/schematics/world"..num..".mts", random, {}, true)
if num == 2 then
local obj = minetest.env:add_entity({x=pos.x+5, y=pos.y+1, z=pos.z+4}, "mobs_npc:npc_custom")
if num == 1 then
local obj = minetest.env:add_entity({x=pos.x+5, y=pos.y+3, z=pos.z+4}, "mobs_npc:npc_custom")
local npc = obj:get_luaentity()
npc.text = "Deku Scrubs have been scaring my animals..."
npc.reward_text = "You killed the Deku Scrubs? Thanks, you can have this"
npc.item = "mobs_animal:bucket_milk"
npc.reward_item = "mobs_loz:deku_nut"
npc.skin = "mobs_farmer.png"
npc.item_count = 10
npc.zdir = -1
end
if num == 5 then
local obj = minetest.env:add_entity({x=pos.x+3, y=pos.y+3, z=pos.z+3}, "mobs_npc:npc_custom")
local npc = obj:get_luaentity()
npc.skin = "mobs_npc_old.png"
npc.text = "It's dangerous to travel in darkness"
npc.item = "hyruletools:lantern"
npc.xdir = 1
end
end
end
end

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

View File

@ -986,8 +986,15 @@ minetest.register_tool("hyruletools:mirror", {
on_use = function(itemstack, user, pointed_thing)
local player = user:get_player_name()
if mana.subtract(player, 100) then
local pos = math.random(1-900)
user:setpos({x= pos,y= 5,z= pos})
local pos1 = user:getpos()
local pos = math.random(1,50)
local vertical = 0
if pos1.y <= -20000 then
vertical = 5
else
vertical = -21000
end
user:setpos({x= pos,y=vertical,z= pos})
end
return itemstack
end

View File

@ -240,6 +240,98 @@ mobs:register_mob("mobs_loz:business_scrub_passive", {
end,
})
mobs:register_mob("mobs_loz:business_scrub_passive2", {
type = "animal",
passive = true,
reach = 1,
damage = 2,
attack_type = "shoot",
arrow = "mobs_loz:nut",
shoot_interval = 0.5,
shoot_offset = 0.5,
hp_min = 10,
hp_max = 25,
armor = 90,
collisionbox = {-0.4, 0, -0.2, 0.2, 1, 0.2},
visual = "mesh",
mesh = "business_scrub.b3d",
textures = {
{"mobs_business_scrub_beard.png"},
},
runaway = true,
knock_back = 1,
runaway_timer = 20,
visual_size = {x=1, y=1},
blood_texture = "default_wood.png",
view_range = 10,
walk_velocity = 1.5,
run_velocity = 5,
jump_height = 5,
makes_footstep_sound = true,
drops = {
{name = "mobs_loz:weird_beard",
chance = 1, min = 1, max = 1},
},
on_die = function(self)
local pos = self.object:getpos()
if math.random(1,5) == 2 then
minetest.env:add_entity(pos, "hyruletools:heart_entity")
end
minetest.env:add_entity(pos, "experience:orb")
end,
water_damage = 0,
lava_damage = 1,
light_damage = 0,
animation = {
speed_normal = 15,
speed_run = 20,
stand_start = 1,
stand_end = 20,
walk_start = 60,
walk_end = 80,
run_start = 60,
run_end = 80,
},
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
if item:get_name() == "hyruletools:green_rupee" then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
local pos = self.object:getpos()
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = "default:leaves"})
elseif item:get_name() == "hyruletools:blue_rupee" then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
local pos = self.object:getpos()
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = "default:stick"})
elseif item:get_name() == "hyruletools:blue_rupee" then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
local pos = self.object:getpos()
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = "default:stick"})
elseif item:get_name() == "hyruletools:red_rupee" then
if not minetest.setting_getbool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
local pos = self.object:getpos()
pos.y = pos.y + 0.5
minetest.add_item(pos, {name = "default:dirt"})
end
end,
})
mobs:register_egg("mobs_loz:business_scrub_passive", "Business Scrub (passive)", "default_leaves.png", 1)
minetest.register_craftitem("mobs_loz:nut", {
@ -247,4 +339,9 @@ minetest.register_craftitem("mobs_loz:nut", {
inventory_image = "mobs_nut.png",
})
minetest.register_craftitem("mobs_loz:weird_beard", {
description = "Weird Beard",
inventory_image = "mobs_weird_beard.png",
})

View File

@ -3,6 +3,7 @@
mobs:register_spawn("mobs_loz:zora", {"default:water_source",}, 20, 10, 15000, 2, 11000)
mobs:register_spawn("mobs_loz:biri", {"default:water_source",}, 20, 10, 15000, 2, 11000)
mobs:register_spawn("mobs_loz:business_scrub_passive", {"default:dirt_with_grass", "default:dirt_with_grass2"}, 20, 10, 15000, 2, 31000)
mobs:register_spawn("mobs_loz:business_scrub_passive2", {"default:dirt_with_grass", "default:dirt_with_grass2"}, 20, 10, 500000, 2, 31000)
mobs:register_spawn("mobs_loz:goron", {"default:stone", "hyrule_mapgen:dirt"}, 20, 10, 15000, 2, 31000)
mobs:register_spawn("mobs_loz:deku_scrub", {"default:dirt_with_grass"}, 20, 10, 15000, 2, 31000)
mobs:register_spawn("mobs_loz:subrosian", {"hyrule_mapgen:subrosian_tile", "hyrule_mapgen:subrosian_sand"}, 20, 0, 15000, -20000, 31000)

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B