Haha - I was actually trying to remove that line from my previous post. TES4Gecko did highlight the differences for me. They were changes to records, not scripts.
1 ;*****************************************************************************************************************2 ; Token used to detect stealth magic attacks and apply magic weaknesses where needed 3 ;*****************************************************************************************************************4 5 0000 scn zzSMGeneralTokenScript6 7 ref Self8 short SneakBonus9 short SetBonus10 float Smess11 float timer12 short sPlayerSpells13 short sCount14 short sSumCount15 short sSummons16 short index17 ref Caster18 ref Spell19 float fSaveddamage20 float magnitude21 float fLastResistMagic22 short bisinvisible23 float fHealth24 float fLastHealth25 long effect26 ref curspell27 28 short bPlayerDetected29 float fPlayerDistance30 short bfirstrundone31 32 0004 Begin OnAdd33 34 0010 Set Self to GetContainer35 001F set timer to 136 37 002A End38 39 002E Begin GameMode40 41 0038 If Self.GetIsReference Player42 004E RemoveMe43 0054 Elseif Self == 044 0065 Set Self to GetContainer45 0074 Return46 0078 elseif Self.GetDead == 1 || Self.GetDisabled == 1 || Player.GetDead || Player.GetDisabled47 00B7 RemoveMe48 00BD Endif49 50 00C1 set bPlayerDetected to Self.GetDetected Player51 00D8 set fPlayerDistance to Self.GetDistance Player52 53 00EF if zzSMQuest.fMagicDamage > 0 && UninstallMode == 054 010E if fsaveddamage != zzSMQuest.fMagicDamage || Self.GetTotalAEMagnitude RSMA != fLastResistMagic55 013C set Magnitude to Magnitude * -156 014F Self.modactorvalue ResistMagic Magnitude57 015E set fsaveddamage to zzSMQuest.fMagicDamage58 016E set fLastResistMagic to Self.GetTotalAEMagnitude RSMA59 0185 if fLastResistMagic > 060 0195 set Magnitude to (zzSMQuest.fMagicDamage * 100) * -(1 - fLastResistMagic/100)61 01BD else62 01C3 set Magnitude to zzSMQuest.fMagicDamage * -10063 01DB endif64 ;set Magnitude to zzSMQuest.fMagicDamage * -10065 01DF Self.modactorvalue ResistMagic Magnitude66 01EE endif67 01F2 set fLastResistMagic to Self.GetTotalAEMagnitude RSMA68 0209 elseif Magnitude != 069 021A set Magnitude to Magnitude * -170 022D Self.modactorvalue ResistMagic Magnitude71 023C set Magnitude to 072 0247 set fSaveddamage to 073 0252 endif74 75 0256 set fHealth to Self.GetAV Health76 026C if zzSMTokenScript.rTarget == Self77 ;if zzSMTokenScript.bplayercast == 1 && fHealth < fLastHealth && Self.GetDistance Player <= 17578 ; set zzSMTokenScript.bplayercast to 079 ; if SMFireTokenOn && zzSMTokenScript.bInFire == 1 && Self.GetItemCount zzSMFireToken <= 080 ; Self.AddItemNS zzSMFireToken 181 ; endif82 ; if SMFrostTokenOn && zzSMTokenScript.bInFrost == 1 && Self.GetItemCount zzSMFrostToken <= 083 ; Self.AddItemNS zzSMFrostToken 184 ; endif85 ; if SMShockTokenOn && zzSMTokenScript.bInShock == 1 && Self.GetItemCount zzSMShockToken <= 086 ; Self.AddItemNS zzSMShockToken 187 ; endif88 ; if SMDamageHealthTokenOn && zzSMTokenScript.bInDamage == 1 && Self.GetItemCount zzSMDamageHealthToken <= 089 ; Self.AddItemNS zzSMDamageHealthToken 190 ; endif91 ; if RestoreDamageEnabled && zzSMTokenScript.bInRestore == 1 && Self.GetItemCount zzSMUndeadRestoreToken <= 092 ; Self.AddItemNS zzSMUndeadRestoreToken 193 ; endif94 ;endif95 0282 if zzSMTokenScript.bplayerattack && fHealth < fLastHealth && fPlayerDistance<= 175*zzSMTokenScript.Wreach96 02B5 set zzSMTokenScript.bplayerattack to 097 02C3 if SMFireTokenOn && zzSMTokenScript.bEInFire > 0 && Self.GetItemCount zzSMFireToken <= 098 02F3 Self.AddItemNS zzSMFireToken 199 0305 endif100 0309 if SMFrostTokenOn && zzSMTokenScript.bEInFrost > 0 && Self.GetItemCount zzSMFrostToken <= 0101 0339 Self.AddItemNS zzSMFrostToken 1102 034B endif103 034F if SMShockTokenOn && zzSMTokenScript.bEInShock > 0 && Self.GetItemCount zzSMShockToken <= 0104 037F Self.AddItemNS zzSMShockToken 1105 0391 endif106 0395 if SMDamageHealthTokenOn && zzSMTokenScript.bEInDamage > 0 && Self.GetItemCount zzSMDamageHealthToken <= 0107 03C5 Self.AddItemNS zzSMDamageHealthToken 1108 03D7 endif109 03DB if RestoreDamageEnabled && zzSMTokenScript.bEInRestore > 0 && Self.GetItemCount zzSMUndeadRestoreToken <= 0110 040B Self.AddItemNS zzSMUndeadRestoreToken 1111 041D endif112 0421 endif113 0425 endif114 0429 set fLastHealth to fHealth115 116 ;set timer to timer - GetSecondsPassed117 118 ;if timer <= 0119 ;set timer to 1120 121 122 0436 set sCount to 0123 0441 set sSumCount to 0124 044C set index to Self.GetActiveEffectCount125 045E while index > 0126 0479 set index to index - 1127 048A set Caster to Self.GetNthActiveEffectCaster index128 04A1 set Spell to Self.GetNthActiveEffectMagicItem index129 04B8 set effect to Self.GetNthActiveEffectCode index130 04CF if MEUsesCreatureC effect131 04E2 if sSumCount == 0132 04F3 set curspell to Spell133 0500 endif134 0504 set sSumCount to sSumCount + 1135 0515 endif136 0519 if Caster.IsReference Player && IsSpellHostile Spell137 053D set sCount to sCount + 1138 054E endif139 0552 loop140 141 0556 if sCount > sPlayerSpells && SetBonus == 1 && bPlayerDetected && bfirstrundone142 0582 set Smess to (SneakBonus * -1 + 100) / 100143 05A1 Message "Magical Sneak Attack for %.1fx damage!" Smess144 05D8 endif145 05DC set sPlayerSpells to sCount146 147 ; Adds the AIToken for multiple summons148 05E9 if sSumCount > sSummons && Self.GetItemCount zzSMAIConjurationToken == 0 && bfirstrundone149 0618 set zzSMConjurationControl.AICurspell to curspell150 0628 Self.AddItem zzSMAIConjurationToken 1151 063A endif152 063E set sSummons to sSumCount153 154 064B set bfirstrundone to 1 ;So all the spells that start active all the npc are not counted as new155 156 0656 If fPlayerDistance > 4000 && Self.GetInSameCell Player || SMStealthTokenOn <= 0 || UninstallMode || SMDebugMode1157 0694 If SetBonus > 0158 ;Message "Sneak Bonus Off 2"159 06A4 Set SetBonus to 0160 06AF Set SneakBonus to -SneakBonus161 06BE Self.ModAV ResistMagic SneakBonus162 06CD Endif163 06D1 if Magnitude != 0164 06E2 set Magnitude to Magnitude * -1165 06F5 Self.modactorvalue ResistMagic Magnitude166 0704 set Magnitude to 0167 070F set fSaveddamage to 0168 071A endif169 071E RemoveMe170 0724 Endif171 172 0728 If Player.IsSneaking && bPlayerDetected == 0173 0745 If SetBonus == 0 && Player.GetLOS Self174 ;Message "Sneak Bonus On"175 0767 Set SetBonus to 1176 0772 Set SneakBonus to Player.GetBaseAV Sneak / 25177 078D If SneakBonus >= 4178 ;Set SneakBonus to 4179 079E set SneakBonus to (zzSMQuest.fMasterMagicSneakMult - 1) * -100180 07BA elseif SneakBonus >= 3181 07CB set SneakBonus to (zzSMQuest.fExpertMagicSneakMult - 1) * -100182 07E7 elseif SneakBonus >= 2183 07F8 set SneakBonus to (zzSMQuest.fJourneymanMagicSneakMult - 1) * -100184 0814 elseif SneakBonus >= 1185 0825 set SneakBonus to (zzSMQuest.fApprenticeMagicSneakMult - 1) * -100186 0841 else187 0847 set SneakBonus to (zzSMQuest.fNoviceMagicSneakMult - 1) * -100188 0863 Endif189 ;Set SneakBonus to SneakBonus * -25190 0867 Self.ModAV ResistMagic SneakBonus191 0876 Endif192 087A ElseIf SetBonus > 0193 ;Message "Sneak Bonus Off"194 088A Set SetBonus to 0195 0895 Set SneakBonus to -SneakBonus196 08A4 Self.ModAV ResistMagic SneakBonus197 08B3 Endif198 199 ;endif200 201 08B7 End202
125 045E set totalcount to index126 046B while index > 0 && totalcount - index < 60
scn zzSMPoisonTokenScriptref Selfref Spellref Casterlong magnitudelong durationshort indexshort effectfloat timerfloat longtimerfloat timepercentfloat damagefloat randomref tSpellBegin OnAddSet Self to GetContainerIf SMDebugMode1 == 1 || UninstallMode == 1 || Self.GetDead || Self.GetAV Health <= 0 || Self.IsActor == 0 || SMPoisonTokenOn <= 0 ReturnEndifshort totaleffectsset effect to Self.GetActiveEffectCount set totaleffects to effectset Spell to 0set Caster to 0 while effect > 0 && totaleffects - effect < 100 set effect to effect - 1 if Self.GetNthActiveEffectCode effect == getmagiceffectcode DUMY set tSpell to Self.GetNthActiveEffectMagicItem effect if GetSpellType tSpell != 4 set index to effect set Spell to tSpell set Caster to Self.GetNthActiveEffectCaster effect set Magnitude to Self.GetNthActiveEffectMagnitude effect Break endif endif loopif magnitude < 0 set magnitude to -magnitudeendifEndBegin GameModeif Self == 0 Set Self to GetContainer ReturnEndifIf SMDebugMode1 == 1 || UninstallMode == 1 || Spell == 0 || Self.GetDead || Self.GetAV Health <= 0 || Self.IsActor == 0 || SMPoisonTokenOn <= 0 || Self.GetNthActiveEffectMagicItem index != Spell RemoveMeEndifSet Timer to Timer + GetSecondsPassedIf Timer < .5 returnelseSet LongTimer to LongTimer + TimerSet Timer to 0Set TimePercent to LongTimer * 2 / DurationSet Damage to Magnitude * (100 - Self.GetAV ResistPoison) / 200 * TimePercentIf Damage >= Self.GetAV Health Self.Kill CasterEndifSet Damage to -DamageSelf.ModAV2 Health DamageSet Random to GetRandomPercent * TimePercentIf Random > (Self.GetAV ResistPoison * 2 + 80 - Magnitude) Set Random to Rand 1 6 If Random == 1 Self.ModAV2 Strength -1 Elseif Random == 2 Self.ModAV2 Endurance -1 Elseif Random == 3 Self.ModAV2 Willpower -1 Elseif Random == 4 Self.ModAV2 Intelligence -1 Elseif Random == 5 Self.ModAV2 Agility -1 Elseif Random == 6 Self.ModAV2 Speed -1 EndifEndifendifEnd
scn zzSMPoisonTokenScriptref Selfref Spellref Casterlong magnitudelong durationshort indexshort effectfloat timerfloat longtimerfloat timepercentfloat randomref tSpellBegin OnAddSet Self to GetContainerIf SMDebugMode1 == 1 || UninstallMode == 1 || Self.GetDead || Self.GetAV Health <= 0 || Self.IsActor == 0 || SMPoisonTokenOn <= 0 ReturnEndifshort totaleffectsset effect to Self.GetActiveEffectCount set totaleffects to effectset Spell to 0set Caster to 0 while effect > 0 && totaleffects - effect < 100 set effect to effect - 1 if Self.GetNthActiveEffectCode effect == getmagiceffectcode DUMY set tSpell to Self.GetNthActiveEffectMagicItem effect if GetSpellType tSpell != 4 set index to effect set Spell to tSpell set Caster to Self.GetNthActiveEffectCaster effect set Magnitude to Self.GetNthActiveEffectMagnitude effect set duration to 1 + Self.GetNthActiveEffectDuration effect Break endif endif loopif magnitude < 0 set magnitude to -magnitudeendifEndBegin GameModeif Self == 0 Set Self to GetContainer ReturnEndifIf SMDebugMode1 == 1 || UninstallMode == 1 || Spell == 0 || Self.GetDead || Self.GetAV Health <= 0 || Self.IsActor == 0 || SMPoisonTokenOn <= 0 || Self.GetNthActiveEffectMagicItem index != Spell RemoveMeEndifSet Timer to Timer + GetSecondsPassedIf Timer < .5 returnelseSet LongTimer to LongTimer + TimerSet Timer to 0Set TimePercent to LongTimer * 2 / DurationSet Random to GetRandomPercent * TimePercentIf Random > (Self.GetAV ResistPoison * 2 + 80 - Magnitude) Set Random to Rand 0 6 If Random <= 1 Self.ModAV2 Strength -1 If Self == Player Message "Magical Poison has damaged your Strength" Endif Elseif Random <= 2 Self.ModAV2 Endurance -1 If Self == Player Message "Magical Poison has damaged your Endurance" Endif Elseif Random <= 3 Self.ModAV2 Willpower -1 If Self == Player Message "Magical Poison has damaged your Willpower" Endif Elseif Random <= 4 Self.ModAV2 Intelligence -1 If Self == Player Message "Magical Poison has damaged your Intelligence" Endif Elseif Random <= 5 Self.ModAV2 Agility -1 If Self == Player Message "Magical Poison has damaged your Agility" Endif Elseif Random <= 6 Self.ModAV2 Speed -1 If Self == Player Message "Magical Poison has damaged your Speed" Endif EndifEndifendifEnd