Skip to content

Commit

Permalink
Update close_server.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonyrewind committed Jan 5, 2024
1 parent 37e308d commit 3259643
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions data/scripts/talkactions/god/close_server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,28 @@ function closeServer.onSay(player, words, param)
end
if configManager.getBoolean(configKeys.GLOBAL_SERVER_SAVE_SHUTDOWN) then
Game.setGameState(GAME_STATE_SHUTDOWN, true)
-- Updating daily reward next server save.
UpdateDailyRewardGlobalStorage(DailyReward.storages.lastServerSave, os.time())
-- Reset gamestore exp boost count.
db.query("UPDATE `player_storage` SET `value` = 0 WHERE `player_storage`.`key` = 51052")
-- Reset gray island bosses.
db.query("UPDATE `player_storage` SET `value` = 0 WHERE `player_storage`.`key` = 20075")
db.query("UPDATE `player_storage` SET `value` = 0 WHERE `player_storage`.`key` = 20076")
db.query("UPDATE `player_storage` SET `value` = 0 WHERE `player_storage`.`key` = 20077")
db.query("UPDATE `global_storage` SET `value` = 0 WHERE `global_storage`.`key` = 65018")
-- Exercise Reward
db.query("UPDATE `player_storage` SET `value` = 0 WHERE `player_storage`.`key` = 30061")
-- Reset Twisted Waters Corpse and fishing Counter
db.query("UPDATE `global_storage` SET `value` = 0 WHERE `global_storage`.`key` = 60170")
db.query("UPDATE `global_storage` SET `value` = 0 WHERE `global_storage`.`key` = 60171")
db.query("UPDATE `global_storage` SET `value` = 0 WHERE `global_storage`.`key` = 60173")
-- Reset BoredMiniWorldChange
db.query("UPDATE `global_storage` SET `value` = 0 WHERE `global_storage`.`key` = 65020")
-- Reset BankRobberyMiniWorldChange
db.query("UPDATE `global_storage` SET `value` = 0 WHERE `global_storage`.`key` = 65021")
db.query("UPDATE `global_storage` SET `value` = 0 WHERE `global_storage`.`key` = 65022")
db.query("UPDATE `global_storage` SET `value` = 0 WHERE `global_storage`.`key` = 65023")
Spdlog.info("storages reset")
end
elseif param == "maintainance" then
Game.setGameState(GAME_STATE_MAINTAIN)
Expand Down

0 comments on commit 3259643

Please sign in to comment.