Jump to content

Need help with weapon scripts.


Durai

Recommended Posts

Currently I'm trying to write a script where if the player isn't a vampire, they are injured for using a cursed vampire weapon. Here's what I've compiled so far:

 

scriptName VampireWeaponEnch extends ActiveMagicEffect

{Scripte effect makes it so if player is not vampire, they take damage}

 

 

 

Event OnHit(ObjectReference akAggressor, Form akWeapon, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)

 

akAggressor = Game.GetPlayer()

 

if Game.GetPlayer().HasKeyword(ActorTypeUndead)

 

if akWeapon

Game.GetPlayer().DamageAV("health", 0)

endif

 

if akProjectile

Game.GetPlayer().DamageAV("health", 0)

endif

 

if abPowerAttack

Game.GetPlayer().DamageAV("health", 0)

endif

 

if abSneakAttack

Game.GetPlayer().DamageAV("health", 0)

endif

 

if abBashAttack

Game.GetPlayer().DamageAV("health", 0)

endif

 

if abHitBlocked

Game.GetPlayer().DamageAV("health", 0)

endif

 

else

 

 

if akWeapon

Game.GetPlayer().DamageAV("health", 5)

endif

 

if akProjectile

Game.GetPlayer().DamageAV("health", 0)

endif

 

if abPowerAttack

Game.GetPlayer().DamageAV("health", 25)

endif

 

if abSneakAttack

Game.GetPlayer().DamageAV("health", 10)

endif

 

if abBashAttack

Game.GetPlayer().DamageAV("health", 0)

endif

 

if abHitBlocked

Game.GetPlayer().DamageAV("health", 0)

endif

endif

EndEvent

 

Honestly I don't even know if i'm on the right path; if anyone can lend a hand I'd be very appreciative!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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