mirror of
https://github.com/1dot13/gamedir.git
synced 2026-07-22 13:40:25 +02:00
************************************************************
* Merged GameDir from Development Trunk: Revision 4063 * ************************************************************ - Merged from SVN: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP git-svn-id: https://ja2svn.mooo.com/source/ja2_v1.13_data@1257 4f8fa57e-7814-0410-bad4-adc449f26b7c
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
Facts =
|
||||
{
|
||||
FACT_BROTHEL_OPEN = 251,
|
||||
FACT_MUSEUM_OPEN = 250,
|
||||
FACT_CLUB_OPEN = 252,
|
||||
FACT_PAST_CLUB_CLOSING_AND_PLAYER_WARNED = 107,
|
||||
}
|
||||
|
||||
local p = 0
|
||||
|
||||
function HourlyQuestUpdate()
|
||||
|
||||
if (cHour >= 4 or cHour < 20) then
|
||||
SetFactFalse( Facts.FACT_BROTHEL_OPEN )
|
||||
else
|
||||
SetFactTrue( Facts.FACT_BROTHEL_OPEN )
|
||||
end
|
||||
|
||||
-- Bar/night club
|
||||
if ( cHour > 15 or cHour < 2) then
|
||||
|
||||
SetFactTrue( Facts.FACT_CLUB_OPEN )
|
||||
SetFactFalse( Facts.FACT_PAST_CLUB_CLOSING_AND_PLAYER_WARNED )
|
||||
|
||||
-- Reset boxes fought
|
||||
for i = 0,3 do
|
||||
-- Set false
|
||||
gfBoxerFought(i,false)
|
||||
end
|
||||
|
||||
-- If # of boxing matches the player has won is a multiple of
|
||||
-- 3, and the boxers haven't rested, then make them rest
|
||||
|
||||
if ( gfBoxersResting == true ) then
|
||||
|
||||
-- Done resting now!
|
||||
gfBoxersResting = false
|
||||
gubBoxersRests = gubBoxersRests + 1
|
||||
|
||||
p = gubBoxingMatchesWon / 3
|
||||
|
||||
elseif ( p > gubBoxersRests ) then
|
||||
-- Time for the boxers to rest!
|
||||
gfBoxersResting = true
|
||||
end
|
||||
|
||||
else
|
||||
SetFactFalse( Facts.FACT_CLUB_OPEN )
|
||||
end
|
||||
|
||||
-- Museum
|
||||
if ( cHour >= 9 or cHour < 18 ) then
|
||||
SetFactTrue( Facts.FACT_MUSEUM_OPEN )
|
||||
else
|
||||
SetFactFalse( Facts.FACT_MUSEUM_OPEN )
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user