scn ElementalWeaponScriptref targetshort randbegin scripteffectstartset target to GetSelfset rand to GetRandomPercent if rand <= 50 Target.addspell FireSpell pms effectFireDamage else if rand > 50 Target.addspell FrostSpell pms effectFrostDamage endifend
The script for the Fire Spell would look like one that Raestloz wrote for me not long ago:
scn FireSpellRemovalScriptfloat timerref mebegin GameModeset me to GetSelfset timer to timer + GetSecondsPassedif timer >= 1 me.removespell FireSpell sms effectFireDamageendifend
And the script for the Frost spell would look like:
scn FrostSpellRemovalScriptfloat timerref mebegin GameModeset me to GetSelfset timer to timer + GetSecondsPassedif timer >= 1 me.removespell FrostSpell sms effectFrostDamageendifend
That would get both the Fire and Frost damage effects and play the correct magic shaders. Note: Ability type spells will not stop affecting their target until they are removed. That is why you need to attach script to them that will make them remove themselves. I'm working on a mod that uses this setup (or a similar one) on multiple weapons, so I know it works.