From acf2d0eefcec6e7c0487c1d325ebc8dfecd8bc10 Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Fri, 19 Jan 2024 20:33:56 -0300 Subject: [PATCH] Update guild_war.lua --- .../scripts/globalevents/others/guild_war.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/data-otservbr-global/scripts/globalevents/others/guild_war.lua b/data-otservbr-global/scripts/globalevents/others/guild_war.lua index f34828b1fa7..c036b3b271a 100644 --- a/data-otservbr-global/scripts/globalevents/others/guild_war.lua +++ b/data-otservbr-global/scripts/globalevents/others/guild_war.lua @@ -1,9 +1,10 @@ local guildWar = GlobalEvent("guildwar") + function guildWar.onThink(interval) local time = os.time() - db.query("UPDATE `guild_wars` SET `status` = 4, `ended` = " .. time .. " WHERE `status` = 1 AND (`started` + 5 * 60 * 60) < " .. time) + db.query("UPDATE `guild_wars` SET `status` = 4 WHERE `status` = 1 AND `ended` < " .. time) return true end -guildWar:interval(100000) +guildWar:interval(600000) guildWar:register()