SCTX |
Scriptname PublicanThreeSistersShuravi
;CellName: LeyawiinThreeSistersInn
;Publican: Shuravi
;Room: East end of 2nd floor
;Door Ref: LeyawiinThreeSistersRentDoor
;Note: Interior door in cell that must also be closed on reset, LeyawiinThreeSistersIntDoor
short rent
short rentday
short rentmonth
short cleanup
short setup
begin gamemode
if ( rent == 1 )
if ( setup == 0 )
set rentday to GameDay
set rentmonth to GameMonth
set setup to 1
LeyawiinThreeSistersRentDoor.unlock
LeyawiinThreeSistersIntDoor.unlock
LeyawiinThreeSistersRentBed.SetOwnership
LeyawiinThreeSistersRentDoor.SetOwnership
LeyawiinThreeSistersIntDoor.SetOwnership
else
if ( GameDay != rentday )
set cleanup to 1
elseif ( GameMonth != rentmonth )
set cleanup to 1
endif
endif
if ( Player.GetInCell LeyawiinThreeSistersInn == 0 )
if ( Cleanup == 1 )
set Cleanup to 2
endif
endif
if ( Cleanup == 2 )
set rent to 0
set setup to 0
set rentday to 0
set rentmonth to 0
set cleanup to 0
LeyawiinThreeSistersRentDoor.SetOpenState 0
LeyawiinThreeSistersIntDoor.SetOpenState 0
LeyawiinThreeSistersIntDoor.lock 30
LeyawiinThreeSistersRentDoor.lock 30
LeyawiinThreeSistersRentBed.SetOwnership Shuravi
LeyawiinThreeSistersRentDoor.SetOwnership GenericOwner
endif
endif
End
|