// w/o PopExt const WEAPONRESTRICT_PRIMARY = 2; const WEAPONRESTRICT_SECONDARY = 4; ::MaxPlayers <- MaxClients().tointeger(); IncludeScript("popextensions_main.nut",getroottable()) PopExt.AddRobotTag("fake_medic", { OnSpawn = function(bot,tag) { bot.GetScriptScope().AttackMode <- false bot.GetScriptScope().PlayerThinkTable.fakeMedThink <- function() { local iHealth = self.GetHealth() if (iHealth <= 2000 && AttackMode == false) { self.RemoveWeaponRestriction(WEAPONRESTRICT_SECONDARY) self.AddWeaponRestriction(WEAPONRESTRICT_PRIMARY) self.AcceptInput("$BotCommand","switch_action FetchFlag",self,null) self.DisbandCurrentSquad() AttackMode = true } } } OnTakeDamage = function(bot,params) { if (!bot.IsValid()) return if (params.damage_stats == TF_DMG_CUSTOM_BACKSTAB && bot.GetScriptScope().AttackMode == false) { bot.RemoveWeaponRestriction(WEAPONRESTRICT_SECONDARY) bot.AddWeaponRestriction(WEAPONRESTRICT_PRIMARY) bot.AcceptInput("$BotCommand","switch_action FetchFlag",bot,null) bot.DisbandCurrentSquad() bot.GetScriptScope().AttackMode = true } } })