local player = self; local giantcount = 0 // amount of giants on field, keep count so we can maxactive them local maxgiants = (2 + arenascleared) // max amount of giants local giantcooldown = 1 // amount of spawns before we send in a giant, keep above one local giantwait = 7 // 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 <- 6 // how many waves to boss wave ::EnemyTable <- [ TF_CLASS_SCOUT, TF_CLASS_SOLDIER, TF_CLASS_PYRO, TF_CLASS_HEAVYWEAPONS, TF_CLASS_MEDIC, ] ::GiantTable <- [ TF_CLASS_DEMOMAN, TF_CLASS_DEMOMAN, TF_CLASS_SOLDIER, TF_CLASS_SOLDIER, TF_CLASS_HEAVYWEAPONS, ] ::BossTable <- [ TF_CLASS_SOLDIER, ] ::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 if (isbosswave && isbossonly) giantcooldown = 0 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.75) 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 = 7 isbossonly = false } if (difficulty >= 6 && difficulty < 9) { giantwait = 7 isbossonly = true } BecomeGiant(self) return } if (self.HasBotTag("bot_boss")) { GetBossHealth(self,22500) self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.AddBotAttribute(USE_BOSS_HEALTH_BAR) // find a way to make this work later self.AddBotAttribute(ALWAYS_CRIT) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("override footstep sound set" ,3, -1); self.AddCustomAttribute("damage force reduction" ,0.4, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.4, -1); self.GetActiveWeapon().AddAttribute("damage bonus" ,1.5, -1); self.GetActiveWeapon().AddAttribute("faster reload rate" ,0.6, -1); self.GetActiveWeapon().AddAttribute("fire rate bonus" ,0.2, -1); self.GetActiveWeapon().AddAttribute("clip size upgrade atomic" ,7.0, -1); self.GetActiveWeapon().AddAttribute("Projectile speed increased" ,1.3, -1); GivePlayerCosmetic(self,9911,"models/workshop/player/items/soldier/robo_soldier_tyrantium/robo_soldier_tyrantium.mdl") SetFakeClientConVarValue(self, "name", "Sergeant Crits"); CalloutGiant(false) hasbossspawned = true return } if (difficulty <= 2) { if (botclass == TF_CLASS_PYRO) { GivePlayerWeapon(self,"tf_weapon_flaregun",39) self.AddWeaponRestriction(SECONDARY_ONLY) self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Flare Pyro"); return } 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_MEDIC) { if (randomizer < 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Medic"); return } if (randomizer >= 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Medic"); return } ClientPrint(null,HUD_PRINTTALK,"!! Medic spawned with no template !!") return } if (botclass == TF_CLASS_HEAVYWEAPONS) { if (randomizer < 5) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) GivePlayerWeapon(self,"tf_weapon_fists",43) GivePlayerCosmetic(self,9911,"models/player/items/heavy/pugilist_protector.mdl") SetFakeClientConVarValue(self, "name", "Heavyweight Champ"); return } if (randomizer >= 5) { self.AddWeaponRestriction(SECONDARY_ONLY) self.AddBotAttribute(AGGRESSIVE) self.AddCustomAttribute("faster reload rate" ,0.1, -1); self.AddCustomAttribute("fire rate bonus" ,2.5, -1); 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_PYRO) { if (randomizer <= 6) { GivePlayerWeapon(self,"tf_weapon_flaregun",39) self.AddWeaponRestriction(SECONDARY_ONLY) self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Flare Pyro"); return } if (randomizer > 6) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(EASY) SetFakeClientConVarValue(self, "name", "Pyro"); return } ClientPrint(null,HUD_PRINTTALK,"!! Pyro spawned with no template !!") return } if (botclass == TF_CLASS_SCOUT) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Scout"); return } if (botclass == TF_CLASS_SOLDIER) { if (!self.HasBotTag("bot_giant")) { if (randomizer < 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Soldier"); return } if (randomizer >= 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Soldier"); GivePlayerWeapon(self,"tf_weapon_rocketlauncher_directhit",127) GivePlayerCosmetic(self,9911,"models/workshop/player/items/soldier/tw_soldierbot_helmet/tw_soldierbot_helmet.mdl") return } ClientPrint(null,HUD_PRINTTALK,"!! Soldier spawned with no template !!") return } if (self.HasBotTag("bot_giant")) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.SetHealth(3800) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("override footstep sound set" ,3, -1); self.AddCustomAttribute("damage force reduction" ,0.4, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.4, -1); self.AddCustomAttribute("max health additive bonus" ,3800, -1); SetFakeClientConVarValue(self, "name", "Giant Soldier"); CalloutGiant(false) return } } if (botclass == TF_CLASS_MEDIC) { if (randomizer < 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Medic"); return } if (randomizer >= 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Medic"); return } ClientPrint(null,HUD_PRINTTALK,"!! Medic spawned with no template !!") return } if (botclass == TF_CLASS_HEAVYWEAPONS) { if (!self.HasBotTag("bot_giant")) { if (randomizer < 6) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) GivePlayerWeapon(self,"tf_weapon_fists",43) GivePlayerCosmetic(self,9911,"models/player/items/heavy/pugilist_protector.mdl") 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 (self.HasBotTag("bot_giant")) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.SetHealth(5000) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("override footstep sound set" ,2, -1); self.AddCustomAttribute("damage force reduction" ,0.3, -1); self.GetActiveWeapon().AddAttribute("damage bonus" ,1.5, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.3, -1); self.AddCustomAttribute("max health additive bonus" ,5000, -1); SetFakeClientConVarValue(self, "name", "Giant Heavy"); CalloutGiant(false) 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) { 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) GivePlayerWeapon(self,"tf_weapon_stickbomb",307) 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_PYRO) { if (randomizer <= 6) { GivePlayerWeapon(self,"tf_weapon_flaregun",39) self.AddWeaponRestriction(SECONDARY_ONLY) self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Flare Pyro"); return } if (randomizer > 6) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(EASY) SetFakeClientConVarValue(self, "name", "Pyro"); return } ClientPrint(null,HUD_PRINTTALK,"!! Pyro spawned with no template !!") return } if (botclass == TF_CLASS_SCOUT) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Scout"); return } if (botclass == TF_CLASS_SOLDIER) { if (!self.HasBotTag("bot_giant")) { if (randomizer < 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Soldier"); return } if (randomizer >= 6 && randomizer < 9) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Soldier"); GivePlayerWeapon(self,"tf_weapon_rocketlauncher_directhit",127) GivePlayerCosmetic(self,9911,"models/workshop/player/items/soldier/tw_soldierbot_helmet/tw_soldierbot_helmet.mdl") 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 (self.HasBotTag("bot_giant")) { if (randomizer <= 5) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.SetHealth(3800) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("override footstep sound set" ,3, -1); self.AddCustomAttribute("damage force reduction" ,0.4, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.4, -1); self.AddCustomAttribute("max health additive bonus" ,3800, -1); self.GetActiveWeapon().AddAttribute("faster reload rate" ,-1, -1); self.GetActiveWeapon().AddAttribute("fire rate bonus" ,0.5, -1); self.GetActiveWeapon().AddAttribute("Projectile speed increased" ,0.65, -1); SetFakeClientConVarValue(self, "name", "Giant Rapid Fire Soldier"); CalloutGiant(false) return } if (randomizer > 5) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(ALWAYS_CRIT) self.SetHealth(3800) GivePlayerWeapon(self,"tf_weapon_rocketlauncher",513) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("override footstep sound set" ,3, -1); self.AddCustomAttribute("damage force reduction" ,0.4, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.4, -1); self.AddCustomAttribute("max health additive bonus" ,3800, -1); self.GetActiveWeapon().AddAttribute("faster reload rate" ,0.2, -1); self.GetActiveWeapon().AddAttribute("fire rate bonus" ,2, -1); self.GetActiveWeapon().AddAttribute("Projectile speed increased" ,0.5, -1); SetFakeClientConVarValue(self, "name", "Giant Charged Soldier"); CalloutGiant(false) return } ClientPrint(null,HUD_PRINTTALK,"!! Soldier spawned with no template !!") return } } if (botclass == TF_CLASS_MEDIC) { if (randomizer < 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Medic"); return } if (randomizer >= 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Medic"); return } ClientPrint(null,HUD_PRINTTALK,"!! Medic spawned with no template !!") return } if (botclass == TF_CLASS_HEAVYWEAPONS) { if (!self.HasBotTag("bot_giant")) { if (randomizer < 6) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) GivePlayerWeapon(self,"tf_weapon_fists",43) GivePlayerCosmetic(self,9911,"models/player/items/heavy/pugilist_protector.mdl") 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 (self.HasBotTag("bot_giant")) { if (randomizer <= 5) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.SetHealth(5000) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("override footstep sound set" ,2, -1); self.AddCustomAttribute("damage force reduction" ,0.3, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.3, -1); self.AddCustomAttribute("max health additive bonus" ,5000, -1); self.GetActiveWeapon().AddAttribute("damage bonus" ,1.5, -1); SetFakeClientConVarValue(self, "name", "Giant Heavy"); CalloutGiant(false) return } if (randomizer > 5) { self.AddBotAttribute(AGGRESSIVE) self.AddWeaponRestriction(SECONDARY_ONLY) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.SetHealth(5000) self.AddCustomAttribute("move speed bonus" ,0.7, -1); self.AddCustomAttribute("override footstep sound set" ,2, -1); self.AddCustomAttribute("damage force reduction" ,0.3, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.3, -1); self.AddCustomAttribute("max health additive bonus" ,5000, -1); self.AddCustomAttribute("fire rate bonus" ,1.5, -1); self.AddCustomAttribute("faster reload rate" ,0.1, -1); self.AddCustomAttribute("damage penalty" ,0.5, -1); self.AddCustomAttribute("bullets per shot bonus" ,10, -1); SetFakeClientConVarValue(self, "name", "Giant Shotgun Heavy"); CalloutGiant(false) 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) { 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) GivePlayerWeapon(self,"tf_weapon_stickbomb",307) 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_PYRO) { if (randomizer <= 6) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(EASY) SetFakeClientConVarValue(self, "name", "Pyro"); return } if (randomizer > 6) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(NORMAL) GivePlayerCosmetic(self,9911,"models/player/items/pyro/traffic_cone.mdl") SetFakeClientConVarValue(self, "name", "Pyro"); return } ClientPrint(null,HUD_PRINTTALK,"!! Pyro spawned with no template !!") return } if (botclass == TF_CLASS_SCOUT) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Scout"); return } if (botclass == TF_CLASS_SOLDIER) { if (!self.HasBotTag("bot_giant")) { if (randomizer < 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Soldier"); return } if (randomizer >= 6 && randomizer < 9) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) SetFakeClientConVarValue(self, "name", "Direct Hit Soldier"); GivePlayerWeapon(self,"tf_weapon_rocketlauncher_directhit",127) GivePlayerCosmetic(self,9911,"models/workshop/player/items/soldier/tw_soldierbot_helmet/tw_soldierbot_helmet.mdl") 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.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 } ClientPrint(null,HUD_PRINTTALK,"!! Soldier spawned with no template !!") return } if (self.HasBotTag("bot_giant")) { if (randomizer <= 5) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.SetHealth(3800) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("override footstep sound set" ,3, -1); self.AddCustomAttribute("damage force reduction" ,0.4, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.4, -1); self.AddCustomAttribute("max health additive bonus" ,3800, -1); self.GetActiveWeapon().AddAttribute("faster reload rate" ,-1, -1); self.GetActiveWeapon().AddAttribute("fire rate bonus" ,0.5, -1); self.GetActiveWeapon().AddAttribute("Projectile speed increased" ,0.65, -1); SetFakeClientConVarValue(self, "name", "Giant Rapid Fire Soldier"); CalloutGiant(false) return } if (randomizer > 5) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(ALWAYS_CRIT) self.SetHealth(3800) GivePlayerWeapon(self,"tf_weapon_rocketlauncher",513) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("override footstep sound set" ,3, -1); self.AddCustomAttribute("damage force reduction" ,0.4, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.4, -1); self.AddCustomAttribute("max health additive bonus" ,3800, -1); self.GetActiveWeapon().AddAttribute("faster reload rate" ,0.2, -1); self.GetActiveWeapon().AddAttribute("fire rate bonus" ,2, -1); self.GetActiveWeapon().AddAttribute("Projectile speed increased" ,0.5, -1); SetFakeClientConVarValue(self, "name", "Giant Charged Soldier"); CalloutGiant(false) return } ClientPrint(null,HUD_PRINTTALK,"!! Soldier spawned with no template !!") return } } if (botclass == TF_CLASS_MEDIC) { if (randomizer < 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Medic"); return } if (randomizer >= 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Medic"); return } ClientPrint(null,HUD_PRINTTALK,"!! Medic spawned with no template !!") return } if (botclass == TF_CLASS_HEAVYWEAPONS) { if (!self.HasBotTag("bot_giant")) { if (randomizer < 6) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) GivePlayerWeapon(self,"tf_weapon_fists",43) GivePlayerCosmetic(self,9911,"models/player/items/heavy/pugilist_protector.mdl") 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 (self.HasBotTag("bot_giant")) { if (randomizer <= 5) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.SetHealth(5000) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("override footstep sound set" ,2, -1); self.AddCustomAttribute("damage force reduction" ,0.3, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.3, -1); self.AddCustomAttribute("max health additive bonus" ,5000, -1); self.GetActiveWeapon().AddAttribute("damage bonus" ,1.5, -1); SetFakeClientConVarValue(self, "name", "Giant Heavy"); CalloutGiant(false) return } if (randomizer > 5) { self.AddBotAttribute(AGGRESSIVE) self.AddWeaponRestriction(SECONDARY_ONLY) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.SetHealth(5000) self.AddCustomAttribute("move speed bonus" ,0.7, -1); self.AddCustomAttribute("override footstep sound set" ,2, -1); self.AddCustomAttribute("damage force reduction" ,0.3, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.3, -1); self.AddCustomAttribute("max health additive bonus" ,5000, -1); self.AddCustomAttribute("fire rate bonus" ,1.5, -1); self.AddCustomAttribute("faster reload rate" ,0.1, -1); self.AddCustomAttribute("damage penalty" ,0.5, -1); self.AddCustomAttribute("bullets per shot bonus" ,10, -1); SetFakeClientConVarValue(self, "name", "Giant Shotgun Heavy"); CalloutGiant(false) return } ClientPrint(null,HUD_PRINTTALK,"!! Heavy spawned with no template !!") return } } if (botclass == TF_CLASS_DEMOMAN) { if (randomizer < 5) { 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 >= 5 && randomizer <= 8) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.SetHealth(3300) 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" ,3300, -1); self.GetActiveWeapon().AddAttribute("faster reload rate" ,0.35, -1); self.GetActiveWeapon().AddAttribute("fire rate bonus" ,0.1, -1); self.GetActiveWeapon().AddAttribute("clip size upgrade atomic" ,7, -1); self.GetActiveWeapon().AddAttribute("projectile spread angle penalty" ,5, -1); self.GetActiveWeapon().AddAttribute("Projectile speed increased" ,1.1, -1); SetFakeClientConVarValue(self, "name", "Giant Burst Fire Demo"); CalloutGiant(false) return } if (randomizer > 8) { 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) GivePlayerWeapon(self,"tf_weapon_stickbomb",307) 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_PYRO) { if (randomizer <= 6) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(EASY) SetFakeClientConVarValue(self, "name", "Pyro"); return } if (randomizer > 6) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(NORMAL) GivePlayerCosmetic(self,9911,"models/player/items/pyro/traffic_cone.mdl") SetFakeClientConVarValue(self, "name", "Pyro"); return } ClientPrint(null,HUD_PRINTTALK,"!! Pyro spawned with no template !!") return } if (botclass == TF_CLASS_SCOUT) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) SetFakeClientConVarValue(self, "name", "Scout"); return } if (botclass == TF_CLASS_SOLDIER) { if (!self.HasBotTag("bot_giant")) { if (randomizer < 6) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) SetFakeClientConVarValue(self, "name", "Soldier"); return } if (randomizer >= 6 && randomizer < 9) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) SetFakeClientConVarValue(self, "name", "Soldier"); GivePlayerWeapon(self,"tf_weapon_rocketlauncher_directhit",127) GivePlayerCosmetic(self,9911,"models/workshop/player/items/soldier/tw_soldierbot_helmet/tw_soldierbot_helmet.mdl") return } if (randomizer >= 9) // figure out how to give backpacks full rage { 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 } ClientPrint(null,HUD_PRINTTALK,"!! Soldier spawned with no template !!") return } if (self.HasBotTag("bot_giant")) { if (randomizer <= 5) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.SetHealth(3800) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("override footstep sound set" ,3, -1); self.AddCustomAttribute("damage force reduction" ,0.4, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.4, -1); self.AddCustomAttribute("max health additive bonus" ,3800, -1); self.GetActiveWeapon().AddAttribute("faster reload rate" ,-1, -1); self.GetActiveWeapon().AddAttribute("fire rate bonus" ,0.5, -1); self.GetActiveWeapon().AddAttribute("Projectile speed increased" ,0.65, -1); SetFakeClientConVarValue(self, "name", "Giant Rapid Fire Soldier"); CalloutGiant(false) return } if (randomizer > 5) { GivePlayerWeapon(self,"tf_weapon_rocketlauncher",513) self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(ALWAYS_CRIT) self.SetHealth(3800) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("override footstep sound set" ,3, -1); self.AddCustomAttribute("damage force reduction" ,0.4, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.4, -1); self.AddCustomAttribute("max health additive bonus" ,3800, -1); self.GetActiveWeapon().AddAttribute("faster reload rate" ,0.2, -1); self.GetActiveWeapon().AddAttribute("fire rate bonus" ,2, -1); self.GetActiveWeapon().AddAttribute("Projectile speed increased" ,0.5, -1); SetFakeClientConVarValue(self, "name", "Giant Charged Soldier"); CalloutGiant(false) return } ClientPrint(null,HUD_PRINTTALK,"!! Soldier spawned with no template !!") return } } if (botclass == TF_CLASS_MEDIC) { if (randomizer < 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Medic"); return } if (randomizer >= 6) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Medic"); return } ClientPrint(null,HUD_PRINTTALK,"!! Medic spawned with no template !!") return } if (botclass == TF_CLASS_HEAVYWEAPONS) { if (!self.HasBotTag("bot_giant")) { if (randomizer < 6) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(ALWAYS_CRIT) self.SetDifficulty(HARD) GivePlayerWeapon(self,"tf_weapon_fists",43) GivePlayerCosmetic(self,9911,"models/player/items/heavy/pugilist_protector.mdl") SetFakeClientConVarValue(self, "name", "Heavyweight Champ"); return } if (randomizer >= 6) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(NORMAL) GivePlayerWeapon(self,"tf_weapon_minigun",850) GivePlayerCosmetic(self,9911,"models/player/items/mvm_loot/heavy/robo_ushanka.mdl") self.GetActiveWeapon().AddAttribute("attack projectiles" ,1, -1); SetFakeClientConVarValue(self, "name", "Deflector Heavy"); return } ClientPrint(null,HUD_PRINTTALK,"!! Heavy spawned with no template !!") return } if (self.HasBotTag("bot_giant")) { if (randomizer <= 5) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.SetHealth(5000) self.AddCustomAttribute("move speed bonus" ,0.5, -1); self.AddCustomAttribute("override footstep sound set" ,2, -1); self.AddCustomAttribute("damage force reduction" ,0.3, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.3, -1); self.AddCustomAttribute("max health additive bonus" ,5000, -1); self.GetActiveWeapon().AddAttribute("damage bonus" ,1.5, -1); SetFakeClientConVarValue(self, "name", "Giant Heavy"); CalloutGiant(false) return } if (randomizer > 5) { self.AddBotAttribute(AGGRESSIVE) self.AddWeaponRestriction(SECONDARY_ONLY) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.SetHealth(5000) self.AddCustomAttribute("move speed bonus" ,0.7, -1); self.AddCustomAttribute("override footstep sound set" ,2, -1); self.AddCustomAttribute("damage force reduction" ,0.3, -1); self.AddCustomAttribute("airblast vulnerability multiplier" ,0.3, -1); self.AddCustomAttribute("max health additive bonus" ,5000, -1); self.AddCustomAttribute("fire rate bonus" ,1.5, -1); self.AddCustomAttribute("faster reload rate" ,0.1, -1); self.AddCustomAttribute("damage penalty" ,0.5, -1); self.AddCustomAttribute("bullets per shot bonus" ,10, -1); SetFakeClientConVarValue(self, "name", "Giant Shotgun Heavy"); CalloutGiant(false) return } ClientPrint(null,HUD_PRINTTALK,"!! Heavy spawned with no template !!") return } } if (botclass == TF_CLASS_DEMOMAN) { if (randomizer < 5) { 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 >= 5 && randomizer <= 8) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.SetHealth(3300) 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" ,3300, -1); self.GetActiveWeapon().AddAttribute("faster reload rate" ,0.35, -1); self.GetActiveWeapon().AddAttribute("fire rate bonus" ,0.1, -1); self.GetActiveWeapon().AddAttribute("clip size upgrade atomic" ,7.0, -1); self.GetActiveWeapon().AddAttribute("projectile spread angle penalty" ,5, -1); self.GetActiveWeapon().AddAttribute("Projectile speed increased" ,1.1, -1); SetFakeClientConVarValue(self, "name", "Giant Burst Fire Demo"); CalloutGiant(false) return } if (randomizer > 8) { 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) GivePlayerWeapon(self,"tf_weapon_stickbomb",307) 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 } } }