scn relwound short exhitval short exspval short exspval2 short fatb4 short fatb5 short fatb6 short healthval short speedrd short speedrnd short healthper ref UserRef short colval short essval short curspd short curath short perspd short perath short basespd short baseath short spdper1 short athper1 short spdper2 short athper2 short spdper3 short athper3 short spdper4 short athper4 short origspd short origath float timer short init float timer2 short init2 begin ScriptEffectStart end begin ScriptEffectUpdate set UserRef to Getself set origath to UserRef.GetBaseActorValue athletics set origspd to UserRef.GetBaseActorValue speed set fatb6 to UserRef.GetBaseActorValue fatigue set exspval to 0 + (GetRandomPercent * (40- 1)) / 99 if (UserRef.IsInCombat == 1 && exspval == 1) ;message "10" set healthval to UserRef.Getactorvalue health set curspd to UserRef.Getactorvalue speed set curath to UserRef.Getactorvalue athletics set basespd to UserRef.GetBaseactorvalue speed set baseath to UserRef.GetBaseactorvalue athletics set perspd to ((curspd / basespd)*100) set perath to ((curath / baseath)*100) set speedrd to (0 - healthval * 0.3) set healthper to ((healthval / UserRef.GetBaseActorValue health) * 100 ) set essval to (UserRef.IsEssential) set spdper1 to (basespd * 0.5) set athper1 to (baseath * 0.5) set spdper2 to (basespd * 0.35) set athper2 to (baseath * 0.35) set spdper3 to (basespd * 0.2) set athper3 to (baseath * 0.2) set spdper4 to (basespd * 0.1) set athper4 to (baseath * 0.1) If (essval == 0 && healthper < 100 && healthper >= 80) UserRef.Forceactorvalue speed spdper1 UserRef.Forceactorvalue athletics athper1 UserRef.Modactorvalue attackbonus 2 UserRef.Modactorvalue DefendBonus -1 UserRef.Modactorvalue health -1 ;messagebox "5" endif If (essval == 0 && healthper < 80 && healthper >= 60) UserRef.Forceactorvalue speed spdper2 UserRef.Forceactorvalue athletics athper2 UserRef.Modactorvalue attackbonus 4 UserRef.Modactorvalue DefendBonus -2 UserRef.Modactorvalue health -2 ;messagebox "6" endif If (essval == 0 && healthper < 60 && healthper >= 40) UserRef.Forceactorvalue speed spdper3 UserRef.Forceactorvalue athletics athper3 UserRef.Modactorvalue attackbonus 6 UserRef.Modactorvalue DefendBonus -3 UserRef.Modactorvalue health -4 ;messagebox "7" endif If (essval == 0 && healthper < 40 && healthper >= 20) UserRef.Forceactorvalue speed spdper4 UserRef.Forceactorvalue athletics athper4 UserRef.Modactorvalue attackbonus 10 UserRef.Modactorvalue DefendBonus -4 UserRef.Modactorvalue health -6 ;messagebox "8" endif set exhitval to 0 + (GetRandomPercent * (6 - 1)) / 99 set fatb4 to UserRef.Getactorvalue fatigue set fatb5 to (0 - (fatb4 + 10)) If (exhitval == 1 && healthper <= 20 && colval == 0) UserRef.ForceActorValue fatigue -50 set colval to 1 endif endif if (colval == 1) if init == 0 ;set the timer value set timer to 7 set init to 1 else if timer > 0 set timer to timer - getSecondsPassed else UserRef.ForceActorValue fatigue fatb6 set colval to 0 set init to 0 endif endif endif set curspd to UserRef.Getactorvalue speed set curath to UserRef.Getactorvalue athletics if (UserRef.IsInCombat == 0) UserRef.Forceactorvalue speed origspd UserRef.Forceactorvalue athletics origath endif end