Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

aisis

Allies
  • Posts

    1
  • Joined

  • Last visited

aisis's Achievements

Layman

Layman (1/11)

0

Reputation

  1. Hi, could someone please check my script? It is meant to be an alternative way of buying House Upgrades (only alchemy and child room so far) through a Ledger in the house. I am a complete noob at papyrus, so this is mostly crated through the system: find similar to what I want / copy / paste / edit. Therefore, I have no idea if it is even close to a functional script. Thank you! Scriptname ASTbhLedger extends ObjectReference ;Properties / Variables Message Property ASTbhLedgerM Auto MiscObject Property Gold Auto ObjectReference Property ASTalchRoomStart Auto ObjectReference Property ASTalchRoomNew Auto ObjectReference Property ASTchildRoomNew Auto ;Main Code Event OnActivate(ObjectReference akActionRef) Menu() EndEvent Function Menu(Bool abMenu = True, Int aiButton = 0) While abMenu If aiButton != -1 ; Wait for input (this can prevent problems if recycling the aiButton argument in submenus) aiButton = ASTbhLedgerM.Show() ; Buy Upgrade abMenu = False ; End the function If aiButton == 0 ; Cancel ElseIf aiButton == 1 ; Alchemy/Enchanting Room (500) If (ASTalchRoomNew.IsEnabled()) debug.notification("Upgrade already bought") ElseIf (Game.GetPlayer().GetItemCount(Gold001) >= 500) Game.GetPlayer().RemoveItem(Gold001,500,False) ASTalchRoomNew.enable() ASTalchRoomStart.disable() debug.notification("Alchemy and Enchanting Room bought") Else debug.notification("500 gold required") EndIf ElseIf aiButton == 2 ; Children Room (250) If (ASTchildRoomNew.IsEnabled()) debug.notification("Upgrade already bought") ElseIf (Game.GetPlayer().GetItemCount(Gold001) >= 250) Game.GetPlayer().RemoveItem(Gold001,250,False) ASTchildRoomNew.enable() debug.notification("Children Room bought") Else debug.notification("250 gold required") EndIf EndIf EndIf EndWhile EndFunction
×
×
  • Create New...