adrenyslopez
Member
- Joined
- Dec 22, 2015
- Messages
- 201
- Reaction score
- 15
Hello, someone helps me with this, I want to know how to configure the schedule of my server, for example I want to place it in your schedule
(GMT-4)
me use otbr tfs1.3
It is that I am trying to place this scripts and I think it is because of the time that it does not work
(GMT-4)
me use otbr tfs1.3
It is that I am trying to place this scripts and I think it is because of the time that it does not work
Lua:
local raids = {
-- Weekly
--Segunda-Feira
['Monday'] = {
['06:00'] = {raidName = 'RatsThais'},
},
--Terça-Feira
['Tuesday'] = {
['16:00'] = {raidName = 'Midnight Panther One'}
},
--Quarta-Feira
['Friday'] = {
['12:55'] = {raidName = 'Draptor'}
},
--Quinta-Feira
['Thursday'] = {
['01:35'] = {raidName = 'Undead Cavebear'}
},
--Sexta-feira
['Friday'] = {
['06:00'] = {raidName = 'Crustacea Gigantica treasure'}
},
--Sábado
['Saturday'] = {
['20:00'] = {raidName = 'Draptor'}
},
--Domingo
['Sunday'] = {
['15:00'] = {raidName = 'Midnight Panther Two'},
['13:00'] = {raidName = 'Orc Backpack'}
},
-- By date (Day/Month)
['31/10'] = {
['16:00'] = {raidName = 'Halloween Hare'}
}
}
local spawnRaids = GlobalEvent("spawn raids")
function spawnRaids.onThink(interval, lastExecution, thinkInterval)
local day, date = os.date('%A'), getRealDate()
local raidDays = {}
if raids[day] then
raidDays[#raidDays + 1] = raids[day]
end
if raids[date] then
raidDays[#raidDays + 1] = raids[date]
end
if #raidDays == 0 then
return true
end
for i = 1, #raidDays do
local settings = raidDays[i][getRealTime()]
if settings and not settings.alreadyExecuted then
Game.startRaid(settings.raidName)
settings.alreadyExecuted = true
end
end
return true
end
spawnRaids:interval(60000)
spawnRaids:register()