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

Rebirth

By: Mellen on Apr 11th, 2013  |  syntax: None  |  size: 1.99 KB  |  hits: 41  |  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 PlayerRef Auto  
  5. EffectShader Property decayEffect  Auto  
  6. EffectShader Property decayEffect2  Auto
  7. Sound Property pDeathFXSound  Auto  
  8. ObjectReference Property fallBackSite  Auto  
  9. ObjectReference Property pSpawnPoint  Auto  
  10. ObjectReference Property pDeathStorage  Auto  
  11. ObjectReference Property pPanicStorage  Auto  
  12. ObjectReference Property pDeathMark  Auto  
  13. ObjectReference Property pDeathMarkFX  Auto  
  14.  
  15. Event OnInit()
  16.         pPlayer.SetEssential(true)
  17.         RegisterForSingleUpdate(1.0)
  18.         ;Debug.Notification("You have been cursed.")
  19.         pSpawnPoint.MoveTo(fallBackSite)
  20. EndEvent
  21.  
  22. Event OnUpdate()
  23.         If PlayerRef.IsBleedingOut() == True
  24.                 disNiggaDed()
  25.         Else
  26.                 RegisterForSingleUpdate(1.0)
  27.                 ;Debug.Notification("Registering again...")
  28.         EndIf
  29. EndEvent
  30.  
  31. Function disNiggaDed()
  32.         deathFX()
  33.         Utility.Wait(5)
  34.         pDeathStorage.RemoveAllItems(pPanicStorage, true)
  35.         PlayerRef.RemoveAllItems(pDeathStorage, true)
  36.         pDeathMark.MoveTo(PlayerRef, abMatchRotation = false)
  37.         pDeathMarkFX.MoveTo(pDeathMark, abMatchRotation = false)
  38.         reBirth()
  39. EndFunction
  40.  
  41. Function deathFX()
  42.         ;Debug.MessageBox("Starting Death Effects")
  43.         Debug.Notification("Your vessel has broken.  Attempting to reintegrate at Shrine of Arkay...")
  44.         Game.DisablePlayerControls()
  45.         PlayerRef.SetNoBleedoutRecovery(true)
  46.         Utility.Wait(3.5)      
  47.         PlayerRef.SetAlpha(0, true)
  48.         decayEffect.Play(PlayerRef)
  49.         Utility.Wait(2.0)
  50.         pDeathFXSound.Play(PlayerRef)
  51.         decayEffect2.Play(PlayerRef, 5.0)
  52.         Game.FadeOutGame(true, true, 5.0, 5.0)
  53. EndFunction
  54.  
  55. Function reBirth()
  56.         PlayerRef.SetNoBleedoutRecovery(False)
  57.         Game.EnablePlayerControls()
  58.         PlayerRef.RestoreAV("Health", 100)
  59.         ;Debug.MessageBox("You should now be reborn")
  60.         PlayerRef.MoveTo(pSpawnPoint)  
  61.         decayEffect.Stop(PlayerRef)
  62.         decayEffect2.Stop(PlayerRef)
  63.         Utility.Wait(10)
  64.         PlayerRef.SetAlpha(1, true)
  65.         RegisterForSingleUpdate(1.0)
  66.         ;Debug.MessageBox("Update Registered.")
  67. EndFunction