sumo_duels/messages.lua

17 lines
634 B
Lua
Raw Normal View History

2021-03-24 10:29:52 -07:00
sumo_duels.messages = {
"You can join the waiting list for an arena using /join <number from 1 to 3>",
"The longer you wait to hit your opponent, the more knockback you do",
"Once there are at least 2 people in a waiting list for an arena, the first 2 people who were in the waiting list will be put in a game"
}
2021-03-24 10:03:54 -07:00
2021-03-24 10:22:13 -07:00
local timer = 0
minetest.register_globalstep(function(dtime)
timer = timer + dtime;
if timer >= 5 then
-- Send message to all players every 5 seconds
2021-03-24 10:29:52 -07:00
local random = math.random(1, #sumo_duels.messages)
2021-03-24 10:22:13 -07:00
minetest.chat_send_all(minetest.colorize("#999997", sumo_duels.messages[random]))
timer = 0
end
end)