in globalevents/scripts add a serverave.luaDo you have Server Save script on interval?
local shutdownAtServerSave = false -- leave true if you want to shut down the server
local cleanMapAtServerSave = false -- leave true if you want to clear the map
local function serverSave()
if shutdownAtServerSave then
Game.setGameState(GAME_STATE_SHUTDOWN)
else
Game.setGameState(GAME_STATE_NORMAL)
end
if cleanMapAtServerSave then
cleanMap()
end
saveServer()
end
local function secondServerSaveWarning()
Game.broadcastMessage('Server is saving game in one minute. Please go to a safe place.', MESSAGE_STATUS_WARNING)
addEvent(serverSave, 60000)
end
local function...
in globalevents/scripts add a serverave.luaDo you have Server Save script on interval?
local shutdownAtServerSave = false -- leave true if you want to shut down the server
local cleanMapAtServerSave = false -- leave true if you want to clear the map
local function serverSave()
if shutdownAtServerSave then
Game.setGameState(GAME_STATE_SHUTDOWN)
else
Game.setGameState(GAME_STATE_NORMAL)
end
if cleanMapAtServerSave then
cleanMap()
end
saveServer()
end
local function secondServerSaveWarning()
Game.broadcastMessage('Server is saving game in one minute. Please go to a safe place.', MESSAGE_STATUS_WARNING)
addEvent(serverSave, 60000)
end
local function firstServerSaveWarning()
Game.broadcastMessage('Server is saving game in 3 minutes. Please go to a safe place.', MESSAGE_STATUS_WARNING)
addEvent(secondServerSaveWarning, 120000)
end
function onTime(interval)
Game.broadcastMessage('Server is saving game in 5 minutes. Please go to a safe place.', MESSAGE_STATUS_WARNING)
Game.setGameState(GAME_STATE_STARTUP)
addEvent(firstServerSaveWarning, 120000)
return not shutdownAtServerSave
end
<globalevent name="ServerSave" interval="1800000" script="serversave.lua" />
Do you have Server Save script on interval?This link that I tested is functional and perfect. I'm also using TFS 1.4.2.
Auto map clean script
Hello i cant find anywhere auto map clean that happens every 2hours and puts warning before map is cleaned. It should remove items and corpses from map but no items from houses. TFS 1.2otland.net
How to set resolved?Are the scripts working for you? If yes, just mark as resolved so that many people who are looking for these scripts can find it.
How to set resolved?
im using this script and it works very well, i did have to change the function "function onTime(interval)" from "onTime" to "onThink" to make it work, but i have a question, it doesnt clean the items in protected zones is there a way to make it be able to also clean protected zones from "trash" items in for an example depot/tempel?in globalevents/scripts add a serverave.lua
in globalevents.xmlLua:local shutdownAtServerSave = false -- leave true if you want to shut down the server local cleanMapAtServerSave = false -- leave true if you want to clear the map local function serverSave() if shutdownAtServerSave then Game.setGameState(GAME_STATE_SHUTDOWN) else Game.setGameState(GAME_STATE_NORMAL) end if cleanMapAtServerSave then cleanMap() end saveServer() end local function secondServerSaveWarning() Game.broadcastMessage('Server is saving game in one minute. Please go to a safe place.', MESSAGE_STATUS_WARNING) addEvent(serverSave, 60000) end local function firstServerSaveWarning() Game.broadcastMessage('Server is saving game in 3 minutes. Please go to a safe place.', MESSAGE_STATUS_WARNING) addEvent(secondServerSaveWarning, 120000) end function onTime(interval) Game.broadcastMessage('Server is saving game in 5 minutes. Please go to a safe place.', MESSAGE_STATUS_WARNING) Game.setGameState(GAME_STATE_STARTUP) addEvent(firstServerSaveWarning, 120000) return not shutdownAtServerSave end
f you activate the option to turn off the server, instead of interval="1800000" put time="04:55:00"XML:<globalevent name="ServerSave" interval="1800000" script="serversave.lua" />
im using this script and it works very well, i did have to change the function "function onTime(interval)" from "onTime" to "onThink" to make it work, but i have a question, it doesnt clean the items in protected zones is there a way to make it be able to also clean protected zones from "trash" items in for an example depot/tempel?
Config.luaim using this script and it works very well, i did have to change the function "function onTime(interval)" from "onTime" to "onThink" to make it work, but i have a question, it doesnt clean the items in protected zones is there a way to make it be able to also clean protected zones from "trash" items in for an example depot/tempel?
thank you Marko<3 ill give it a look!You must enable it in config.lua
cleanProtectionZones = false
change to true
Its so items on top of deposit dont get deletedim using this script and it works very well, i did have to change the function "function onTime(interval)" from "onTime" to "onThink" to make it work, but i have a question, it doesnt clean the items in protected zones is there a way to make it be able to also clean protected zones from "trash" items in for an example depot/tempel?
(using tfs 1.4.2 10.98)
Yep!Its so items on top of deposit dont get deleted
yeah enjoy the crying that item got deleted and no way to trace it and people making gms dupe items or just loose very expensive items shit system. maybe reward people for cleaning deposit floors in some way bi binding onmoveitem to dustbin and timed so they only have to throw 1 rubbish get reward they wil put rest into bin hopoing there is more but no timed every 24-48-72 h but dont tell them that ;xdYep!
ill change the warnings telling people to not leave items they want on the ground etc etc should be more than enough for players to think "hmmm i should maybe pick this item up" hehe
since i dont really want the server to shutdown.
just look at what is most popular item on the ground floor of deposit and make it autodelete via script if it lies on ground for too long. instead.yeah enjoy the crying that item got deleted and no way to trace it and people making gms dupe items or just loose very expensive items shit system. maybe reward people for cleaning deposit floors in some way bi binding onmoveitem to dustbin and timed so they only have to throw 1 rubbish get reward they wil put rest into bin hopoing there is more but no timed every 24-48-72 h but dont tell them that ;xd
i mean if that ever would happen i would simply tell them no.yeah enjoy the crying that item got deleted and no way to trace it and people making gms dupe items or just loose very expensive items shit system. maybe reward people for cleaning deposit floors in some way bi binding onmoveitem to dustbin and timed so they only have to throw 1 rubbish get reward they wil put rest into bin hopoing there is more but no timed every 24-48-72 h but dont tell them that ;xd
Post automatically merged:
just look at what is most popular item on the ground floor of deposit and make it autodelete via script if it lies on ground for too long. instead.
if its fluids thjen just remove empty fluids and remove the item instead
If the server never restarts your last problem will be depot items anyways good luck.i mean if that ever would happen i would simply tell them no.
i cant bend over to them just because they are crying, there is warnings they do realize that the map gets cleaned after playing for a while. if they would lose an item from the map getting cleaned, there isnt much i can or want to do about it to be fair.... i cant satisfy players for crying or atleast thats not how i would like to run my server.
its like having a big sign saying "THE ANIMAL BITES" and then still sticking ur finger in to see if it happens...
Arent u a Lovely person to talk to. Christ The passiv agressive shit i see in this forum is crazy.If the server never restarts your last problem will be depot items anyways good luck.
If its passive it cant be aggressive i put Xor gate before itArent u a Lovely person to talk to. Christ The passiv agressive shit i see in this forum is crazy.
It will restart just not regularly. Im still trying to Learn and understand how a server functions who knows i might even change The server save its litteraly not a big deal especiallt with this script where i can turn it off n on =)
Thanks gl in life...