added relics.
24
chats.lua
@ -1,10 +1,24 @@
|
||||
local illuminati_death_message_table = {
|
||||
illuminati.death_message_table = {
|
||||
'<Distant voice> We control your life too.',
|
||||
'<Hissing voice> Assemble the brotherhood, we have fresh flesh.',
|
||||
'<Whisper> The Illuminati claimed another life',
|
||||
'<Faint voices in the breeze> That was an easy one.'
|
||||
'<Faint voices in the breeze> That was an easy one.',
|
||||
}
|
||||
|
||||
illuminati.core_message_table = {
|
||||
'Ah, a new convert.',
|
||||
'Every day we grow in numbers.',
|
||||
'Has a mortal discovered our secret? Death to him!',
|
||||
'Blocks are but temporal, we are forever.',
|
||||
}
|
||||
|
||||
function send_message(table)
|
||||
local max = #(table)
|
||||
local key = math.random(1,max)
|
||||
local message = table[key]
|
||||
return message
|
||||
end
|
||||
|
||||
minetest.register_on_chat_message(function(name,message)
|
||||
if string.match(message, 'foobar') then
|
||||
minetest.chat_send_all('<Illuminati> Hush, this is not public information.')
|
||||
@ -21,7 +35,9 @@ minetest.register_on_dieplayer(function(player)
|
||||
local key = #(minetest.get_connected_players())
|
||||
local people = minetest.get_connected_players()
|
||||
local person = math.random(1, key)
|
||||
local name1 = people[person]
|
||||
local name1 = people[person]
|
||||
local name = name1:get_player_name()
|
||||
minetest.chat_send_player(name, "Hello " ..name..' somebody just died.')
|
||||
if name1 ~= player then
|
||||
minetest.chat_send_player(name, send_message(illuminati.death_message_table))
|
||||
end
|
||||
end)
|
||||
|
3
init.lua
@ -1,2 +1,5 @@
|
||||
illuminati = {}
|
||||
|
||||
dofile(minetest.get_modpath('illuminati')..'/chats.lua')
|
||||
dofile(minetest.get_modpath('illuminati')..'/nodes.lua')
|
||||
dofile(minetest.get_modpath('illuminati')..'/relics.lua')
|
||||
|
60
nodes.lua
@ -36,30 +36,30 @@ minetest.register_node('illuminati:core_off',{
|
||||
fixed = {-.4, -.5, -.4, .4, .5, .4},
|
||||
},
|
||||
after_place_node = function(pos, itemstack)
|
||||
local n = minetest.get_node(pos)
|
||||
local p1 = {x=pos.x, y=pos.y-1, z=pos.z}
|
||||
local p2 = {x=pos.x, y=pos.y-2, z=pos.z}
|
||||
local n1 = minetest.get_node_or_nil(p1)
|
||||
local n2 = minetest.get_node_or_nil(p2)
|
||||
if n1.name == 'default:diamondblock' and n2.name == 'default:diamondblock' then
|
||||
local ps1 = {x=pos.x-3, y=pos.y-1, z=pos.z}
|
||||
local pw1 = {x=pos.x+3, y=pos.y-1, z=pos.z}
|
||||
local pn1 = {x=pos.x, y=pos.y-1, z=pos.z-3}
|
||||
local pe1 = {x=pos.x, y=pos.y-1, z=pos.z+3}
|
||||
local ns1 = minetest.get_node_or_nil(ps1)
|
||||
local nw1 = minetest.get_node_or_nil(pw1)
|
||||
local nn1 = minetest.get_node_or_nil(pn1)
|
||||
local ne1 = minetest.get_node_or_nil(pe1)
|
||||
if ns1.name == 'illuminati:cone_off' and nw1.name == 'illuminati:cone_off' and nn1.name == 'illuminati:cone_off' and ne1.name == 'illuminati:cone_off' then
|
||||
local ps2 = {x=pos.x-3, y=pos.y-2, z=pos.z}
|
||||
local pw2 = {x=pos.x+3, y=pos.y-2, z=pos.z}
|
||||
local pn2 = {x=pos.x, y=pos.y-2, z=pos.z-3}
|
||||
local pe2 = {x=pos.x, y=pos.y-2, z=pos.z+3}
|
||||
local ns2 = minetest.get_node_or_nil(ps2)
|
||||
local nw2 = minetest.get_node_or_nil(pw2)
|
||||
local nn2 = minetest.get_node_or_nil(pn2)
|
||||
local ne2 = minetest.get_node_or_nil(pe2)
|
||||
if ns2.name == 'default:goldblock' and nw2.name == 'default:goldblock' and nn2.name == 'default:goldblock' and ne2.name == 'default:goldblock' then
|
||||
local n = minetest.get_node(pos)
|
||||
local p1 = {x=pos.x, y=pos.y-1, z=pos.z}
|
||||
local p2 = {x=pos.x, y=pos.y-2, z=pos.z}
|
||||
local n1 = minetest.get_node_or_nil(p1)
|
||||
local n2 = minetest.get_node_or_nil(p2)
|
||||
if n1.name == 'default:diamondblock' and n2.name == 'default:diamondblock' then
|
||||
local ps1 = {x=pos.x-3, y=pos.y-1, z=pos.z}
|
||||
local pw1 = {x=pos.x+3, y=pos.y-1, z=pos.z}
|
||||
local pn1 = {x=pos.x, y=pos.y-1, z=pos.z-3}
|
||||
local pe1 = {x=pos.x, y=pos.y-1, z=pos.z+3}
|
||||
local ns1 = minetest.get_node_or_nil(ps1)
|
||||
local nw1 = minetest.get_node_or_nil(pw1)
|
||||
local nn1 = minetest.get_node_or_nil(pn1)
|
||||
local ne1 = minetest.get_node_or_nil(pe1)
|
||||
if ns1.name == 'illuminati:cone_off' and nw1.name == 'illuminati:cone_off' and nn1.name == 'illuminati:cone_off' and ne1.name == 'illuminati:cone_off' then
|
||||
local ps2 = {x=pos.x-3, y=pos.y-2, z=pos.z}
|
||||
local pw2 = {x=pos.x+3, y=pos.y-2, z=pos.z}
|
||||
local pn2 = {x=pos.x, y=pos.y-2, z=pos.z-3}
|
||||
local pe2 = {x=pos.x, y=pos.y-2, z=pos.z+3}
|
||||
local ns2 = minetest.get_node_or_nil(ps2)
|
||||
local nw2 = minetest.get_node_or_nil(pw2)
|
||||
local nn2 = minetest.get_node_or_nil(pn2)
|
||||
local ne2 = minetest.get_node_or_nil(pe2)
|
||||
if ns2.name == 'default:goldblock' and nw2.name == 'default:goldblock' and nn2.name == 'default:goldblock' and ne2.name == 'default:goldblock' then
|
||||
minetest.set_node(pos,{name = 'illuminati:core_on', param2=n.param2})
|
||||
minetest.set_node(ps1,{name = 'illuminati:cone_on'})
|
||||
minetest.set_node(pw1,{name = 'illuminati:cone_on'})
|
||||
@ -130,6 +130,18 @@ minetest.register_node('illuminati:cone_off',{
|
||||
type = 'fixed',
|
||||
fixed = {-.5, -.5, -.5, .5, .35, .5},
|
||||
},
|
||||
after_place_node = function(pos, placer)
|
||||
local key = #(minetest.get_connected_players())
|
||||
local people = minetest.get_connected_players()
|
||||
local person = math.random(1, key)
|
||||
local name1 = people[person]
|
||||
local name = name1:get_player_name()
|
||||
local placer_name = placer:get_player_name()
|
||||
if name ~= placer_name then
|
||||
minetest.chat_send_player(name, send_message(illuminati.core_message_table))
|
||||
end
|
||||
end,
|
||||
|
||||
})
|
||||
|
||||
minetest.register_node('illuminati:cone_on',{
|
||||
|
22
relics.lua
Normal file
@ -0,0 +1,22 @@
|
||||
relic_table = { -- Number, Description
|
||||
{'1', 'Achieve ultimate power.'},
|
||||
{'2', 'Build a core..'},
|
||||
{'3', 'Blocks of diamond and gold.'},
|
||||
{'4', 'Cones atop the gold.'},
|
||||
{'5', 'Crystal above two diamond.'},
|
||||
{'6', 'Diamond in the center.'},
|
||||
{'7', 'Gold to the N, S, E, and W.'},
|
||||
{'8', 'Two spaces between blocks.'},
|
||||
{'9', 'If correct will generate power.'},
|
||||
}
|
||||
|
||||
for i in ipairs (relic_table) do
|
||||
local num = relic_table[i][1]
|
||||
local desc = relic_table[i][2]
|
||||
|
||||
minetest.register_craftitem('illuminati:relic_'..num, {
|
||||
description = desc,
|
||||
inventory_image = 'illuminati_relic_'..num..'.png',
|
||||
groups = {not_in_creative_inventory=1},
|
||||
})
|
||||
end
|
BIN
textures/illuminati_relic_1.png
Normal file
After Width: | Height: | Size: 692 B |
BIN
textures/illuminati_relic_2.png
Normal file
After Width: | Height: | Size: 760 B |
BIN
textures/illuminati_relic_3.png
Normal file
After Width: | Height: | Size: 733 B |
BIN
textures/illuminati_relic_4.png
Normal file
After Width: | Height: | Size: 816 B |
BIN
textures/illuminati_relic_5.png
Normal file
After Width: | Height: | Size: 808 B |
BIN
textures/illuminati_relic_6.png
Normal file
After Width: | Height: | Size: 710 B |
BIN
textures/illuminati_relic_7.png
Normal file
After Width: | Height: | Size: 709 B |
BIN
textures/illuminati_relic_8.png
Normal file
After Width: | Height: | Size: 767 B |
BIN
textures/illuminati_relic_9.png
Normal file
After Width: | Height: | Size: 772 B |