Mellen

Some hacky shit

Nov 13th, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.82 KB | None | 0 0
  1. Scriptname aaaHijackDeathAlias extends ReferenceAlias
  2.  
  3. Actor Property pBones Auto
  4. Armor Property pAmulet Auto
  5. Book Property pTome Auto
  6. EffectShader Property decayEffect Auto
  7. EffectShader Property decayEffect2 Auto
  8. GlobalVariable Property pLostSouls Auto
  9. Quest Property pMainQuest Auto
  10. Quest Property pMQSovngarde Auto
  11. Quest Property pMQSovngarde2 Auto
  12. Quest Property pWerewolfQuest Auto
  13. Quest Property pMyQuest Auto
  14. Sound Property pDeathFXSound Auto
  15. SPELL Property pPower Auto
  16. Idle property idlestoploose auto
  17. Idle property bleedoutstart auto
  18. Idle property bleedoutstop auto
  19. ObjectReference Property fallBackSite Auto
  20. ObjectReference Property fallBackSovn Auto
  21. ObjectReference Property pSpawnPoint Auto
  22. ObjectReference Property pDeathStorage Auto
  23. ObjectReference Property pPanicStorage Auto
  24. ObjectReference Property pDeathMark Auto
  25. ObjectReference Property pDeathMarkFX Auto
  26.  
  27. Event OnInit()
  28. GetActorReference().StartDeferredKill()
  29. RegisterForSingleUpdate(1.0)
  30. Debug.Notification("You have been cursed...")
  31. pSpawnPoint.MoveTo(fallBackSite)
  32. If !pMyQuest.IsObjectiveDisplayed(10)
  33. pMyQuest.SetObjectiveDisplayed(10, True, False)
  34. EndIf
  35. GetActorReference().AddItem(pTome, 1)
  36. EndEvent
  37.  
  38. Event OnPlayerLoadGame()
  39. If !GetActorReference().HasSpell(pPower)
  40. GetActorReference().AddSpell(pPower)
  41. EndIf
  42. EndEvent
  43.  
  44. Event OnUpdate()
  45. If GetActorReference().GetAV("Health") <= 0
  46. disNiggaDed()
  47. Else
  48. RegisterForSingleUpdate(1.0)
  49. ;Debug.Notification("Registering again...")
  50. EndIf
  51. EndEvent
  52.  
  53. Function disNiggaDed()
  54. Int numSouls = GetActorReference().GetActorValue("dragonsouls") as Int
  55. If pMainQuest.IsRunning()
  56. Debug.MessageBox("You haven't even finished the intro yet, dummy!")
  57. GetActorReference().EndDeferredKill()
  58. Else
  59. If pMQSovngarde.IsRunning() || pMQSovngarde2.IsRunning()
  60. pSpawnPoint.MoveTo(fallBackSovn)
  61. EndIf
  62. deathFX()
  63. Utility.Wait(5)
  64. If GetActorReference().IsEquipped(pAmulet)
  65. GetActorReference().RemoveItem(pAmulet, 1, true)
  66. reBirth()
  67. Debug.Notification("Your Amulet of Arkay crumbles to dust.")
  68. Else
  69. pLostSouls.SetValue(numSouls)
  70. GetActorReference().SetActorValue("dragonsouls", 0)
  71. pDeathStorage.RemoveAllItems(pPanicStorage, true)
  72. GetActorReference().RemoveAllItems(pDeathStorage, true)
  73. pDeathMark.MoveTo(GetActorReference(), abMatchRotation = false)
  74. pDeathMarkFX.MoveTo(GetActorReference(), abMatchRotation = false)
  75. pBones.MoveTo(pDeathMarkFX)
  76. pBones.Kill()
  77. reBirth()
  78. EndIf
  79. EndIf
  80. EndFunction
  81.  
  82. Function deathFX()
  83. ;Debug.MessageBox("Starting Death Effects")
  84. Game.DisablePlayerControls()
  85. Game.ForceThirdPerson()
  86. If (pWerewolfQuest.GetCurrentStageID() < 100 && pWerewolfQuest.isRunning())
  87. pWerewolfQuest.SetCurrentStageID(100)
  88. ElseIf (pWerewolfQuest.isRunning())
  89. ;I guess it will fix itself or something?
  90. EndIf
  91. pMyQuest.SetObjectiveDisplayed(20, True, True)
  92. GetActorReference().PlayIdle(bleedoutstart)
  93. Utility.Wait(3.5)
  94. Debug.Notification("The barriers between worlds are no match for the soul of a Dragon!")
  95. GetActorReference().SetAlpha(0, true)
  96. decayEffect.Play(GetActorReference())
  97. Utility.Wait(2.0)
  98. decayEffect2.Play(GetActorReference(), 5.0)
  99. pDeathFXSound.Play(GetActorReference())
  100. Game.FadeOutGame(true, true, 5.0, 5.0)
  101. EndFunction
  102.  
  103. Function reBirth()
  104. GetActorReference().RestoreAV("Health", 9999999)
  105. ;Debug.MessageBox("You should now be reborn")
  106. GetActorReference().MoveTo(pSpawnPoint)
  107. GetActorReference().PlayIdle(bleedoutstop)
  108. Utility.Wait(2)
  109. Game.EnablePlayerControls()
  110. decayEffect.Stop(GetActorReference())
  111. decayEffect2.Stop(GetActorReference())
  112. GetActorReference().PlayIdle(idlestoploose)
  113. RegisterForSingleUpdate(1.0)
  114. ;Debug.MessageBox("Update Registered.")
  115. Utility.Wait(10)
  116. GetActorReference().SetAlpha(1, true)
  117. EndFunction
Advertisement
Add Comment
Please, Sign In to add comment