• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Invasion 1 week

maikons

Member
Joined
Aug 1, 2015
Messages
227
Reaction score
16
How to make 2 invasions per week (sunday and saturday)
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:
How to make to the invasion start in a random hour?

Someone help me to fix or fix to me

2 errors when start the server

uvfjF5l.png


KZuUPr9.png
 
Last edited:
Back
Top