From e0d58cb9ec9f94dcd32f66cd926fca806c805d92 Mon Sep 17 00:00:00 2001 From: noooooo4499 <32027706+noooooo4499@users.noreply.github.com> Date: Sun, 8 Feb 2026 20:47:52 -0500 Subject: [PATCH] Fix lua hourly update script Use lua setters instead of reassigning the global so it actually does something Reverted the time conditionals so that it only updates on the opening/closing hours instead of every hour in between. Why was this change necessary to begin with? It also makes it so it resets all the boxing variables every hour instead of daily (not that it even worked before the setter change anyway) In practice, this fixes a few things so they work as originally intended: Boxers will actually rest for 1 day after every 3 fights as originally intended After every rest, boxers will get progressively stronger and harder to beat as originally intended --- Data-1.13/Scripts/HourlyUpdate.lua | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/Data-1.13/Scripts/HourlyUpdate.lua b/Data-1.13/Scripts/HourlyUpdate.lua index 974b1ee7e..f132d5319 100644 --- a/Data-1.13/Scripts/HourlyUpdate.lua +++ b/Data-1.13/Scripts/HourlyUpdate.lua @@ -10,14 +10,14 @@ local p = 0 function HourlyQuestUpdate() - if (cHour >= 4 or cHour < 20) then + if (cHour == 4) then SetFactFalse( Facts.FACT_BROTHEL_OPEN ) - else + elseif (cHour == 20) then SetFactTrue( Facts.FACT_BROTHEL_OPEN ) end -- Bar/night club - if ( cHour >= 15 or cHour < 2) then + if ( cHour == 15 ) then SetFactTrue( Facts.FACT_CLUB_OPEN ) SetFactFalse( Facts.FACT_PAST_CLUB_CLOSING_AND_PLAYER_WARNED ) @@ -34,25 +34,23 @@ function HourlyQuestUpdate() if ( gfBoxersResting == true ) then -- Done resting now! - gfBoxersResting = false - gubBoxersRests = gubBoxersRests + 1 + SetgfBoxersResting(false) + SetgubBoxersRests(gubBoxersRests + 1) - p = gubBoxingMatchesWon / 3 - - elseif ( p > gubBoxersRests ) then + elseif ( gubBoxingMatchesWon / 3 > gubBoxersRests ) then -- Time for the boxers to rest! - gfBoxersResting = true + SetgfBoxersResting(true) end - else + elseif ( cHour == 2 ) then SetFactFalse( Facts.FACT_CLUB_OPEN ) end -- Museum - if ( cHour >= 9 or cHour < 18 ) then + if ( cHour == 9 ) then SetFactTrue( Facts.FACT_MUSEUM_OPEN ) - else + elseif ( cHour == 18 ) then SetFactFalse( Facts.FACT_MUSEUM_OPEN ) end -end \ No newline at end of file +end