1 function coronaserver.flame(name)
2 local player = minetest.get_player_by_name(name)
3 if not player then return end
4 local pos = player:get_pos()
5 minetest.add_particlespawner({
8 minpos = vector.add(pos, {x = -1, y = 2, z = -1}),
9 maxpos = vector.add(pos, {x = 1, y = 3, z = 1}),
10 minvel = {x=0, y=0, z=0},
11 maxvel = {x=0, y=0, z=0},
12 minacc = {x=0, y=-8, z=0},
13 maxacc = {x=0, y=-8, z=0},
18 collisiondetection = true,
20 texture = "flowers_rose.png",
22 minetest.after(0.5, function() elidragon.flower_rain(name) end)
24 minetest.register_on_joinplayer(function(player)
25 local name = player:get_player_name()
26 if elidragon.savedata.birthday[name] == os.date("%d/%m") then
27 minetest.chat_send_all(minetest.colorize("#FF20FF", name .. " has joined the game. Today is their birthday!"))
28 elidragon.flower_rain(name)
30 hud_elem_type = "text",
31 position = {x = 1, y = 0},
32 offset = {x = -5, y = 5},
33 text = "Happy Birthday!",
34 alignment = {x = -1, y = 1},
35 scale = {x = 100, y = 100},
40 minetest.register_chatcommand("birthday", {
41 description = "Set your birthday (e.g. 07/09 if your birthday is the seventh of september)",
43 func = function(name, param)
44 elidragon.savedata.birthday[name] = param
45 minetest.chat_send_player(name, "Birthday set to " .. param)