Please take a look and see if you can identify why the update block and finish block aren't running properly.
scn TCShadowStepAllylong indexref NPCref selfref actref meref staticref sourceshort switchshort fatigueshort succeedfloat randnumfloat xpfloat xcfloat ypfloat ycfloat zpfloat zcfloat faceanglefloat anglefloat angleoriginalfloat anglecorrectfloat sinefloat cosinefloat fact2float fact3float fact4float fact5float fact6float fact7float fact8float fact9float x2float x3float x4float x5float x6float x7float x8float x9float newxfloat newyfloat newzfloat dummyint targetint doneint staggerfloat dfloat prevdfloat afloat angletargetfloat stopposxfloat stopposyBegin ScriptEffectStart if act act.RemoveMe endif set index to GetScriptActiveEffectIndex set NPC to GetNthActiveEffectCaster index set static to SKSSTarget set self to GetSelf set succeed to (( rand 0 30 ) + 1) + ((NPC.getav luck / 10) + (NPC.getav Mysticism / 5) *3) if(self.IsActor == 0 && self.getisid static == 0); message "Missed!" ~ if you miss, reenable the player~ NPC.removespell TcStepping NPC.removespell TcShadowFocusing NPC.SetRestrained 0 NPC.SetUnconscious 0 endif if (target == 1) return endif if (target == 0) set act to self.placeatme TcShadow 1,256,0 set target to 1 endif if (((NPC.isSneaking == 1 && self.IsActor == 1) || self.getisid static == 1)); && self != NPC && isthirdperson == 0 && self.getdistance NPC > 200 && self.getdistance NPC < 1500) NPC.addspell TcShadowFocusing ; add effects if(succeed < 25 && succeed > -1 ) ; add effects of failed step set fatigue to NPC.getav Fatigue set fatigue to ( fatigue * -1 )+1 NPC.ModActorValue2 Fatigue fatigue NPC.PlayGroup Stagger 1 else set fatigue to NPC.GetBaseActorValue fatigue set fatigue to ( fatigue * 30 /100) NPC.ModActorValue2 Fatigue fatigue endif set succeed to -1 set faceangle to NPC.getangle z + NPC.GetHeadingAngle self NPC.setangle z faceangle set angleoriginal to NPC.GetAngle z set angletarget to self.GetAngle z if (angleoriginal >= 360) set angleoriginal to angleoriginal - 360.0 endif if (angletarget >= 360) set angletarget to angletarget - 360.0 endif set anglecorrect to angleoriginal set angleoriginal to angleoriginal % 90 set angle to (angleoriginal / 57.29) set fact2 to 2.0 set fact3 to 6.0 set fact4 to 24.0 set fact5 to 120.0 set fact6 to 720.0 set fact7 to 5040.0 set fact8 to 40320.0 set fact9 to 362880.0 set x2 to (angle * angle) set x3 to (angle * angle * angle) set x4 to (x2 * x2) set x5 to (x2 * x3) set x6 to (x3 * x3) set x7 to (x3 * x4) set x8 to (x4 * x4) set x9 to (x5 * x4) set sine to (angle - (x3 / fact3) + (x5 / fact5) - (x7 / fact7) + (x9 / fact9)) set cosine to (1.0 - (x2 / fact2) + (x4 / fact4) - (x6 / fact6) + (x8 / fact8)) set newx to sine * 1625 * GetSecondsPassed set newy to cosine * 1625 * GetSecondsPassed if (anglecorrect >= 270) set dummy to newx set newx to 0 - newy set newy to dummy elseif (anglecorrect >= 180) set newx to 0 - newx set newy to 0 - newy elseif (anglecorrect >= 90) set dummy to newy set newy to 0 - newx set newx to dummy endif set xc to NPC.getpos x set xp to act.getpos x set yc to NPC.getpos y set yp to act.getpos y set zc to NPC.getpos z set zp to act.getpos z set newz to (zc - zp) / 20 set done to 0 set stagger to 0 set anglecorrect to angletarget set angleoriginal to angleoriginal % 90 set angle to (angleoriginal / 57.29) set fact2 to 2.0 set fact3 to 6.0 set fact4 to 24.0 set fact5 to 120.0 set fact6 to 720.0 set fact7 to 5040.0 set fact8 to 40320.0 set fact9 to 362880.0 set x2 to (angle * angle) set x3 to (angle * angle * angle) set x4 to (x2 * x2) set x5 to (x2 * x3) set x6 to (x3 * x3) set x7 to (x3 * x4) set x8 to (x4 * x4) set x9 to (x5 * x4) set sine to (angle - (x3 / fact3) + (x5 / fact5) - (x7 / fact7) + (x9 / fact9)) set cosine to (1.0 - (x2 / fact2) + (x4 / fact4) - (x6 / fact6) + (x8 / fact8)) set stopposx to sine * -50 set stopposy to cosine * -50 if (anglecorrect >= 270) set dummy to stopposx set stopposx to 0 - stopposy set stopposy to dummy elseif (anglecorrect >= 180) set stopposx to 0 - stopposx set stopposy to 0 - stopposy elseif (anglecorrect >= 90) set dummy to stopposy set stopposy to 0 - stopposx set stopposx to dummy endifelse set done to 1 NPC.removespell TcStepping Npc.removespell TcShadowFocusing NPC.SetRestrained 0 NPC.SetUnconscious 0endif set d to NPC.GetDistance act set prevd to dEndBegin ScriptEffectUpdate set xc to NPC.getpos x set xp to act.getpos x set yc to NPC.getpos y set yp to act.getpos y set zc to NPC.getpos z set zp to act.getpos z set d to NPC.GetDistance act if (stagger > 0 && stagger < 30) self.setangle z a set stagger to stagger + 1 endif if (NPC.GetDistance act < 300 && done == 0 && stagger == 0) self.removespell TcStepping Npc.removespell TcShadowFocusing NPC.SetRestrained 0 NPC.SetUnconscious 0 set a to self.getangle z self.setangle z a NPC.setangle z a set stopposx to stopposx + self.getpos x set stopposy to stopposy + self.getpos y NPC.setpos x stopposx NPC.setpos y stopposy set stagger to 1 set done to 1 NPC.removespell TcStepping endif if ((self.getisid static == 1 || (self.IsActor == 1 && self != NPC))&& done != 1) message "Moving player" set xc to xc + newx set yc to yc + newy if ((newz < 0 && zc < zp) || (newz > 0 && zc > zp)) set zc to zc - newz endif NPC.setpos x xc NPC.setpos y yc NPC.setpos z zc NPC.TriggerHitShader 1 endif set prevd to dEndBegin ScriptEffectFinish self.removespell TcStepping Npc.removespell TcShadowFocusing NPC.SetRestrained 0 NPC.SetUnconscious 0 act.RemoveMeEnd