I have this script that is in globalevents, that was to give invasion with date and time, but it is not working. I tried to change some script in the raids folder, but it still did not work.
Can someone help me? something is missing? Do I have to configure anything else?
PHP:
local raids = {
-- Weekly
['Monday'] = {
['08:00'] = {raidName = 'RatsThais'},
['21:00'] = {raidName = 'Arachir the Ancient One'}
}
}
function 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
Can someone help me? something is missing? Do I have to configure anything else?