Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scriptname mskd_itemMenu extends ObjectReference
- {Menu for custom items}
- Message Property Question Auto
- {Menu description}
- Message Property SacDef Auto
- Message Property MTel01 Auto
- Message Property MTel02 Auto
- Message Property MTel03 Auto
- Message Property GHToil Auto
- Message Property BosGam Auto
- ;Various buttons, like menu, message items I made in Creation Kit.
- Book Property mskd_SacredDefiance Auto
- Book Property mskd_ManyTell01 Auto
- Book Property mskd_ManyTell02 Auto
- Book Property mskd_ManyTell03 Auto
- Book Property mskd_GoodHonestToil Auto
- Book Property mskd_BosmerianGambit Auto
- ;The script doesn't know about game objects unless I name each one specifically, so Book does that.
- ;I also tried MiscObject, it ran but didn't add to inventory. BookItem and BookObject fail to compile.
- int Button
- ;Keeps track of the button index, that is, which of the question messagebox options is chosen
- EVENT onActivate(objectReference akActionRef)
- ;" akActionRef is a variable name you will be using in the script below. It holds the reference of the actor that activated the object this script is attached to. For clarity, you should leave it named as is."
- If akActionRef == Game.GetPlayer()
- ;Checking if the variable 'akActionRef ' is the player.
- Button = question.show()
- ;Display the 'question' text, get the index number of the item ('button') chosen.
- if button == 0
- SacDef.show()
- ;Keep this option showing while the rest disappear and the action happens, like in conversations.
- Game.GetPlayer().AddItem(mskd_SacredDefiance,1,true)
- ;Place item in player inventory.
- elseif button == 1
- MTel01.show()
- Game.GetPlayer().AddItem(mskd_ManyTell01,1,true)
- elseif button == 2
- MTel02.show()
- Game.GetPlayer().AddItem(mskd_ManyTell02,1,true)
- elseif button == 3
- ;MTel03.show()
- Game.GetPlayer().AddItem(mskd_ManyTell03,1,true)
- elseif button == 4
- GHToil.show()
- Game.GetPlayer().AddItem(mskd_GoodHonestToil,1,true)
- elseif button == 5
- BosGam.show()
- Game.GetPlayer().AddItem(mskd_BosmerianGambit,1,true)
- endif
- ;No more if/elsif/else statements on this level.
- Endif
- endEVENT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement