• 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!

Raids per week?

probably something like this
LUA:
if os.date("%w") ==    then
your script
else
return false
end
and in global event
XML:
<globalevent name="yourscript" time="21:35" event="script" value="yourscript.lua"/>
 
LUA:
if os.date("%w") == then
your script
else
return false
end

What is %w?

I have this:

LUA:
local storage = 1344
	
local raids = {
"Barbarian"
}

function onTime()
		executeRaid(raids[math.random(1, #raids)])
end

If I add this:

LUA:
local day = string.lower(os.date("%A", os.time()))
if day == "monday"
script
else
return false

So maybe a:

LUA:
local storage = 1344
	
local raids = {
"Barbarian"
}

function onTime()
	local day = string.lower(os.date("%A", os.time()))
	if (day == "monday")
		executeRaid(raids[math.random(1, #raids)])
	else
		return false
end

It would work?
 
should be like that
LUA:
local storage = 1344
 
local raids = {
"Barbarian"
}
 
function onTime()
	local day = string.lower(os.date("%A"))
	if (day == "monday")
		executeRaid(raids[math.random(1, #raids)])
	end
	return true
end
 
Back
Top