Advertisement
ThoraldGM

Scavver Travel Package Script

Nov 12th, 2017
699
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.80 KB | None | 0 0
  1. Scriptname ScavverTravelPkgTracker extends Package
  2. { It just works. }
  3.  
  4. ; SCAVVER MOD BY @THORALDGM | [email protected] | SCRIPT UPDATED 20160619
  5.  
  6. ; -----------------------------------------------------------------------------
  7. ; PROPERTIES
  8. ; -----------------------------------------------------------------------------
  9.  
  10. GlobalVariable Property pgvScavverCurrentRoute Auto Mandatory ; What is the current route? (default = 100)
  11. GlobalVariable Property pgvScavverCurrentMarker Auto Mandatory ; Track route progress / location (0 to 27)
  12. GlobalVariable Property pgvScavverIsRelocating Auto Mandatory ; Is Scavver in process of relocating?
  13. GlobalVariable Property pgvScavverRelocated Auto Mandatory ; Did Scavver finish relocating?
  14. GlobalVariable Property pgvScavverLootedArea Auto Mandatory ; Condition for package stack. Important!
  15. GlobalVariable Property pgvScavverStatusSniffer Auto Mandatory ; Does player have Scavver dev tracking on?
  16.  
  17. ObjectReference Property pScavMarker000 Auto Const Mandatory ; Scavver's moving target for travel location
  18. ObjectReference Property pScavMarker100 Auto Const Mandatory ; Vault 111 Ext
  19. ObjectReference Property pScavMarker101 Auto Const Mandatory ; Sanctuary mailbox
  20. ObjectReference Property pScavMarker102 Auto Const Mandatory ; Minuteman statue
  21.  
  22. ObjectReference[] Property arScavMarkers Auto ; Array of ScavMarkers (0 = 100, 1 = 101 ...)
  23.  
  24. ; -----------------------------------------------------------------------------
  25. ; EVENT: ON START ("Called when the package starts.")
  26. ; -----------------------------------------------------------------------------
  27.  
  28. Event OnStart(Actor akActor)
  29. string DevMsg = ""
  30. int CurrentMarker = pgvScavverCurrentMarker.GetValue() as int
  31. int NextMarker
  32.  
  33. If pgvScavverIsRelocating.GetValue() == 1
  34. DevMsg = "SCAVVER TRAVEL PACKAGE RESTARTED."
  35. Else
  36. DevMsg = "Scavver travel package started."
  37. NextMarker = CurrentMarker + 1
  38. pScavMarker000.MoveTo(arScavMarkers[NextMarker])
  39. pgvScavverCurrentMarker.SetValue(NextMarker as float)
  40. EndIf
  41.  
  42. If pgvScavverStatusSniffer.GetValue() == 1
  43. Debug.Notification(DevMsg)
  44. EndIf
  45.  
  46. pgvScavverIsRelocating.SetValue(1)
  47. EndEvent
  48.  
  49. ; -----------------------------------------------------------------------------
  50. ; EVENT: ON CHANGE ("Called when the package is preempted or ends normally.")
  51. ; -----------------------------------------------------------------------------
  52.  
  53. Event OnChange(Actor akActor)
  54. If pgvScavverRelocated.GetValue() == 1 ; Travel package ended normally
  55. ; so do nothing
  56. Else ; Otherwise
  57. If pgvScavverStatusSniffer.GetValue() == 1 ; if player is dev tracking
  58. Debug.Notification("SCAVVER TRAVEL PACKAGE INTERRUPTED.") ; then let player know package interrupted
  59. EndIf
  60. EndIf
  61. akActor.EvaluatePackage() ; Force Scavver to choose a package
  62. EndEvent
  63.  
  64. ; -----------------------------------------------------------------------------
  65. ; EVENT: ON END ("Called when package ends normally, not called if preempted.")
  66. ; -----------------------------------------------------------------------------
  67.  
  68. Event OnEnd(Actor akActor)
  69. pgvScavverIsRelocating.SetValue(0) ; Scavver is no longer relocating
  70. pgvScavverRelocated.SetValue(1) ; Scavver finished relocating
  71. pgvScavverLootedArea.SetValue(0) ; Reset condition for package stack!
  72. If pgvScavverStatusSniffer.GetValue() == 1 ; If player is dev tracking
  73. Debug.Notification("Scavver travel package ended.") ; notify that package ended well
  74. EndIf
  75. EndEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement