Scriptname SoSWildsConfigScript extends Quest  conditional
{Launches the SoS-Wilds in-game configuration menu that allows the player to choose personal settings on the new sound effects.}

Quest Property WildsConfigQuest  Auto  

Message Property EnableDisableMainMenu  Auto  

Message Property EnableDisableBats  Auto  
Message Property EnableDisableCoyotes  Auto  
Message Property EnableDisableDeers  Auto  
Message Property EnableDisableFlies  Auto  
Message Property EnableDisableForestBirds  Auto  
Message Property EnableDisableFoxes  Auto  
Message Property EnableDisableGoats  Auto  
Message Property EnableDisableHawks  Auto  
Message Property EnableDisableHorkers  Auto  
Message Property EnableDisableLoons  Auto  
Message Property EnableDisableOwls  Auto  
Message Property EnableDisableRainImpacts  Auto  
Message Property EnableDisableRavens  Auto  
Message Property EnableDisableSabreCats  Auto  
Message Property EnableDisableSeaGulls  Auto  
Message Property EnableDisableWolves  Auto  
Message Property EnableDisableEndMessage  Auto  

Int ChosenOption = 0
Int EnableDisablePage

Int BatsDisabled  Conditional
Int CoyotesDisabled  Conditional
Int DeersDisabled  Conditional
Int FliesDisabled  Conditional
Int ForestBirdsDisabled  Conditional
Int FoxesDisabled  Conditional
Int GoatsDisabled  Conditional
Int HawksDisabled  Conditional
Int HorkersDisabled  Conditional
Int LoonsDisabled  Conditional
Int OwlsDisabled  Conditional
Int RainImpactsDisabled  Conditional
Int RavensDisabled  Conditional
Int SabrecatsDisabled  Conditional
Int SeaGullsDisabled  Conditional
Int WolvesDisabled  Conditional



Event OnInit() ; This event will run once, when the script is initialized
	RegisterForSingleUpdate(3)
EndEvent

Event OnUpdate()

	ChosenOption = EnableDisableMainMenu.Show()

		If (ChosenOption == 0)
			EnableDisablePage = 1
			If (EnableDisablePage == 1)
				EnableDisablePage = 0
					ChosenOption = EnableDisableBats.Show()
						If (ChosenOption == 0)
							BatsDisabled = 0
							EnableDisablePage = 2
						ElseIf (ChosenOption == 1)
							BatsDisabled = 1
							EnableDisablePage = 2
						Endif
			Endif
		ElseIf (chosenOption == 1)
			EnableDisableEndMessage.Show()
			Stop()
		Endif
		
		If (EnableDisablePage == 2)
				EnableDisablePage = 0
					ChosenOption = EnableDisableCoyotes.Show()
						If (ChosenOption == 0)
							CoyotesDisabled = 0
							EnableDisablePage = 3
						ElseIf (ChosenOption == 1)
							CoyotesDisabled = 1
							EnableDisablePage = 3
						Endif	
		Endif	

		If (EnableDisablePage == 3)
				EnableDisablePage = 0
					ChosenOption = EnableDisableDeers.Show()
						If (ChosenOption == 0)
							DeersDisabled = 0
							EnableDisablePage = 4
						ElseIf (ChosenOption == 1)
							DeersDisabled = 1
							EnableDisablePage = 4
						Endif	
		Endif

		If (EnableDisablePage == 4)
				EnableDisablePage = 0
					ChosenOption = EnableDisableFlies.Show()
						If (ChosenOption == 0)
							FliesDisabled = 0
							EnableDisablePage = 5
						ElseIf (ChosenOption == 1)
							FliesDisabled = 1
							EnableDisablePage = 5
						Endif	
		Endif

		If (EnableDisablePage == 5)
				EnableDisablePage = 0
					ChosenOption = EnableDisableForestBirds.Show()
						If (ChosenOption == 0)
							ForestBirdsDisabled = 0
							EnableDisablePage = 6
						ElseIf (ChosenOption == 1)
							ForestBirdsDisabled = 1
							EnableDisablePage = 6
						Endif	
		Endif	

		If (EnableDisablePage == 6)
				EnableDisablePage = 0
					ChosenOption = EnableDisableFoxes.Show()
						If (ChosenOption == 0)
							FoxesDisabled = 0
							EnableDisablePage = 7
						ElseIf (ChosenOption == 1)
							FoxesDisabled = 1
							EnableDisablePage = 7
						Endif	
		Endif	

		If (EnableDisablePage == 7)
				EnableDisablePage = 0
					ChosenOption = EnableDisableGoats.Show()
						If (ChosenOption == 0)
							GoatsDisabled = 0
							EnableDisablePage = 8
						ElseIf (ChosenOption == 1)
							GoatsDisabled = 1
							EnableDisablePage = 8
						Endif	
		Endif

		If (EnableDisablePage == 8)
				EnableDisablePage = 0
					ChosenOption = EnableDisableHawks.Show()
						If (ChosenOption == 0)
							HawksDisabled = 0
							EnableDisablePage = 9
						ElseIf (ChosenOption == 1)
							HawksDisabled = 1
							EnableDisablePage = 9
						Endif	
		Endif

		If (EnableDisablePage == 9)
				EnableDisablePage = 0
					ChosenOption = EnableDisableHorkers.Show()
						If (ChosenOption == 0)
							HorkersDisabled = 0
							EnableDisablePage = 10
						ElseIf (ChosenOption == 1)
							HorkersDisabled = 1
							EnableDisablePage = 10
						Endif	
		Endif

		If (EnableDisablePage == 10)
				EnableDisablePage = 0
					ChosenOption = EnableDisableLoons.Show()
						If (ChosenOption == 0)
							LoonsDisabled = 0
							EnableDisablePage = 11
						ElseIf (ChosenOption == 1)
							LoonsDisabled = 1
							EnableDisablePage = 11
						Endif	
		Endif

		If (EnableDisablePage == 11)
				EnableDisablePage = 0
					ChosenOption = EnableDisableOwls.Show()
						If (ChosenOption == 0)
							OwlsDisabled = 0
							EnableDisablePage = 12
						ElseIf (ChosenOption == 1)
							OwlsDisabled = 1
							EnableDisablePage = 12
						Endif	
		Endif

		If (EnableDisablePage == 12)
				EnableDisablePage = 0
					ChosenOption = EnableDisableRavens.Show()
						If (ChosenOption == 0)
							RavensDisabled = 0
							EnableDisablePage = 13
						ElseIf (ChosenOption == 1)
							RavensDisabled = 1
							EnableDisablePage = 13
						Endif	
		Endif

		If (EnableDisablePage == 13)
				EnableDisablePage = 0
					ChosenOption = EnableDisableSabreCats.Show()
						If (ChosenOption == 0)
							SabrecatsDisabled = 0
							EnableDisablePage = 14
						ElseIf (ChosenOption == 1)
							SabrecatsDisabled = 1
							EnableDisablePage = 14
						Endif	
		Endif

		If (EnableDisablePage == 14)
				EnableDisablePage = 0
					ChosenOption = EnableDisableSeagulls.Show()
						If (ChosenOption == 0)
							SeaGullsDisabled = 0
							EnableDisablePage = 15
						ElseIf (ChosenOption == 1)
							SeaGullsDisabled = 1
							EnableDisablePage = 15
						Endif	
		Endif

		If (EnableDisablePage == 15)
				EnableDisablePage = 0
					ChosenOption = EnableDisableWolves.Show()
						If (ChosenOption == 0)
							WolvesDisabled = 0
							EnableDisablePage = 16
						ElseIf (ChosenOption == 1)
							WolvesDisabled = 1
							EnableDisablePage = 16
						Endif	
		Endif

		If (EnableDisablePage == 16)
				EnableDisablePage = 0
					ChosenOption = EnableDisableRainImpacts.Show()
						If (ChosenOption == 0)
							RainImpactsDisabled = 0
							EnableDisablePage = 17
						ElseIf (ChosenOption == 1)
							RainImpactsDisabled = 1
							EnableDisablePage = 17
						Endif	
		Endif

		If (EnableDisablePage == 17)
			EnableDisablePage = 0
			EnableDisableEndMessage.Show()
			WildsConfigQuest.Stop()
		Endif			

EndEvent

