;-----------------------------------------------------------------------------------------;Script Disabling;-----------------------------------------------------------------------------------------if ( CellChanged == 1 ) StopScript, "AI_Attachment_5"elseif ( player->GetEffect sEffectRecall == 1 ) StopScript, "AI_Attachment_5"elseif ( player->GetEffect sEffectDivineIntervention == 1 ) StopScript, "AI_Attachment_5"elseif ( player->GetEffect sEffectAlmsiviIntervention == 1 ) StopScript, "AI_Attachment_5"endifset timer to ( timer + GetSecondsPassed )if ( timer >= 15 ) set timer to 0 StopScript, "AI_Attachment_5"endifIf ( GetHealth < 1 ) Stopscript, "AI_Attachment_5"endifif ( GetDistance "player" >= 1500 ) StopScript, "AI_Attachment_5"endifAI_Attachment_5 after
;-----------------------------------------------------------------------------------------;Script Disabling;-----------------------------------------------------------------------------------------if ( CellChanged == 1 ) StopScript, "AI_Attachment_5" returnelseif ( player->GetEffect sEffectRecall == 1 ) StopScript, "AI_Attachment_5" returnelseif ( player->GetEffect sEffectDivineIntervention == 1 ) StopScript, "AI_Attachment_5" returnelseif ( player->GetEffect sEffectAlmsiviIntervention == 1 ) StopScript, "AI_Attachment_5" returnendifset timer to ( timer + GetSecondsPassed )if ( timer >= 15 ) set timer to 0 StopScript, "AI_Attachment_5" returnendifIf ( GetHealth < 1 ) Stopscript, "AI_Attachment_5" returnendifif ( GetDistance "player" >= 1500 ) StopScript, "AI_Attachment_5" returnendif
If ( DisableScript == 1 )Set MagickaRegenTimer to 0Set Timer to 0Set DisableScript to 0set doonce to 0set state to 0set delay to 0set stop to 0set wstate to 0Removespell "Easier Magicka"Removespell "AI_Is_Creature"Removespell "AI_Is_NPC"SetAttackBonus, 0If ( 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_Main_1"ReturnEndifIf ( ( GetJournalIndex "GV_Reloaded" ) != 100 )Set MagickaRegenTimer to 0Set Timer to 0Set DisableScript to 0set doonce to 0set state to 0set delay to 0set stop to 0set wstate to 0ReturnEndif;-----------------------------------------------------------------------------------------;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 1ReturnEndif
Ifx ( State ) Set State to 0 Set NPCref to 0 Set Call to 0 StopScript AI_Protective_Guards_Scout return Else Ifx ( npcref ) Set call to 0 Setx npcref to xNextRef npcref ElseAlso, unrelated but strange exporting scripts sources from Mash I found there's a spurious NUL character after each script End, I don't think it creates problems compiling but as I've never seen it before maybe better know.
Ifx ( State ) Set State to 0 Set NPCref to 0 Set Call to 0 StopScript AI_Protective_Guards_Scout return Else Ifx ( npcref ) Set call to 0 Setx npcref to xNextRef npcref ElseAlso, unrelated but strange exporting scripts sources from Mash I found there's a spurious NUL character after each script End, I don't think it creates problems compiling but as I've never seen it before maybe better know.