Advertisement
Siegmeyer

Untitled

Feb 3rd, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. Int property BMStandCost auto
  2. spell property Battlemage1HSpellSide auto
  3. Float property Speed auto
  4. Int property BMBackCost auto
  5. Float property Direction auto
  6. Int property BMForwardCost auto
  7. actor property selfref auto hidden
  8. Int property BMBashCost auto
  9. spell property Battlemage1HSpellStand auto
  10. Int property BMSideCost auto
  11. spell property Battlemage1HSpellBack auto
  12. spell property Battlemage1HSpellForward auto
  13.  
  14.  
  15. function OnAnimationEvent(objectreference akSource, String EventName)
  16.  
  17. If EventName == "WeaponSwing"
  18. Direction = selfref.GetAnimationVariableFloat("Direction")
  19. Speed = selfref.GetAnimationVariableFloat("Speed")
  20. Bool PowerAttack = selfref.GetAnimationVariableBool("bAllowRotation")
  21. if PowerAttack
  22. if Speed == 0.000000
  23. if selfref.GetActorValue("magicka") >= BMStandCost as Float
  24. Battlemage1HSpellStand.Cast(selfref as objectreference, none)
  25. game.getplayer().damageAv("magicka", BMStandCost as Float)
  26. game.Advanceskill("Restoration", BMStandCost as Float)
  27. endIf
  28. elseIf Speed > 0.000000
  29. if Direction == 1.00000 || Direction == 0.000000
  30. if selfref.GetActorValue("magicka") >= BMForwardCost as Float
  31. Battlemage1HSpellForward.Cast(selfref as objectreference, none)
  32. game.getplayer().damageAv("magicka", BMForwardCost as Float)
  33. game.Advanceskill("Restoration", BMForwardCost as Float)
  34. endIf
  35. elseIf Direction == 0.250000
  36. if selfref.GetActorValue("magicka") >= BMSideCost as Float
  37. Battlemage1HSpellSide.Cast(selfref as objectreference, none)
  38. game.getplayer().damageAv("magicka", BMSideCost as Float)
  39. game.Advanceskill("Restoration", BMSideCost as Float)
  40. endIf
  41. elseIf Direction == 0.750000
  42. if selfref.GetActorValue("magicka") >= BMSideCost as Float
  43. Battlemage1HSpellSide.Cast(selfref as objectreference, none)
  44. game.getplayer().damageAv("magicka", BMSideCost as Float)
  45. game.Advanceskill("Restoration", BMSideCost as Float)
  46. endIf
  47. elseIf Direction == 0.500000
  48. if selfref.GetActorValue("magicka") >= BMBackCost as Float
  49. Battlemage1HSpellBack.Cast(selfref as objectreference, none)
  50. game.getplayer().damageAv("magicka", BMBackCost as Float)
  51. game.Advanceskill("Restoration", BMBackCost as Float)
  52. endIf
  53. endIf
  54. endIf
  55. endIf
  56. endIf
  57. endFunction
  58.  
  59. function OnEffectFinish(actor akTarget, actor akCaster)
  60.  
  61. self.unregisterForAnimationEvent(akCaster as objectreference, "PowerAttack_Start_End")
  62. self.unregisterForAnimationEvent(akCaster as objectreference, "WeaponSwing")
  63. endFunction
  64.  
  65. function OnEffectStart(actor akTarget, actor akCaster)
  66.  
  67. selfref = akCaster
  68. self.registerForAnimationEvent(akCaster as objectreference, "PowerAttack_Start_End")
  69. self.registerForAnimationEvent(akCaster as objectreference, "WeaponSwing")
  70. endFunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement