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()