Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scriptname VRC_PlayerReference extends ReferenceAlias
- Import Debug
- Import Game
- Import Utility
- VRC mainQuest
- Spell cloakSpell
- MagicEffect cloakEffect
- Actor player
- Actor lastAttacker
- Event OnInit()
- Init()
- mainQuest.Init()
- EndEvent
- Event OnPlayerLoadGame()
- Init()
- mainQuest.Init()
- EndEvent
- Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
- Actor aggressor = akAggressor as Actor
- lastAttacker = aggressor
- If(akSource != aggressor.GetEquippedWeapon(False) && akSource != aggressor.GetEquippedWeapon(True) && akSource != aggressor.GetEquippedShield())
- Return
- EndIf
- Float stamina = player.GetActorValue("Stamina")
- If(!akProjectile)
- If(abPowerAttack)
- If(abHitBlocked)
- Game.ShakeController(0.0, 1.0, 1.0)
- mainQuest.ShakeCamera(10.0, 10)
- Else
- Game.FadeOutGame(False, True, 0, 1.5)
- mainQuest.ShakeCamera(15.0, 15)
- EndIf
- ElseIf(abBashAttack)
- If(abHitBlocked)
- Game.ShakeController(1.0, 0.0, 0.75)
- mainQuest.ShakeCamera(7.5, 10)
- Else
- Game.FadeOutGame(False, True, 0, 0.75)
- mainQuest.ShakeCamera(10.0, 10)
- EndIf
- Else
- If(abHitBlocked)
- Game.ShakeController(0.0, 1.0, 0.5)
- mainQuest.ShakeCamera(7.5, 5)
- Else
- Game.FadeOutGame(False, True, 0, 0.25)
- mainQuest.ShakeCamera(7.5, 5)
- EndIf
- EndIf
- Else
- If(abHitBlocked)
- Game.ShakeController(0.0, 1.0, 0.25)
- mainQuest.ShakeCamera(5.0, 5)
- Else
- Game.FadeOutGame(False, True, 0, 0.2)
- mainQuest.ShakeCamera(10.0, 5)
- EndIf
- EndIf
- EndEvent
- Function Init()
- player = Game.GetPlayer()
- mainQuest = Game.GetFormFromFile(0xD61, "VRCombatEnhanced.esp") As VRC
- cloakSpell = Game.GetFormFromFile(0x1826, "VRCombatEnhanced.esp") As Spell
- cloakEffect = Game.GetFormFromFile(0xD62, "VRCombatEnhanced.esp") As MagicEffect
- player.RemoveSpell(cloakSpell)
- player.DispelSpell(cloakSpell)
- Wait(0.5)
- player.AddSpell(cloakSpell, False)
- EndFunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement