Guest User

Untitled

a guest
Jan 22nd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.50 KB | None | 0 0
  1. ;-------------------------------------------------
  2. ; Need to have a unique variable per random
  3. ; Not sure why
  4. ;-------------------------------------------------
  5. short mRandFaction
  6. short mTempRand ; Only non-unique variable. It's called within another func so it appears unique.
  7. short mConfidenceRand
  8. short mEquipmentRand
  9. short mWeaponsRand
  10. short mCharRand
  11. short mGunsRand
  12. short mEnergyWepsRand
  13. short mMeleeWepsRand
  14. short mMedRand
  15. short mSpeechRand
  16. short mSneakRand
  17. short mLocationRand
  18. ;-------------------------------------------------
  19. ref mCan
  20. ref mTarget
  21. short mDoOnce
  22. ;-------------------------------------------------
  23. short mHitmanAspectLocalLocal
  24. ref mAspectBodyguard
  25. ref mAspectDog
  26. ref mAspectRobot
  27. ;ref mAspectHitman
  28. ;ref mAspectDecoy
  29. ;short mDepartTimer
  30. ;short mDepartRand
  31. ;short mDepart
  32. if ( mDoesHaveTarget == 0 )
  33. ; Human Male
  34. set mCharRand to 1 + GetRandomPercent * (10-1) / 99
  35. if ( mCharRand == 1 )
  36. set mTarget to mHumanMaleWhiteRef
  37. elseif ( mCharRand == 2 )
  38. set mTarget to mHumanMaleBlackRef
  39. elseif ( mCharRand == 3 )
  40. set mTarget to mHumanMaleHispanicRef
  41. elseif ( mCharRand == 4 )
  42. set mTarget to mHumanMaleAsianRef
  43. ; Human Female
  44. elseif ( mCharRand == 5 )
  45. set mTarget to mHumanFemaleWhiteRef
  46. elseif ( mCharRand == 6 )
  47. set mTarget to mHumanFemaleBlackRef
  48. elseif ( mCharRand == 7 )
  49. set mTarget to mHumanFemaleHispanicRef
  50. elseif ( mCharRand == 8 )
  51. set mTarget to mHumanFemaleAsianRef
  52. ; Ghouls
  53. elseif ( mCharRand == 9 )
  54. set mTarget to mGhoulMaleRef
  55. elseif ( mCharRand == 10 )
  56. set mTarget to mGhoulFemaleRef
  57. else
  58. ShowMessage mTargetNoTarget
  59. endif
  60. set mCharacterNumb to mCharRand
  61. ;-------------------------------------------------
  62. ; Clean slate
  63. ;set mHitmanAspectLocal to 0
  64. ; prevent unintentional DOA
  65. mTarget.Resurrect
  66. ; Items
  67. mTarget.RemoveAllItems
  68. ; Factions
  69. mTarget.SetFactionRank PowderGangerFactionNV -1
  70. mTarget.SetFactionRank GoodspringsFaction -1
  71. mTarget.SetFactionRank NCRFactionNV -1
  72. mTarget.SetFactionRank VTopsChairmenFaction -1
  73. mTarget.SetFactionRank OmertaFaction -1
  74. mTarget.SetFactionRank VWhiteGloveSocietyFaction -1
  75. mTarget.SetFactionRank KingsFaction -1
  76. mTarget.SetFactionRank VanGraffFaction -1
  77. mTarget.SetFactionRank JacobstownFaction -1
  78. set mRandFaction to 0
  79. ;-------------------------------------------------
  80. ;Factions
  81. if ( GetRandomPercent <= 20 )
  82. set mRandFaction to 1 + GetRandomPercent * ( 9 - 1 ) / 99
  83. endif
  84. if ( mRandFaction == 1 )
  85. mTarget.SetFactionRank PowderGangerFactionNV 0
  86. elseif ( mRandFaction == 2 )
  87. mTarget.SetFactionRank GoodspringsFaction 0
  88. elseif ( mRandFaction == 3 )
  89. mTarget.SetFactionRank NCRFactionNV 0
  90. elseif ( mRandFaction == 4 )
  91. mTarget.SetFactionRank VTopsChairmenFaction 0
  92. elseif ( mRandFaction == 5 )
  93. mTarget.SetFactionRank OmertaFaction 0
  94. elseif ( mRandFaction == 6 )
  95. mTarget.SetFactionRank VWhiteGloveSocietyFaction 0
  96. elseif ( mRandFaction == 7 )
  97. mTarget.SetFactionRank KingsFaction 0
  98. elseif ( mRandFaction == 8 )
  99. mTarget.SetFactionRank VanGraffFaction 0
  100. elseif ( mRandFaction == 9 )
  101. mTarget.SetFactionRank JacobstownFaction 0
  102. endif
  103. ; Confidence
  104. set mConfidenceRand to 1 + GetRandomPercent * ( 5 - 1 ) / 99
  105. if ( mConfidenceRand == 1 )
  106. mTarget.ForceActorValue Confidence 0
  107. elseif ( mConfidenceRand == 2 )
  108. mTarget.ForceActorValue Confidence 1
  109. elseif ( mConfidenceRand == 3 )
  110. mTarget.ForceActorValue Confidence 2
  111. elseif ( mConfidenceRand == 4 )
  112. mTarget.ForceActorValue Confidence 3
  113. elseif ( mConfidenceRand == 5 )
  114. mTarget.ForceActorValue Confidence 4
  115. endif
  116. ;-------------------------------------------------
  117. ; Equipment
  118. ;-------------------------------------------------
  119. if ( mRandFaction == 0 )
  120. set mEquipmentRand to GetRandomPercent
  121. if ( mEquipmentRand <= 15 )
  122. mTarget.AddItem ArmorLeather 1
  123. elseif ( mEquipmentRand > 15 && mEquipmentRand < 20 )
  124. mTarget.AddItem ArmorLeatherReinforced 1
  125. elseif ( mEquipmentRand > 20 && mEquipmentRand < 25 )
  126. mTarget.AddItem ArmorMetal 1
  127. elseif ( mEquipmentRand > 25 && mEquipmentRand < 28 )
  128. mTarget.AddItem ArmorMetalReinforced 1
  129. elseif ( mEquipmentRand > 28 && mEquipmentRand < 41 )
  130. set mTempRand to 1 + GetRandomPercent * ( 4 - 1 ) / 99
  131. if ( mTempRand == 1 )
  132. mTarget.AddItem ArmorRaider01 1
  133. elseif ( mTempRand == 2 )
  134. mTarget.AddItem ArmorRaider02 1
  135. elseif ( mTempRand == 3 )
  136. mTarget.AddItem ArmorRaider03 1
  137. elseif ( mTempRand == 4 )
  138. mTarget.AddItem ArmorRaider04 1
  139. endif
  140. elseif ( mEquipmentRand > 41 && mEquipmentRand < 53 )
  141. set mTempRand to 1 + GetRandomPercent * ( 6 - 1 ) / 99
  142. if ( mTempRand == 1 )
  143. mTarget.AddItem OutfitMerc01 1
  144. elseif ( mTempRand == 2 )
  145. mTarget.AddItem OutfitMerc02 1
  146. elseif ( mTempRand == 3 )
  147. mTarget.AddItem OutfitMerc03 1
  148. elseif ( mTempRand == 4 )
  149. mTarget.AddItem OutfitMerc04 1
  150. elseif ( mTempRand == 5 )
  151. mTarget.AddItem OutfitMerc05 1
  152. elseif ( mTempRand == 6 )
  153. mTarget.AddItem OutfitMerc06 1
  154. endif
  155. elseif ( mEquipmentRand > 53 && mEquipmentRand < 74 )
  156. set mTempRand to 1 + GetRandomPercent * ( 4 - 1 ) / 99
  157. if ( GetRandomPercent == 1 )
  158. mTarget.AddItem OutfitGambler01 1
  159. elseif ( mTempRand == 2 )
  160. mTarget.AddItem OutfitGambler02 1
  161. elseif ( mTempRand == 3 )
  162. mTarget.AddItem OutfitGambler03 1
  163. elseif ( mTempRand == 4 )
  164. mTarget.AddItem OutfitGambler04 1
  165. endif
  166. elseif ( mEquipmentRand > 74 && mEquipmentRand < 85 )
  167. set mTempRand to 1 + GetRandomPercent * ( 10 - 1 ) / 99
  168. if ( mTempRand == 1 )
  169. mTarget.AddItem OutfitPreWarBusinesswearDirty 1
  170. elseif ( mTempRand == 2 )
  171. mTarget.AddItem OutfitPreWarCasualwear 1
  172. elseif ( mTempRand == 3 )
  173. mTarget.AddItem OutfitPreWarCasualwear2 1
  174. elseif ( mTempRand == 4 )
  175. mTarget.AddItem OutfitPreWarCasualwear2Dirty 1
  176. elseif ( mTempRand == 5 )
  177. mTarget.AddItem OutfitPreWarCasualwearDirty 1
  178. elseif ( mTempRand == 6 )
  179. mTarget.AddItem OutfitPreWarNegligee 1
  180. elseif ( mTempRand == 7 )
  181. mTarget.AddItem OutfitPreWarSpring 1
  182. elseif ( mTempRand == 8 )
  183. mTarget.AddItem OutfitPreWarSpring2 1
  184. elseif ( mTempRand == 9 )
  185. mTarget.AddItem OutfitPreWarSpring2Dirty 1
  186. elseif ( mTempRand == 10 )
  187. mTarget.AddItem OutfitPreWarSpringDirty 1
  188. endif
  189. elseif ( mEquipmentRand > 85 )
  190. set mTempRand to 1 + GetRandomPercent * ( 3 - 1 ) / 99
  191. if ( GetRandomPercent == 1 )
  192. mTarget.AddItem BountyHunterDuster 1
  193. elseif ( GetRandomPercent == 2 )
  194. mTarget.AddItem OutfitFormalWear 1
  195. elseif ( GetRandomPercent == 3 )
  196. mTarget.AddItem OutfitTrenchcoat 1
  197. endif
  198. endif
  199. endif
  200. ; Faction equipment ...
  201. if ( mRandFaction == 1 )
  202. mTarget.additem CondPowderGangerArmorAll 1
  203. elseif ( mRandFaction == 2 )
  204. mTarget.additem CondOutfitRepublican02 1
  205. elseif ( mRandFaction == 3 )
  206. mTarget.additem CondNVTrooperArmor 1
  207. elseif ( mRandFaction == 4 )
  208. mTarget.additem OutfitPrewarBusinesswearDirty 1
  209. elseif ( mRandFaction == 5 )
  210. mTarget.additem OutfitPrewarBusinesswearDirty 1
  211. elseif ( mRandFaction == 6 )
  212. mTarget.additem ArmorWhiteGloveSociety 1
  213. mTarget.additem VMS18WhiteGloveMask 1
  214. elseif ( mRandFaction == 7 )
  215. mTarget.additem VFSKingsClothing 1
  216. elseif ( mRandFaction == 8 )
  217. mTarget.additem CondCombatArmorBlack 1
  218. elseif ( mRandFaction == 9 )
  219. mTarget.additem CondOutfitRepublican02 1
  220. endif
  221. ;-------------------------------------------------
  222. ; Equipment end
  223. ;-------------------------------------------------
  224. ; Weapons
  225. set mWeaponsRand to GetRandomPercent
  226. if ( mWeaponsRand <= 60 )
  227. mTarget.AddItem WeapNVMachete 1
  228. mTarget.AddItem WeapNV9mmPistol 1
  229. mTarget.AddItem Ammo9mm 300
  230. mTarget.AddItem WeapLaserPistol 1
  231. mTarget.AddItem AmmoSmallEnergyCell 300
  232. elseif ( mWeaponsRand > 60 && mWeaponsRand < 90 )
  233. mTarget.AddItem WeapSledgehammer 1
  234. mTarget.AddItem WeapNV44Revolver 1
  235. mTarget.AddItem Ammo44Magnum 300
  236. mTarget.AddItem WeapPlasmaPistol 1
  237. mTarget.AddItem AmmoSmallEnergyCell 300
  238. elseif ( mWeaponsRand > 90 )
  239. mTarget.AddItem WeapSuperSledge 1
  240. mTarget.AddItem WeapNV127mmPistol 1
  241. mTarget.AddItem Ammo127mm 300
  242. mTarget.AddItem WeapNVPlasmaDefender 1
  243. mTarget.AddItem AmmoSmallEnergyCell 300
  244. endif
  245. ; Skills
  246. set mGunsRand to GetRandomPercent
  247. mTarget.ForceActorValue Guns mGunsRand
  248. set mEnergyWepsRand to GetRandomPercent
  249. mTarget.ForceActorValue EnergyWeapons mEnergyWepsRand
  250. set mMeleeWepsRand to GetRandomPercent
  251. mTarget.ForceActorValue MeleeWeapons mMeleeWepsRand
  252. set mMedRand to GetRandomPercent
  253. mTarget.ForceActorValue Medicine mMedRand
  254. set mSpeechRand to GetRandomPercent
  255. mTarget.ForceActorValue Speech mSpeechRand
  256. set mSneakRand to GetRandomPercent
  257. mTarget.ForceActorValue Sneak mSneakRand
  258. set mCan to mHitmanGarbageCanRef
  259. ;-------------------------------------------------
  260. ; Location
  261. ;-------------------------------------------------
  262. set mLocationRand to 1 + GetRandomPercent * (45-1) / 99
  263. ; testing location rand
  264. ;set mLocationRand to 8
  265. ; Freeside
  266. if ( mLocationRand == 1 )
  267. mTarget.MoveTo VFSAWEscortTeleportMarkerREF
  268. mCan.additem mHitmanTargetFreeside 1
  269. elseif ( mLocationRand == 2 )
  270. mTarget.MoveTo mKingsPlaceRef
  271. mCan.additem mHitmanTargetFreeside 1
  272. elseif ( mLocationRand == 3 )
  273. mTarget.MoveTo mMickAndRalphsRef
  274. mCan.additem mHitmanTargetFreeside 1
  275. elseif ( mLocationRand == 4 )
  276. mTarget.MoveTo mSilverRushRef
  277. mCan.additem mHitmanTargetFreeside 1
  278. elseif ( mLocationRand == 5 )
  279. mTarget.MoveTo mFollowersFortRef
  280. mCan.additem mHitmanTargetFreeside 1
  281. elseif ( mLocationRand == 6 )
  282. mTarget.MoveTo VFSSilverRushGuardPacerMarker
  283. mCan.additem mHitmanTargetFreeside 1
  284. ; Goodsprings
  285. elseif ( mLocationRand == 7 )
  286. mTarget.MoveTo XMarkerGoodspringsSaloon
  287. mCan.additem mHitmanTargetGoodsprings 1
  288. elseif ( mLocationRand == 8 )
  289. mTarget.MoveTo SunnySpawnMarker
  290. mCan.additem mHitmanTargetGoodsprings 1
  291. elseif ( mLocationRand == 9 )
  292. mTarget.MoveTo mGoodspringsHouse01Ref
  293. mCan.additem mHitmanTargetGoodsprings 1
  294. elseif ( mLocationRand == 10 )
  295. mTarget.MoveTo SettlerAAMFleeMarker
  296. mCan.additem mHitmanTargetGoodsprings 1
  297. elseif ( mLocationRand == 11 )
  298. mTarget.MoveTo GSSettlerHideMarker
  299. mCan.additem mHitmanTargetGoodsprings 1
  300. elseif ( mLocationRand == 12 )
  301. mTarget.MoveTo mGoodspringsHouse04Ref
  302. mCan.additem mHitmanTargetGoodsprings 1
  303. elseif ( mLocationRand == 13 )
  304. mTarget.MoveTo mGoodspringsAbandonedShackRef
  305. mCan.additem mHitmanTargetGoodsprings 1
  306. elseif ( mLocationRand == 14 )
  307. mTarget.MoveTo VCG01DocSkullTestMarkerREF
  308. mCan.additem mHitmanTargetGoodsprings 1
  309. elseif ( mLocationRand == 15 )
  310. mTarget.MoveTo mGoodspringsGeneralStoreRef
  311. mCan.additem mHitmanTargetGoodsprings 1
  312. elseif ( mLocationRand == 16 )
  313. mTarget.MoveTo mGoodspringsExtRef
  314. mCan.additem mHitmanTargetGoodsprings 1
  315. ; NCRCF
  316. elseif ( mLocationRand == 17 )
  317. mTarget.MoveTo NCRCFHostageMarker1
  318. mCan.additem mHitmanTargetNCRCF 1
  319. elseif ( mLocationRand == 18 )
  320. mTarget.MoveTo mNCRCPCellBlockARef
  321. mCan.additem mHitmanTargetNCRCF 1
  322. elseif ( mLocationRand == 19 )
  323. mTarget.MoveTo mNCRCPCellBlockBRef
  324. mCan.additem mHitmanTargetNCRCF 1
  325. elseif ( mLocationRand == 20 )
  326. mTarget.MoveTo mNCRCPCellBlockCRef
  327. mCan.additem mHitmanTargetNCRCF 1
  328. elseif ( mLocationRand == 21 )
  329. mTarget.MoveTo mNCRCPAdminOfficeRef
  330. mCan.additem mHitmanTargetNCRCF 1
  331. elseif ( mLocationRand == 2 )
  332. mTarget.MoveTo VMS02Team2Destination
  333. mCan.additem mHitmanTargetNCRCF 1
  334. ; Jacobstown
  335. elseif ( mLocationRand == 23 )
  336. mTarget.MoveTo JacobsTownBungalowRef
  337. mCan.additem mHitmanTargetJacobstown 1
  338. elseif ( mLocationRand == 24 )
  339. mTarget.MoveTo mJacobstownBungalow02Ref
  340. mCan.additem mHitmanTargetJacobstown 1
  341. elseif ( mLocationRand == 25 )
  342. mTarget.MoveTo mJacobstownBungalow03
  343. mCan.additem mHitmanTargetJacobstown 1
  344. elseif ( mLocationRand == 26 )
  345. mTarget.MoveTo mJacobstownLodgeRef
  346. mCan.additem mHitmanTargetJacobstown 1
  347. elseif ( mLocationRand == 27 )
  348. mTarget.MoveTo LilyJacobstownMarker
  349. mCan.additem mHitmanTargetJacobstown 1
  350. ; New Vegas
  351. ; Tops
  352. elseif ( mLocationRand == 28 )
  353. mTarget.MoveTo TOPSResturantRef
  354. mCan.additem mHitmanTargetNewVegas 1
  355. elseif ( mLocationRand == 29 )
  356. mTarget.MoveTo mTopsTheaterRef
  357. mCan.additem mHitmanTargetNewVegas 1
  358. elseif ( mLocationRand == 30 )
  359. mTarget.MoveTo mTopsMainFloorRef
  360. mCan.additem mHitmanTargetNewVegas 1
  361. ; Gommorah
  362. elseif ( mLocationRand == 31 )
  363. mTarget.MoveTo mGommorahLowerLobbyRef
  364. mCan.additem mHitmanTargetNewVegas 1
  365. elseif ( mLocationRand == 32 )
  366. mTarget.MoveTo mGommorahMainFloorRef
  367. mCan.additem mHitmanTargetNewVegas 1
  368. elseif ( mLocationRand == 33 )
  369. mTarget.MoveTo Gomorrah3rdMarker
  370. mCan.additem mHitmanTargetNewVegas 1
  371. elseif ( mLocationRand == 34 )
  372. mTarget.MoveTo mGomorrahSuitesRef
  373. mCan.additem mHitmanTargetNewVegas 1
  374. ; Ultra Luxe
  375. elseif ( mLocationRand == 35 )
  376. mTarget.MoveTo mUltraLuxeRef
  377. mCan.additem mHitmanTargetNewVegas 1
  378. elseif ( mLocationRand == 36 )
  379. mTarget.MoveTo mUltraLuxeMainFloorRef
  380. mCan.additem mHitmanTargetNewVegas 1
  381. elseif ( mLocationRand == 37 )
  382. mTarget.MoveTo mUltraLuxeRoomsRef
  383. mCan.additem mHitmanTargetNewVegas 1
  384. ; Novac
  385. elseif ( mLocationRand == 38 )
  386. mTarget.MoveTo NovacMotelLobbyRef
  387. mCan.additem mHitmanTargetNovac 1
  388. elseif ( mLocationRand == 39 )
  389. mTarget.MoveTo mNovacHouse01Ref
  390. mCan.additem mHitmanTargetNovac 1
  391. elseif ( mLocationRand == 40 )
  392. mTarget.MoveTo mNovacHouse02Ref
  393. mCan.additem mHitmanTargetNovac 1
  394. elseif ( mLocationRand == 41 )
  395. mTarget.MoveTo mNovacGiftShopRef
  396. mCan.additem mHitmanTargetNovac 1
  397. elseif ( mLocationRand == 42 )
  398. mTarget.MoveTo mNovacMotelRoom01
  399. mCan.additem mHitmanTargetNovac 1
  400. elseif ( mLocationRand == 43 )
  401. mTarget.MoveTo mNovacHotelRoom02
  402. mCan.additem mHitmanTargetNovac 1
  403. elseif ( mLocationRand == 44 )
  404. mTarget.MoveTo mNovacMotelRoom03
  405. mCan.additem mHitmanTargetNovac 1
  406. elseif ( mLocationRand == 45 )
  407. mTarget.MoveTo mNovacMotelRoom04
  408. mCan.additem mHitmanTargetNovac 1
  409. else
  410. ShowMessage mTargetNoTargetCell
  411. endif
  412. ;-------------------------------------------------
  413. ; aspects
  414. ;-------------------------------------------------
  415. set mHitmanAspectLocal to 1 + GetRandomPercent * (4-1) / 99
  416. set mAspectBodyguard to mHitmanBodyguardRef
  417. set mAspectRobot to mHitmanRobotRefe
  418. set mAspectDog to mHitmanDogRefe
  419. ;set mAspectHitman to mHitmanHitmanRef
  420. ;aspects
  421. if ( mHitmanAspectLocal == 1 )
  422. mAspectBodyguard.MoveTo mTarget
  423. mAspectBodyguard.AddScriptPackage mHitmanSandboxAI
  424. mAspectBodyguard.EvaluatePackage
  425. elseif ( mHitmanAspectLocal == 2 )
  426. mAspectRobot.MoveTo mTarget
  427. mAspectRobot.AddScriptPackage mHitmanSandboxAI
  428. mAspectRobot.EvaluatePackage
  429. elseif ( mHitmanAspectLocal == 3 )
  430. mAspectDog.MoveTo mTarget
  431. mAspectDog.AddScriptPackage mHitmanSandboxAI
  432. mAspectDog.EvaluatePackage
  433. ;elseif ( mHitmanAspectLocal == 4 )
  434. ; mAspectHitman.MoveTo Player
  435. ; StartCombat Player
  436. ; set mDepart to 0
  437. ;set mDepart to 1
  438. ;elseif ( mHitmanAspectLocal == 5 )
  439. endif
  440. ;-------------------------------------------------
  441. ; Location end
  442. ;-------------------------------------------------
  443. mTarget.AddScriptPackage mHitmanSandboxAI
  444. mTarget.EvaluatePackage
  445. set mDoesHaveTarget to 1
  446. set mHitmanAspectLocal to 0
  447. ShowMessage mHitmanTargetAcquired
  448. else
  449. ShowMessage mHasTargetMessage
  450. endif
  451. ; if ( mDepart == 1 )
  452. ;the hitman could be sent anywhere from 30 to 180 seconds after grabbing the target
  453. ; set mDepartRand to 30 + GetRandomPercent * (180-30) / 99
  454. ; if ( mDepartTimer < mDepartRand )
  455. ; set mDepartTimer to mDepartTimer + GetSecondsPassed
  456. ; else
  457. ; mAspectHitman.MoveTo Player
  458. ; StartCombat Player
  459. ; set mDepart to 0
  460. ; endif
  461. ; endif
Add Comment
Please, Sign In to add comment