Don't like ads? PRO users don't see any ads ;-)
Guest

Rebirth New

By: Mellen on Aug 5th, 2013  |  syntax: None  |  size: 3.40 KB  |  hits: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Scriptname aaaHijackDeathScript extends Quest  
  2.  
  3. ActorBase Property pPlayer  Auto
  4. Actor Property pBones  Auto  
  5. Actor Property PlayerRef Auto  
  6. Armor Property pAmulet  Auto  
  7. Book Property pTome  Auto
  8. EffectShader Property decayEffect  Auto  
  9. EffectShader Property decayEffect2  Auto
  10. GlobalVariable Property pLostSouls  Auto  
  11. Quest Property pMainQuest  Auto
  12. Quest Property pMQSovngarde  Auto
  13. Quest Property pMQSovngarde2  Auto
  14. Sound Property pDeathFXSound  Auto  
  15. Idle property idlestoploose auto
  16. Idle property bleedoutstart auto
  17. Idle property bleedoutstop auto
  18. ObjectReference Property fallBackSite  Auto
  19. ObjectReference Property fallBackSovn  Auto  
  20. ObjectReference Property pSpawnPoint  Auto  
  21. ObjectReference Property pDeathStorage  Auto  
  22. ObjectReference Property pPanicStorage  Auto  
  23. ObjectReference Property pDeathMark  Auto  
  24. ObjectReference Property pDeathMarkFX  Auto  
  25. ObjectReference Property pDeathMarkFX2  Auto  
  26.  
  27. Event OnInit()
  28.         PlayerRef.StartDeferredKill()
  29.         RegisterForSingleUpdate(1.0)
  30.         Debug.Notification("You have been cursed...")
  31.         pSpawnPoint.MoveTo(fallBackSite)
  32.         PlayerRef.AddItem(pTome, 1)
  33.         self.SetObjectiveDisplayed(0, true, true)
  34. EndEvent
  35.  
  36. ;/ Event OnPlayerLoadGame()
  37.         PlayerRef.EquipSpell(pPrayer, 2)
  38. EndEvent /;
  39.  
  40. Event OnUpdate()
  41.         If PlayerRef.GetAV("Health") <= 0
  42.                 disNiggaDed()
  43.         Else
  44.                 RegisterForSingleUpdate(3.0)
  45.                 ;Debug.Notification("Registering again...")
  46.         EndIf
  47. EndEvent
  48.  
  49. Event OnHit()
  50.         If PlayerRef.GetAV("Health") <= 0
  51.                 disNiggaDed()
  52.         EndIf
  53. EndEvent
  54.  
  55. Function disNiggaDed()
  56.         Int numSouls = PlayerRef.GetActorValue("dragonsouls") as Int
  57.         If pMainQuest.IsRunning()
  58.                 Debug.MessageBox("You haven't even finished the intro yet, dummy!")
  59.                 PlayerRef.EndDeferredKill()
  60.         Else
  61.                 If pMQSovngarde.IsRunning() || pMQSovngarde2.IsRunning()
  62.                         pSpawnPoint.MoveTo(fallBackSovn)
  63.                 EndIf
  64.                 deathFX()
  65.                 Utility.Wait(5)
  66.                 If PlayerRef.IsEquipped(pAmulet)
  67.                         PlayerRef.RemoveItem(pAmulet, 1, true)
  68.                         reBirth()
  69.                         Debug.Notification("Your Amulet of Arkay crumbles to dust.")
  70.                 Else
  71.                         pLostSouls.SetValue(numSouls)
  72.                         PlayerRef.SetActorValue("dragonsouls", 0)
  73.                         pDeathStorage.RemoveAllItems(pPanicStorage, true)
  74.                         PlayerRef.RemoveAllItems(pDeathStorage, true)
  75.                         pDeathMark.MoveTo(PlayerRef, abMatchRotation = false)
  76.                         pDeathMarkFX.MoveTo(pDeathMark, abMatchRotation = false)
  77.                         pDeathMarkFX2.MoveTo(pDeathMark, abMatchRotation = false)
  78.                         pBones.MoveTo(pDeathMarkFX)
  79.                         pBones.Kill()
  80.                         reBirth()
  81.                 EndIf
  82.         EndIf
  83. EndFunction
  84.  
  85. Function deathFX()
  86.         ;Debug.MessageBox("Starting Death Effects")
  87.         Debug.Notification("Your vessel has broken.  Opening Aetherial channel for soul recursion...")
  88.         Game.DisablePlayerControls()   
  89.         Game.ForceThirdPerson()
  90.         PlayerRef.PlayIdle(bleedoutstart)
  91.         Utility.Wait(3.5)      
  92.         PlayerRef.SetAlpha(0, true)
  93.         decayEffect.Play(PlayerRef)
  94.         Utility.Wait(2.0)
  95.         decayEffect2.Play(PlayerRef, 5.0)
  96.         pDeathFXSound.Play(PlayerRef)
  97.         Game.FadeOutGame(true, true, 5.0, 5.0)
  98. EndFunction
  99.  
  100. Function reBirth()
  101.         PlayerRef.RestoreAV("Health", 9999999)
  102.         ;Debug.MessageBox("You should now be reborn")
  103.         PlayerRef.MoveTo(pSpawnPoint)
  104.         PlayerRef.PlayIdle(bleedoutstop)
  105.         Utility.Wait(2)
  106.         Game.EnablePlayerControls()    
  107.         decayEffect.Stop(PlayerRef)
  108.         decayEffect2.Stop(PlayerRef)
  109.         playerRef.PlayIdle(idlestoploose)
  110.         RegisterForSingleUpdate(1.0)
  111.                 ;Debug.MessageBox("Update Registered.")
  112.         Utility.Wait(10)
  113.         PlayerRef.SetAlpha(1, true)
  114. EndFunction