sillirion Posted November 27, 2012 Share Posted November 27, 2012 Hello, guys i'm trying to make a script who make the mage check the weakness to elements before attacking with the good spell but i can't make it work any help? (compile fine but doesn't work ingame,tryied addspell,equipspell...) Scriptname SmartMageAi extends Actor SPELL Property Fireball Auto SPELL Property IceSpike Auto SPELL Property LightningBolt Auto SPELL Property sortpardefault Auto SPELL Property monsort Auto MagicEffect Property AbWeaknessFireConstant Auto MagicEffect Property AbWeaknessFrostConstant Auto MagicEffect Property AbWeaknessMagicConstant Auto MagicEffect Property VampireAbWeaknessFireConstant Auto Event OnCombatStateChanged(Actor akTarget, int aeCombatState) if aeCombatState > 0 Self.RemoveSpell(monsort) if akTarget.HasmagicEffect(AbWeaknessFireConstan) monsort = Fireball elseif akTarget.HasmagicEffect(AbWeaknessFrostConstant) monsort = IceSpike elseif akTarget.HasmagicEffect(AbWeaknessMagicConstant) monsort = LightningBolt Elseif akTarget.HasmagicEffect(VampireAbWeaknessFireConstant) monsort = Fireball Else monsort = sortpardefault EndIf self.addSpell(monsort) ENDIF ENDEVENT Link to comment Share on other sites More sharing options...
Trucidation Posted November 27, 2012 Share Posted November 27, 2012 I could have sworn I read a mod that did this, unfortunately I didn't bookmark it (probably didn't like what else it did so I moved on). Likely one of the various follower mods. Sorry couldn't help, good luck with the script. Link to comment Share on other sites More sharing options...
sillirion Posted November 27, 2012 Author Share Posted November 27, 2012 I search your thing but couldn't find it, anyone can help on this script? Link to comment Share on other sites More sharing options...
Recommended Posts