Scriptname HouseFurnReceiptScript
; attached to the receipts
 
short Doonce

begin OnAdd

if ( Doonce == 0 )
	SetItemValue 0
	set Doonce to 1
endif

end

-------------------------
;attached to the door

ScriptName HouseRiftenWealthyScript

Begin OnLoad
	If GetStage HouseRiftenWealthy == 10
		If Player.GetInCell 1SkxxSDRiftenTowerforSaleKitchen == 1
			SetStage HouseRiftenWealthy 20
		EndIf
	EndIf
End



-------------------------
;attached to the quest

Scriptname HouseRiftenTowerFurnScript

short TotalCount
short MerchSetup
short Doonce1
short Doonce2
short Doonce3
short Doonce4
short Doonce5
short Doonce6
short Doonce7
short Doonce8
short Doonce9
short Doonce10
float fQuestDelayTime

begin gamemode

;Kill script if conditions aren't met

if ( GetStage HouseRiftenWealthy < 10 )
	Return
endif

;Merch Container Stuff

if ( GetStage HouseRiftenWealthy == 20 ) && ( MerchSetup == 0 )
	HouseRiftenAddons01Ref.Enable
	HouseRiftenAddons01Ref.SetOwnership 1SKxxSDBarynIndarys
	set MerchSetup to 1
endif

;These are the variable triggers that are set when a voucher is acquired

if ( Player.GetItemCount 1SKxxSDHouseRiftenDecorReceipt == 1 ) && ( Doonce1 == 0 )
	SDParentTapsandPaints.Enable
	set TotalCount to ( TotalCount + 1 )
	set Doonce1 to 1
endif

if ( Player.GetItemCount 1SKxxSDHouseRiftenDisplayReceipt == 1 ) && ( Doonce2 == 0 )
	SDParentDisplay.Enable
	set TotalCount to ( TotalCount + 1 )
	set Doonce2 to 1
endif

if ( Player.GetItemCount 1SKxxSDHouseRiftenLightingReceipt == 1 ) && ( Doonce3 == 0 )
	SDParentLights.Enable
	set TotalCount to ( TotalCount + 1 )
	set Doonce3 to 1
endif

if ( Player.GetItemCount 1SKxxSDHouseRiftenStorageReceipt == 1 ) && ( Doonce4 == 0 )
	SDParentStorage.Enable
	set TotalCount to ( TotalCount + 1 )
	set Doonce4 to 1
endif

if ( Player.GetItemCount 1SKxxSDHouseRiftenStudyReceipt == 1 ) && ( Doonce5 == 0 )
	SDParentStudy.Enable
	set TotalCount to ( TotalCount + 1 )
	set Doonce5 to 1
endif

if ( Player.GetItemCount 1SKxxSDHouseRiftenKitchenReceipt == 1 ) && ( Doonce6 == 0 )
	SDParentKitchen.Enable
	set TotalCount to ( TotalCount + 1 )
	set Doonce6 to 1
endif

if ( Player.GetItemCount 1SKxxSDHouseRiftenBedroomReceipt == 1 ) && ( Doonce7 == 0 )
	SDParentBedroom.Enable
	set TotalCount to ( TotalCount + 1 )
	set Doonce7 to 1
endif

if ( Player.GetItemCount 1SKxxSDHouseRiftenBedroomSuiteReceipt == 1 ) && ( Doonce8 == 0 )
	SDParentSuite.Enable
	set TotalCount to ( TotalCount + 1 )
	set Doonce8 to 1
endif

if ( Player.GetItemCount 1SKxxSDHouseRiftenBasementReceipt == 1 ) && ( Doonce9 == 0 )
	SDParentBasement.Enable
	set TotalCount to ( TotalCount + 1 )
	set Doonce9 to 1
endif

if ( Player.GetItemCount 1SKxxSDHouseRiftenAlchemyGardenReceipt == 1 ) && ( Doonce10 == 0 )
	SDParentAlchemy.Enable
	set TotalCount to ( TotalCount + 1 )
	set Doonce10 to 1
endif

;Ends Quest if All Bought

if ( TotalCount < 11 )
	if ( TotalCount == 10 )
		setstage HouseRiftenWealthy 30
		set fQuestDelayTime to 0
	endif
endif

end




