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

Change Clean Time, Where?

Nux

Yzeria Custom War
Joined
Jan 2, 2009
Messages
1,067
Reaction score
1
Hi Guys, im having some problem in my server, its to fast clean time, its often clean in my server and the people who die loses there body which could have expensive items. at this moment the server game clean is eash 2 hour´s, and i would do it to each 5 hours, but where do i change that?

Clean.Lua

PHP:
function executeClean()
	doCleanMap()
	doBroadcastMessage("Game map cleaned, next clean in 2 hours.")
	return true
end

function onThink(interval)
	doBroadcastMessage("Game map cleaning within 30 seconds, please pick up your items!")
	addEvent(executeClean, 30000)
	return true
end


Globalevent.xml

PHP:
<globalevent name="clean" interval="720" event="script" value="clean.lua"/>

~Nux
 
In globalevents.xml:
Lua:
<globalevent name="clean" interval="720" event="script" value="clean.lua"/>

The part where it says
Lua:
interval="720"
is how many SECONDS it cleans the server... So if you want 5 hours,

1 hour = 3600 seconds

One minute = 60 seconds

One hour = 60 minutes

so, 5 hours is 18000 seconds.

So in global events:

Lua:
<globalevent name="clean" interval="720" event="script" value="clean.lua"/>

Just change
Lua:
interval="720"

to

Lua:
interval="18000"

And uh, if this doesn't work, then it should be something in your config? Anyways... 720 seconds is only 12 minutes, so it was cleaning every 12 minutes not every 2 hours. Correct me if I'm wrong or something.

:)
 
Back
Top