Hmm. Got this 99% working, but I get one weird error.
Here is my script. You can CTRL+F "squid" to see where the problem is.
Scriptname ChromaticOrbScript extends activemagiceffect Faction Property DnDMageLevel autoFaction Property DnDTHAC0 autoFaction Property DnDArmorClass autoFaction Property DnDStrength autoFaction Property DnDDexterity autoFaction Property DnDLinearDamageAdjuster autoSpell Property DnDParalyse1Sec autoSpell Property DnDStun1Sec autoEvent OnEffectStart(Actor akTarget, Actor akCaster) int d4randomdam = Utility.RandomInt(1,4) int d6randomdam = Utility.RandomInt(1,6) int d8randomdam = Utility.RandomInt(1,8) int d10randomdam = Utility.RandomInt(1,10) int d12randomdam = Utility.RandomInt(1,12) int twod4randomdam = Utility.RandomInt(2,8) int twod8randomdam = Utility.RandomInt(2,16) int fourd10randomdam = Utility.RandomInt(4,40) int duration = 0 int durationcounter = 0 Actor Mage = akCaster actor hitactor = akTarget if Mage.GetFactionRank(DnDMageLevel) as int ==1 hitactor.DamageAV("Health", d4randomdam) hitactor.SetFactionRank(DnDArmorClass, (hitactor.GetFactionRank(DnDArmorClass) as int) +- 4) hitactor.SetFactionRank(DnDTHAC0, (hitactor.GetFactionRank(DnDTHAC0) as int) +- 4) Utility.Wait(2) hitactor.SetFactionRank(DnDArmorClass, (hitactor.GetFactionRank(DnDArmorClass) as int) + 4) hitactor.SetFactionRank(DnDTHAC0, (hitactor.GetFactionRank(DnDTHAC0) as int) + 4) endIf if Mage.GetFactionRank(DnDMageLevel) as int ==2 hitactor.DamageAV("Health", d6randomdam) ;Usage ;squid Right here it is saying that DnDThac0 is not specified and has no initial value. Everything else in the script runs fine. EvalDerived.EvalStrMod(hitactor, -1, DnDStrength, DnDLinearDamageAdjuster, DnDTHAC0) EvalDerived.EvalStrMod(hitactor, -1, DnDDexterity, DnDArmorClass) Utility.Wait(2) EvalDerived.EvalStrMod(hitactor, 1, DnDStrength, DnDLinearDamageAdjuster, DnDTHAC0) EvalDerived.EvalStrMod(hitactor, 1, DnDDexterity, DnDArmorClass) endIf if Mage.GetFactionRank(DnDMageLevel) as int ==3 hitactor.DamageAV("Health", (d8randomdam+ d4randomdam)) endIf if Mage.GetFactionRank(DnDMageLevel) as int ==4 hitactor.DamageAV("Health", d10randomdam) hitactor.SetFactionRank(DnDArmorClass, (hitactor.GetFactionRank(DnDArmorClass) as int) +- 4) hitactor.SetFactionRank(DnDTHAC0, (hitactor.GetFactionRank(DnDTHAC0) as int) +- 4) Utility.Wait(2) hitactor.SetFactionRank(DnDArmorClass, (hitactor.GetFactionRank(DnDArmorClass) as int) + 4) hitactor.SetFactionRank(DnDTHAC0, (hitactor.GetFactionRank(DnDTHAC0) as int) + 4) endIf if Mage.GetFactionRank(DnDMageLevel) as int ==5 hitactor.DamageAV("Health", d12randomdam) int Stun1Counter = 0 while Stun1Counter <= 5 Stun1counter = Stun1Counter + 1 duration = duration + Utility.RandomInt(1,4) endwhile duration = duration +5 duration = duration/6 while durationcounter <= duration DnDStun1Sec.Cast(mage, hitactor) Utility.Wait(1) durationcounter = durationcounter + 1 endWhile endIf if Mage.GetFactionRank(DnDMageLevel) as int ==6 int SleepCounter = 0 while SleepCounter <= 5 Sleepcounter = SleepCounter + 1 duration = duration + Utility.RandomInt(1,4) endwhile duration = duration +5 duration = duration/6 hitactor.DamageAV("Health", twod4randomdam) hitactor.SetUnconscious() Utility.Wait(duration) hitactor.SetUnconscious(false) endIf if Mage.GetFactionRank(DnDMageLevel) as int >=7 && Mage.GetFactionRank(DnDMageLevel) as int <10 hitactor.DamageAV("Health", twod8randomdam) int StunCounter = 0 duration = 30 + Utility.RandomInt(0,70) duration = duration/6 while durationcounter <= duration DnDParalyse1Sec.Cast(mage, hitactor) Utility.Wait(1) durationcounter = durationcounter + 1 endWhile endIf if (Mage.GetFactionRank(DnDMageLevel) as int) >=10 && (Mage.GetFactionRank(DnDMageLevel) as int) < 12 endIf if Mage.GetFactionRank(DnDMageLevel) as int >=12 hitactor.DamageAV("Health", fourd10randomdam) duration = 10 + Utility.RandomInt(0,30) duration = duration/6 while durationcounter <= duration DnDParalyse1Sec.Cast(mage, hitactor) Utility.Wait(1) durationcounter = durationcounter + 1 endWhile endIfendEventP.S You'll not that at level 10 it doesn't do anything. This is because it is supposed to have a chance to turn people to stone. Is it even remotely possible to dynamically apply a texture to something? Because turning people to stone would be purty sweet.