This is where the problems begin. This script is causing the game to crash upon loading a saved game about every other time you try to load it.
Spoiler
Begin AI_Attachment_ScoutShort DoStopScriptLong AIRefLong TempFloat Timer;This script individually hooks the AI_Attachment scripts to each NPC/Creature.If ( ( GetJournalIndex "GV_Reloaded" ) != 100 ) ; This is set to 100 after 5 seconds in a separate script.Set AIRef to 0Set Timer to 0ReturnEndifIf ( Timer <= 0.5 ) ; Script cycles every 0.5 seconds.Set Timer to ( Timer + GetSecondsPassed )ReturnElseSet Timer to 0EndifIf ( MenuMode == 1 )ReturnElseif ( CellChanged == 1 )ReturnElseif ( Player->GetEffect, sEffectRecall == 1 )ReturnElseif ( Player->GetEffect, sEffectDivineIntervention == 1 )ReturnElseif ( Player->GetEffect, sEffectAlmsiviIntervention == 1 )ReturnEndifIfx ( AIRef )Setx AIRef to xNextRef, AIRefElseSetx AIRef to xFirstNPCEndifIf ( DoStopScript == 1 )If ( AI_Attachment_Count != 0 ) ; Never completely stop this script if there are no attachment scripts currently running.Set DoStopScript to 0StopScript, "AI_Attachment_Scout"EndifEndifIf ( AIRef == 0 )ReturnEndifSetx Temp to AIRef->xRefTypeIf ( Temp != 1598246990 ) ;if not type NPCIf ( Temp != 1095062083 ) ;if not type CreatureReturnEndifEndifxSetRef, AIRefIf ( GetDisabled )ReturnEndifxSetRef, AIRefIf ( GetHealth < 1 )ReturnEndifxSetRef, AIRefIf ( GetSpell, "AI_Has_Attachment" > 0 )ReturnEndifXSetRef, AIRefIf ( GetDistance, Player > 2048 )Return ; No need to worry about them if they are that far away.EndifxSetRef, AIRefStartScript "AI_Attachment_Distributor"If ( GV_Attachment_Allowance == 5 ); The number of allowed attachment's is chosen in the GV configuration menu.If ( AI_Attachment_Count >= 5 ) ; The count is increased by one everytime an attachment script begins running.Set DoStopScript to 0 ; Stop the script because the maximum allowance has been used.ReturnEndifElseif ( GV_Attachment_Allowance == 10 )If ( AI_Attachment_Count >= 10 )Set DoStopScript to 0ReturnEndifElseif ( GV_Attachment_Allowance == 15 )If ( AI_Attachment_Count >= 15 )Set DoStopScript to 0ReturnEndifElseif ( GV_Attachment_Allowance == 20 )If ( AI_Attachment_Count >= 20 )Set DoStopScript to 0ReturnEndifEndifEnd
These are the scripts that it utilizes.
Spoiler
Begin AI_Attachment_DistributorIf ( GV_Attachment_Allowance == 5 )If ( AI_Attachment_Count >= 5 )Stopscript, "AI_Attachment_Distributor"ReturnEndifElseif ( GV_Attachment_Allowance == 10 )If ( AI_Attachment_Count >= 10 )Stopscript, "AI_Attachment_Distributor"ReturnEndifElseif ( GV_Attachment_Allowance == 15 )If ( AI_Attachment_Count >= 15 )Stopscript, "AI_Attachment_Distributor"ReturnEndifElseif ( GV_Attachment_Allowance == 20 )If ( AI_Attachment_Count >= 20 )Stopscript, "AI_Attachment_Distributor"ReturnEndifEndifIf ( Scriptrunning, "AI_Attachment_1" == 0 )Startscript, "AI_Attachment_1"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_2" == 0 )Startscript, "AI_Attachment_2"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_3" == 0 )Startscript, "AI_Attachment_3"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_4" == 0 )Startscript, "AI_Attachment_4"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_5" == 0 )Startscript, "AI_Attachment_5"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_6" == 0 )Startscript, "AI_Attachment_6"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_7" == 0 )Startscript, "AI_Attachment_7"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_8" == 0 )Startscript, "AI_Attachment_8"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_9" == 0 )Startscript, "AI_Attachment_9"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_10" == 0 )Startscript, "AI_Attachment_10"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_11" == 0 )Startscript, "AI_Attachment_11"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_12" == 0 )Startscript, "AI_Attachment_12"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_13" == 0 )Startscript, "AI_Attachment_13"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_14" == 0 )Startscript, "AI_Attachment_14"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_15" == 0 )Startscript, "AI_Attachment_15"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_16" == 0 )Startscript, "AI_Attachment_16"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_17" == 0 )Startscript, "AI_Attachment_17"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_18" == 0 )Startscript, "AI_Attachment_18"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_19" == 0 )Startscript, "AI_Attachment_19"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )ElseIf ( Scriptrunning, "AI_Attachment_20" == 0 )Startscript, "AI_Attachment_20"Set AI_Attachment_Count to ( AI_Attachment_Count + 1 )EndifStopscript, "AI_Attachment_Distributor"End
This script causes the game to crash randomly during fights.
Spoiler
Begin AI_Attachment_1;This script attaches the abilities, magicka regeneration, and sound effects to any NPCs/Creatures that are far away from the player.Short DisableScriptShort FrameShort SwingingWeaponShort GettingHurtShort HealthDamageSoundRandomizerShort HitSoundRandomizerShort MarksmanSoundRandomizerShort SwishSoundRandomizerShort SpellSoundRandomizerShort BowPulledShort BowShotFloat BowPullTimerFloat BowShootTimerShort CrossBowPulledShort CrossBowShotFloat CrossBowPullTimerFloat CrossBowShootTimerShort StuntedMagickaFloat MagickaRegenRateFloat MagickaRegenTimerFloat CurMagickaFloat WillpowerFloat DamagedFatigueFloat CurrentFatigueFloat HtHDamageFloat Timer;-----------------------------------------------------------------------------------------;CTD Prevention;-----------------------------------------------------------------------------------------If ( DisableScript == 1 )Set BowShootTimer to 0Set BowPullTimer to 0Set CrossbowShootTimer to 0Set CrossbowPullTimer to 0Set MagickaRegenTimer to 0Set Timer to 0Set DisableScript to 0Removespell "Easier Magicka"Removespell "AI_Has_Attachment"If ( AI_Attachment_Count > 0 )Set AI_Attachment_Count to ( AI_Attachment_Count - 1 )EndifIf ( Scriptrunning, "AI_Attachment_Scout" == 0 )Startscript, "AI_Attachment_Scout" ; When stopping this script, begin the scout script again.EndifStopScript, "AI_Attachment_1"ReturnEndifIf ( ( GetJournalIndex "GV_Reloaded" ) != 100 )Set DisableScript to 1ReturnEndif;-----------------------------------------------------------------------------------------;NPC/Creature Abilities;-----------------------------------------------------------------------------------------If ( GetSpell, "Easier Magicka" == 1 )If ( MenuMode == 1 )Set DisableScript to 1ReturnEndifElseif ( GetSpell, "Easier Magicka" == 0 )If ( MenuMode == 0 )If ( GV_Attack_Bonus == 4 )SetAttackBonus, 200 ; Makes the striking more realistic and solidElseIf ( GV_Attack_Bonus == 3 )SetAttackBonus, 75ElseIf ( GV_Attack_Bonus == 2 )SetAttackBonus, 50ElseIf ( GV_Attack_Bonus == 1 )SetAttackBonus, 25ElseIf ( GV_Attack_Bonus == 0 )SetAttackBonus, 0EndifSetDefendBonus, -100 ; Removes any Sanctuary effects from the actorAddspell, "Easier Magicka" ; Makes casting spells easierAddspell, "AI_Has_Attachment"EndifEndif;-----------------------------------------------------------------------------------------;NPC/Creature Magicka Regeneration;-----------------------------------------------------------------------------------------If ( GV_Magicka_Regen > 0 ) ; 0 is skipping magicka regneration entirelySet StuntedMagicka To ( GetEffect, sEffectStuntedMagicka )If ( StuntedMagicka == 0 )Set MagickaRegenTimer to ( MagickaRegenTimer + GetSecondsPassed )If ( MagickaRegenTimer >= 1 )Set MagickaRegenTimer to 0Set Willpower to ( GetWillpower )Set CurMagicka to ( GetMagicka )Set MagickaRegenRate To ( ( 0.02 * Willpower ) + 0.75 )Set MagickaRegenRate To ( 0.01 * MagickaRegenRate )Set MagickaRegenRate To ( MagickaRegenRate * CurMagicka ); If GV_Magicka_Regen is set to 4 (default value), magicka regen speed is the same as Oblivion's.If ( GV_Magicka_Regen == 3 ) ; These options are picked in the GV configuration menu.Set MagickaRegenRate to ( MagickaRegenRate * 0.75 ) ; This slows the regen rate by 25%.ElseIf ( GV_Magicka_Regen == 2 )Set MagickaRegenRate to ( MagickaRegenRate * 0.50 ) ; This slows the regen rate by 50%.ElseIf ( GV_Magicka_Regen == 1 )Set MagickaRegenRate to ( MagickaRegenRate * 0.25 ) ; This slows the regen rate by 75%.EndIfIf ( MagickaRegenRate < 1 )ModCurrentMagicka 1ElseModCurrentMagicka MagickaRegenRateEndifEndifEndifEndif;-----------------------------------------------------------------------------------------;Script Disabling;-----------------------------------------------------------------------------------------If ( CellChanged == 1 )Set DisableScript to 1ReturnElseif ( Player->GetEffect sEffectRecall == 1 )Set DisableScript to 1ReturnElseif ( Player->GetEffect sEffectDivineIntervention == 1 )Set DisableScript to 1ReturnElseif ( Player->GetEffect sEffectAlmsiviIntervention == 1 )Set DisableScript to 1ReturnEndifIf ( GetHealth < 1 )Set DisableScript to 1ReturnEndifSet Frame to ( Frame + 1 ) ;we don't want to do this too muchIf ( Frame > 25 )Set Frame to 0If ( GetDistance, Player > 2048 )Set DisableScript to 1ReturnEndifEndif;-----------------------------------------------------------------------------------------;NPC Sound Effects;-----------------------------------------------------------------------------------------Set CurrentFatigue to GetFatigueIf ( GetSoundPlaying "Health Damage" == 0 )If ( GettingHurt == 1 )Set GettingHurt to 0EndifEndif;Begin Hit SoundsIf ( GetSoundPlaying "Health Damage" == 1 )If ( GettingHurt == 0 )Set GettingHurt to 1Set HealthDamageSoundRandomizer to Random, 6If ( Player->GetSpell, "Critically Striking Novice" == 1 )PlaySound3D "Critical Damage"Set HealthDamageSoundRandomizer to 6 ; Skip playing the health damage sound effects.ElseIf ( Player->GetSpell, "Critically Striking Apprentice" == 1 )PlaySound3D "Critical Damage"Set HealthDamageSoundRandomizer to 6 ; Skip playing the health damage sound effects.ElseIf ( Player->GetSpell, "Critically Striking Journeyman" == 1 )PlaySound3D "Critical Damage"Set HealthDamageSoundRandomizer to 6 ; Skip playing the health damage sound effects.ElseIf ( Player->GetSpell, "Critically Striking Expert" == 1 )PlaySound3D "Critical Damage"Set HealthDamageSoundRandomizer to 6 ; Skip playing the health damage sound effects.ElseIf ( Player->GetSpell, "Critically Striking Master" == 1 )PlaySound3D "Critical Damage"Set HealthDamageSoundRandomizer to 6 ; Skip playing the health damage sound effects.EndifIf ( HealthDamageSoundRandomizer == 0 )PlaySound3D "Health Damage 01"ElseIf ( HealthDamageSoundRandomizer == 1 )PlaySound3D "Health Damage 02"ElseIf ( HealthDamageSoundRandomizer == 2 )PlaySound3D "Health Damage 03"ElseIf ( HealthDamageSoundRandomizer == 3 )PlaySound3D "Health Damage 04"ElseIf ( HealthDamageSoundRandomizer == 4 )PlaySound3D "Health Damage 05"ElseIf ( HealthDamageSoundRandomizer == 5 )PlaySound3D "Health Damage 06"ElseIf ( HealthDamageSoundRandomizer == 6 ) ; Critical StrikeSet HealthDamageSoundRandomizer to Random, 5If ( HealthDamageSoundRandomizer == 0 )PlaySound3D "Critical Damage 01"ElseIf ( HealthDamageSoundRandomizer == 1 )PlaySound3D "Critical Damage 02"ElseIf ( HealthDamageSoundRandomizer == 2 )PlaySound3D "Critical Damage 03"ElseIf ( HealthDamageSoundRandomizer == 3 )PlaySound3D "Critical Damage 04"ElseIf ( HealthDamageSoundRandomizer == 4 )PlaySound3D "Critical Damage 05"EndifEndifEndifEndifIf ( GetSoundPlaying "Hand to Hand Hit" == 1 )StopSound, "Hand to Hand Hit"Set HitSoundRandomizer to Random, 3If ( HitSoundRandomizer == 0 )PlaySound3D "Hand to Hand Hit 01"ElseIf ( HitSoundRandomizer == 1 )PlaySound3D "Hand to Hand Hit 02"ElseIf ( HitSoundRandomizer == 2 )PlaySound3D "Hand to Hand Hit 03"Endif; Hand-to-Hand Health DamageSet DamagedFatigue to GetFatigueIf ( DamagedFatigue < CurrentFatigue )Set HtHDamage to ( CurrentFatigue - DamagedFatigue )set HtHDamage to ( HtHDamage / 2 ) ; Amount of health damage is half of fatigue damage caused by each punch.set HtHDamage to ( HtHDamage * -1 )ModCurrentHealth, HtHDamageEndifElseif ( Player->GetSoundPlaying "Hand to Hand Hit 2" == 1 )StopSound, "Hand to Hand Hit 2"Set HitSoundRandomizer to Random, 3If ( HitSoundRandomizer == 0 )PlaySound3D "Hand to Hand Hit 01"ElseIf ( HitSoundRandomizer == 1 )PlaySound3D "Hand to Hand Hit 02"ElseIf ( HitSoundRandomizer == 2 )PlaySound3D "Hand to Hand Hit 03"Endif; Hand-to-Hand Health DamageSet DamagedFatigue to GetFatigueIf ( DamagedFatigue < CurrentFatigue )Set HtHDamage to ( CurrentFatigue - DamagedFatigue )set HtHDamage to ( HtHDamage / 2 ) ; Amount of health damage is half of fatigue damage caused by each punch.set HthDamage to ( HtHDamage * -1 )ModCurrentHealth, HtHDamageEndifEndifIf ( GetSoundplaying, "Light Armor Hit" == 1)Set HitSoundRandomizer to Random, 7StopSound, "Light Armor Hit"If ( HitSoundRandomizer == 0 )Playsound3D, "Light Armor Hit 01"elseIf ( HitSoundRandomizer == 1 )Playsound3D, "Light Armor Hit 02"elseIf ( HitSoundRandomizer == 2 )Playsound3D, "Light Armor Hit 03"elseIf ( HitSoundRandomizer == 3 )Playsound3D, "Light Armor Hit 04"elseIf ( HitSoundRandomizer == 4 )Playsound3D, "Light Armor Hit 05"elseIf ( HitSoundRandomizer == 5 )Playsound3D, "Light Armor Hit 06"endifElseIf ( GetSoundplaying, "Medium Armor Hit" == 1)Set HitSoundRandomizer to Random, 6StopSound, "Medium Armor Hit"If ( HitSoundRandomizer == 0 )Playsound3D, "Medium Armor Hit 01"elseIf ( HitSoundRandomizer == 1 )Playsound3D, "Medium Armor Hit 02"elseIf ( HitSoundRandomizer == 2 )Playsound3D, "Medium Armor Hit 03"elseIf ( HitSoundRandomizer == 3 )Playsound3D, "Medium Armor Hit 04"elseIf ( HitSoundRandomizer == 4 )Playsound3D, "Medium Armor Hit 05"elseIf ( HitSoundRandomizer == 5 )Playsound3D, "Medium Armor Hit 06"endifElseIf ( GetSoundplaying, "Heavy Armor Hit" == 1 )Set HitSoundRandomizer to Random, 6StopSound, "Heavy Armor Hit"If ( HitSoundRandomizer == 0 )Playsound3D, "Heavy Armor Hit 01"elseIf ( HitSoundRandomizer == 1 )Playsound3D, "Heavy Armor Hit 02"elseIf ( HitSoundRandomizer == 2 )Playsound3D, "Heavy Armor Hit 03"elseIf ( HitSoundRandomizer == 3 )Playsound3D, "Heavy Armor Hit 04"elseIf ( HitSoundRandomizer == 4 )Playsound3D, "Heavy Armor Hit 05"elseIf ( HitSoundRandomizer == 5 )Playsound3D, "Heavy Armor Hit 06"endifendif; End Hit Sounds;Begin Weapon Swish SoundsIf ( GetSoundPlaying, "Weapon Swish" == 0 )If ( SwingingWeapon == 1 )Set SwingingWeapon to 0EndifEndifIf ( GetSoundPlaying "Weapon Swish" == 1 )If ( SwingingWeapon == 0 )Set SwingingWeapon to 1Set SwishSoundRandomizer to Random, 3If ( GetWeaponType == -1 ) ; UnarmedIf ( SwishSoundRandomizer == 0 )PlaySound3D "Hand to Hand Swish 01"ElseIf ( SwishSoundRandomizer == 1 )PlaySound3D "Hand to Hand Swish 02"ElseIf ( SwishSoundRandomizer == 2 )PlaySound3D "Hand to Hand Swish 03"EndifElseif ( GetWeaponType == 0 ) ; Short blade, 1-HandIf ( SwishSoundRandomizer == 0 )PlaySound3D "Short Blade Swish 01"ElseIf ( SwishSoundRandomizer == 1 )PlaySound3D "Short Blade Swish 02"ElseIf ( SwishSoundRandomizer == 2 )PlaySound3D "Short Blade Swish 03"EndifElseIf ( GetWeaponType == 1 ) ; Long blade, 1-HandIf ( SwishSoundRandomizer == 0 )PlaySound3D "Long Blade 1H Swish 01"ElseIf ( SwishSoundRandomizer == 1 )PlaySound3D "Long Blade 1H Swish 02"ElseIf ( SwishSoundRandomizer == 2 )PlaySound3D "Long Blade 1H Swish 03"EndifElseIf ( GetWeaponType == 2 ) ; Long blade, 2-HandIf ( SwishSoundRandomizer == 0 )PlaySound3D "Long Blade 2H Swish 01"ElseIf ( SwishSoundRandomizer == 1 )PlaySound3D "Long Blade 2H Swish 02"ElseIf ( SwishSoundRandomizer == 2 )PlaySound3D "Long Blade 2H Swish 03"EndifElseIf ( GetWeaponType == 3 ) ; Blunt, 1-HandIf ( SwishSoundRandomizer == 0 )PlaySound3D "Blunt 1H Swish 01"ElseIf ( SwishSoundRandomizer == 1 )PlaySound3D "Blunt 1H Swish 02"ElseIf ( SwishSoundRandomizer == 2 )PlaySound3D "Blunt 1H Swish 03"EndifElseIf ( GetWeaponType == 4 ); Blunt, 2-Hand CloseIf ( SwishSoundRandomizer == 0 )PlaySound3D "Blunt 2H Close Swish 01"ElseIf ( SwishSoundRandomizer == 1 )PlaySound3D "Blunt 2H Close Swish 02"ElseIf ( SwishSoundRandomizer == 2 )PlaySound3D "Blunt 2H Close Swish 03"EndifElseIf ( GetWeaponType == 5 ); Blunt, 2-Hand WideIf ( SwishSoundRandomizer == 0 )PlaySound3D "Blunt 2H Wide Swish 01"ElseIf ( SwishSoundRandomizer == 1 )PlaySound3D "Blunt 2H Wide Swish 02"ElseIf ( SwishSoundRandomizer == 2 )PlaySound3D "Blunt 2H Wide Swish 03"EndifElseIf ( GetWeaponType == 6 ) ; Spear, 2-Hand WideIf ( SwishSoundRandomizer == 0 )PlaySound3D "Spear Swish 01"ElseIf ( SwishSoundRandomizer == 1 )PlaySound3D "Spear Swish 02"ElseIf ( SwishSoundRandomizer == 2 )PlaySound3D "Spear Swish 03"EndifElseIf ( GetWeaponType == 7 ) ; Axe, 1-HandIf ( SwishSoundRandomizer == 0 )PlaySound3D "Axe 1H Swish 01"ElseIf ( SwishSoundRandomizer == 1 )PlaySound3D "Axe 1H Swish 02"ElseIf ( SwishSoundRandomizer == 2 )PlaySound3D "Axe 1H Swish 03"EndifElseIf ( GetWeaponType == 8 ) ; Axe, 2-Hand CloseIf ( SwishSoundRandomizer == 0 )PlaySound3D "Axe 2H Swish 01"ElseIf ( SwishSoundRandomizer == 1 )PlaySound3D "Axe 2H Swish 02"ElseIf ( SwishSoundRandomizer == 2 )PlaySound3D "Axe 2H Swish 03"EndifElseIf ( GetWeaponType == 11 ) ; Thrown weapon, 1-HandIf ( SwishSoundRandomizer == 0 )PlaySound3D "Thrown Weapon Swish 01"ElseIf ( SwishSoundRandomizer == 1 )PlaySound3D "Thrown Weapon Swish 02"ElseIf ( SwishSoundRandomizer == 2 )PlaySound3D "Thrown Weapon Swish 03"EndifEndifEndifEndif; End Weapon Swish Sounds; Begin Bow/Crossbow SoundsIf ( BowPulled == 1 )set BowPullTimer to ( BowPullTimer + GetSecondsPassed )if ( BowPullTimer >= 2 )set BowPulled to 0endifendifIf ( BowShot == 1 )set BowShootTimer to ( BowShootTimer + GetSecondsPassed )if ( BowShootTimer >= 2 )set BowShot to 0endifendifIf ( CrossBowPulled == 1 )set CrossBowPullTimer to ( CrossBowPullTimer + GetSecondsPassed )if ( CrossBowPullTimer >= 2 )set CrossBowPulled to 0endifendifIf ( CrossBowShot == 1 )set CrossBowShootTimer to ( CrossBowShootTimer + GetSecondsPassed )if ( CrossBowShootTimer >= 2 )set CrossBowShot to 0endifendifIf ( GetSoundPlaying "BowPull" == 1 )StopSound, "BowPull"If ( BowPulled == 0 )Set BowPulled to 1Set BowPullTimer to 0Set MarksmanSoundRandomizer to Random, 3If ( MarksmanSoundRandomizer == 0 )PlaySound3D "Bow Pull 01"ElseIf ( MarksmanSoundRandomizer == 1 )PlaySound3D "Bow Pull 02"ElseIf ( MarksmanSoundRandomizer == 2 )PlaySound3D "Bow Pull 03"EndifEndifElseif ( GetSoundPlaying "BowShoot" == 1 )StopSound, "BowShoot"Set MarksmanSoundRandomizer to Random, 3If ( BowShot == 0 )Set BowShot to 1Set BowShootTimer to 0If ( MarksmanSoundRandomizer == 0 )PlaySound3D "Bow Shoot 01"ElseIf ( MarksmanSoundRandomizer == 1 )PlaySound3D "Bow Shoot 02"ElseIf ( MarksmanSoundRandomizer == 2 )PlaySound3D "Bow Shoot 03"EndifEndifElseif ( GetSoundPlaying "CrossbowPull" == 1 )StopSound, "CrossbowPull"Set MarksmanSoundRandomizer to Random, 3If ( CrossBowPulled == 0 )set CrossBowPulled to 1Set CrossBowPullTimer to 0If ( MarksmanSoundRandomizer == 0 )PlaySound3D "Crossbow Pull 01"ElseIf ( MarksmanSoundRandomizer == 1 )PlaySound3D "Crossbow Pull 02"ElseIf ( MarksmanSoundRandomizer == 2 )PlaySound3D "Crossbow Pull 03"EndifEndifElseif ( GetSoundPlaying "CrossbowShoot" == 1 )StopSound, "CrossbowShoot"Set MarksmanSoundRandomizer to Random, 3If ( CrossBowPulled == 0 )Set CrossBowShot to 1Set CrossBowShootTimer to 0If ( MarksmanSoundRandomizer == 0 )PlaySound3D "Crossbow Shoot 01"ElseIf ( MarksmanSoundRandomizer == 1 )PlaySound3D "Crossbow Shoot 02"ElseIf ( MarksmanSoundRandomizer == 2 )PlaySound3D "Crossbow Shoot 03"EndifEndifEndif;End Bow/Crossbow Sounds;Begin Spell SoundsIf ( GetSoundPlaying, "Destruction Hit" == 1 )StopSound, "Destruction Hit"Set SpellSoundRandomizer to Random, 4If ( SpellSoundRandomizer== 0 )Playsound3D, "Destruction Hit 01"ElseIf ( SpellSoundRandomizer== 1 )Playsound3D, "Destruction Hit 02"ElseIf ( SpellSoundRandomizer== 2 )Playsound3D, "Destruction Hit 03"ElseIf ( SpellSoundRandomizer== 3 )Playsound3D, "Destruction Hit 04"EndifElseIf ( GetSoundPlaying, "Shock Hit" == 1 )StopSound, "Shock Hit"Set SpellSoundRandomizer to Random, 4If ( SpellSoundRandomizer== 0 )Playsound3D, "Shock Hit 01"ElseIf ( SpellSoundRandomizer== 1 )Playsound3D, "Shock Hit 02"ElseIf ( SpellSoundRandomizer== 2 )Playsound3D, "Shock Hit 03"ElseIf ( SpellSoundRandomizer== 3 )Playsound3D, "Shock Hit 04"EndifElseIf ( GetSoundPlaying, "Frost_Hit" == 1 )StopSound, "Frost_Hit"Set SpellSoundRandomizer to Random, 3If ( SpellSoundRandomizer== 0 )Playsound3D, "Frost Hit 01"ElseIf ( SpellSoundRandomizer== 1 )Playsound3D, "Frost Hit 02"ElseIf ( SpellSoundRandomizer== 2 )Playsound3D, "Frost Hit 03"EndifEndif;End Spell SoundsEnd
Somewhere in these scripts lie the reason for the crashing and I haven't been able to figure out what it is after months of trial and error. I could really use some help here. What am I missing?