-- MY FIRST ACTUAL DEVELOPING/DEVELOPED LUA... PROBABLY SO SHIT IT MAKES YOU CRY -- [1] = "Scout", -- [3] = "Soldier", -- [7] = "Pyro", -- [4] = "Demo", -- [6] = "Heavy", -- [9] = "Engineer", -- [5] = "Medic", -- [2] = "Sniper", -- [8] = "Spy", -- just to remember what the fuck their IDs are. party_Activated = false djbuff = 0 --Removers function OnWaveReset(wave) print("Suddenly... The Arrayed Variables disappeared.") party_Activated = false djbuff = 0 end -- function OnWaveSuccess() playersNerfedBecauseItWasRemoved() djbuff = 0 for i=1, gimmickBotsList, 1 do gimmickBotsList[i] = nil print("bye bye".. gimmickBotsList[i]) end end -- --The Gimmick Itself function OnWaveSpawnBot(bot, wave, tags) -- time to party local unusualifier local smallbuffs = { function() -- Bonk Scout DJ unusualifier = bot:GetPlayerItemBySlot(LOADOUT_POSITION_MISC) bot:GiveItem("Boston Boom-Bringer") bot:GiveItem("Weight Room Warmer") bot:GiveItem("Blizzard Britches") bot:GiveItem("Batter's Helmet") bot.m_iHealth = bot.m_iHealth - 25 bot:AddCond(TF_COND_SPEED_BOOST,-1) unusualifier:SetAttributeValue("attach particle effect", 337) end, function() -- Rap Soldier DJ local head = {"The Lucky Shot", "Cranium Cover", "The Frag Proof Fragger", "Aimframe", } local misc = {"Preventative Measure", "Fancy Dress Uniform", "Veterans Attire"} if bot.m_iClass == 6 then bot:GiveItem("Die Regime-Panzerung") end bot:GiveItem(head[math.floor(math.random(1,2))]) bot:GiveItem(misc[math.floor(math.random(1,2))]) bot:AddCond(TF_COND_PREVENT_DEATH, -1) bot:AddCallback(ON_DAMAGE_RECEIVED_POST, function(_, damageInfo) if bot.m_iHealth <= 3 then bot:AddHealth( 0, bot.m_iMaxHealth * 1.5) bot:AcceptInput("$TauntFromItem","Taunt: Mourning Mercs") timer.Simple(1.5,function() bot:Suicide() end) bot:RemoveAllCallback() end end) end } local giantbuffs = { function() -- Bonk Scout DJ bot:GiveItem("Boston Boom-Bringer") bot:GiveItem("Weight Room Warmer") bot:GiveItem("Blizzard Britches") bot:GiveItem("Batter's Helmet") bot:AddCond(TF_COND_SPEED_BOOST,-1) bot:SetAttributeValue("head scale",1.20) unusualifier:SetAttributeValue("attach particle effect", 337) end, function() -- Rap Soldier DJ NOTE: before randomize cosmetics// DO this for all local head = {"Battle Balaclava", "Cranium Cover", "The Frag Proof Fragger"} local misc = {"Preventative Measure", "Fancy Dress Uniform"} bot:GiveItem(head[math.floor(math.random(1,3))]) bot:GiveItem(misc[math.floor(math.random(1,2))]) bot:SetAttributeValue("head scale",1.20) end } for _, tag in pairs(tags) do if tag == "partyStandard" and party_Activated then smallbuffs[djbuff]() elseif tag == "partyGiant" and party_Activated then giantbuffs[djbuff]() elseif tag == "Gimmick" and party_Activated then gimmickBotsList[_] = bot:GetHandleIndex() end end end function lightUpTheNight(param) djbuff = math.tointeger(param) party_Activated = true end -- -- --PLAYER GETS BUFFED function playersBuffed() local playerbuffs = { function() -- Bonk Scout DJ for _, player in pairs(ents.GetAllPlayers()) do player:AddCond(TF_COND_SPEED_BOOST,-1) player:SetAttributeValue("Reload time decreased", 0.75) end -- util.PrintToChatAll("Wassup") end } playerbuffs[djbuff]() end function playersNerfedBecauseItWasRemoved() local playerBuffRemoved = { function() -- Bonk Scout DJ for _, player in pairs(ents.GetAllPlayers()) do player:RemoveCond(TF_COND_SPEED_BOOST) player:SetAttributeValue("Reload time decreased", nil) end -- util.PrintToChatAll("Wassup") end } playerBuffRemoved[djbuff]() end