local player = self; local giantcount = 0 // amount of giants on field, keep count so we can maxactive them local maxgiants = 6 // 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 = 6 // 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 <- 5 // how many waves to boss wave ::EnemyTable <- [ TF_CLASS_PYRO, TF_CLASS_PYRO, TF_CLASS_DEMOMAN, TF_CLASS_HEAVYWEAPONS, TF_CLASS_HEAVYWEAPONS, TF_CLASS_SNIPER, ] ::GiantTable <- // we use the giant table to control how much spies spawn ( for now ) [ TF_CLASS_SPY, ] ::BossTable <- [ TF_CLASS_DEMOMAN, ] ::ExitStageLeft <- function(miniboss) // remove bot from wave counter { local botcount = NetProps.GetPropInt(PopExtUtil.ObjectiveResource, "m_nMannVsMachineWaveClassCounts") if (botcount == 0) return botcount-= 1 NetProps.SetPropInt(PopExtUtil.ObjectiveResource, "m_nMannVsMachineWaveClassCounts", botcount) if (miniboss) giantcount -= 1 } ::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.GetPlayerClass() == TF_CLASS_SPY ) return // we don't want this running multiple times 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.AddCondEx(87,10,null) // hold in place to apply the stuff self.SetPlayerClass(GiantTable[RandomInt(0, GiantTable.len() - 1)]) NetProps.SetPropInt(self,"m_Shared.m_iDesiredPlayerClass",GiantTable[RandomInt(0, GiantTable.len() - 1)]) self.ForceRegenerateAndRespawn() if (isbosswave && bosswait <= 0 && !hasbossspawned) { self.SetPlayerClass(BossTable[diceroll_boss]) NetProps.SetPropInt(self,"m_Shared.m_iDesiredPlayerClass",BossTable[diceroll_boss]) self.ForceRegenerateAndRespawn() self.AddBotTag("bot_boss") self.SetIsMiniBoss(true) UpdateBotModel(self) GetBotLoadout(self) MoveToSpawnLocation(self) return } self.SetDifficulty(HARD) UpdateBotModel(self) GetBotLoadout(self) difficulty = difficulty + 0.025 SetFakeClientConVarValue(self, "name", "Spy"); self.SetMission(MISSION_SPY,true) 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) { giantcooldown = giantwait BecomeGiant(self) return } if (self.HasBotTag("bot_boss")) { GetBossHealth(self,17500) GivePlayerWeapon(self,"tf_weapon_sword",132) self.AddBotAttribute(AGGRESSIVE) self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(USE_BOSS_HEALTH_BAR) // find a way to make this work later self.AddCustomAttribute("move speed bonus" ,0.65, -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.4) self.GetActiveWeapon().AddAttribute("damage bonus" ,3, -1); self.GetActiveWeapon().AddAttribute("fire rate penalty" ,1.6, -1); GivePlayerCosmetic(self,9911,"models/weapons/c_models/c_big_mallet/c_big_mallet.mdl") // yea we're just overlaying it on top of the sword SetFakeClientConVarValue(self, "name", "Major Mallet"); PopExtUtil.AddThinkToEnt(self, "ChargeThink") 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_DEMOMAN) { if (randomizer < 2) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) SetFakeClientConVarValue(self, "name", "Demoman"); return } if (randomizer >= 2) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) GivePlayerWeapon(self,"tf_weapon_sword",132) GivePlayerCosmetic(self,9911,"models/weapons/c_models/c_targe/c_targe.mdl") self.AddCustomAttribute("dmg taken from fire reduced" ,0.5, -1); self.AddCustomAttribute("dmg taken from blast reduced" ,0.7, -1); self.GetActiveWeapon().AddAttribute("critboost on kill" ,3, -1); SetFakeClientConVarValue(self, "name", "Demoknight"); PopExtUtil.AddThinkToEnt(self, "ChargeThink") return } ClientPrint(null,HUD_PRINTTALK,"!! Demo spawned with no template !!") return } if (botclass == TF_CLASS_SNIPER) { self.AddBotAttribute(AGGRESSIVE) GivePlayerWeapon(self,"tf_weapon_compound_bow",56) SetFakeClientConVarValue(self, "name", "Bowman"); 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(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) GivePlayerWeapon(self,"tf_weapon_fists",1184) // GRU MvM GivePlayerCosmetic(self,9911,"models/player/items/heavy/pugilist_protector.mdl") SetFakeClientConVarValue(self, "name", "Heavyweight Champ"); return } ClientPrint(null,HUD_PRINTTALK,"!! Heavy spawned with no template !!") return } } if (difficulty > 2 && difficulty <= 4) { 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_DEMOMAN) { if (randomizer < 6) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) SetFakeClientConVarValue(self, "name", "Demoman"); return } if (randomizer >= 6) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) GivePlayerWeapon(self,"tf_weapon_sword",132) GivePlayerCosmetic(self,9911,"models/weapons/c_models/c_targe/c_targe.mdl") self.AddCustomAttribute("dmg taken from fire reduced" ,0.5, -1); self.AddCustomAttribute("dmg taken from blast reduced" ,0.7, -1); self.GetActiveWeapon().AddAttribute("critboost on kill" ,3, -1); SetFakeClientConVarValue(self, "name", "Demoknight"); PopExtUtil.AddThinkToEnt(self, "ChargeThink") return } ClientPrint(null,HUD_PRINTTALK,"!! Demo spawned with no template !!") return } if (botclass == TF_CLASS_SNIPER) { self.AddBotAttribute(AGGRESSIVE) GivePlayerWeapon(self,"tf_weapon_compound_bow",56) SetFakeClientConVarValue(self, "name", "Bowman"); 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 > 4 && difficulty <= 6) { 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_DEMOMAN) { if (randomizer < 4) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) SetFakeClientConVarValue(self, "name", "Demoman"); return } if (randomizer >= 4 && randomizer <= 7) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) GivePlayerWeapon(self,"tf_weapon_sword",132) GivePlayerCosmetic(self,9911,"models/weapons/c_models/c_targe/c_targe.mdl") self.AddCustomAttribute("dmg taken from fire reduced" ,0.5, -1); self.AddCustomAttribute("dmg taken from blast reduced" ,0.7, -1); self.GetActiveWeapon().AddAttribute("critboost on kill" ,3, -1); SetFakeClientConVarValue(self, "name", "Demoknight"); return } if (randomizer > 7) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) GivePlayerWeapon(self,"tf_weapon_sword",404) GivePlayerCosmetic(self,406,"models/workshop/weapons/c_models/c_persian_shield/c_persian_shield.mdl") self.AddCustomAttribute("dmg taken from fire reduced" ,0.8, -1); self.AddCustomAttribute("dmg taken from blast reduced" ,0.8, -1); self.GetActiveWeapon().AddAttribute("critboost on kill" ,3, -1); GivePlayerCosmetic(self,9911,"models/player/items/demo/demo_sultan_hat.mdl") SetFakeClientConVarValue(self, "name", "Demoknight"); PopExtUtil.AddThinkToEnt(self, "ChargeThink") return } ClientPrint(null,HUD_PRINTTALK,"!! Demo spawned with no template !!") return } if (botclass == TF_CLASS_SNIPER) { if (randomizer <= 5) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) GivePlayerWeapon(self,"tf_weapon_compound_bow",56) SetFakeClientConVarValue(self, "name", "Bowman"); return } if (randomizer > 5) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) GivePlayerWeapon(self,"tf_weapon_compound_bow",56) SetFakeClientConVarValue(self, "name", "Bowman"); return } ClientPrint(null,HUD_PRINTTALK,"!! Sniper 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(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) GivePlayerWeapon(self,"tf_weapon_fists",1184) // GRU MvM GivePlayerCosmetic(self,9911,"models/player/items/heavy/pugilist_protector.mdl") SetFakeClientConVarValue(self, "name", "Heavyweight Champ"); return } ClientPrint(null,HUD_PRINTTALK,"!! Heavy spawned with no template !!") return } } if (difficulty > 6 && difficulty <= 8) { giantcooldown -= 1 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_DEMOMAN) { if (randomizer < 4) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) SetFakeClientConVarValue(self, "name", "Demoman"); return } if (randomizer >= 4 && randomizer <= 7) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) GivePlayerWeapon(self,"tf_weapon_sword",132) GivePlayerCosmetic(self,9911,"models/weapons/c_models/c_targe/c_targe.mdl") self.AddCustomAttribute("dmg taken from fire reduced" ,0.5, -1); self.AddCustomAttribute("dmg taken from blast reduced" ,0.7, -1); self.GetActiveWeapon().AddAttribute("critboost on kill" ,3, -1); SetFakeClientConVarValue(self, "name", "Demoknight"); PopExtUtil.AddThinkToEnt(self, "ChargeThink") return } if (randomizer > 7) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) GivePlayerWeapon(self,"tf_weapon_sword",404) GivePlayerCosmetic(self,406,"models/workshop/weapons/c_models/c_persian_shield/c_persian_shield.mdl") self.AddCustomAttribute("dmg taken from fire reduced" ,0.8, -1); self.AddCustomAttribute("dmg taken from blast reduced" ,0.8, -1); self.GetActiveWeapon().AddAttribute("critboost on kill" ,3, -1); GivePlayerCosmetic(self,9911,"models/player/items/demo/demo_sultan_hat.mdl") SetFakeClientConVarValue(self, "name", "Demoknight"); PopExtUtil.AddThinkToEnt(self, "ChargeThink") return } ClientPrint(null,HUD_PRINTTALK,"!! Demo spawned with no template !!") return } if (botclass == TF_CLASS_SNIPER) { if (randomizer <= 5) { self.AddBotAttribute(AGGRESSIVE) GivePlayerWeapon(self,"tf_weapon_compound_bow",56) SetFakeClientConVarValue(self, "name", "Bowman"); return } if (randomizer > 5) { self.AddBotAttribute(AGGRESSIVE) GivePlayerWeapon(self,"tf_weapon_compound_bow",56) SetFakeClientConVarValue(self, "name", "Bowman"); return } ClientPrint(null,HUD_PRINTTALK,"!! Sniper spawned with no template !!") return } if (botclass == TF_CLASS_HEAVYWEAPONS) { if (randomizer <= 4) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(ALWAYS_CRIT) GivePlayerWeapon(self,"tf_weapon_fists",43) GivePlayerCosmetic(self,9911,"models/player/items/heavy/pugilist_protector.mdl") SetFakeClientConVarValue(self, "name", "Heavyweight Champ"); return } if (randomizer > 4 && randomizer <= 7) { 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 } if (randomizer > 7) { self.AddBotAttribute(AGGRESSIVE) SetFakeClientConVarValue(self, "name", "Heavy"); return } ClientPrint(null,HUD_PRINTTALK,"!! Heavy spawned with no template !!") return } } if (difficulty >= 8) { giantcooldown -= 1 if (isbosswave && !isbossonly && !hasbossspawned) bosswait -= 1 if (botclass == TF_CLASS_PYRO) { if (randomizer <= 3) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(NORMAL) GivePlayerWeapon(self,"tf_weapon_flamethrower",40) GivePlayerCosmetic(self,30400,"models/workshop/player/items/pyro/short2014_wildfire_wrappers/short2014_wildfire_wrappers.mdl") GivePlayerCosmetic(self,949,"models/workshop_partner/player/items/pyro/pyro_rocks/pyro_rocks_hat.mdl") self.SetHealth(400) self.AddCustomAttribute("max health additive bonus" ,400, -1); self.SetScaleOverride(1.3) SetFakeClientConVarValue(self, "name", "Backburner Pyro"); return } if (randomizer > 3 && randomizer <= 6) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) GivePlayerCosmetic(self,9911,"models/player/items/pyro/traffic_cone.mdl") SetFakeClientConVarValue(self, "name", "Pyro"); return } if (randomizer > 6) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) self.AddWeaponRestriction(MELEE_ONLY) GivePlayerWeapon(self,"tf_weapon_fireaxe",214) GivePlayerCosmetic(self,9911,"models/player/items/pyro/attendant.mdl") self.SetHealth(700) self.AddCustomAttribute("max health additive bonus" ,700, -1); self.SetScaleOverride(1.3) self.AddCustomAttribute("move speed bonus" ,1.25, -1); SetFakeClientConVarValue(self, "name", "Powerjack Pyro"); return } ClientPrint(null,HUD_PRINTTALK,"!! Pyro spawned with no template !!") return } if (botclass == TF_CLASS_DEMOMAN) { if (randomizer < 4) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(HOLD_FIRE_UNTIL_FULL_RELOAD) self.GetActiveWeapon().AddAttribute("faster reload rate" ,1.75, -1); self.GetActiveWeapon().AddAttribute("fire rate bonus" ,0.05, -1); self.GetActiveWeapon().AddAttribute("projectile spread angle penalty" ,3, -1); SetFakeClientConVarValue(self, "name", "Burst Fire Demo"); return } if (randomizer >= 4 && randomizer <= 7) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(ALWAYS_CRIT) GivePlayerWeapon(self,"tf_weapon_sword",404) GivePlayerCosmetic(self,406,"models/workshop/weapons/c_models/c_persian_shield/c_persian_shield.mdl") self.AddCustomAttribute("dmg taken from fire reduced" ,0.8, -1); self.AddCustomAttribute("dmg taken from blast reduced" ,0.8, -1); self.GetActiveWeapon().AddAttribute("critboost on kill" ,3, -1); GivePlayerCosmetic(self,9911,"models/player/items/demo/demo_sultan_hat.mdl") SetFakeClientConVarValue(self, "name", "Demoknight"); PopExtUtil.AddThinkToEnt(self, "ChargeThink") return } if (randomizer > 7) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) GivePlayerWeapon(self,"tf_weapon_katana",357) GivePlayerCosmetic(self,406,"models/workshop/weapons/c_models/c_persian_shield/c_persian_shield.mdl") self.AddCustomAttribute("dmg taken from fire reduced" ,0.8, -1); self.AddCustomAttribute("dmg taken from blast reduced" ,0.8, -1); self.GetActiveWeapon().AddAttribute("damage bonus" ,1.5, -1); self.SetHealth(650) self.AddCustomAttribute("max health additive bonus" ,650, -1); self.SetScaleOverride(1.3) SetFakeClientConVarValue(self, "name", "Samurai Demo"); PopExtUtil.AddThinkToEnt(self, "ChargeThink") return } ClientPrint(null,HUD_PRINTTALK,"!! Demo spawned with no template !!") return } if (botclass == TF_CLASS_SNIPER) { if (randomizer <= 5) { self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(ALWAYS_CRIT) GivePlayerWeapon(self,"tf_weapon_compound_bow",56) SetFakeClientConVarValue(self, "name", "Bowman"); return } if (randomizer > 5) { self.AddBotAttribute(AGGRESSIVE) GivePlayerWeapon(self,"tf_weapon_compound_bow",56) self.SetHealth(1200) self.AddCustomAttribute("max health additive bonus" ,1200, -1); self.SetScaleOverride(1.3) self.GetActiveWeapon().AddAttribute("fire rate bonus" ,0.6, -1); self.AddCustomAttribute("head scale" ,0.7, -1); self.AddCustomAttribute("move speed bonus" ,0.85, -1); SetFakeClientConVarValue(self, "name", "Rapid Fire Bowman"); return } ClientPrint(null,HUD_PRINTTALK,"!! Sniper spawned with no template !!") return } if (botclass == TF_CLASS_HEAVYWEAPONS) { if (randomizer <= 4) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(ALWAYS_CRIT) GivePlayerWeapon(self,"tf_weapon_fists",43) GivePlayerCosmetic(self,9911,"models/player/items/heavy/pugilist_protector.mdl") SetFakeClientConVarValue(self, "name", "Heavyweight Champ"); return } if (randomizer > 4 && randomizer <= 7) { self.AddWeaponRestriction(MELEE_ONLY) self.AddBotAttribute(AGGRESSIVE) self.AddBotAttribute(ALWAYS_CRIT) GivePlayerWeapon(self,"tf_weapon_fists",656) // mittens GivePlayerCosmetic(self,9911,"models/workshop/player/items/all_class/xms_beard/xms_beard_heavy.mdl") GivePlayerCosmetic(self,634,"models/player/items/all_class/trn_wiz_hat_heavy.mdl") self.GetActiveWeapon().AddAttribute("damage bonus" ,0.2, -1); self.AddCustomAttribute("move speed bonus" ,1.3, -1); SetFakeClientConVarValue(self, "name", "Heavy Mittens"); return } if (randomizer > 7) { self.AddBotAttribute(AGGRESSIVE) self.SetDifficulty(HARD) SetFakeClientConVarValue(self, "name", "Heavy"); return } ClientPrint(null,HUD_PRINTTALK,"!! Heavy spawned with no template !!") return } } }