JimLahey88

Untitled

Sep 26th, 2023
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. Scriptname RagnaParry
  2.  
  3. short blocktracker
  4.  
  5. float timer
  6.  
  7. short oldhealth
  8. short oldHelmet
  9. short oldCuirass
  10. short oldGreaves
  11. short oldGauntlets
  12. short oldBoots
  13. short oldShield
  14. short oldWeapon
  15. short healthMod
  16.  
  17. short newHelmet
  18. short newCuirass
  19. short newGreaves
  20. short newGauntlets
  21. short newBoots
  22. short newShield
  23. short newWeapon
  24.  
  25. ref currentWeapon
  26.  
  27. short cancelAttack
  28.  
  29. begin gamemode
  30. set HealthMod to OldHealth - player.GetAV Health
  31. set NewHelmet to OldHelmet - player.getEquippedCurrentHealth 0
  32. set NewCuirass to OldCuirass - player.getEquippedCurrentHealth 2
  33. set NewGreaves to OldGreaves - player.getEquippedCurrentHealth 3
  34. set NewGauntlets to OldGauntlets - player.getEquippedCurrentHealth 4
  35. set NewBoots to OldBoots - player.getEquippedCurrentHealth 5
  36. set NewShield to OldShield - player.getEquippedCurrentHealth 13
  37. set NewWeapon to OldWeapon - player.getEquippedCurrentHealth 16
  38. end
  39.  
  40. Begin OnHit
  41. if (timer > 0.0) && (timer <= 0.25)
  42. modEquippedCurrentHealth newHelmet 0
  43. modEquippedCurrentHealth newCuirass 2
  44. modEquippedCurrentHealth newGreaves 3
  45. modEquippedCurrentHealth newGauntlets 4
  46. modEquippedCurrentHealth newBoots 5
  47. modEquippedCurrentHealth newShield 13
  48. modEquippedCurrentHealth newWeapon 16
  49. ModActorValue2 health healthMod
  50. playMagicShaderVisuals effectParry 1.3
  51. endif
  52. end
  53.  
  54. Begin GameMode
  55.  
  56. if (player.IsBlocking) && (blocktracker == 0)
  57. set blocktracker to 1
  58. set timer to 0
  59. endif
  60.  
  61. if (player.IsBlocking) && (blocktracker == 1)
  62. set timer to timer + getSecondsPassed
  63. endif
  64.  
  65. if (player.IsBlocking == 0) && (blocktracker == 1)
  66. set blocktracker to 0
  67. set timer to 0
  68. return
  69. endif
  70. end
  71.  
  72. begin gameMode
  73. set oldHealth to player.getActorValue health + 1
  74. set oldHelmet to player.getEquippedCurrentHealth 0
  75. set oldCuirass to player.getEquippedCurrentHealth 2
  76. set oldGreaves to player.getEquippedCurrentHealth 3
  77. set oldGauntlets to player.getEquippedCurrentHealth 4
  78. set oldBoots to player.getEquippedCurrentHealth 5
  79. set oldShield to player.getEquippedCurrentHealth 13
  80. set oldWeapon to player.getEquippedCurrentHealth 16
  81. end
  82.  
  83. begin gameMode
  84. if player.isweaponout == 0
  85. return
  86. endif
  87. if iscontrolpressed 6 && cancelAttack == 1
  88. return
  89. elseif iscontrolpressed 6 && cancelAttack == 0 && (player.isattacking == 0 && player.ispowerattacking == 0)
  90. set cancelAttack to 1
  91. return
  92. elseif iscontrolpressed 6 && cancelAttack == 0 && (player.ispowerattacking == 1)
  93. set cancelAttack to 1
  94. if cancelAttack == 1
  95. player.playgroup BlockHit 1
  96. endif
  97. player.playgroup idle 1
  98. elseif iscontrolpressed 6 && cancelAttack == 0 && (player.isattacking == 1)
  99. set cancelAttack to 1
  100. if cancelAttack == 1
  101. player.playgroup BlockHit 1
  102. endif
  103. player.playgroup idle 1
  104. else
  105. set cancelAttack to 0
  106. endif
  107. end
Advertisement
Add Comment
Please, Sign In to add comment