GraceCB

Untitled

Dec 16th, 2021
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.57 KB | None | 0 0
  1. scn FastTravelCallBack
  2.  
  3. ;Script Version 1.70, ~ Lime - 09/11/2021.
  4.  
  5. ;Master script that handles all encounters for "Immersive Fast Travel Encounters" Mod for FNV.
  6. ;This script is attached to a fast travel event handler. Once fast travel occurs this script runs.
  7. ;This script is conditioned so that only relevant functions are called as relevant checks are passed or failed.
  8.  
  9. ;Some general purpose rules for the player. Player will NOT be punished for not possessing an item (i.e water, stimpak etc.)
  10. ;Player WILL be Punished for taking a descision that rolls unfavorably / they do not posses the required skills to pass the check.
  11. ;Player will NOT be killed during fast travel, checks are in place to ensure encounters do not cause Radiation
  12. ;Levels to exceed 1000 or health to drop below 1.
  13.  
  14. ;As of v1.20 this script contains the vast majority of functionality. This allows me to fire the script at a delay (preventing pip boy ui remaining
  15. ;On screen with certain mods). Additionally paired down the debug info to essential and information used multiple times. Improved performance by
  16. ;Only getting certain info if it is only used once instead of grabbing everything on chance check pass. Reconditioned random values to Rand function
  17. ;For the sake of readability. Removed JIP and NVSE version checks as they would returning zero after first travel and would need to be re-initialized
  18. ;to be of any use. Also added checks that allow the player to avoid addiction with a high endurance or survival skill.
  19.  
  20. ;As of v1.30 various sweeping gramamtical checks and bugfixes across all scripts. Added configuration options and revisions to skeleton "Additional support"
  21.  
  22. ;As of v1.40 added the ability to skip encounters with addiction for the sake of character or roleplaying. ( bEnableAddictionEncounters )
  23.  
  24. ;As of v1.50 reconditioned some encounters to prevent conflicts with other mods which may cause dehydration to be incorrectly applied.
  25.  
  26. ;As of V1.60 - V1.70. New encounters, bugfixes and now making use of CIOS timed effects. Re-wrote addiction encounters and made Aux-Vars public for patching.
  27.  
  28. ;Additionally removed a rougue print which was added during testing.
  29.  
  30. ;Calling ref
  31. ref rCallingRef
  32.  
  33. ;General purpose variables / internal tracking
  34. int EncounterChance
  35. int NumberOfEncounters
  36. int EncounterSelection
  37. int CurrentRadLevel
  38. int CurrentHPLevel
  39. int CurrentLuck
  40. int CurrentSurvivalSkill
  41. int CurrentEndurance
  42. int Random
  43. int RandomSmall
  44. int watercount
  45. int PlayerLevel
  46. int WWEncounters
  47. int VanityEncounters
  48.  
  49. int MyRand
  50.  
  51.  
  52.  
  53.  
  54. ;Currently equipped clothes.
  55. ref PlayerClothes
  56.  
  57. ;Names & random vars for game & person playing.
  58. String_Var Person
  59. String_Var Game
  60. int GameChance
  61. int PersonChance
  62.  
  63. ;Aux variables (Encounters.ini)
  64. int bChance
  65. int bDebug
  66. int bEnableAddictionEncounters
  67. int bNoTravelUnder
  68. int bFastTravelRequirements
  69.  
  70.  
  71. ;Function attached to eventhandler
  72. begin Function {}
  73.  
  74. set rCallingRef to this
  75.  
  76. ;Removes this as a callback until called again.
  77. SetGameMainLoopCallback FastTravelCallBack 0
  78.  
  79. ;Grab user defined chance of something happening from Aux value.
  80. set bChance to Player.AuxiliaryVariableGetFloat "*_bChance"
  81. set bFastTravelRequirements to Player.AuxiliaryVariableGetFloat "*_bFastTravelRequirements"
  82. ;This section of the script removes either a caravan lunch or trail mix fromt the player on travel
  83. ;Assuming the option is enabled in the .ini file.
  84. if bFastTravelRequirements == 1
  85.  
  86. if (Player.GetItemCount CaravanLunch > 0)
  87.  
  88. PlayerREF.EquipItem CaravanLunch, 0, 1
  89.  
  90. elseif (Player.GetItemCount TrailMix > 0)
  91.  
  92. Player.EquipItem TrailMix, 0, 1
  93.  
  94. endif
  95.  
  96. endif
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115. ;If the encounter chance passes the percentage check
  116. if rand 1, 100 <= bChance
  117.  
  118. ;Calculate some general purpose information about the player. These values are generally used multiple times in this script.
  119. ;Those used just once have been conditioned per encounter, try to avoid unessecary calls here for the sake of performance.
  120. set Random to rand 1, 100 ;Random general purpose variable between 1 & 100.
  121. set RandomSmall to rand 1, 3
  122. set CurrentHPLevel to Player.GetAv Health
  123. set CurrentSurvivalSkill to Player.getav Survival
  124. set watercount to player.getitemcount WaterPurified
  125.  
  126. ;Change this if more encounter states are added (Set higher than number of states to weight vanity and WW encounters)
  127. set NumberOfEncounters to 40
  128.  
  129. ;Generates a number between 1 and the total number of possible outcomes. Used to determine *what* will happen.
  130.  
  131. set EncounterSelection to rand 1, NumberofEncounters
  132.  
  133.  
  134. ;Query AuxVars
  135. set bDebug to Player.AuxiliaryVariableGetFloat "*_bDebug"
  136. set bEnableAddictionEncounters to Player.AuxiliaryVariableGetFloat "*_bEnableAddictionEncounters"
  137.  
  138. ;Debug info prints to terminal if enabled in .ini
  139. if bDebug == 1
  140.  
  141. print "Encounter State: " + $EncounterSelection + " Selected"
  142. print $NumberofEncounters + " Encounter states Loaded"
  143. print "Chance roll: " + $bChance
  144. print "Random roll 01 (1-100): " + $Random
  145. print "Random roll 02 (1-3): " + $RandomSmall
  146. print "Current HP: " + $CurrentHPLevel
  147. print "Current Survival Skill: " + $CurrentSurvivalSkill
  148. print "Water count: " + $WaterCount
  149.  
  150. endif
  151.  
  152. if EncounterSelection == 1
  153. MessageBoxEx ("Your trip was long and strenuous - you are attacked by a gang of raiders. You barely manage to escape them. [-HP]")
  154. set MyRand to (GetRandomPercent + 1)
  155. set MyRand to MyRand / 2
  156. player.damageav health MyRand
  157. call FastTravelPainSoundRandomiserUDF
  158.  
  159. elseif EncounterSelection == 2
  160.  
  161. MessageBoxEx ("Warm sands, calm winds, and not a raider in sight - unusual for the wasteland. During a calm moment, you spot some caps in the sand. [+" + $Random + "Cap(s)]")
  162. player.additem Caps001 Random
  163.  
  164. elseif EncounterSelection == 3
  165.  
  166. MessageBoxEx "During your trip you get lost and incredibly thirsty. [-H2O]"
  167. set MyRand to (GetRandomPercent + 1)
  168. set MyRand to (MyRand + 75)
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175. player.damageav Dehydration MyRand
  176.  
  177.  
  178. elseif EncounterSelection == 4
  179.  
  180. MessageBoxEx "You find a raided caravan - luckily, it seems they missed a few things. [+Healing items]"
  181. set MyRand to ((GetRandomPercent + 1) / 25)
  182. player.additem LootChemsHealing100 MyRand
  183.  
  184. elseif EncounterSelection == 5
  185.  
  186. MessageBoxEx "You find a raided caravan, but it's been picked dry. You throw up from the putrid smell surrounding the dead Brahmin. [-FOD]"
  187. Playsound NPCIdleVomit
  188. set MyRand to ((GetRandomPercent + 1) * 2)
  189. player.DamageActorValue Hunger MyRand
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199. elseif EncounterSelection == 6
  200.  
  201. MessageBoxEx "The wind turns, and your geiger counter begins ticking frantically. [+Rads]"
  202.  
  203. playsound UIPipBoyRadiationB
  204.  
  205. set MyRand to ((GetRandomPercent + 1) * 1.25)
  206.  
  207.  
  208.  
  209. player.damageav RadiationRads MyRand
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223. elseif EncounterSelection == 7
  224.  
  225. ;Randomize some of the encounter
  226.  
  227. set PersonChance to 1 + GetRandomPercent * 4/100
  228. set GameChance to 1 + GetRandomPercent * 4/100
  229.  
  230. if PersonChance == 1
  231. let Person := "wastelander"
  232. elseif PersonChance == 2
  233. let Person := "prospector"
  234. else if Personchance == 3
  235. let Person := "adventurer"
  236. else
  237. let Person := "merchant"
  238. endif
  239.  
  240.  
  241. if GameChance == 1
  242. let Game := "caravan"
  243. elseif GameChance == 2
  244. let Game := "dice Roll"
  245. else if GameChance == 3
  246. let Game := "cap Flip"
  247. else
  248. let Game:= "cards"
  249. endif
  250.  
  251. MessageBoxExAlt FastTravelWager ("^Wager Offer^You meet a passing " + $Person + ",%rthey offer you a wager on a game of " + $Game + ":|Accept|Decline")
  252.  
  253. elseif EncounterSelection == 8
  254.  
  255. MessageBoxExAlt FastTravelLootTheBox "^Buried Footlocker^You spot a footlocker, partally sunken into the%rwastes. |Investigate|Move on"
  256.  
  257. elseif ( EncounterSelection == 9 && bEnableAddictionEncounters == 1 )
  258.  
  259. set CurrentEndurance to Player.GetAv Endurance
  260.  
  261.  
  262.  
  263.  
  264.  
  265. if (CurrentSurvivalSkill <= 70 || CurrentEndurance <= 7) || (player.hasperk NVDLC03TraitLogansLoophole == 0)
  266.  
  267. MessageBoxEx "The harsh wastes take their toll on even the most steadfast of travelers. You find yourself relying on alcohol to take the edge off. [You consume some alcohol]"
  268. playsound NPCHumanDrinkingBottleUp || NPCHumanDrinkingBottleGulp || NPCHumanDrinkingBottleDown
  269.  
  270.  
  271.  
  272.  
  273. player.CIOS Vodka
  274.  
  275.  
  276.  
  277.  
  278.  
  279. else
  280.  
  281. MessageBoxEx "The harsh wastes take their toll on even the most steadfast of travelers, except you. You find strength where others cannot. [+1 Strength, 2 min]"
  282. Player.CIOS FastTravelInspire
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296. endif
  297.  
  298. elseif ( EncounterSelection == 10 && bEnableAddictionEncounters == 1 )
  299.  
  300.  
  301.  
  302.  
  303.  
  304. if (CurrentSurvivalSkill <= 70 || CurrentEndurance <= 7) || (player.hasperk NVDLC03TraitLogansLoophole == 0)
  305.  
  306. MessageBoxEx "Anything to make the long, hot day pass faster. You've become reliant on Jet to get through the day. [You take some Jet]"
  307. player.CIOS Jet
  308. playsound NPCHumanUsingJet
  309.  
  310. ;player.CIOS WithdrawalJet
  311. ;Playsound UIHealthChemsAddicted
  312.  
  313. else
  314. MessageBoxEx "Anything to make the long, hot day pass faster. But where others may have faltered, you come out the other side stronger than ever. [+1 Strength, 2 min]"
  315. player.CIOS FastTravelInspire
  316. endif
  317.  
  318. elseif EncounterSelection == 11
  319.  
  320. MessageBoxEx "You come across some raiders that are drinking and shouting - they don't notice your approach. You dispatch them easily. [+50 XP]"
  321. RewardXP 50
  322.  
  323. elseif EncounterSelection == 12
  324.  
  325. set PlayerLevel to Player.Getlevel
  326.  
  327. if PlayerLevel <15
  328.  
  329. MessageBoxEx ("You come across a Deathclaw and are forced to run from it. You recieve a nasty gash before managing to make your escape. [-HP] [+XP]")
  330. set MyRand to ((GetRandomPercent + 1) * 1.25)
  331. player.damageav health MyRand
  332. RewardXP 50
  333.  
  334. playsound NPCDeathclawIdleClawScrape
  335.  
  336. elseif PlayerLevel >= 20 && PlayerLevel < 25
  337.  
  338. MessageBoxEx "You come across a Deathclaw - a long an intense fight ensues. You come out badly bruised, but alive. [-HP] [+150 XP]"
  339. set MyRand to (GetRandomPercent + 1)
  340. player.damageav health MyRand
  341. RewardXP 150
  342. playsound NPCDeathclawIdleClawScrape
  343.  
  344. elseif PlayerLevel > 24
  345.  
  346. MessageBoxEx "During your journey, you come across a Deathclaw - it's no match for an experienced Wastelander like you. You defeat it and take it's hand as a trophy. [+300 XP] [+Deathclaw Hand]"
  347. RewardXP 300
  348. player.additem DeathClawHand 1
  349. playsound NPCDeathclawDeath
  350.  
  351. endif
  352.  
  353. elseif EncounterSelection == 13
  354.  
  355. MessageBoxExAlt FastTravelRaiderGang "^Raider Gang Ahead^You spot a large group of raiders in the distance.%rThey're drinking and yelling, and haven't spotted you.|Fight|Sneak past"
  356.  
  357. elseif EncounterSelection == 14
  358.  
  359. MessageBoxExAlt FastTravelDeadWastelander "^Dead Wastelander^A dead wastelander lies before you.%rThey seem to have been carrying some medical supplies.%rBury them, or take their belongings?:|Bury them|Desecrate their body|Loot them"
  360.  
  361. elseif EncounterSelection == 15
  362.  
  363. MessageBoxEx "Though your journey is safe, the desolate wasteland takes a toll, and you become particularly fatigued. [-Fatigue]"
  364. set MyRand to ((GetRandomPercent + 1) + 75)
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374. player.damageav Sleepdeprevation MyRand
  375.  
  376.  
  377. elseif EncounterSelection == 16
  378.  
  379. MessageBoxExAlt FastTravelCaravanInTrouble "^Distressed Caravan^In the distance, you spot a caravan besieged by raiders. %r They seem to be in considerable%rdistress:|Help the caravan|Ignore them"
  380.  
  381. elseif EncounterSelection == 17
  382.  
  383. MessageBoxExAlt FastTravelBoobyTrapped "^Suspicious Trunk^You come across one of the wasteland's many%rabandoned, inoperable cars. This one seems%rdifferent though - it's trunk appears to be tied shut%rwith a flimsy looking rope.%rUpon closer inspection, the trunk is clearly trapped.|Attempt to disarm the trap|Leave the trunk alone"
  384.  
  385. elseif EncounterSelection == 18
  386.  
  387. MessageBoxExAlt FastTravelStrangeMan "^Encounter With A Stranger^An elderly wastelander offers you an open drink:|Accept the drink|Reject the drink"
  388.  
  389. elseif EncounterSelection == 19
  390.  
  391. if playerref.IsHardcore == 1 ; if hardcore is activated
  392. MessageBoxEx "The weather is nice, and your journey is peaceful. You feel refreshed [+150 Sleep Deprivation]."
  393. set MyRand to (GetRandomPercent + 1)
  394.  
  395. player.restoreav SleepDeprevation MyRand
  396. else
  397. MessageBoxEx "The weather is nice, and your journey is peaceful. You come across a clean water pipe, and fill up a spare bottle. [+1 Purified Water]"
  398. player.additem waterpurified 1
  399. endif
  400.  
  401. elseif EncounterSelection == 20
  402.  
  403. if Player.HasPerk WildWasteland
  404. MessageBoxEx "The heat is starting to get to you - in the distance, you see a dance party in the middle of the wasteland, complete with multi-colored stand lights and blaring Sinatra. You excitedly approach to find out it's just a group of Brahmin in party hats grazing by a muddy pond. Dissapointing."
  405. playSound UIWildWasteland
  406. else
  407. MessageBoxEx "Nothing of note happens on your journey - what a relief."
  408. endif
  409.  
  410. elseif EncounterSelection == 21
  411.  
  412. MessageBoxEx "An extreme heat wave forces you to take a risky shortcut. You slip in the process and injure both of your legs [+Injured Legs]"
  413. call FastTravelPainSoundRandomiserUDF
  414. set MyRand to (GetRandomPercent + 1)
  415. player.damageav leftmobilitycondition MyRand
  416.  
  417. set MyRand to (GetRandomPercent + 1)
  418. player.damageav rightmobilitycondition MyRand
  419.  
  420. elseif EncounterSelection == 22
  421.  
  422. MessageBoxExAlt FastTravelRaiderShakedown "^Raider Leader^You run into a Raider gang, their leader%rdemands 200 caps.%rHe threatens to break your legs if you don't comply.%rHe seems tough:|Pay them|Attack them|Trick them"
  423.  
  424. elseif EncounterSelection == 23
  425.  
  426. if CurrentSurvivalSkill >= 70
  427. MessageBoxEx "You get turned around on your travels, but your excellent sense of direction allows you to quickly reorient yourself with little lost time."
  428. else
  429. MessageBoxEx "You get turned around on your travels, wasting a lot of time, making you tired and thirsty. [-H2O] [-Sleep Deprivation]"
  430. set MyRand to (GetRandomPercent + 1)
  431. player.restoreav Dehydration MyRand
  432.  
  433. set MyRand to (GetRandomPercent + 1)
  434. player.restoreav SleepDeprevation MyRand
  435. endif
  436.  
  437. elseif EncounterSelection == 24
  438.  
  439. MessageBoxEx "A friendly Caravaneer offers you a ride to your destination, you have time to rest and plan your next move. [+Health restored]"
  440. player.resethealth
  441.  
  442. elseif EncounterSelection == 25
  443.  
  444. MessageBoxExAlt FastTravelCazadoreSting "^Cazadore Sting^An encounter with some cazadors leaves%ryou in great pain as one of the insects%rstings you with it's tail.%rHow will you deal with the sting?|Find a doctor|Tough it out|Attempt to treat the sting yourself"
  445.  
  446.  
  447. elseif EncounterSelection == 26
  448.  
  449. MessageBoxExAlt FastTravelBighornerEncounter "^Bighorner Herd^A wandering herd of Bighorners crosses your path.%rThey seem uninterested in you. |Attack|Leave them alone"
  450.  
  451. elseif EncounterSelection == 27
  452.  
  453. MessageBoxExAlt FastTravelUnsuspectingWastelander "^Unsuspecting Wastelander^There's a wastelander traveling in%rfront of you. They appear to be alone, and armed only with a%rpolice baton: |Rob|Attack|Pickpocket|Leave them alone"
  454.  
  455. elseif EncounterSelection == 28
  456.  
  457. if Player.HasPerk WildWasteland == 1
  458. MessageBoxEx "You accept some cave mushrooms from a bearded gentleman wearing sexy sleepwear. You wake up in the desert feeling strangely refreshed. You have no idea what just happened, but you feel fantastic."
  459. set MyRand to (GetRandomPercent + 1)
  460. player.restoreav Health (MyRand /2)
  461. playSound UIWildWasteland
  462. else
  463. MessageBoxEx "You take a moment to stare out across the wastes - the horizon is calm. Just you, the sand, the heat, and a faint breeze."
  464. ; player.CIOS FastTravelHapiness
  465. endif
  466.  
  467. elseif EncounterSelection == 29
  468.  
  469. MessageBoxExAlt FastTravelGhoulPack "^Ghoul Pack^A roaming pack of feral ghouls blocks your path.%rYou can choose to take an alternate route,%rbut it would likely add hours to your journey:|Attack|Sneak by|Take the alternate path"
  470.  
  471. ;Some general vanity encounters
  472. elseif EncounterSelection >= 30 && EncounterSelection <= 35
  473.  
  474. ;This line will need to be changed if more vanity encounters are added.
  475. set VanityEncounters to Rand 1, 12
  476.  
  477. if VanityEncounters == 1
  478.  
  479. MessageBoxEx "Your geiger counter begins ticking very rapidly as you pass a rusty car wreck, but it abruptly stops once you take two steps to the north of the rusted hulk. Nothing looks suspicious about the vehicle. Is your geiger counter working properly?"
  480.  
  481. elseif VanityEncounters == 2 && GetPlayerTeammateCount > 0
  482.  
  483. MessageBoxEx "You and your companion share stories during the trip. The time passes quickly."
  484.  
  485. elseif VanityEncounters == 2 && GetPlayerTeammateCount < 1
  486.  
  487. MessageBoxEx "With no traveling companion to keep you company, you hum to yourself to pass the time."
  488.  
  489.  
  490. elseif VanityEncounters == 3
  491.  
  492. MessageBoxEx "You pass by a few unrecognizable bodies. The smell is unbearable."
  493.  
  494. elseif VanityEncounters == 4
  495.  
  496. MessageBoxEx "You find a deceased Deathclaw, it's hands and horns missing. A dozen laser burns crisscross it's chest and face."
  497.  
  498. elseif VanityEncounters == 5
  499.  
  500. MessageBoxEx "Your travels are tiring, and your bones are weary. If only you had a working car..."
  501.  
  502. elseif VanityEncounters == 6
  503.  
  504. MessageBoxEx "You find yourself wondering about how other nations fared after the bombs dropped."
  505.  
  506. elseif VanityEncounters == 7
  507.  
  508. MessageBoxEx "You spot a trail of blood but it quickly dissapears into the sand. You feel as though something may be watching you."
  509.  
  510. elseif VanityEncounters == 8
  511.  
  512. MessageBoxEx "You find yourself itching, did something bite you? Maybe it's just the heat?"
  513.  
  514. elseif VanityEncounters == 9
  515.  
  516. MessageBoxEx "You recall reading about small creatures called cats in a pre-war book. They seem sweet."
  517.  
  518. elseif VanityEncounters == 10
  519.  
  520. MessageBoxEx "You find the long dried skeleton of a vault dweller, evident by the scrap of jumpsuit next to the skull. You feel a curious sadness for the deceased wastelander. [-1 Endurance, 3 min]"
  521. player.CIOS FastTravelSadness
  522.  
  523. elseif VanityEncounters == 11
  524.  
  525. MessageBoxEx "You find an old university text-book, in surpisingly good condtion! You learn about some of the pre-war languages of the world. [+1 Intelligence, 4 min]"
  526. player.CIOS FastTravelLearned
  527.  
  528. elseif VanityEncounters == 12
  529.  
  530. MessageBoxEx "Due to the unbearable heat, you are forced to undress, and you arrive at your destination half-naked."
  531. Set PlayerClothes to PlayerREF.GetEquippedObject 2 ; 'Upper Body'
  532. Player.UnequipItem PlayerClothes 0 0
  533.  
  534.  
  535. endif
  536.  
  537. ;Some general WW encounters (Mostly vanity although some have effects)
  538. ;This line will need to be changed if more vanity encounters are added.
  539. elseif EncounterSelection > 35
  540.  
  541. if Player.HasPerk WildWasteland == 1
  542.  
  543. playSound UIWildWasteland
  544. set WWEncounters to Rand 1, 10
  545.  
  546. if WWEncounters == 1
  547.  
  548. MessageBoxEx "A crowd of angry Brahmin rushes at you, mooing with fervor and hate in their eyes. They trample you viciously before leaving. [-15 HP]"
  549. set MyRand to ((GetRandomPercent + 1) / 2)
  550.  
  551.  
  552.  
  553. player.DamageActorValue Health MyRand
  554.  
  555. playsound NPCBrahminAttack
  556. playsound NPCBrahminIdleMoo
  557. playsound NPCBrahminInjured
  558. playsound NPCBrahminFootL
  559. playsound NPCBrahminFootR
  560.  
  561.  
  562.  
  563.  
  564. elseif WWEncounters == 2
  565.  
  566. MessageBoxEx "You come across a giant footprint, filled in with rainwater. There's no others in the area. A crushed stealth boy sits in the puddle."
  567. player.additem SpareParts 1
  568.  
  569. elseif WWEncounters == 3
  570.  
  571. MessageBoxEx "A small glowing dot hovers above you in the sky. Suddenly, it begins flying to the east, then abruptly changes it's direction at a perfect right angle and shoots directly up into the sky, beyond your view. You don't feel like you're completely alone..."
  572.  
  573. elseif WWEncounters == 4
  574.  
  575. MessageBoxEx "You come across a crashed Nuka-Cola delivery truck. The driver's skeleton has been crushed inside the cabin, and most of the Nuka-Cola bottles have popped open or shattered."
  576.  
  577. ;Only used here so only update luck when needed
  578. set Currentluck to Player.GetAV Luck
  579.  
  580. if Currentluck > 6
  581. MessageBoxEx "You're lucky enough to find an intact bottle of Nuka-Cola!"
  582. player.addItem Nukacola 1
  583. elseif Currentluck > 7
  584. MessageBoxEx "You're lucky enough to find two intact bottles of Nuka-Cola!"
  585. player.addItem Nukacola 2
  586. elseif Currentluck > 8
  587. MessageBoxEx "You're lucky enough to find an intact bottle of Nuka-Cola Quartz!"
  588. player.addItem NVNukaColAQuartz 1
  589. elseif Currentluck > 9
  590. MessageBoxEx "You're lucky enough to find an intact bottle of Nuka-Cola Victory!"
  591. player.addItem NVNukaColAVictory 1
  592. endif
  593.  
  594. elseif WWEncounters == 5
  595.  
  596. MessageBoxEx "You feel some ammo sliding out of your pocket. A thief! You turn around quickly, but nobody is there. [Paranoia, -2 Perception, 2 min]"
  597. player.CIOS FastTravelParanoia
  598.  
  599. elseif WWEncounters == 6
  600.  
  601. MessageBoxEx "You come across a man drinking what appears to be car coolant. Your geiger counter ticks when he gets nearby. You leave the man to his beverage."
  602.  
  603. elseif WWEncounters == 7
  604.  
  605. MessageBoxEx "In a crater, you see massive mounds of blubber and huge bones. Something very large died here."
  606.  
  607. elseif WWEncounters == 8
  608. set MyRand to GetRandomPercent + 1
  609. if MyRand < 10
  610. MessageBoxEx "An imposing wastelander with vivid green eyes and T-51b Power Armor passes you. Her minigun is aimed near you, but not directly at you. She passes without incident."
  611. playsound FOLArmorHeavyWalk
  612. elseif MyRand < 20
  613. MessageBoxEx "You pass a wastelander wearing Riot Armor, with a kind smile, orange eyes like the desert sun, and a pristine Grenade Launcher in her hands. She winks slyly as you pass."
  614. playsound FOLArmorMediumWalk
  615. elseif MyRand < 101
  616. MessageBoxEx "In the hazy distance, you see someone crouched over a dead body. As you get closer, a gust of wind buffets you, making you blink. When you open your eyes, only the body remains."
  617. playsound AMBDesertWindI02
  618. playsound AMBDesertWindI01
  619. endif
  620.  
  621.  
  622.  
  623.  
  624. elseif WWEncounters == 9
  625.  
  626. MessageBoxEx "In the distance, you spot a hunter leading along a golden gecko with a leash and a collar. The gecko seems complacent."
  627.  
  628. elseif WWEncounters == 10
  629.  
  630. MessageBoxEx "You come across a group of cannibals. They seem desperate."
  631.  
  632. else
  633.  
  634. ;Exception for player not having WW so that something happens
  635. MessageBoxEx "Your spine tingles as you walk past the decaying remains of a Brahmin. Organs and bones half-covered in viscera lay strewn around. Something terrible happened here."
  636.  
  637. endif
  638. endif
  639. else
  640.  
  641. ;Generally this block will never be entered. Here for debugging purposes.
  642. MessageBoxEx "FAST TRAVEL ENCOUNTERS: Error002, something should have happened here but an exception occured and the handler has attempted to launch a non-existant encounter. check for conflicts, mod updates or attempt to reinstall. This message will only diplay once per game-session"
  643. ;I.e in the event where another mod / script modifies the variable controlling selection.
  644. Print "Error, something should have happened here but an exception occured and the handler has attempted to launch a non-existant encounter. check for conflicts"
  645.  
  646. endif
  647.  
  648. else
  649.  
  650. ;do nothing
  651. ;print "Nothing happened"
  652.  
  653. endif
  654.  
  655. ;Send help
  656.  
  657. end
Advertisement
Add Comment
Please, Sign In to add comment