Jump to content

Script Help.


Trandoshan

Recommended Posts

SCN zzArmorDamageThroughMagic

float CurrentSpellEffect
ref CurrentTop
ref CurrentBottom
float CurrentTopHP
float CurrentBottomHP
float DamageToArmor1
float DamageToArmor2
float MagicEffectChooser
float DamageEffectStage
float CurrentLevel
float CurrentAgility

begin GameMode

set CurrentAgility to player.getav agility / 2
set CurrentLevel to player.getlevel

set CurrentTop to player.getequippedobject 2
set CurrentBottom to player.getequippedobject 3

set CurrentTopHP to player.GetObjectHealth CurrentTop
set CurrentBottomHP to player.GetObjectHealth CurrentBottom


if player.hasmagiceffect FIDG == 1
set MagicEffectChooser to 1
elseif player.hasmagiceffect FRDG == 1
set MagicEffectChooser to 2
elseif player.hasmagiceffect SHDG == 1
set MagicEffectChooser to 3
else
return
endif

if MagicEffectChooser == 1 || MagicEffectChooser == 2 || MagicEffectChooser == 3
set DamageToArmor1 to -CurrentBottomHP / (CurrentAgility + CurrentLevel)
set DamageToArmor2 to -CurrentTopHP / (CurrentAgility + CurrentLevel)
player.modobjecthealth DamageToArmor1 CurrentBottom
player.modobjecthealth DamageToArmor2 CurrentTop
set MagicEffectChooser to 0
endif

end

 

Gentlemen?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...