How to make 2 invasions per week (sunday and saturday)
Random raid and Random TIME
How to make it in random time to day
raids.lua
raids.xml
Random raid and Random TIME
How to make it in random time to day
Code:
<globalevent name="Invasion" time="03:22:00" script="raids.lua" />
raids.lua
Code:
local now = os.date("*t")
local raids = {
'Orshabaal',
'Orshabaal',
'Orshabaal'
}
if now.wday == 7 or now.wday == 1 then -- if today is monday (wday can be 1-7 and starts with Sunday as 1)
executeRaid(raids[math.random(1, #raids)])
end
raids.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<raids>
<singlespawn name="Orshabaal" delay="0" message="Raid: Orshabaal" x="368" y="1588" z="7">
</raids>
Last edited: