Music and npc stuff

>Added music
>Added old npc texture
>added wolfos tear
>added herbal potion and changed red potion quest
master
D00Med 2017-01-26 07:46:07 +10:00
parent ce3ba90c48
commit 5f05fb060b
14 changed files with 148 additions and 5 deletions

28
mods/clawshot/license.txt Normal file
View File

@ -0,0 +1,28 @@
License for Code
----------------
Copyright (C) 2017 D00Med <heiselong@gmx.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
License for Textures, Models
---------------------------------------
CC BY-SA D00Med (see above)

View File

@ -2426,6 +2426,7 @@ minetest.register_node("hyrule_mapgen:volvagia_spawn", {
on_construct = function(pos)
minetest.after(5, function()
minetest.add_entity({x=pos.x, y=pos.y+0.5, z=pos.z}, "mobs_loz:volvagia")
minetest.sound_play("BrassFleece", {gain=0.3})
end)
end,
on_rightclick = function(pos, node, clicker, item, _)

View File

@ -1655,6 +1655,7 @@ minetest.register_on_newplayer(function(player)
npc.xdir = 1
npc.item = "default:sword_wood"
npc.text = "It's dangerous to go alone, take this!"
npc.skin = "mobs_npc_old.png"
end)
end
end
@ -1703,11 +1704,20 @@ minetest.register_on_generated(function(minp, maxp)
local obj = minetest.env:add_entity({x=pos.x+4, y=pos.y+7, z=pos.z+5}, "mobs_npc:shopkeeper")
local obj = minetest.env:add_entity({x=pos.x+6, y=pos.y+3, z=pos.z+18}, "mobs_npc:npc_custom")
local npc = obj:get_luaentity()
npc.text = "I'll give you something nice if you find me a 'red potion'"
npc.reward_text = "*slurp* Here you go"
npc.text = "I'll give you something nice if you find me a 'herbal potion'"
npc.reward_text = "*slurp* Oh Thankyou!"
npc.item = "bucket:bucket_empty"
npc.reward_item = "witchcraft:potion_red"
npc.reward_item = "witchcraft:potion_herbal"
npc.zdir = -1
local obj2 = minetest.env:add_entity({x=pos.x+3, y=pos.y+3, z=pos.z+10}, "mobs_npc:npc_custom")
local npc2 = obj2:get_luaentity()
npc2.text = "If I had a wolfos' tear, I could make a 'herbal potion'"
npc2.reward_text = "That's it!, here you go"
npc2.item = "sword:sword_diamond"
npc2.reward_item = "witchcraft:potion_herbal"
npc2.skin = "mobs_witch.png"
npc2.zdir = -1
end
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

View File

@ -1,6 +1,11 @@
-- Wolfos by D00Med
-- edit of Dirt Monster by PilzAdam
minetest.register_craftitem("mobs_loz:wolfos_tear", {
description = "Wolfos Tear",
inventory_image = "mobs_wolfostear.png",
})
mobs:register_mob("mobs_loz:wolfos", {
type = "monster",
passive = false,
@ -24,6 +29,8 @@ mobs:register_mob("mobs_loz:wolfos", {
drops = {
{name = "hyruletools:green_rupee",
chance = 5, min = 1, max = 3},
{name = "mobs_loz:wolfos_tear",
chance = 50, min = 1, max = 1},
},
on_die = function(self)
local pos = self.object:getpos()
@ -77,6 +84,8 @@ mobs:register_mob("mobs_loz:wolfos2", {
drops = {
{name = "hyruletools:blue_rupee",
chance = 5, min = 1, max = 3},
{name = "mobs_loz:wolfos_tear",
chance = 50, min = 1, max = 1},
},
on_die = function(self)
local pos = self.object:getpos()

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

47
mods/music/init.lua Normal file
View File

@ -0,0 +1,47 @@
local music = false
local music_playing = false
local music_name = ""
local duration = 0
local gain = 0
minetest.register_globalstep(function()
for _, player in ipairs(minetest.get_connected_players()) do
local playername = player:get_player_name()
local pos = player:getpos()
local village_nodes = minetest.find_nodes_in_area({x=pos.x-5, y=pos.y-3, z=pos.z-5}, {x=pos.x+5, y=pos.y+5, z=pos.z+5}, {"stairs:slab_red", "stairs:slab_blue", "farming:straw"})
local boss_nodes = minetest.find_nodes_in_area({x=pos.x-5, y=pos.y-3, z=pos.z-5}, {x=pos.x+5, y=pos.y+5, z=pos.z+5}, {"hyrule_mapgen:volvagia_spawn", "hyrule_mapgen:ganon_spawn", "hyrule_mapgen:bongo_spawn", "hyrule_mapgen:dodongo_spawn"})
minetest.chat_send_all("boss_nodes:"..#boss_nodes.." village_nodes:"..#village_nodes)
if #boss_nodes ~= nil and #village_nodes ~= nil then
if #boss_nodes > 0 then
music = true
music_name = "BrassFleece"
duration = 105
gain = 0.8
elseif #village_nodes > 5 and math.random(1, 50) == 1 then
music = true
music_name = "Villageforest"
duration = 93
gain = 1
elseif math.random(1, 200) == 1 then
music = true
music_name = "Downtime"
duration = 75
gain = 1
end
end
if music and not music_playing then
minetest.sound_play(music_name, {to_player=playername, gain=gain})
music_playing = true
music = false
minetest.after(duration, function()
music_playing = false
end)
end
end
end)

30
mods/music/license.txt Normal file
View File

@ -0,0 +1,30 @@
License for Code
----------------
Copyright (C) 2017 D00Med <heiselong@gmx.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
License for Textures, Models
---------------------------------------
CC BY-SA D00Med (see above)
Sounds - see /sounds/license.txt

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +1,3 @@
CC BY-SA 3.0
Sam Labbato https://soundcloud.com/sam-labbato
Noah K. https://www.youtube.com/channel/UCu8MTAFrihYO9PxKm-pk_xw
(this is just here so I don't forget to add it to the relevant mods)
Noah K. https://www.youtube.com/channel/UCu8MTAFrihYO9PxKm-pk_xw

View File

@ -285,6 +285,24 @@ minetest.register_abm({
--potions
minetest.register_node("witchcraft:potion_herbal", {
description = "Herbal Potion",
drawtype = "plantlike",
tiles = {"witchcraft_potion_herbal.png"},
wield_image = "witchcraft_potion_herbal.png",
paramtype = "light",
stack_max = 1,
is_ground_content = false,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
},
groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_herbal.png",
})
minetest.register_node("witchcraft:potion_redbrown", {
description = "Basic Soup",
drawtype = "plantlike",

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B