mirror of
https://github.com/1dot13/gamedir.git
synced 2026-07-22 13:40:25 +02:00
Update HourlyUpdate scripts for Data and Data-UB
This commit is contained in:
@@ -12,20 +12,20 @@ function HourlyQuestUpdate()
|
|||||||
|
|
||||||
-- JA2
|
-- JA2
|
||||||
--[[
|
--[[
|
||||||
if (cHour >= 4 or cHour < 20) then
|
if (guiHour == 4) then
|
||||||
SetFactFalse( Facts.FACT_BROTHEL_OPEN )
|
SetFactFalse( Facts.FACT_BROTHEL_OPEN )
|
||||||
else
|
elseif (guiHour == 20) then
|
||||||
SetFactTrue( Facts.FACT_BROTHEL_OPEN )
|
SetFactTrue( Facts.FACT_BROTHEL_OPEN )
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Bar/night club
|
-- Bar/night club
|
||||||
if ( cHour > 15 or cHour < 2) then
|
if ( guiHour == 15 ) then
|
||||||
|
|
||||||
SetFactTrue( Facts.FACT_CLUB_OPEN )
|
SetFactTrue( Facts.FACT_CLUB_OPEN )
|
||||||
SetFactFalse( Facts.FACT_PAST_CLUB_CLOSING_AND_PLAYER_WARNED )
|
SetFactFalse( Facts.FACT_PAST_CLUB_CLOSING_AND_PLAYER_WARNED )
|
||||||
|
|
||||||
-- Reset boxes fought
|
-- Reset boxes fought
|
||||||
for i = 0,3 do
|
for i = 0,2 do
|
||||||
-- Set false
|
-- Set false
|
||||||
gfBoxerFought(i,false)
|
gfBoxerFought(i,false)
|
||||||
end
|
end
|
||||||
@@ -36,24 +36,23 @@ function HourlyQuestUpdate()
|
|||||||
if ( gfBoxersResting == true ) then
|
if ( gfBoxersResting == true ) then
|
||||||
|
|
||||||
-- Done resting now!
|
-- Done resting now!
|
||||||
gfBoxersResting = false
|
SetgfBoxersResting(false)
|
||||||
gubBoxersRests = gubBoxersRests + 1
|
SetgubBoxersRests(gubBoxersRests + 1)
|
||||||
|
HealBoxers()
|
||||||
|
|
||||||
p = gubBoxingMatchesWon / 3
|
elseif ( gubBoxingMatchesWon / 3 > gubBoxersRests ) then
|
||||||
|
|
||||||
elseif ( p > gubBoxersRests ) then
|
|
||||||
-- Time for the boxers to rest!
|
-- Time for the boxers to rest!
|
||||||
gfBoxersResting = true
|
SetgfBoxersResting(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
elseif ( guiHour == 2 ) then
|
||||||
SetFactFalse( Facts.FACT_CLUB_OPEN )
|
SetFactFalse( Facts.FACT_CLUB_OPEN )
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Museum
|
-- Museum
|
||||||
if ( cHour >= 9 or cHour < 18 ) then
|
if ( guiHour == 9 ) then
|
||||||
SetFactTrue( Facts.FACT_MUSEUM_OPEN )
|
SetFactTrue( Facts.FACT_MUSEUM_OPEN )
|
||||||
else
|
elseif ( guiHour == 18 ) then
|
||||||
SetFactFalse( Facts.FACT_MUSEUM_OPEN )
|
SetFactFalse( Facts.FACT_MUSEUM_OPEN )
|
||||||
end
|
end
|
||||||
]]
|
]]
|
||||||
|
|||||||
@@ -6,18 +6,16 @@ Facts =
|
|||||||
FACT_PAST_CLUB_CLOSING_AND_PLAYER_WARNED = 107,
|
FACT_PAST_CLUB_CLOSING_AND_PLAYER_WARNED = 107,
|
||||||
}
|
}
|
||||||
|
|
||||||
local p = 0
|
|
||||||
|
|
||||||
function HourlyQuestUpdate()
|
function HourlyQuestUpdate()
|
||||||
|
|
||||||
if (cHour >= 4 or cHour < 20) then
|
if (guiHour == 4) then
|
||||||
SetFactFalse( Facts.FACT_BROTHEL_OPEN )
|
SetFactFalse( Facts.FACT_BROTHEL_OPEN )
|
||||||
else
|
elseif (guiHour == 20) then
|
||||||
SetFactTrue( Facts.FACT_BROTHEL_OPEN )
|
SetFactTrue( Facts.FACT_BROTHEL_OPEN )
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Bar/night club
|
-- Bar/night club
|
||||||
if ( cHour >= 15 or cHour < 2) then
|
if ( guiHour == 15 ) then
|
||||||
|
|
||||||
SetFactTrue( Facts.FACT_CLUB_OPEN )
|
SetFactTrue( Facts.FACT_CLUB_OPEN )
|
||||||
SetFactFalse( Facts.FACT_PAST_CLUB_CLOSING_AND_PLAYER_WARNED )
|
SetFactFalse( Facts.FACT_PAST_CLUB_CLOSING_AND_PLAYER_WARNED )
|
||||||
@@ -34,24 +32,23 @@ function HourlyQuestUpdate()
|
|||||||
if ( gfBoxersResting == true ) then
|
if ( gfBoxersResting == true ) then
|
||||||
|
|
||||||
-- Done resting now!
|
-- Done resting now!
|
||||||
gfBoxersResting = false
|
SetgfBoxersResting(false)
|
||||||
gubBoxersRests = gubBoxersRests + 1
|
SetgubBoxersRests(gubBoxersRests + 1)
|
||||||
|
HealBoxers()
|
||||||
|
|
||||||
p = gubBoxingMatchesWon / 3
|
elseif ( gubBoxingMatchesWon / 3 > gubBoxersRests ) then
|
||||||
|
|
||||||
elseif ( p > gubBoxersRests ) then
|
|
||||||
-- Time for the boxers to rest!
|
-- Time for the boxers to rest!
|
||||||
gfBoxersResting = true
|
SetgfBoxersResting(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
elseif ( guiHour == 2 ) then
|
||||||
SetFactFalse( Facts.FACT_CLUB_OPEN )
|
SetFactFalse( Facts.FACT_CLUB_OPEN )
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Museum
|
-- Museum
|
||||||
if ( cHour >= 9 or cHour < 18 ) then
|
if ( guiHour == 9 ) then
|
||||||
SetFactTrue( Facts.FACT_MUSEUM_OPEN )
|
SetFactTrue( Facts.FACT_MUSEUM_OPEN )
|
||||||
else
|
elseif ( guiHour == 18 ) then
|
||||||
SetFactFalse( Facts.FACT_MUSEUM_OPEN )
|
SetFactFalse( Facts.FACT_MUSEUM_OPEN )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user