Scriptname Publican_BrumaJerallViewHafid
;CellName: BrumaJerallView
;Publican: Hafid Hollowleg
;Room: Only room upstairs
;Door Ref: BrumaJerallViewRentDoor
short rent
short cleanup
short setup
short hourspassed
float renthour
float hourcheck
begin gamemode
if ( rent == 1 )
if ( setup == 0 )
set renthour to GameHour
set setup to 1
set hourspassed to 0
set hourcheck to GameHour
BrumaJerallViewRentDoor.unlock
BrumaJerallViewRentBed.SetOwnership
BrumaJerallViewTransitionDoor.unlock
else
if ( HoursPassed >= 24 )
set cleanup to 1
else
set hourcheck to GameHour
if ( renthour >= 23 )
if ( GameHour < 1 )
set HoursPassed to ( HoursPassed + 1 )
set renthour to GameHour
endif
else
if ( ( renthour + 1 ) < GameHour )
set HoursPassed to ( HoursPassed + 1 )
set renthour to GameHour
endif
endif
endif
endif
if ( Cleanup == 2 )
set rent to 0
set renthour to 0
set hourspassed to 0
set setup to 0
set cleanup to 0
set JerallViewTriggerRef.Doonce to 1
BrumaJerallViewRentDoor.SetOpenState 0
BrumaJerallViewRentDoor.lock 30
BrumaJerallViewTransitionDoor.lock 30
BrumaJerallViewRentBed.SetOwnership HafidHollowleg
endif
endif
End
Begin MenuMode
if ( rent == 1 )
if ( setup == 1 )
if ( HoursPassed >= 24 )
set cleanup to 1
else
if ( renthour >= 23 )
if ( Gamehour < 1 )
set HoursPassed to ( HoursPassed + 1 )
set renthour to GameHour
endif
else
if ( ( renthour + 1 ) < GameHour )
set HoursPassed to ( HoursPassed + 1 )
set renthour to GameHour
endif
endif
endif
endif
endif
End
|