added relics.
22
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.')
|
||||
|
@ -23,5 +37,7 @@ minetest.register_on_dieplayer(function(player)
|
|||
local person = math.random(1, key)
|
||||
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')
|
||||
|
|
12
nodes.lua
|
@ -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',{
|
||||
|
|
|
@ -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
|
After Width: | Height: | Size: 692 B |
After Width: | Height: | Size: 760 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 816 B |
After Width: | Height: | Size: 808 B |
After Width: | Height: | Size: 710 B |
After Width: | Height: | Size: 709 B |
After Width: | Height: | Size: 767 B |
After Width: | Height: | Size: 772 B |