Mariuskens
Sword Art Online 2D-MMORPG
very 3 weekends server change to world type: Hardcore-PvP... Globalevent can do it?
For a TFS 1.2, but your script is to start for example now with a duration 60 minutes with PVP_ENF true? also is posible to add every days like automated event?
My idea is for just people play every week with gameworld pvp and every weekends server changes to pvp enfo without change manualy the config.lua (this is to prevent if I forget to change it on Sunday and start with pvpenf on Monday XD)
<globalevent name="PvPevent" time="10:00:00" script="pvpEvent.lua" />
You should always include what distro you are requesting scripts for, someone from 2008 with over 900 messages should know this. Also this explanation is lacking, idk if you want it to last the whole weekend, or if it should be on startup or at a certain time.very 3 weekends server change to world type: Hardcore-PvP... Globalevent can do it?
local global_storage = 9000
local duration = 60 -- in minutes
function onTime(interval)
local time = os.time()
if Game.getStorageValue(global_storage) >= time then
Game.setWorldType(WORLD_TYPE_PVP_ENFORCED)
Game.setStorageValue(global_storage, time + (3 * 7 * 24 * 60 * 60))
addEvent(function()
Game.setWorldType(WORLD_TYPE_PVP)
end, duration * 60 * 1000)
end
return true
end
For a TFS 1.2, but your script is to start for example now with a duration 60 minutes with PVP_ENF true? also is posible to add every days like automated event?
My idea is for just people play every week with gameworld pvp and every weekends server changes to pvp enfo without change manualy the config.lua (this is to prevent if I forget to change it on Sunday and start with pvpenf on Monday XD)
<globalevent name="PvPevent" time="10:00:00" script="pvpEvent.lua" />