Scriptname aaUCBuyHouseScript extends ObjectReference  
{Script for buying the player house}

Message property HouseMsg auto
{Message on activation}

MiscObject property Gold auto
{Gold to be removed}

Key property HouseKey auto
{The player house key}

Event OnActivate(ObjectReference akActionRef)
  
	Int iButton = HouseMsg.Show()

	If (iButton == 0)
        	Game.GetPlayer().RemoveItem(Gold, 40000)
		Game.GetPlayer().AddItem(HouseKey, 1)
		Disable(true)

	ElseIf (iButton == 1)
		Return 
       EndIf

endEvent