Hi
So, I just created this script, from scratch, with practically no clue as to what I was doing, and it works, yay! (if you can't tell that made me very happy lol) But anyway, it's not quite finished yet. At the moment in the script at the part I haven't done yet, I've just put a description as to what I want to do, but I have no idea how to go about doing it, or if it's even possible :S Basically, the script comes up with a message box when you equip the piece of armor, and asks you which set of enchantments (choice of three) you'd like to apply to it. Then whichever one you pick it'll give you a description and ask you if you're sure. Right now if you then select no, it'll take you back to the first menu. But what I don't how to do is script what happens when you select yes. Is there a way for a script to enchant an item for you? If anyone can help me I'd really appreciate it, thanks!
Here's the script I've got so far so you can see what I mean:
Scriptname HeroAmuletEnchantmentScript extends ObjectReference Message Property EnchantMsg AutoMessage Property MageEnchantMsg AutoMessage Property WarriorEnchantMsg AutoMessage Property ThiefEnchantMsg Auto AUTO STATE WaitingEvent OnEquipped (Actor akActor)GoToState("Done")if akActor == Game.GetPlayer()Menu()EndifEndEventENDSTATE STATE DoneEvent OnEquipped (Actor akActor);;nothingEndEventENDSTATE Function Menu(int aiButton = 0)aiButton = EnchantMsg.Show()If aiButton == 0MageEnchantMsg.Show()ElseIf aiButton == 1WarriorEnchantMsg.Show()ElseIf aiButton == 2ThiefEnchantMsg.Show()EndIfEndFunction Function MageMenu(int aiButton = 0)aiButton = MageEnchantMsg.Show()If aiButton == 0;;apply mage enchantments to amuletElseIf aiButton == 1EnchantMsg.Show()EndIfEndFunction Function WarriorMenu(int aiButton = 0)aiButton = WarriorEnchantMsg.Show()If aiButton == 0;;apply warrior enchantments to amuletElseIf aiButton == 1EnchantMsg.Show()EndIfEndFunction Function ThiefMenu(int aiButton = 0)aiButton = ThiefEnchantMsg.Show()If aiButton == 0;;apply thief enchantments to amuletElseIf aiButton == 1EnchantMsg.Show()EndIfEndFunction Int Property aiButton Auto