Jump to content

[LE] House Ownership Problems


Recommended Posts

Set Player ownership in the house cell's properties.

To make it purchasable, either give the key to a merchant so that you can buy it from, or put a sign (activator or with an activator) outside the house that on activate will ask for money in exchange for the key.

Here is a little script to get you started, for use with a sign/activator :




Key Property MyKey Auto
{ Key to give Player }

Int Property MyGold Auto
{ The amount of Gold to Collect from Player }

Message Property NoGoldMSG Auto
{ Message to show when you don't have the required gold }

Miscobject Property MiscGoldRef Auto
{The Gold Misc Object}


Event OnActivate(ObjectReference akActionRef)
if (akActionRef == Game.GetPlayer())

If ( Game.GetPlayer().GetGoldAmount() > MyGold )
Game.GetPlayer().AddItem( MyKey , 1 )
Game.GetPlayer().RemoveItem( MiscGoldRef , MyGold )
GoToState( "Done" )
Else
NoGoldMSG.Show()
EndIf

EndIf
EndEvent

State Done
Self.Disable()
Utility.Wait(0.5)
Self.Delete()
EndState

Edited by maxarturo
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...