Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;-------------------------------------------------
- ; Need to have a unique variable per random
- ; Not sure why
- ;-------------------------------------------------
- short mRandFaction
- short mTempRand ; Only non-unique variable. It's called within another func so it appears unique.
- short mConfidenceRand
- short mEquipmentRand
- short mWeaponsRand
- short mCharRand
- short mGunsRand
- short mEnergyWepsRand
- short mMeleeWepsRand
- short mMedRand
- short mSpeechRand
- short mSneakRand
- short mLocationRand
- ;-------------------------------------------------
- ref mCan
- ref mTarget
- short mDoOnce
- ;-------------------------------------------------
- short mHitmanAspectLocalLocal
- ref mAspectBodyguard
- ref mAspectDog
- ref mAspectRobot
- ;ref mAspectHitman
- ;ref mAspectDecoy
- ;short mDepartTimer
- ;short mDepartRand
- ;short mDepart
- if ( mDoesHaveTarget == 0 )
- ; Human Male
- set mCharRand to 1 + GetRandomPercent * (10-1) / 99
- if ( mCharRand == 1 )
- set mTarget to mHumanMaleWhiteRef
- elseif ( mCharRand == 2 )
- set mTarget to mHumanMaleBlackRef
- elseif ( mCharRand == 3 )
- set mTarget to mHumanMaleHispanicRef
- elseif ( mCharRand == 4 )
- set mTarget to mHumanMaleAsianRef
- ; Human Female
- elseif ( mCharRand == 5 )
- set mTarget to mHumanFemaleWhiteRef
- elseif ( mCharRand == 6 )
- set mTarget to mHumanFemaleBlackRef
- elseif ( mCharRand == 7 )
- set mTarget to mHumanFemaleHispanicRef
- elseif ( mCharRand == 8 )
- set mTarget to mHumanFemaleAsianRef
- ; Ghouls
- elseif ( mCharRand == 9 )
- set mTarget to mGhoulMaleRef
- elseif ( mCharRand == 10 )
- set mTarget to mGhoulFemaleRef
- else
- ShowMessage mTargetNoTarget
- endif
- set mCharacterNumb to mCharRand
- ;-------------------------------------------------
- ; Clean slate
- ;set mHitmanAspectLocal to 0
- ; prevent unintentional DOA
- mTarget.Resurrect
- ; Items
- mTarget.RemoveAllItems
- ; Factions
- mTarget.SetFactionRank PowderGangerFactionNV -1
- mTarget.SetFactionRank GoodspringsFaction -1
- mTarget.SetFactionRank NCRFactionNV -1
- mTarget.SetFactionRank VTopsChairmenFaction -1
- mTarget.SetFactionRank OmertaFaction -1
- mTarget.SetFactionRank VWhiteGloveSocietyFaction -1
- mTarget.SetFactionRank KingsFaction -1
- mTarget.SetFactionRank VanGraffFaction -1
- mTarget.SetFactionRank JacobstownFaction -1
- set mRandFaction to 0
- ;-------------------------------------------------
- ;Factions
- if ( GetRandomPercent <= 20 )
- set mRandFaction to 1 + GetRandomPercent * ( 9 - 1 ) / 99
- endif
- if ( mRandFaction == 1 )
- mTarget.SetFactionRank PowderGangerFactionNV 0
- elseif ( mRandFaction == 2 )
- mTarget.SetFactionRank GoodspringsFaction 0
- elseif ( mRandFaction == 3 )
- mTarget.SetFactionRank NCRFactionNV 0
- elseif ( mRandFaction == 4 )
- mTarget.SetFactionRank VTopsChairmenFaction 0
- elseif ( mRandFaction == 5 )
- mTarget.SetFactionRank OmertaFaction 0
- elseif ( mRandFaction == 6 )
- mTarget.SetFactionRank VWhiteGloveSocietyFaction 0
- elseif ( mRandFaction == 7 )
- mTarget.SetFactionRank KingsFaction 0
- elseif ( mRandFaction == 8 )
- mTarget.SetFactionRank VanGraffFaction 0
- elseif ( mRandFaction == 9 )
- mTarget.SetFactionRank JacobstownFaction 0
- endif
- ; Confidence
- set mConfidenceRand to 1 + GetRandomPercent * ( 5 - 1 ) / 99
- if ( mConfidenceRand == 1 )
- mTarget.ForceActorValue Confidence 0
- elseif ( mConfidenceRand == 2 )
- mTarget.ForceActorValue Confidence 1
- elseif ( mConfidenceRand == 3 )
- mTarget.ForceActorValue Confidence 2
- elseif ( mConfidenceRand == 4 )
- mTarget.ForceActorValue Confidence 3
- elseif ( mConfidenceRand == 5 )
- mTarget.ForceActorValue Confidence 4
- endif
- ;-------------------------------------------------
- ; Equipment
- ;-------------------------------------------------
- if ( mRandFaction == 0 )
- set mEquipmentRand to GetRandomPercent
- if ( mEquipmentRand <= 15 )
- mTarget.AddItem ArmorLeather 1
- elseif ( mEquipmentRand > 15 && mEquipmentRand < 20 )
- mTarget.AddItem ArmorLeatherReinforced 1
- elseif ( mEquipmentRand > 20 && mEquipmentRand < 25 )
- mTarget.AddItem ArmorMetal 1
- elseif ( mEquipmentRand > 25 && mEquipmentRand < 28 )
- mTarget.AddItem ArmorMetalReinforced 1
- elseif ( mEquipmentRand > 28 && mEquipmentRand < 41 )
- set mTempRand to 1 + GetRandomPercent * ( 4 - 1 ) / 99
- if ( mTempRand == 1 )
- mTarget.AddItem ArmorRaider01 1
- elseif ( mTempRand == 2 )
- mTarget.AddItem ArmorRaider02 1
- elseif ( mTempRand == 3 )
- mTarget.AddItem ArmorRaider03 1
- elseif ( mTempRand == 4 )
- mTarget.AddItem ArmorRaider04 1
- endif
- elseif ( mEquipmentRand > 41 && mEquipmentRand < 53 )
- set mTempRand to 1 + GetRandomPercent * ( 6 - 1 ) / 99
- if ( mTempRand == 1 )
- mTarget.AddItem OutfitMerc01 1
- elseif ( mTempRand == 2 )
- mTarget.AddItem OutfitMerc02 1
- elseif ( mTempRand == 3 )
- mTarget.AddItem OutfitMerc03 1
- elseif ( mTempRand == 4 )
- mTarget.AddItem OutfitMerc04 1
- elseif ( mTempRand == 5 )
- mTarget.AddItem OutfitMerc05 1
- elseif ( mTempRand == 6 )
- mTarget.AddItem OutfitMerc06 1
- endif
- elseif ( mEquipmentRand > 53 && mEquipmentRand < 74 )
- set mTempRand to 1 + GetRandomPercent * ( 4 - 1 ) / 99
- if ( GetRandomPercent == 1 )
- mTarget.AddItem OutfitGambler01 1
- elseif ( mTempRand == 2 )
- mTarget.AddItem OutfitGambler02 1
- elseif ( mTempRand == 3 )
- mTarget.AddItem OutfitGambler03 1
- elseif ( mTempRand == 4 )
- mTarget.AddItem OutfitGambler04 1
- endif
- elseif ( mEquipmentRand > 74 && mEquipmentRand < 85 )
- set mTempRand to 1 + GetRandomPercent * ( 10 - 1 ) / 99
- if ( mTempRand == 1 )
- mTarget.AddItem OutfitPreWarBusinesswearDirty 1
- elseif ( mTempRand == 2 )
- mTarget.AddItem OutfitPreWarCasualwear 1
- elseif ( mTempRand == 3 )
- mTarget.AddItem OutfitPreWarCasualwear2 1
- elseif ( mTempRand == 4 )
- mTarget.AddItem OutfitPreWarCasualwear2Dirty 1
- elseif ( mTempRand == 5 )
- mTarget.AddItem OutfitPreWarCasualwearDirty 1
- elseif ( mTempRand == 6 )
- mTarget.AddItem OutfitPreWarNegligee 1
- elseif ( mTempRand == 7 )
- mTarget.AddItem OutfitPreWarSpring 1
- elseif ( mTempRand == 8 )
- mTarget.AddItem OutfitPreWarSpring2 1
- elseif ( mTempRand == 9 )
- mTarget.AddItem OutfitPreWarSpring2Dirty 1
- elseif ( mTempRand == 10 )
- mTarget.AddItem OutfitPreWarSpringDirty 1
- endif
- elseif ( mEquipmentRand > 85 )
- set mTempRand to 1 + GetRandomPercent * ( 3 - 1 ) / 99
- if ( GetRandomPercent == 1 )
- mTarget.AddItem BountyHunterDuster 1
- elseif ( GetRandomPercent == 2 )
- mTarget.AddItem OutfitFormalWear 1
- elseif ( GetRandomPercent == 3 )
- mTarget.AddItem OutfitTrenchcoat 1
- endif
- endif
- endif
- ; Faction equipment ...
- if ( mRandFaction == 1 )
- mTarget.additem CondPowderGangerArmorAll 1
- elseif ( mRandFaction == 2 )
- mTarget.additem CondOutfitRepublican02 1
- elseif ( mRandFaction == 3 )
- mTarget.additem CondNVTrooperArmor 1
- elseif ( mRandFaction == 4 )
- mTarget.additem OutfitPrewarBusinesswearDirty 1
- elseif ( mRandFaction == 5 )
- mTarget.additem OutfitPrewarBusinesswearDirty 1
- elseif ( mRandFaction == 6 )
- mTarget.additem ArmorWhiteGloveSociety 1
- mTarget.additem VMS18WhiteGloveMask 1
- elseif ( mRandFaction == 7 )
- mTarget.additem VFSKingsClothing 1
- elseif ( mRandFaction == 8 )
- mTarget.additem CondCombatArmorBlack 1
- elseif ( mRandFaction == 9 )
- mTarget.additem CondOutfitRepublican02 1
- endif
- ;-------------------------------------------------
- ; Equipment end
- ;-------------------------------------------------
- ; Weapons
- set mWeaponsRand to GetRandomPercent
- if ( mWeaponsRand <= 60 )
- mTarget.AddItem WeapNVMachete 1
- mTarget.AddItem WeapNV9mmPistol 1
- mTarget.AddItem Ammo9mm 300
- mTarget.AddItem WeapLaserPistol 1
- mTarget.AddItem AmmoSmallEnergyCell 300
- elseif ( mWeaponsRand > 60 && mWeaponsRand < 90 )
- mTarget.AddItem WeapSledgehammer 1
- mTarget.AddItem WeapNV44Revolver 1
- mTarget.AddItem Ammo44Magnum 300
- mTarget.AddItem WeapPlasmaPistol 1
- mTarget.AddItem AmmoSmallEnergyCell 300
- elseif ( mWeaponsRand > 90 )
- mTarget.AddItem WeapSuperSledge 1
- mTarget.AddItem WeapNV127mmPistol 1
- mTarget.AddItem Ammo127mm 300
- mTarget.AddItem WeapNVPlasmaDefender 1
- mTarget.AddItem AmmoSmallEnergyCell 300
- endif
- ; Skills
- set mGunsRand to GetRandomPercent
- mTarget.ForceActorValue Guns mGunsRand
- set mEnergyWepsRand to GetRandomPercent
- mTarget.ForceActorValue EnergyWeapons mEnergyWepsRand
- set mMeleeWepsRand to GetRandomPercent
- mTarget.ForceActorValue MeleeWeapons mMeleeWepsRand
- set mMedRand to GetRandomPercent
- mTarget.ForceActorValue Medicine mMedRand
- set mSpeechRand to GetRandomPercent
- mTarget.ForceActorValue Speech mSpeechRand
- set mSneakRand to GetRandomPercent
- mTarget.ForceActorValue Sneak mSneakRand
- set mCan to mHitmanGarbageCanRef
- ;-------------------------------------------------
- ; Location
- ;-------------------------------------------------
- set mLocationRand to 1 + GetRandomPercent * (45-1) / 99
- ; testing location rand
- ;set mLocationRand to 8
- ; Freeside
- if ( mLocationRand == 1 )
- mTarget.MoveTo VFSAWEscortTeleportMarkerREF
- mCan.additem mHitmanTargetFreeside 1
- elseif ( mLocationRand == 2 )
- mTarget.MoveTo mKingsPlaceRef
- mCan.additem mHitmanTargetFreeside 1
- elseif ( mLocationRand == 3 )
- mTarget.MoveTo mMickAndRalphsRef
- mCan.additem mHitmanTargetFreeside 1
- elseif ( mLocationRand == 4 )
- mTarget.MoveTo mSilverRushRef
- mCan.additem mHitmanTargetFreeside 1
- elseif ( mLocationRand == 5 )
- mTarget.MoveTo mFollowersFortRef
- mCan.additem mHitmanTargetFreeside 1
- elseif ( mLocationRand == 6 )
- mTarget.MoveTo VFSSilverRushGuardPacerMarker
- mCan.additem mHitmanTargetFreeside 1
- ; Goodsprings
- elseif ( mLocationRand == 7 )
- mTarget.MoveTo XMarkerGoodspringsSaloon
- mCan.additem mHitmanTargetGoodsprings 1
- elseif ( mLocationRand == 8 )
- mTarget.MoveTo SunnySpawnMarker
- mCan.additem mHitmanTargetGoodsprings 1
- elseif ( mLocationRand == 9 )
- mTarget.MoveTo mGoodspringsHouse01Ref
- mCan.additem mHitmanTargetGoodsprings 1
- elseif ( mLocationRand == 10 )
- mTarget.MoveTo SettlerAAMFleeMarker
- mCan.additem mHitmanTargetGoodsprings 1
- elseif ( mLocationRand == 11 )
- mTarget.MoveTo GSSettlerHideMarker
- mCan.additem mHitmanTargetGoodsprings 1
- elseif ( mLocationRand == 12 )
- mTarget.MoveTo mGoodspringsHouse04Ref
- mCan.additem mHitmanTargetGoodsprings 1
- elseif ( mLocationRand == 13 )
- mTarget.MoveTo mGoodspringsAbandonedShackRef
- mCan.additem mHitmanTargetGoodsprings 1
- elseif ( mLocationRand == 14 )
- mTarget.MoveTo VCG01DocSkullTestMarkerREF
- mCan.additem mHitmanTargetGoodsprings 1
- elseif ( mLocationRand == 15 )
- mTarget.MoveTo mGoodspringsGeneralStoreRef
- mCan.additem mHitmanTargetGoodsprings 1
- elseif ( mLocationRand == 16 )
- mTarget.MoveTo mGoodspringsExtRef
- mCan.additem mHitmanTargetGoodsprings 1
- ; NCRCF
- elseif ( mLocationRand == 17 )
- mTarget.MoveTo NCRCFHostageMarker1
- mCan.additem mHitmanTargetNCRCF 1
- elseif ( mLocationRand == 18 )
- mTarget.MoveTo mNCRCPCellBlockARef
- mCan.additem mHitmanTargetNCRCF 1
- elseif ( mLocationRand == 19 )
- mTarget.MoveTo mNCRCPCellBlockBRef
- mCan.additem mHitmanTargetNCRCF 1
- elseif ( mLocationRand == 20 )
- mTarget.MoveTo mNCRCPCellBlockCRef
- mCan.additem mHitmanTargetNCRCF 1
- elseif ( mLocationRand == 21 )
- mTarget.MoveTo mNCRCPAdminOfficeRef
- mCan.additem mHitmanTargetNCRCF 1
- elseif ( mLocationRand == 2 )
- mTarget.MoveTo VMS02Team2Destination
- mCan.additem mHitmanTargetNCRCF 1
- ; Jacobstown
- elseif ( mLocationRand == 23 )
- mTarget.MoveTo JacobsTownBungalowRef
- mCan.additem mHitmanTargetJacobstown 1
- elseif ( mLocationRand == 24 )
- mTarget.MoveTo mJacobstownBungalow02Ref
- mCan.additem mHitmanTargetJacobstown 1
- elseif ( mLocationRand == 25 )
- mTarget.MoveTo mJacobstownBungalow03
- mCan.additem mHitmanTargetJacobstown 1
- elseif ( mLocationRand == 26 )
- mTarget.MoveTo mJacobstownLodgeRef
- mCan.additem mHitmanTargetJacobstown 1
- elseif ( mLocationRand == 27 )
- mTarget.MoveTo LilyJacobstownMarker
- mCan.additem mHitmanTargetJacobstown 1
- ; New Vegas
- ; Tops
- elseif ( mLocationRand == 28 )
- mTarget.MoveTo TOPSResturantRef
- mCan.additem mHitmanTargetNewVegas 1
- elseif ( mLocationRand == 29 )
- mTarget.MoveTo mTopsTheaterRef
- mCan.additem mHitmanTargetNewVegas 1
- elseif ( mLocationRand == 30 )
- mTarget.MoveTo mTopsMainFloorRef
- mCan.additem mHitmanTargetNewVegas 1
- ; Gommorah
- elseif ( mLocationRand == 31 )
- mTarget.MoveTo mGommorahLowerLobbyRef
- mCan.additem mHitmanTargetNewVegas 1
- elseif ( mLocationRand == 32 )
- mTarget.MoveTo mGommorahMainFloorRef
- mCan.additem mHitmanTargetNewVegas 1
- elseif ( mLocationRand == 33 )
- mTarget.MoveTo Gomorrah3rdMarker
- mCan.additem mHitmanTargetNewVegas 1
- elseif ( mLocationRand == 34 )
- mTarget.MoveTo mGomorrahSuitesRef
- mCan.additem mHitmanTargetNewVegas 1
- ; Ultra Luxe
- elseif ( mLocationRand == 35 )
- mTarget.MoveTo mUltraLuxeRef
- mCan.additem mHitmanTargetNewVegas 1
- elseif ( mLocationRand == 36 )
- mTarget.MoveTo mUltraLuxeMainFloorRef
- mCan.additem mHitmanTargetNewVegas 1
- elseif ( mLocationRand == 37 )
- mTarget.MoveTo mUltraLuxeRoomsRef
- mCan.additem mHitmanTargetNewVegas 1
- ; Novac
- elseif ( mLocationRand == 38 )
- mTarget.MoveTo NovacMotelLobbyRef
- mCan.additem mHitmanTargetNovac 1
- elseif ( mLocationRand == 39 )
- mTarget.MoveTo mNovacHouse01Ref
- mCan.additem mHitmanTargetNovac 1
- elseif ( mLocationRand == 40 )
- mTarget.MoveTo mNovacHouse02Ref
- mCan.additem mHitmanTargetNovac 1
- elseif ( mLocationRand == 41 )
- mTarget.MoveTo mNovacGiftShopRef
- mCan.additem mHitmanTargetNovac 1
- elseif ( mLocationRand == 42 )
- mTarget.MoveTo mNovacMotelRoom01
- mCan.additem mHitmanTargetNovac 1
- elseif ( mLocationRand == 43 )
- mTarget.MoveTo mNovacHotelRoom02
- mCan.additem mHitmanTargetNovac 1
- elseif ( mLocationRand == 44 )
- mTarget.MoveTo mNovacMotelRoom03
- mCan.additem mHitmanTargetNovac 1
- elseif ( mLocationRand == 45 )
- mTarget.MoveTo mNovacMotelRoom04
- mCan.additem mHitmanTargetNovac 1
- else
- ShowMessage mTargetNoTargetCell
- endif
- ;-------------------------------------------------
- ; aspects
- ;-------------------------------------------------
- set mHitmanAspectLocal to 1 + GetRandomPercent * (4-1) / 99
- set mAspectBodyguard to mHitmanBodyguardRef
- set mAspectRobot to mHitmanRobotRefe
- set mAspectDog to mHitmanDogRefe
- ;set mAspectHitman to mHitmanHitmanRef
- ;aspects
- if ( mHitmanAspectLocal == 1 )
- mAspectBodyguard.MoveTo mTarget
- mAspectBodyguard.AddScriptPackage mHitmanSandboxAI
- mAspectBodyguard.EvaluatePackage
- elseif ( mHitmanAspectLocal == 2 )
- mAspectRobot.MoveTo mTarget
- mAspectRobot.AddScriptPackage mHitmanSandboxAI
- mAspectRobot.EvaluatePackage
- elseif ( mHitmanAspectLocal == 3 )
- mAspectDog.MoveTo mTarget
- mAspectDog.AddScriptPackage mHitmanSandboxAI
- mAspectDog.EvaluatePackage
- ;elseif ( mHitmanAspectLocal == 4 )
- ; mAspectHitman.MoveTo Player
- ; StartCombat Player
- ; set mDepart to 0
- ;set mDepart to 1
- ;elseif ( mHitmanAspectLocal == 5 )
- endif
- ;-------------------------------------------------
- ; Location end
- ;-------------------------------------------------
- mTarget.AddScriptPackage mHitmanSandboxAI
- mTarget.EvaluatePackage
- set mDoesHaveTarget to 1
- set mHitmanAspectLocal to 0
- ShowMessage mHitmanTargetAcquired
- else
- ShowMessage mHasTargetMessage
- endif
- ; if ( mDepart == 1 )
- ;the hitman could be sent anywhere from 30 to 180 seconds after grabbing the target
- ; set mDepartRand to 30 + GetRandomPercent * (180-30) / 99
- ; if ( mDepartTimer < mDepartRand )
- ; set mDepartTimer to mDepartTimer + GetSecondsPassed
- ; else
- ; mAspectHitman.MoveTo Player
- ; StartCombat Player
- ; set mDepart to 0
- ; endif
- ; endif
Add Comment
Please, Sign In to add comment