Mechaheart Posted March 2, 2018 Share Posted March 2, 2018 Hi, I am trying to create a script where I can add as many doomstones as I want, and then optionally remove them as well. I made a script which worked but only removed them in alphabetical order. Now I am trying to create a menu to specifically remove any stone from any other stone. This is what I have so far: BOOL DOONCE=TRUEAuto State baseEVENT onACTIVATE(OBJECTREFERENCE obj); //check to see if the player is the activator and we havent already activatedIF(doOnce && obj AS ACTOR == game.getPlayer())doOnce = FALSEmenu()ENDIFENDEVENTEndstateFUNCTION menu(Bool abMenu = True, Int aiButton = 0, Int aiMessage = 0) ; Menu will exit after selectionWHILE abMenuIF aiButton != -1 ; Wait for inputaiButton = StoneRemovalQuestion.Show() ; Add or removeIF aiButton == 0 ; Add stone; //if we already have the power and this is the stone then kick the player outIF(bApprentice && game.getPlayer().hasSpell(pDoomApprenticeAbility))pDoomAlreadyHaveMSG.show()utility.wait(2)doOnce = TRUEELSEIF(bAtronach && game.getPlayer().hasSpell(pDoomAtronachAbility))pDoomAlreadyHaveMSG.show()utility.wait(2)doOnce = TRUEELSEIF(bLady && game.getPlayer().hasSpell(pDoomLadyAbility))pDoomAlreadyHaveMSG.show()utility.wait(2)doOnce = TRUEELSEIF(bLord && game.getPlayer().hasSpell(pDoomLordAbility))pDoomAlreadyHaveMSG.show()utility.wait(2)doOnce = TRUEELSEIF(bLover && game.getPlayer().hasSpell(pDoomLoverAbility))pDoomAlreadyHaveMSG.show()utility.wait(2)doOnce = TRUEELSEIF(bMage && game.getPlayer().hasSpell(pDoomMageAbility))pDoomAlreadyHaveMSG.show()utility.wait(2)doOnce = TRUEELSEIF(bRitual && game.getPlayer().hasSpell(pDoomRitualAbility))pDoomAlreadyHaveMSG.show()utility.wait(2)doOnce = TRUEELSEIF(bSerpent && game.getPlayer().hasSpell(pDoomSerpentAbility))pDoomAlreadyHaveMSG.show()utility.wait(2)doOnce = TRUEELSEIF(bShadow && game.getPlayer().hasSpell(pDoomShadowAbility))pDoomAlreadyHaveMSG.show()utility.wait(2)doOnce = TRUEELSEIF(bSteed && game.getPlayer().hasSpell(pDoomSteedAbility))pDoomAlreadyHaveMSG.show()utility.wait(2)doOnce = TRUEELSEIF(bThief && game.getPlayer().hasSpell(pDoomThiefAbility))pDoomAlreadyHaveMSG.show()utility.wait(2)doOnce = TRUEELSEIF(bTower && game.getPlayer().hasSpell(pDoomTowerAbility))pDoomAlreadyHaveMSG.show()utility.wait(2)doOnce = TRUEELSEIF(bWarrior && game.getPlayer().hasSpell(pDoomWarriorAbility))pDoomAlreadyHaveMSG.show()utility.wait(2)doOnce = TRUEELSE; // present them with the choiceIF(showSign() == 0)addSign()abMenu = FalseSELF.playAnimation("playanim01")utility.wait(15)doOnce = TRUEELSEutility.wait(2)doOnce = TRUEabMenu = FalseENDIFENDIFELSEIF aiButton == 1 ; Remove a blessingaiMessage = 1utility.wait(2)ELSEIF aiMessage == 1aiButton = StoneRemovalQuestion01.Show() ; A-R or S-ZIF aiButton == 0 ; A-RaiMessage = 2utility.wait(2)ELSEIF aiMessage == 2aiButton = StoneRemovalQuestion02.Show() ; Which stone?IF aiButton == 0IF(game.getPlayer().hasSpell(pDoomApprenticeAbility))game.getPlayer().removeSpell(pDoomApprenticeAbility)game.getPlayer().removeSpell(pdoomApprenticeNegativeAbility)pDoomApprenticeRemovedMSG.show()abMenu = FalseENDIFELSEIF aiButton == 1IF(game.getPlayer().hasSpell(pDoomAtronachAbility))game.getPlayer().removeSpell(pDoomAtronachAbility)pDoomAtronachRemovedMSG.show()abMenu = FalseENDIFELSEIF aiButton == 2IF(game.getPlayer().hasSpell(pDoomLadyAbility))game.getPlayer().removeSpell(pDoomLadyAbility)pDoomLadyRemovedMSG.show()abMenu = FalseENDIFELSEIF aiButton == 3IF(game.getPlayer().hasSpell(pDoomLordAbility))game.getPlayer().removeSpell(pDoomLordAbility)pDoomLordRemovedMSG.show()abMenu = FalseENDIFELSEIF aiButton == 4IF(game.getPlayer().hasSpell(pDoomLoverAbility))game.getPlayer().removeSpell(pDoomLoverAbility)pDoomLoverRemovedMSG.show()abMenu = FalseENDIFELSEIF aiButton == 5IF(game.getPlayer().hasSpell(pDoomMageAbility))game.getPlayer().removeSpell(pDoomMageAbility)pDoomMageRemovedMSG.show()abMenu = FalseENDIFELSEIF aiButton == 6IF(game.getPlayer().hasSpell(pDoomRitualAbility))game.getPlayer().removeSpell(pDoomRitualAbility)pDoomRitualRemovedMSG.show()abMenu = FalseENDIFENDIFELSEIF aiButton == 1 ; S-ZaiMessage = 3utility.wait(2)ELSEIF aiMessage == 3aiButton = StoneRemovalQuestion03.Show()ELSEIF aiButton == 0IF(game.getPlayer().hasSpell(pDoomSerpentAbility))game.getPlayer().removeSpell(pDoomSerpentAbility)pDoomSerpentRemovedMSG.show()abMenu = FalseENDIFELSEIF aiButton == 1IF(game.getPlayer().hasSpell(pDoomShadowAbility))game.getPlayer().removeSpell(pDoomShadowAbility)pDoomShadowRemovedMSG.show()abMenu = FalseENDIFELSEIF aiButton == 2IF(game.getPlayer().hasSpell(pDoomSteedAbility))game.getPlayer().removeSpell(pDoomSteedAbility)pDoomSteedRemovedMSG.show()abMenu = FalseENDIFELSEIF aiButton == 3IF(game.getPlayer().hasSpell(pDoomThiefAbility))game.getPlayer().removeSpell(pDoomThiefAbility)pDoomThiefRemovedMSG.show()abMenu = FalseENDIFELSEIF aiButton == 4IF(game.getPlayer().hasSpell(pDoomTowerAbility))game.getPlayer().removeSpell(pDoomTowerAbility)pDoomTowerRemovedMSG.show()abMenu = FalseENDIFELSEIF aiButton == 2IF(game.getPlayer().hasSpell(pDoomWarriorAbility))game.getPlayer().removeSpell(pDoomWarriorAbility)pDoomWarriorRemovedMSG.show()abMenu = FalseENDIFENDIFENDIFdoOnce = TRUEENDIFENDWHILEendFUNCTION It's getting confusing for me, considering I have only really tried scripting a few times. Any help would be appreciated. Link to comment Share on other sites More sharing options...
Recommended Posts