House for Sale Tutorial

Revision as of 14:42, 2 August 2006 by imported>GhanBuriGhan (Added to quest tutorials cat.)

Needed for the Purchase A House Quest

-House

-Interior

-A HouseForSale door (ie. HouseForSaleBartholm) (HouseBartholmScript runs on this object)

-Furnished with All purchase furnishings linked to one parentobject. (ie the rug is the parent of the chair, table, books on the table, etc. named something to the effect of ParentStudyAreaBartholm, ParentStorageAreaBartholm, etc.)

-A vendor (the person you purchase furniture from)

-A house quest giver. (the person you buy the house from)

-A container object hidden in the vendors cell with all the receipts for purchased furniture (give it a reference name its refered to in the house furniture script)

-A Receipt (actually a book) for each Furnishable Area (ie. House Bedroom Area) with the HouseFurnReceiptScript linked to it.

-A script HouseBartholmFurnScript for the furnishings (it enables purchases once you have bought you house and completes the quest once you have purchased all available upgrades) (quest script linked to the house for sale quest)

-A script HouseBartholmScript to advance the quest once you have visited your new house. (ie. I've seen my new house now I want furniture... point me towards the furniture store) (object script)

-A quest for the House for Sale (HouseBartholm runs HouseBartholmFurnScript)

+ Quest Data: runs HosueBartholmFurnScript

+ Quest Stages: 3 (bought house, visited house need furniture, purchased all available upgrades)

+ Quest Targets: Point to house3sale door and furniture vendor

+ Quest Topics: HouseByBartholm- sets stage 1 HouseDecline HouseInquiry- adds choices HouseBuyBartholm, HouseDecline,HouseTooMuchBartholm HouseTooMuchBartholm


  • Note: I do not mention the conditions, result scripts, & checks in the quest. (Actually I did but my dog sat on my surge protector and I’m not motivated to write them a second time) Refer to the game’s topics and infos to make sure you have everything linked correctly. Use the copy all conditions and paste them into your infos and then change their references to your town, house, door, furniture vendor, etc.


Scriptname HouseBartholmFurnScript

short TotalCount
short MerchSetup
short Doonce1
float fQuestDelayTime

begin gamemode

;Kill script if conditions aren't met

if ( GetStage HouseBartholm < 10 )
	Return
endif

;Merch Container Stuff

if ( GetStage HouseBartholm == 10 ) && ( MerchSetup == 0 )
	HouseBartholmAddonsRef.Enable
	HouseBartholmAddonsRef.SetOwnership ZorbagraUzgash
	set MerchSetup to 1
endif

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

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


;Ends Quest if All Bought

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

end


ScriptName HouseBartholmScript

Begin OnLoad
	If GetStage HouseBartholm == 10
		If Player.GetInCell BartholmHouseForSale == 1
			SetStage HouseBartholm 20
		EndIf
	EndIf
End