//check if player has m_hItem //if not do nothing //if yes, get the item, fire kill input ::SeekPlayer <- function(player) // player is self { printl(player) if (GetPropEntity(player, "m_hItem") != null) { local flag = GetPropEntity(player, "m_hItem") // printl(flag) // printl("found it!") flag.Kill() } } //if(player != null && player.GetTeam() == 2 works function KillRedBots(){ for (local i = 1; i <= MAX_CLIENTS ; i++) { local player = PlayerInstanceFromIndex(i) if (player == null) { continue } player.RemoveCondEx(5, true) // medigun player.RemoveCondEx(14, true) // bonk player.RemoveCondEx(45, true) // phlogbuff player.RemoveCondEx(51, true) // spawnroom player.RemoveCondEx(52, true) // canteen player.RemoveCondEx(57, true) // wheel, just incase player.TakeDamage(9999, 536870912, null) // if (player.GetTeam() == 2) // { // player.TakeDamage(9999, 65536, null) // } // printl(player) } } function FindAllIntels() { for(local intel; intel = FindByClassname(intel, "item_teamflag");) { if (NetProps.GetPropFloat(intel, "m_flResetTime") != 70000) return intel.ValidateScriptScope(); if (hasScript == true) return printl(intel) intel.GetScriptScope().hasScript <- false; AddThinkToEnt(intel, "IntelThink") if (intel == null) { break } } } function SetIconsWave1(){ PopExt.SetWaveIconsFunction(function() { //add tags PopExt.AddRobotTag("bot_gcritsoldier", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("soldier_crit",MVM_CLASS_FLAG_MINIBOSS | MVM_CLASS_FLAG_ALWAYSCRIT,0) } }) PopExt.AddRobotTag("bot_gstickydemo", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("demo_sticky_red_daan",MVM_CLASS_FLAG_MINIBOSS,0) } }) PopExt.AddRobotTag("bot_scout", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("scout",MVM_CLASS_FLAG_NORMAL,0) } }) PopExt.AddRobotTag("bot_sniper_bow", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("sniper_bow",MVM_CLASS_FLAG_NORMAL,0) } }) PopExt.AddRobotTag("bot_demo_burst", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("demo_burst_red",MVM_CLASS_FLAG_MINIBOSS,0) } }) PopExt.AddRobotTag("bot_pyro_flare", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("pyro_flare_red",MVM_CLASS_FLAG_NORMAL,0) } }) PopExt.AddRobotTag("bot_demo", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("demo",MVM_CLASS_FLAG_NORMAL,0) } }) PopExt.AddRobotTag("bot_sniper_smg", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("sniper_smg_tind",MVM_CLASS_FLAG_NORMAL,0) } }) PopExt.AddRobotTag("bot_soldier", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("soldier",MVM_CLASS_FLAG_NORMAL,0) } }) //set wave icon PopExt.SetWaveIconSpawnCount("soldier_crit", MVM_CLASS_FLAG_MINIBOSS | MVM_CLASS_FLAG_ALWAYSCRIT, 4) PopExt.SetWaveIconSpawnCount("demo_sticky_red_daan", MVM_CLASS_FLAG_MINIBOSS, 2) PopExt.SetWaveIconSpawnCount("scout", MVM_CLASS_FLAG_NORMAL, 40) PopExt.SetWaveIconSpawnCount("sniper_bow", MVM_CLASS_FLAG_NORMAL, 40) PopExt.SetWaveIconSpawnCount("pyro_flare_red", MVM_CLASS_FLAG_NORMAL, 25) PopExt.SetWaveIconSpawnCount("demo_burst_red", MVM_CLASS_FLAG_NORMAL, 25) PopExt.SetWaveIconSpawnCount("sniper_smg_tind", MVM_CLASS_FLAG_NORMAL, 35) PopExt.SetWaveIconSpawnCount("soldier", MVM_CLASS_FLAG_NORMAL, 18) }) } function SetIconsWave2(){ PopExt.AddRobotTag("bot_intelspawn", { OnDeath = function(bot, tag) { local botorigin = bot.GetOrigin() local bomb = SpawnEntityFromTable("item_teamflag", { flag_icon = "../hud/objectives_flagpanel_carried", flag_model = "models/flags/toolbox_flag.mdl", flag_paper = "player_intel_papertrail", flag_trail = "flagtrail", GameType = 1, NeutralType = 1, ReturnBetweenWaves = 1, ReturnTime = 70000, ScoringType = 0, StartDisabled = 1, // keep disabled so the bot can mob VisibleWhenDisabled = 0, targetname = "robot_part", TeamNum = 3, trail_effect = 1, origin = botorigin, "OnPickup1#1" : "!activatorRunScriptCodeClientPrint(self, 4, `Take these parts to CAPTURE zone!`)0-1", "OnPickup1#2" : "!activator,RunScriptCode,self.AddCond(65),0,-1", "OnPickup1#3" : "!self,Skin,1,0,-1", "OnPickupTeam1#1" : "!self,ForceDrop,,0,-1" // TODO: Fix intel teleporting to bots trying to pick up the intel "OnDrop1#1" : "!activator,RunScriptCode,self.RemoveCond(65),0,-1", "OnDrop1#2" : "!self,SetTeam,3,0.1,-1", "OnDrop1#3" : "!self,Skin,1,0.1,-1", "OnDrop1#4" : "!self,RunScriptCode,self.SetOrigin(curOrigin),0,-1" }) bomb.ValidateScriptScope() bomb.GetScriptScope().curOrigin <- botorigin SetPropInt(bomb, "m_nFlagStatus", 2) EntFireByHandle(bomb, "Enable", null, 0.1, null, null) EntFireByHandle(bomb, "SetTeam", "3", 0.1, null, null) } }) return //fix later PopExt.SetWaveIconsFunction(function() { //add tags PopExt.AddRobotTag("bot_gspammersoldier", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("soldier_spammer",MVM_CLASS_FLAG_MINIBOSS | MVM_CLASS_FLAG_ALWAYSCRIT,0) } }) PopExt.AddRobotTag("bot_gpyro_dragon", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("pyro_dragon_fury_swordstone_giant",MVM_CLASS_FLAG_MINIBOSS,0) } }) PopExt.AddRobotTag("bot_gdemo_burst", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("demo_burst_red",MVM_CLASS_FLAG_MINIBOSS,0) } }) PopExt.AddRobotTag("bot_demoknight", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("demoknight",MVM_CLASS_FLAG_NORMAL,0) } }) PopExt.AddRobotTag("bot_soldier", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("soldier",MVM_CLASS_FLAG_NORMAL,0) } }) PopExt.AddRobotTag("bot_medic_uber", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("medic_uber",MVM_CLASS_FLAG_NORMAL,0) } }) PopExt.AddRobotTag("bot_ironhands", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("heavy_chief",MVM_CLASS_FLAG_NORMAL,0) } }) PopExt.AddRobotTag("bot_scout_fan", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("scout_fan",MVM_CLASS_FLAG_NORMAL,0) } }) //set wave icon // PopExt.SetWaveIconSpawnCount("soldier_spammer", MVM_CLASS_FLAG_MINIBOSS, 3) // PopExt.SetWaveIconSpawnCount("pyro_dragon_fury_swordstone_giant", MVM_CLASS_FLAG_MINIBOSS, 2) // PopExt.SetWaveIconSpawnCount("demo_burst_red", MVM_CLASS_FLAG_MINIBOSS, 8) // PopExt.SetWaveIconSpawnCount("demoknight", MVM_CLASS_FLAG_NORMAL, 50) // PopExt.SetWaveIconSpawnCount("soldier", MVM_CLASS_FLAG_NORMAL, 30) // PopExt.SetWaveIconSpawnCount("medic_uber", MVM_CLASS_FLAG_NORMAL, 10) // PopExt.SetWaveIconSpawnCount("heavy_chief", MVM_CLASS_FLAG_NORMAL, 18) // PopExt.SetWaveIconSpawnCount("scout_fan", MVM_CLASS_FLAG_NORMAL, 50) }) } function SetIconsWave3(){ PopExt.SetWaveIconsFunction(function() { //add tags PopExt.AddRobotTag("bot_gdeflector", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("heavy_deflector_giant",MVM_CLASS_FLAG_MINIBOSS,0) } }) PopExt.AddRobotTag("bot_gpyro", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("pyro_giant",MVM_CLASS_FLAG_MINIBOSS,0) } }) PopExt.AddRobotTag("bot_gmedic", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("medic_giant",MVM_CLASS_FLAG_MINIBOSS,0) } }) PopExt.AddRobotTag("bot_gsoldier_burst", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("soldier_burstfire",MVM_CLASS_FLAG_MINIBOSS,0) } }) PopExt.AddRobotTag("bot_scout_milk", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("scout_milk",MVM_CLASS_FLAG_NORMAL,0) } }) PopExt.AddRobotTag("bot_soldier", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("soldier",MVM_CLASS_FLAG_NORMAL,0) } }) PopExt.AddRobotTag("bot_medic_bigheal", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("medic_regen2",MVM_CLASS_FLAG_NORMAL,0) } }) PopExt.AddRobotTag("bot_engi_pomson", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("engineer_pomson",MVM_CLASS_FLAG_NORMAL,0) } }) PopExt.AddRobotTag("bot_heavy_shotgun", { OnDeath = function(bot, tag) { PopExt.DecrementWaveIconSpawnCount("heavy_shotgun_red",MVM_CLASS_FLAG_NORMAL,0) } }) //set wave icon PopExt.SetWaveIconSpawnCount("heavy_deflector_giant", MVM_CLASS_FLAG_MINIBOSS, 2) PopExt.SetWaveIconSpawnCount("pyro_giant", MVM_CLASS_FLAG_MINIBOSS, 3) PopExt.SetWaveIconSpawnCount("medic_giant", MVM_CLASS_FLAG_MINIBOSS, 1) PopExt.SetWaveIconSpawnCount("soldier_burstfire", MVM_CLASS_FLAG_MINIBOSS, 1) PopExt.SetWaveIconSpawnCount("scout_milk", MVM_CLASS_FLAG_NORMAL, 36) PopExt.SetWaveIconSpawnCount("soldier", MVM_CLASS_FLAG_NORMAL, 30) PopExt.SetWaveIconSpawnCount("engineer_pomson", MVM_CLASS_FLAG_NORMAL | MVM_CLASS_FLAG_ALWAYSCRIT, 40) PopExt.SetWaveIconSpawnCount("medic_regen2", MVM_CLASS_FLAG_NORMAL, 24) PopExt.SetWaveIconSpawnCount("heavy_shotgun_red", MVM_CLASS_FLAG_NORMAL, 30) }) } function TankMsgFirst() { SendGlobalGameEvent("show_annotation", { text = "Defend this Tank!" lifetime = 5 worldPosX = -1661.7 worldPosY = 2961 worldPosZ = -251.19 id = 193254 play_sound = "misc/null.wav" show_distance = true show_effect = true // visibilityBitfield = 0 }) } function TankMsgSecond() { SendGlobalGameEvent("show_annotation", { text = "Defend this Tank!" lifetime = 5 worldPosX = -305 worldPosY = 315 worldPosZ = -171 id = 193254 play_sound = "misc/null.wav" show_distance = true show_effect = true // visibilityBitfield = 0 }) } function TankMsgThird() { SendGlobalGameEvent("show_annotation", { text = "Defend this Tank!" lifetime = 5 worldPosX = 105 worldPosY = -1355 worldPosZ = -199 id = 193254 play_sound = "misc/null.wav" show_distance = true show_effect = true // visibilityBitfield = 0 }) } function TankMsgFinal() { SendGlobalGameEvent("show_annotation", { text = "Escort Tank to break the forcefield!" lifetime = 5 worldPosX = -640 worldPosY = 4608 worldPosZ = -432 id = 193254 play_sound = "misc/null.wav" show_distance = true show_effect = true // visibilityBitfield = 0 }) } function SetHatchWave4() { DoEntFire("capturezone_blue", "Disable", "", 0, null, null) DoEntFire("capturezone_blue_new", "Enable", "", 0, null, null) // PopExtUtil.RemoveOutputAll("capturezone_blue", "OnCapture") for (local zone; zone = FindByClassname(zone, "func_capturezone");) { AddOutput(zone, "OnCapture", "capturezone_blue", "initwave_hatchdestroy", "trigger", 0, 0) } // //AddOutput(func_capturezone, "OnCapture", "", "initwave_hatchdestroy", "trigger", 0, 0) } function OnGameEvent_post_inventory_application(params) { local player = GetPlayerFromUserID(params.userid); //printl(team) local playerScope = player.GetScriptScope() local wep = PopExtUtil.GetItemInSlot(player, 2) local getwepID = NetProps.GetPropInt(wep, "m_AttributeManager.m_Item.m_iItemDefinitionIndex") // if (player != null && IsPlayerABot(player) == true && player.GetTeam() != 1) // { // printl("no flag") // player.DropFlag(true) // FindAllIntels() // //player.AddBotAttribute(2) // } } __CollectGameEventCallbacks(this);