--Hello there :) function OnWaveReset(wave) for index, bot in pairs(tankFollowers) do tankFollowers[index] = nil end tankAlive = true tankFollowers = {} -- for index, players in pairs(class) do -- class[index] = nil -- PrintTable(players) -- print("player table reset") -- end -- class = {} end function OnWaveInit(wave) if wave == 5 then ents.SpawnTemplate("spawnLocationBoss") end for index, bot in pairs(tankFollowers) do tankFollowers[index] = nil end tankAlive = true tankFollowers = {} if wave == 3 then for _, player in pairs(ents.GetAllPlayers()) do player:AcceptInput("$DisplayTextChat", "{9c386b}Management {fbeccb}: Heads up! There is a dangerous Giant Robot incoming. It seems it has tricks on its sleeves, Stay aware of whatever he'll throws at you.") end elseif wave == 4 then for _, player in pairs(ents.GetAllPlayers()) do player:AcceptInput("$DisplayTextChat", "{9c386b}Management {fbeccb}: Heads up! I've detected unusual extreme electrical flow within some robots, it seems a few are capable of performing {red}COMBOS!") timer.Simple(5, function() player:AcceptInput("$DisplayTextChat", "{9c386b}Management {fbeccb}: I'll mark the these robots with 2 icons in 1 inside your wave bar informer. I wish you all good luck. Team Fortress. You'll need it.") end) end elseif wave == 5 then for _, player in pairs(ents.GetAllPlayers()) do timer.Simple(5, function() player:AcceptInput("$DisplayTextChat", "{9c386b}Management {fbeccb}: We've reached the finale. Judging by this info, they'll be sending out everything at us. You can do this, Team Fortress! Godspeed.") end) end end end function OnWaveStart(wave) -- print (test) if wave == 1 then ents.FindByName("music1"):AcceptInput("Trigger") for _, player in pairs(ents.GetAllPlayers()) do player:AcceptInput("$DisplayTextChat", "{yellow}-NOW PLAYING : Welcome To The Gray Mann Empire (By: SlungerBlob)") end elseif wave == 2 then ents.FindByName("music2"):AcceptInput("Trigger") ents.FindByName("spawnbot_health*"):AcceptInput("Kill") for _, player in pairs(ents.GetAllPlayers()) do player:AcceptInput("$DisplayTextChat", "{yellow}-NOW PLAYING : T-Error On The Dance Floor (By: ShinyBod)") end elseif wave == 3 then ents.FindByName("music3"):AcceptInput("Trigger") ents.FindByName("spawnbot_health*"):AcceptInput("Kill") for _, player in pairs(ents.GetAllPlayers()) do player:AcceptInput("$DisplayTextChat", "{blue}? {fbeccb}: BOMB THEM. BOMB THEM. AIRSTRIKES ALL AROUND! ") end timer.Simple(5.5, function() for _, player in pairs(ents.GetAllPlayers()) do player:AcceptInput("$DisplayTextChat", "{yellow}-NOW PLAYING : Sky-Fall Trigger (By: SingerBrob)") end end) elseif wave == 4 then ents.FindByName("music4"):AcceptInput("Trigger") ents.FindByName("spawnbot_health*"):AcceptInput("Kill") for _, player in pairs(ents.GetAllPlayers()) do player:AcceptInput("$DisplayTextChat", "{yellow}-NOW PLAYING : Hard-Struck (By: SimpleShop FEAT. Tungsten-Scrub)") end elseif wave == 5 then ents.FindByName("music5"):AcceptInput("Trigger") ents.FindByName("spawnbot_health*"):AcceptInput("Kill") for _, player in pairs(ents.GetAllPlayers()) do player:AcceptInput("$DisplayTextChat", "{yellow}-NOW PLAYING : Meta Combat (By: SlungerBlob)") end ------------------------------------------------------------------------------------------------------------------------- end end -- function OnWaveSpawnTank(tank, wave) for _, player in pairs(ents.GetAllPlayers()) do if tank.m_iMaxHealth == 8000 then player:AcceptInput("$DisplayTextChat", "{9c386b}Management {fbeccb}: Heads up mercs! An {BLUE}UBERED {fbeccb}Tank with {blue}" .. tank.m_iHealth.. " {fbeccb}Health has appeared!") timer.Simple(3, function() player:AcceptInput("$DisplayTextChat", "{9c386b}Management {fbeccb}: Destroy the {RED}Giant Robots {fbeccb}maintaining the uber!") end) else player:AcceptInput("$DisplayTextChat", "{9c386b}Management {fbeccb}: Heads up mercs! A Tank with {blue}" .. tank.m_iHealth.. " {fbeccb}Health has appeared!") end end end -- function OnWaveSuccess(wave) end -- function OnWaveFail(wave) end --END OF DIALOUGES --COSMETICS --Also Variables For The Tank Follower Mechanic tankFollowers = {} tankAlive = true function OnWaveSpawnBot(bot, wave, tags) bot.tag = tags local head = {"Breach and Bomb","Commonwealth Commando","The Team Captain","The Eliminators Safeguard"} local misc = {"Battle Music","Fancy Dress Uniform","OSX Item"," The Frag Proof Fragger","Bolt Boy"} local pants = {"Blizzard Britches","Transparent Trousers","Stealth Bomber"} for _, tag in pairs(tags) do if tag ~= "boss" then bot:GiveItem(head[math.floor(math.random(#head))]) bot:GiveItem(misc[math.floor(math.random(#misc))]) bot:GiveItem(misc[math.floor(math.random(#misc))]) if bot.m_iClass ~= 5 then bot:GiveItem(pants[math.floor(math.random(#pants))]) end end if tag == "tankfollower" then if tankAlive == true then print("tank follower spawned") tankFollowers[bot:GetHandleIndex()] = bot timer.Simple(1, function() bot:BotCommand("switch_action Mobber") bot:BotCommand("interrupt_action -posent tankposfollow -duration 9999 -distance 125") bot:SetAttributeValue("cannot pick up intelligence", 1) end) else tankAlive = false print("tank is down. Unfollow") bot:BotCommand("stop interrupt action") bot:BotCommand("switch_action FetchFlag") bot:SetAttributeValue("cannot pick up intelligence", 0) end end end -- Tank Followers end function setFollow() tankAlive = true end function cancelFollow() tankAlive = false if tankAlive == false then for _, bot in pairs(tankFollowers) do print(bot:GetPlayerName().." No Longer Following Tank") bot:BotCommand("stop interrupt action") bot:BotCommand("switch_action FetchFlag") bot:SetAttributeValue("cannot pick up intelligence", 0) end end end --//////////////////////////////////////// -- GIMMICKS ///////////////////////////////////////////////////// --variables here class = {} -- index = 1 choice = nil doppelGangerPhase = 1 function phase2() doppelGangerPhase = 2 end --////////////////////////////////////////////////////////////////////////////////////////// --This spy loves the condensation sequal remaks /////////////////////////////////////////////////////// --///////////////////////////////////////////////////////////////////////////////////////// --////////////////////////////// SOLDIER COMMANDER ABILITY //////////////////////////////////// function bombThem(_, activator) local mapInfo = { translation = "0 0 0" } ents.SpawnTemplate("barragezone_sound", playerInfo) for _, player in pairs(ents.FindInSphere(activator:GetAbsOrigin(), 800, "player")) do if player:IsRealPlayer() and player:IsAlive() and player.m_iTeamNum == 2 and not player:InCond(6) then print(player) local playerInfo = { translation = player:GetAbsOrigin() } ents.SpawnTemplate("barragezone", playerInfo) end end end --/// SOLDIER ACCEL SPAMMER function accelVariable(_, activator) activator.accelerate = 1.25 end function accelOnHit(_, activator, caller) -- util.PrintToChatAll(caller.accelerate .."caller") activator.accelerate = activator.accelerate - 0.05 if activator.accelerate < 0.6 then timer.Simple(0.2, function() activator:SetAttributeValue("Projectile speed increased", 0.5) end) end if activator.accelerate > 0.5 then timer.Simple(0.2, function() activator:SetAttributeValue("fire rate bonus", activator.accelerate) end) else print("max accel rate") end end function accelRemove(_, activator, caller) activator.accelerate = 1 activator:SetAttributeValue("fire rate bonus", nil) activator:SetAttributeValue("Projectile speed increased", nil) end --// The Voting at the end of wave 5... are you worthy? EncoreMenu = { timeout = 0, title = "Carrier Is Calling For Back up.", itemsPerPage = 2, flags = MENUFLAG_NO_SOUND, onSelect = function(voter, index) util.PrintToChatAll(voter) util.PrintToChatAll(index) end } function VoteForEncore() EncoreMenu[1] = {text = "Destroy Call"} EncoreMenu[2] = {text = "... Let It Call (Encore Mode)"} for _, player in pairs(ents.GetAllPlayers()) do if player:IsRealPlayer() and player.m_iTeamNum == 2 then player:DisplayMenu(EncoreMenu) else print("not Real Player") end end end