local player = self; local giantcount = 0 // amount of giants on field, keep count so we can maxactive them local maxgiants = (3 + arenascleared) // max amount of giants, morph later around playercount / difficulty level? local giantcooldown = 1 // amount of spawns before we send in a giant, keep above one local giantwait = 8 // how many bots need to spawn after a giant to spawn another one local bosswait = RandomInt(10,25) // how many bots need to spawn before the boss can spawn, is IGNORED if it's bossonly local round_number = NetProps.GetPropInt(PopExtUtil.ObjectiveResource, "m_nMannVsMachineWaveCount") ::isbosswave <- false ::isbossonly <- false ::hasbossspawned <- false // lets try unique wave counts? ::boss_timer <- 7 // how many waves to boss wave ::EnemyTable <- [ TF_CLASS_SCOUT, TF_CLASS_SOLDIER, TF_CLASS_SNIPER, TF_CLASS_HEAVYWEAPONS, ] ::GiantTable <- [ TF_CLASS_DEMOMAN, ] ::BossTable <- [ TF_CLASS_HEAVYWEAPONS, ] ::EnemySpawn <- function(self) { EntFireByHandle(self,"runscriptcode","SelectEnemyType(self)",0.5,null,self); } ::SelectEnemyType <- function(self) { if (self.HasBotTag("Cooldude")) return if (!self.IsAlive) return if (!self.IsValid) return if (self.HasBotAttribute(REMOVE_ON_DEATH)) return // we don't want this running multiple times local diceroll = RandomInt(0, EnemyTable.len() - 1) self.AddBotAttribute(REMOVE_ON_DEATH) self.AddBotAttribute(DISABLE_DODGE) // I suspect this is not carrying over from bot_generator self.AddCondEx(87,10,null) // hold in place to apply the stuff self.SetPlayerClass(EnemyTable[diceroll]) NetProps.SetPropInt(self,"m_Shared.m_iDesiredPlayerClass",EnemyTable[diceroll]) self.ForceRegenerateAndRespawn() UpdateBotModel(self) GetBotLoadout(self) difficulty = difficulty + 0.025 if (difficulty > 10) difficulty = 10 MoveToSpawnLocation(self) } ::BecomeGiant <- function(self) { if (self.IsMiniBoss()) return // we don't want this running multiple times local diceroll = RandomInt(0, GiantTable.len() - 1) local diceroll_boss = RandomInt(0, BossTable.len() - 1) if (isbossonly) bosswait = 0 self.AddBotAttribute(REMOVE_ON_DEATH) self.AddBotAttribute(DISABLE_DODGE) // I suspect this is not carrying over from bot_generator self.SetPlayerClass(GiantTable[diceroll]) NetProps.SetPropInt(self,"m_Shared.m_iDesiredPlayerClass",GiantTable[diceroll]) if (isbosswave && bosswait <= 0 && !hasbossspawned) { self.SetPlayerClass(BossTable[diceroll_boss]) NetProps.SetPropInt(self,"m_Shared.m_iDesiredPlayerClass",BossTable[diceroll_boss]) self.ForceRegenerateAndRespawn() self.SetIsMiniBoss(true) self.AddBotTag("bot_boss") self.SetScaleOverride(1.75) UpdateBotModel(self) GetBotLoadout(self) MoveToSpawnLocation(self) return } self.ForceRegenerateAndRespawn() self.SetIsMiniBoss(true) // all this needs to run after our above trick so they don't get cleared self.SetDifficulty(EXPERT) UpdateBotModel(self) self.AddBotTag("bot_giant") self.SetScaleOverride(1.5) // needs this because lumberyard GetBotLoadout(self) difficulty = difficulty + 0.025 if (difficulty > 10) difficulty = 10 giantcount += 1 MoveToSpawnLocation(self) } ::GetBotLoadout <- function(self) { if (GetRoundState() != 4) return if (self.HasBotTag("Cooldude")) return self.ClearAllWeaponRestrictions() local botclass = self.GetPlayerClass() local randomizer = RandomInt(1,11) if (giantcooldown <= 0 && giantcount < maxgiants && !hasbossspawned) // on boss waves: stop spawning giants when the boss spawns { giantcooldown = giantwait if (difficulty < 6) giantwait = 8 if (difficulty >= 6 && difficulty < 9) giantwait = 8 if (difficulty >= 9) giantwait = 7 BecomeGiant(self) return } if (self.HasBotTag("bot_boss")) { GetBossHealth(self,20000) GivePlayerWeapon(self,"tf_weapon_minigun",811) self.AddBotAttribute(AGGRESSIVE) self.SetUseBossHealthBar(true) // find a way to make this work later self.AddCustomAttribute("move speed bonus" ,0.4, -1); self.AddCustomAttribute("override footstep sound set" ,2, -1); self.AddCustomAttribute("damage force reduction" ,0.1, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.1, -1); self.SetScaleOverride(1.55) self.GetActiveWeapon().AddAttribute("bullets per shot bonus" ,3, -1); self.GetActiveWeapon().AddAttribute("damage bonus" ,1.5, -1); self.GetActiveWeapon().AddAttribute("Set DamageType Ignite" ,1, -1); self.GetActiveWeapon().AddAttribute("fire rate bonus" ,1.2, -1); GivePlayerCosmetic(self,9911,"models/workshop/player/items/heavy/robo_heavy_chief/robo_heavy_chief.mdl") SetFakeClientConVarValue(self, "name", "Chief Forest Fire"); CalloutGiant(false) hasbossspawned = true return } if (difficulty <= 2) { if (botclass == TF_CLASS_SCOUT) { if (randomizer < 6) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Scout"); return } if (randomizer >= 6) { self.AddWeaponRestriction(SECONDARY_ONLY) self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Scout"); return } ClientPrint(null,HUD_PRINTTALK,"!! Scout spawned with no template !!") return } if (botclass == TF_CLASS_SOLDIER) { if (randomizer < 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Soldier"); return } if (randomizer >= 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Soldier"); return } ClientPrint(null,HUD_PRINTTALK,"!! Soldier spawned with no template !!") return } if (botclass == TF_CLASS_SNIPER) { if (randomizer < 6) { self.AddWeaponRestriction(SECONDARY_ONLY) self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Gunman"); return } if (randomizer >= 6) { self.AddBotAttribute(AGGRESSIVE) self.SetMission(MISSION_SNIPER,true) SetFakeClientConVarValue(self, "name", "Sniper"); return } ClientPrint(null,HUD_PRINTTALK,"!! Sniper spawned with no template !!") return } if (botclass == TF_CLASS_HEAVYWEAPONS) { if (randomizer < 5) { GivePlayerWeapon(self,"tf_weapon_fists",43) // kind of crap but still works? GivePlayerCosmetic(self,9911,"models/player/items/heavy/pugilist_protector.mdl") // this supports any modelpath given to it self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Heavyweight Champ"); return } if (randomizer >= 5) { self.AddWeaponRestriction(SECONDARY_ONLY) self.AddBotAttribute(AGGRESSIVE) self.AddCustomAttribute("faster reload rate" ,0.1, -1); // stock weapons under weapon restriction don't work with GetActiveWeapon() self.AddCustomAttribute("fire rate bonus" ,2.5, -1); // lets apply weapon stats to the body instead self.AddCustomAttribute("bullets per shot bonus" ,3, -1); self.AddCustomAttribute("damage bonus" ,0.33, -1); SetFakeClientConVarValue(self, "name", "Shotgun Heavy"); return } ClientPrint(null,HUD_PRINTTALK,"!! Heavy spawned with no template !!") return } } if (difficulty > 2 && difficulty <= 4) { giantcooldown -= 1 if (giantcooldown < 0) giantcooldown = 0 if (botclass == TF_CLASS_SCOUT) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Scout"); return } if (botclass == TF_CLASS_SOLDIER) { if (randomizer < 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Soldier"); return } if (randomizer >= 6) { GivePlayerWeapon(self,"tf_weapon_rocketlauncher_directhit",127) GivePlayerCosmetic(self,9911,"models/workshop/player/items/soldier/tw_soldierbot_helmet/tw_soldierbot_helmet.mdl") self.AddBotAttribute(AGGRESSIVE) // self.GetActiveWeapon().AddAttribute("rocket specialist" ,1, -1); SetFakeClientConVarValue(self, "name", "Direct Hit Soldier"); return } ClientPrint(null,HUD_PRINTTALK,"!! Soldier spawned with no template !!") return } if (botclass == TF_CLASS_SNIPER) { if (randomizer < 8) { GivePlayerWeapon(self,"tf_weapon_compound_bow",56) self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Bowman"); return } if (randomizer >= 8) { self.AddBotAttribute(AGGRESSIVE) self.SetMission(MISSION_SNIPER,true) SetFakeClientConVarValue(self, "name", "Sniper"); return } ClientPrint(null,HUD_PRINTTALK,"!! Sniper spawned with no template !!") return } if (botclass == TF_CLASS_HEAVYWEAPONS) { if (randomizer < 6) { GivePlayerWeapon(self,"tf_weapon_fists",43) GivePlayerCosmetic(self,9911,"models/player/items/heavy/pugilist_protector.mdl") self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Heavyweight Champ"); return } if (randomizer >= 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Heavy"); return } ClientPrint(null,HUD_PRINTTALK,"!! Heavy spawned with no template !!") return } if (botclass == TF_CLASS_DEMOMAN) { if (randomizer <= 7) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.SetHealth(3000) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("override footstep sound set" ,4, -1); self.AddCustomAttribute("damage force reduction" ,0.5, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.5, -1); self.AddCustomAttribute("max health additive bonus" ,3000, -1); self.GetActiveWeapon().AddAttribute("faster reload rate" ,-0.4, -1); self.GetActiveWeapon().AddAttribute("fire rate bonus" ,0.75, -1); SetFakeClientConVarValue(self, "name", "Giant Demoman"); CalloutGiant(false) return } if (randomizer > 7) { GivePlayerWeapon(self,"tf_weapon_stickbomb",307) self.SetCustomModelWithClassAnimations("models/bots/demo/bot_sentry_buster.mdl") self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) self.SetHealth(2500) self.AddCustomAttribute("move speed bonus" ,2, -1); self.AddCustomAttribute("override footstep sound set" ,7, -1); self.AddCustomAttribute("damage force reduction" ,0.25, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.25, -1); self.AddCustomAttribute("max health additive bonus" ,2500, -1); self.AddCustomAttribute("cannot be backstabbed",1,-1) SetFakeClientConVarValue(self, "name", "Target Buster"); GetRandomTarget(self) self.SetMission(MISSION_DESTROY_SENTRIES,true) CalloutGiant(true) return } ClientPrint(null,HUD_PRINTTALK,"!! Demo spawned with no template !!") return } } if (difficulty > 4 && difficulty <= 6) { giantcooldown -= 1 if (giantcooldown < 0) giantcooldown = 0 if (botclass == TF_CLASS_SCOUT) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Scout"); return } if (botclass == TF_CLASS_SOLDIER) { if (randomizer < 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Soldier"); return } if (randomizer >= 6 && randomizer < 9) { GivePlayerWeapon(self,"tf_weapon_rocketlauncher_directhit",127) GivePlayerCosmetic(self,9911,"models/workshop/player/items/soldier/tw_soldierbot_helmet/tw_soldierbot_helmet.mdl") self.AddBotAttribute(AGGRESSIVE) // self.GetActiveWeapon().AddAttribute("rocket specialist" ,1, -1); SetFakeClientConVarValue(self, "name", "Direct Hit Soldier"); return } if (randomizer >= 9) { GivePlayerWeapon(self,"tf_weapon_buff_item",354) // conch GivePlayerCosmetic(self,9911,"models/workshop/player/items/soldier/tw_soldierbot_helmet/tw_soldierbot_helmet.mdl") self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(SPAWN_WITH_FULL_CHARGE) self.AddCustomAttribute("mod rage on hit bonus" ,100, -1); self.AddCustomAttribute("increase buff duration" ,3.0, -1); SetFakeClientConVarValue(self, "name", "Conch Soldier"); return } ClientPrint(null,HUD_PRINTTALK,"!! Soldier spawned with no template !!") return } if (botclass == TF_CLASS_SNIPER) { if (randomizer < 8) { GivePlayerWeapon(self,"tf_weapon_compound_bow",56) self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Bowman"); return } if (randomizer >= 8) { self.AddBotAttribute(AGGRESSIVE) self.SetMission(MISSION_SNIPER,true) SetFakeClientConVarValue(self, "name", "Sniper"); return } ClientPrint(null,HUD_PRINTTALK,"!! Sniper spawned with no template !!") return } if (botclass == TF_CLASS_HEAVYWEAPONS) { if (randomizer < 6) { GivePlayerWeapon(self,"tf_weapon_fists",43) GivePlayerCosmetic(self,9911,"models/player/items/heavy/pugilist_protector.mdl") self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Heavyweight Champ"); return } if (randomizer >= 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Heavy"); return } ClientPrint(null,HUD_PRINTTALK,"!! Heavy spawned with no template !!") return } if (botclass == TF_CLASS_DEMOMAN) { if (randomizer <= 7) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.SetHealth(3000) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("override footstep sound set" ,4, -1); self.AddCustomAttribute("damage force reduction" ,0.5, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.5, -1); self.AddCustomAttribute("max health additive bonus" ,3000, -1); self.GetActiveWeapon().AddAttribute("faster reload rate" ,-0.4, -1); self.GetActiveWeapon().AddAttribute("fire rate bonus" ,0.75, -1); SetFakeClientConVarValue(self, "name", "Giant Demoman"); CalloutGiant(false) return } if (randomizer > 7) { GivePlayerWeapon(self,"tf_weapon_stickbomb",307) self.SetCustomModelWithClassAnimations("models/bots/demo/bot_sentry_buster.mdl") self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) self.SetHealth(2500) self.AddCustomAttribute("move speed bonus" ,2, -1); self.AddCustomAttribute("override footstep sound set" ,7, -1); self.AddCustomAttribute("damage force reduction" ,0.25, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.25, -1); self.AddCustomAttribute("max health additive bonus" ,2500, -1); self.AddCustomAttribute("cannot be backstabbed",1,-1) SetFakeClientConVarValue(self, "name", "Target Buster"); GetRandomTarget(self) self.SetMission(MISSION_DESTROY_SENTRIES,true) CalloutGiant(true) return } ClientPrint(null,HUD_PRINTTALK,"!! Demo spawned with no template !!") return } } if (difficulty > 6 && difficulty <= 8) { giantcooldown -= 1 if (giantcooldown < 0) giantcooldown = 0 if (isbosswave && !isbossonly && !hasbossspawned) bosswait -= 1 if (botclass == TF_CLASS_SCOUT) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Scout"); return } if (botclass == TF_CLASS_SOLDIER) { if (randomizer < 3) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Soldier"); return } if (randomizer >= 3 && randomizer < 6) { GivePlayerWeapon(self,"tf_weapon_rocketlauncher_directhit",127) GivePlayerCosmetic(self,9911,"models/workshop/player/items/soldier/tw_soldierbot_helmet/tw_soldierbot_helmet.mdl") self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) // self.GetActiveWeapon().AddAttribute("rocket specialist" ,1, -1); SetFakeClientConVarValue(self, "name", "Direct Hit Soldier"); return } if (randomizer >= 6 && randomizer < 8) { GivePlayerWeapon(self,"tf_weapon_buff_item",354) // conch GivePlayerCosmetic(self,9911,"models/workshop/player/items/soldier/tw_soldierbot_helmet/tw_soldierbot_helmet.mdl") self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) self.AddBotAttribute(SPAWN_WITH_FULL_CHARGE) self.AddCustomAttribute("mod rage on hit bonus" ,100, -1); self.AddCustomAttribute("increase buff duration" ,3.0, -1); SetFakeClientConVarValue(self, "name", "Conch Soldier"); return } if (randomizer >= 8) { GivePlayerWeapon(self,"tf_weapon_buff_item",129) // buff GivePlayerCosmetic(self,9911,"models/workshop/player/items/medic/hwn2016_burly_beast/hwn2016_burly_beast.mdl") GivePlayerCosmetic(self,30817,"models/player/items/soldier/ro_helmet.mdl") self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) self.AddBotAttribute(SPAWN_WITH_FULL_CHARGE) self.AddCustomAttribute("mod rage on hit bonus" ,100, -1); self.AddCustomAttribute("increase buff duration" ,3.0, -1); SetFakeClientConVarValue(self, "name", "Buff Soldier"); return } ClientPrint(null,HUD_PRINTTALK,"!! Soldier spawned with no template !!") return } if (botclass == TF_CLASS_SNIPER) { if (randomizer < 8) { GivePlayerWeapon(self,"tf_weapon_compound_bow",56) self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) SetFakeClientConVarValue(self, "name", "Bowman"); return } if (randomizer >= 8) { self.AddBotAttribute(AGGRESSIVE) self.SetMission(MISSION_SNIPER,true) SetFakeClientConVarValue(self, "name", "Sniper"); return } ClientPrint(null,HUD_PRINTTALK,"!! Sniper spawned with no template !!") return } if (botclass == TF_CLASS_HEAVYWEAPONS) { if (randomizer < 6) { GivePlayerWeapon(self,"tf_weapon_fists",43) GivePlayerCosmetic(self,9911,"models/player/items/heavy/pugilist_protector.mdl") self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) SetFakeClientConVarValue(self, "name", "Heavyweight Champ"); return } if (randomizer >= 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Heavy"); return } ClientPrint(null,HUD_PRINTTALK,"!! Heavy spawned with no template !!") return } if (botclass == TF_CLASS_DEMOMAN) { if (randomizer <= 7) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.SetHealth(3000) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("override footstep sound set" ,4, -1); self.AddCustomAttribute("damage force reduction" ,0.5, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.5, -1); self.AddCustomAttribute("max health additive bonus" ,3000, -1); self.GetActiveWeapon().AddAttribute("faster reload rate" ,-0.4, -1); self.GetActiveWeapon().AddAttribute("fire rate bonus" ,0.75, -1); SetFakeClientConVarValue(self, "name", "Giant Demoman"); CalloutGiant(false) return } if (randomizer > 7) { GivePlayerWeapon(self,"tf_weapon_stickbomb",307) self.SetCustomModelWithClassAnimations("models/bots/demo/bot_sentry_buster.mdl") self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) self.SetHealth(2500) self.AddCustomAttribute("move speed bonus" ,2, -1); self.AddCustomAttribute("override footstep sound set" ,7, -1); self.AddCustomAttribute("damage force reduction" ,0.25, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.25, -1); self.AddCustomAttribute("max health additive bonus" ,2500, -1); self.AddCustomAttribute("cannot be backstabbed",1,-1) SetFakeClientConVarValue(self, "name", "Target Buster"); GetRandomTarget(self) self.SetMission(MISSION_DESTROY_SENTRIES,true) CalloutGiant(true) return } ClientPrint(null,HUD_PRINTTALK,"!! Demo spawned with no template !!") return } } if (difficulty >= 8) { giantcooldown -= 1 if (giantcooldown < 0) giantcooldown = 0 if (isbosswave && !isbossonly && !hasbossspawned) bosswait -= 1 if (botclass == TF_CLASS_SCOUT) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) SetFakeClientConVarValue(self, "name", "Scout"); return } if (botclass == TF_CLASS_SOLDIER) { if (randomizer < 3) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) self.GetActiveWeapon().AddAttribute("rocket specialist" ,1, -1); SetFakeClientConVarValue(self, "name", "Stunner Soldier"); return } if (randomizer >= 3 && randomizer < 6) { GivePlayerWeapon(self,"tf_weapon_rocketlauncher_directhit",127) GivePlayerCosmetic(self,9911,"models/workshop/player/items/soldier/tw_soldierbot_helmet/tw_soldierbot_helmet.mdl") self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) // self.GetActiveWeapon().AddAttribute("rocket specialist" ,1, -1); SetFakeClientConVarValue(self, "name", "Direct Hit Soldier"); return } if (randomizer >= 6 && randomizer < 8) { GivePlayerWeapon(self,"tf_weapon_buff_item",354) // conch GivePlayerCosmetic(self,9911,"models/workshop/player/items/soldier/tw_soldierbot_helmet/tw_soldierbot_helmet.mdl") self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) self.AddBotAttribute(SPAWN_WITH_FULL_CHARGE) self.AddCustomAttribute("mod rage on hit bonus" ,100, -1); self.AddCustomAttribute("increase buff duration" ,3.0, -1); SetFakeClientConVarValue(self, "name", "Conch Soldier"); return } if (randomizer >= 8) { GivePlayerWeapon(self,"tf_weapon_buff_item",129) // buff GivePlayerCosmetic(self,9911,"models/workshop/player/items/medic/hwn2016_burly_beast/hwn2016_burly_beast.mdl") GivePlayerCosmetic(self,30817,"models/player/items/soldier/ro_helmet.mdl") self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) self.AddBotAttribute(SPAWN_WITH_FULL_CHARGE) self.AddCustomAttribute("mod rage on hit bonus" ,100, -1); self.AddCustomAttribute("increase buff duration" ,3.0, -1); SetFakeClientConVarValue(self, "name", "Buff Soldier"); return } ClientPrint(null,HUD_PRINTTALK,"!! Soldier spawned with no template !!") return } if (botclass == TF_CLASS_SNIPER) { if (randomizer < 6) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) GivePlayerWeapon(self,"tf_weapon_compound_bow",56) SetFakeClientConVarValue(self, "name", "Bowman"); return } if (randomizer >= 6) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(EXPERT) self.SetMission(MISSION_SNIPER,true) SetFakeClientConVarValue(self, "name", "Sniper"); return } ClientPrint(null,HUD_PRINTTALK,"!! Sniper spawned with no template !!") return } if (botclass == TF_CLASS_HEAVYWEAPONS) { if (randomizer < 6) { GivePlayerWeapon(self,"tf_weapon_fists",43) GivePlayerCosmetic(self,9911,"models/player/items/heavy/pugilist_protector.mdl") self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(ALWAYS_CRIT) self.SetDifficulty(HARD) SetFakeClientConVarValue(self, "name", "Heavyweight Champ"); return } if (randomizer >= 6) { GivePlayerWeapon(self,"tf_weapon_minigun",850) GivePlayerCosmetic(self,9911,"models/player/items/mvm_loot/heavy/robo_ushanka.mdl") self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(NORMAL) self.GetActiveWeapon().AddAttribute("attack projectiles" ,1, -1); SetFakeClientConVarValue(self, "name", "Deflector Heavy"); return } ClientPrint(null,HUD_PRINTTALK,"!! Heavy spawned with no template !!") return } if (botclass == TF_CLASS_DEMOMAN) { if (randomizer <= 2) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.SetHealth(3000) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("override footstep sound set" ,4, -1); self.AddCustomAttribute("damage force reduction" ,0.5, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.5, -1); self.AddCustomAttribute("max health additive bonus" ,3000, -1); self.GetActiveWeapon().AddAttribute("faster reload rate" ,-0.4, -1); self.GetActiveWeapon().AddAttribute("fire rate bonus" ,0.75, -1); SetFakeClientConVarValue(self, "name", "Giant Demoman"); CalloutGiant(false) return } if (randomizer > 2 && randomizer <= 4) { GivePlayerWeapon(self,"tf_weapon_stickbomb",307) self.SetCustomModelWithClassAnimations("models/bots/demo/bot_sentry_buster.mdl") self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) self.SetHealth(2500) self.AddCustomAttribute("move speed bonus" ,2, -1); self.AddCustomAttribute("override footstep sound set" ,7, -1); self.AddCustomAttribute("damage force reduction" ,0.25, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.25, -1); self.AddCustomAttribute("max health additive bonus" ,2500, -1); self.AddCustomAttribute("cannot be backstabbed",1,-1) SetFakeClientConVarValue(self, "name", "Target Buster"); GetRandomTarget(self) self.SetMission(MISSION_DESTROY_SENTRIES,true) CalloutGiant(true) return } if (randomizer > 4 && randomizer <= 6) { self.SetPlayerClass(TF_CLASS_SCOUT) NetProps.SetPropInt(self,"m_Shared.m_iDesiredPlayerClass",TF_CLASS_SCOUT) self.ForceRegenerateAndRespawn() self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(ALWAYS_CRIT) self.AddWeaponRestriction(MELEE_ONLY) GivePlayerWeapon(self,"tf_weapon_bat_fish",221) GivePlayerCosmetic(self,9911,"models/workshop/player/items/scout/bonk_mask/bonk_mask.mdl") self.SetIsMiniBoss(true) self.SetDifficulty(NORMAL) UpdateBotModel(self) self.AddBotTag("bot_giant") self.SetScaleOverride(1.5) self.SetIsMiniBoss(true) self.SetHealth(1200) self.AddCustomAttribute("move speed bonus" ,2, -1); self.AddCustomAttribute("override footstep sound set" ,5, -1); self.AddCustomAttribute("damage force reduction" ,0.7, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.7, -1); self.AddCustomAttribute("max health additive bonus" ,1200, -1); SetFakeClientConVarValue(self, "name", "Super Scout"); MoveToSpawnLocation(self) CalloutGiant(false) return } if (randomizer > 6 && randomizer <= 8) { self.SetPlayerClass(TF_CLASS_PYRO) NetProps.SetPropInt(self,"m_Shared.m_iDesiredPlayerClass",TF_CLASS_PYRO) self.ForceRegenerateAndRespawn() self.AddBotAttribute(AGGRESSIVE) self.SetIsMiniBoss(true) self.SetDifficulty(EXPERT) UpdateBotModel(self) self.AddBotTag("bot_giant") self.SetScaleOverride(1.5) self.SetIsMiniBoss(true) self.SetHealth(3000) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("airblast disabled" ,1, -1); self.AddCustomAttribute("override footstep sound set" ,6, -1); self.AddCustomAttribute("damage force reduction" ,0.6, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.6, -1); self.AddCustomAttribute("max health additive bonus" ,3000, -1); self.GetActiveWeapon().AddAttribute("lunchbox gives minicrits" ,2, -1); SetFakeClientConVarValue(self, "name", "Giant Pyro"); MoveToSpawnLocation(self) CalloutGiant(false) return } if (randomizer > 8) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.AddBotAttribute(ALWAYS_CRIT) self.SetHealth(3000) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("override footstep sound set" ,4, -1); self.AddCustomAttribute("damage force reduction" ,0.5, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.5, -1); self.AddCustomAttribute("max health additive bonus" ,3000, -1); self.GetActiveWeapon().AddAttribute("faster reload rate" ,-0.4, -1); self.GetActiveWeapon().AddAttribute("fire rate bonus" ,0.75, -1); SetFakeClientConVarValue(self, "name", "Giant Charged Demoman"); CalloutGiant(false) return } ClientPrint(null,HUD_PRINTTALK,"!! Demo spawned with no template !!") return } } }