Skip to content

Commit

Permalink
Update guild_war.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Luan Luciano authored Jan 19, 2024
1 parent 5a06b73 commit acf2d0e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit acf2d0e

Please sign in to comment.