raziel23x Posted May 6, 2006 Share Posted May 6, 2006 I am having trouble in getting this script to runI can click the actavator and nothing happens but when i click on a different actavator to use it then my script finally kicks in and overrides the other script and finall want to workcan anyone look this over and fix it or tell me what i am doing wrong.here is the script in question ;MSNotepad, Courier New, Regular, 10, Word Wrap Off ScriptName SoulGemsDischargerActavator ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Variables;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ref Continueref GemMenuref GemStoreref MagMenuref MagStoreref NumMenuref NumStoreref RemNumref GemTypeAndMag short Stepshort Petty1PettySoulshort Lesser1PettySoulshort Lesser2LesserSoulshort Common1PettySoulshort Common2LesserSoulshort Common3CommonSoulshort Greater1PettySoulshort Greater2LesserSoulshort Greater3CommonSoulshort Greater4GreaterSoulshort Grand1PettySoulshort Grand2LesserSoulshort Grand3CommonSoulshort Grand4GreaterSoulshort Grand5GrandSoulshort BlackSoulGem ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Section One;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Initialize Values for: ; Continue [Temporary value for the continue selection menu]; GemMenu [Temporary value for the gem selection menu]; GemStore [stored value from the gem selection menu]; MagMenu [Temporary value for the magnitude selection menu]; MagStore [stored value from the magnitude selection menu]; NumMenu [Temporary value for the number selection menu]; NumStore [stored value from the number selection menu]; RemNum [Number of Gem(s) to remove/add at the end]; Step [step we are on in the script] ;Get Item Count(s) for: ; Petty1PettySoul; Lesser1PettySoul; Lesser2LesserSoul; Common1PettySoul; Common2LesserSoul; Common3CommonSoul; Greater1PettySoul; Greater2LesserSoul; Greater3CommonSoul; Greater4GreaterSoul; Grand1PettySoul; Grand2LesserSoul; Grand3CommonSoul; Grand4GreaterSoul; Grand5GrandSoul; BlackSoulGem BEGIN OnActivateIf ( IsActionRef Player == 1 ) set GemMenu to -1 set GemStore to -1 set MagMenu to -1 set MagStore to -1 set NumMenu to -1 set NumStore to -1 set RemNum to -1 set Step to 1 set Petty1PettySoul to player.GetItemCount SoulGem1Petty1PettySoul set Lesser1PettySoul to player.GetItemCount SoulGem2Lesser1PettySoul set Lesser2LesserSoul to player.GetItemCount SoulGem2Lesser2LesserSoul set Common1PettySoul to player.GetItemCount SoulGem3Common1PettySoul set Common2LesserSoul to player.GetItemCount SoulGem3Common2LesserSoul set Common3CommonSoul to player.GetItemCount SoulGem3Common3CommonSoul set Greater1PettySoul to player.GetItemCount SoulGem4Greater1PettySoul set Greater2LesserSoul to player.GetItemCount SoulGem4Greater2LesserSoul set Greater3CommonSoul to player.GetItemCount SoulGem4Greater3CommonSoul set Greater4GreaterSoul to player.GetItemCount SoulGem4Greater4GreaterSoul set Grand1PettySoul to player.GetItemCount SoulGem5Grand1PettySoul set Grand2LesserSoul to player.GetItemCount SoulGem5Grand2LesserSoul set Grand3CommonSoul to player.GetItemCount SoulGem5Grand3CommonSoul set Grand4GreaterSoul to player.GetItemCount SoulGem5Grand4GreaterSoul set Grand5GrandSoul to player.GetItemCount SoulGem5Grand5GrandSoul set BlackSoulGem to player.GetItemCount BlackSoulGemFilledEndif END ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Section Two;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Get Values for: ; GemMenu [Temporary value for the gem selection menu]; GemStore [stored value from the gem selection menu]; MagMenu [Temporary value for the magnitude selection menu]; MagStore [stored value from the magnitude selection menu]; NumMenu [Temporary value for the number selection menu]; NumStore [stored value from the number selection menu]; RemNum [Number of Gem(s) to remove/add at the end]; GemTypeAndMag [Gem ID] ;Remove this [RemNum] number of Soul Gem(s) of this [GemTypeAndMag] type and magnitude ;Add this [RemNum] number of Soul Gem(s) of the appropriate Empty Soul Gem(s) type BEGIN MENUMODE If Step == 0 set GemMenu to -1 set GemStore to -1 set MagMenu to -1 set MagStore to -1 set NumMenu to -1 set NumStore to -1 set RemNum to -1 ReturnEndif If Step == 1 MessageBox "What type of Soul Gem(s) do you wish to empty?", "Petty", "Lesser", "Common", "Greater", "Grand", "Black", "Quit" set Step to 2Endif If Step == 2 set GemMenu to GetButtonPressed if GemMenu > -1 set Step to 3 set GemStore to GemMenu set GemMenu to -1 endifEndif If Step == 3 if GemStore == 0 set MagStore to 0 ;Petty Soul Gems only hold Petty Souls set Step to 5 elseif GemStore == 1 MessageBox "What magnitude of Soul(s) do you wish to release?", "Petty", "Lesser", "Quit" set Step to 4 elseif GemStore == 2 MessageBox "What magnitude of Soul(s) do you wish to release?", "Petty", "Lesser", "Common", "Quit" set Step to 4 elseif GemStore == 3 MessageBox "What magnitude of Soul(s) do you wish to release?", "Petty", "Lesser", "Common", "Greater", "Quit" set Step to 4 elseif GemStore == 4 MessageBox "What magnitude of Soul(s) do you wish to release?", "Petty", "Lesser", "Common", "Greater", "Grand", "Quit" set Step to 4 elseif GemStore == 5 set MagStore to 0 ;Black Soul Gems only hold Grand Souls from Humanoids set Step to 5 elseif GemStore == 6 set Step to 0 endifEndif If Step == 4 set MagMenu to GetButtonPressed if MagMenu > -1 set Step to 5 set MagStore to MagMenu set MagMenu to -1 endifEndif If Step == 5 if GemStore == 0 if MagStore == 0 if Petty1PettySoul < 1 MessageBox "You don't have any Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 51 elseif Petty1PettySoul >= 1 set GemTypeAndMag to SoulGem1Petty1PettySoul set Step to 6 endif endif elseif GemStore == 1 if MagStore == 0 if Lesser1PettySoul < 1 MessageBox "You don't have any Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 51 elseif Lesser1PettySoul >= 1 set GemTypeAndMag to SoulGem2Lesser1PettySoul set Step to 6 endif elseif MagStore == 1 if Lesser2LesserSoul < 1 MessageBox "You don't have any Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 51 elseif Lesser2LesserSoul >= 1 set GemTypeAndMag to SoulGem2Lesser2LesserSoul set Step to 6 endif elseif MagStore == 2 set Step to 0 endif elseif GemStore == 2 if MagStore == 0 if Common1PettySoul < 1 MessageBox "You don't have any Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 51 elseif Common1PettySoul >= 1 set GemTypeAndMag to SoulGem3Common1PettySoul set Step to 6 endif elseif MagStore == 1 if Common2LesserSoul < 1 MessageBox "You don't have any Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 51 elseif Common2LesserSoul >= 1 set GemTypeAndMag to SoulGem3Common2LesserSoul set Step to 6 endif elseif MagStore == 2 if Common3CommonSoul < 1 MessageBox "You don't have any Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 51 elseif Common3CommonSoul >= 1 set GemTypeAndMag to SoulGem3Common3CommonSoul set Step to 6 endif elseif MagStore == 3 set Step to 0 endif elseif GemStore == 3 if MagStore == 0 if Greater1PettySoul < 1 MessageBox "You don't have any Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 51 elseif Greater1PettySoul >= 1 set GemTypeAndMag to SoulGem4Greater1PettySoul set Step to 6 endif elseif MagStore == 1 if Greater2LesserSoul < 1 MessageBox "You don't have any Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 51 elseif Greater2LesserSoul >= 1 set GemTypeAndMag to SoulGem4Greater2LesserSoul set Step to 6 endif elseif MagStore == 2 if Greater3CommonSoul < 1 MessageBox "You don't have any Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 51 elseif Greater3CommonSoul >= 1 set GemTypeAndMag to SoulGem4Greater3CommonSoul set Step to 6 endif elseif MagStore == 3 if Greater4GreaterSoul < 1 MessageBox "You don't have any Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 51 elseif Greater4GreaterSoul >= 1 set GemTypeAndMag to SoulGem4Greater4GreaterSoul set Step to 6 endif elseif MagStore == 4 set Step to 0 endif elseif GemStore == 4 if MagStore == 0 if Grand1PettySoul < 1 MessageBox "You don't have any Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 51 elseif Grand1PettySoul >= 1 set GemTypeAndMag to SoulGem5Grand1PettySoul set Step to 6 endif elseif MagStore == 1 if Grand2LesserSoul < 1 MessageBox "You don't have any Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 51 elseif Grand2LesserSoul >= 1 set GemTypeAndMag to SoulGem5Grand2LesserSoul set Step to 6 endif elseif MagStore == 2 if Grand3CommonSoul < 1 MessageBox "You don't have any Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 51 elseif Grand3CommonSoul >= 1 set GemTypeAndMag to SoulGem5Grand3CommonSoul set Step to 6 endif elseif MagStore == 3 if Grand4GreaterSoul < 1 MessageBox "You don't have any Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 51 elseif Grand4GreaterSoul >= 1 set GemTypeAndMag to SoulGem5Grand4GreaterSoul set Step to 6 endif elseif MagStore == 4 if Grand5GrandSoul < 1 MessageBox "You don't have any Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 51 elseif Grand5GrandSoul >= 1 set GemTypeAndMag to SoulGem5Grand5GrandSoul set Step to 6 endif elseif MagStore == 5 set Step to 0 endif elseif GemStore == 5 if MagStore == 0 if BlackSoulGem < 1 MessageBox "You don't have any Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 51 elseif BlackSoulGem >= 1 set GemTypeAndMag to BlackSoulGemFilled set Step to 6 endif endif endifEndif If Step == 51 set Continue to GetButtonPressed if Continue > -1 if Continue == 0 set Step to 1 set Continue to -1 elseif Continue == 1 set Step to 0 set Continue to -1 endif endifEndif If Step == 6 MessageBox "How many Soul Gems of this type and magnitude do you wish to empty?" "One", "Five", "Ten", "Fifteen", "Twenty", "All", "Quit" set Step to 7Endif If Step == 7 set NumMenu to GetButtonPressed if NumMenu > -1 set Step to 8 set NumStore to NumMenu set NumMenu to -1 endifEndif If Step == 8 if NumStore == 0 set RemNum to 1 set Step to 9 elseif NumStore == 1 if player.GetItemCount GemTypeAndMag >= 5 set RemNum to 5 set Step to 9 elseif player.GetItemCount GemTypeAndMag < 5 MessageBox "You do not have that many Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 81 endif elseif NumStore == 2 if player.GetItemCount GemTypeAndMag >= 10 set RemNum to 10 set Step to 9 elseif player.GetItemCount GemTypeAndMag < 10 MessageBox "You do not have that many Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 81 endif elseif NumStore == 3 if player.GetItemCount GemTypeAndMag >= 15 set RemNum to 15 set Step to 9 elseif player.GetItemCount GemTypeAndMag < 15 MessageBox "You do not have that many Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 81 endif elseif NumStore == 4 if player.GetItemCount GemTypeAndMag >= 20 set RemNum to 20 set Step to 9 elseif player.GetItemCount GemTypeAndMag < 20 MessageBox "You do not have that many Soul Gems of that type and magnitude.", "Continue", "Quit" set Step to 81 endif elseif NumStore == 5 set RemNum to player.GetItemCount GemTypeAndMag set Step to 9 endifEndif If Step == 81 set Continue to GetButtonPressed if Continue > -1 if Continue == 0 set Step to 6 set Continue to -1 elseif Continue == 1 set Step to 0 set Continue to -1 endif endifEndif If Step == 9 player.removeitem GemTypeAndMag RemNum if GemTypeAndMag == SoulGem1Petty1PettySoul player.additem SoulGemEmpty1Petty RemNum elseif (GemTypeAndMag == SoulGem2Lesser1PettySoul) || (GemTypeAndMag == SoulGem2Lesser2LesserSoul) player.additem SoulGemEmpty2Lesser RemNum elseif (GemTypeAndMag == SoulGem3Common1PettySoul) || (GemTypeAndMag == SoulGem3Common2LesserSoul) || (GemTypeAndMag == SoulGem3Common3CommonSoul) player.additem SoulGemEmpty3Common RemNum elseif (GemTypeAndMag == SoulGem4Greater1PettySoul) || (GemTypeAndMag == SoulGem4Greater2LesserSoul) || (GemTypeAndMag == SoulGem4Greater3CommonSoul) || (GemTypeAndMag == SoulGem4Greater4GreaterSoul) player.additem SoulGemEmpty4Greater RemNum elseif (GemTypeAndMag == SoulGem5Grand1PettySoul) || (GemTypeAndMag == SoulGem5Grand2LesserSoul) || (GemTypeAndMag == SoulGem5Grand3CommonSoul) || (GemTypeAndMag == SoulGem5Grand4GreaterSoul) || (GemTypeAndMag == SoulGem5Grand5GrandSoul) player.additem SoulGemEmpty5Grand RemNum elseif GemTypeAndMag == BlackSoulGemFilled player.additem BlackSoulGem RemNum endif set Step to 0Endif END Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.