CEntity.PlayParentedParticle = function(self, particle, offset, remove_after, RemoveFunction) if (not IsValid(self)) then return; end particle = ents.CreateWithKeys("info_particle_system", { effect_name=particle, start_active=1, ["$modules"]="fakeparent", ["$positiononly"]=1, }, true, true) local entity_origin = self:GetAbsOrigin(); if (offset) then entity_origin = entity_origin + offset; end particle.m_vecOrigin = entity_origin; particle:SetFakeParent(self); particle:Start(); timer.Create(60, function() pcall(particle["Remove"], particle); if (RemoveFunction) then pcall(RemoveFunction); end end, 1); return particle; end local function applyName(bot, displayName) bot.m_szNetname = displayName bot:SetFakeClientConVar("name", displayName) end function screecherBuff(damage, activator, caller) local sphereResults = ents.FindInSphere(activator:GetAbsOrigin(), 750) local players = ents.GetAllPlayers() local enemies_buffed = 0 if sphereResults then for _, entity in pairs(sphereResults) do if entity:IsBot() and entity:IsAlive() and entity.m_iTeamNum ~= activator.m_iTeamNum then enemies_buffed = enemies_buffed + 1 entity:IgnitePlayerDuration(1, activator) entity:AddCond(16, 30, entity) entity:AddCond(69, 30, entity) entity:SetAttributeValue("CARD: move speed bonus", 1.3) -- function CEntity:SetAttributeValue(name, value) end entity:SetAttributeValue("CARD: health regen", 25) entity:SetAttributeValue("faster reload rate", 0.5) entity:SetAttributeValue("fire rate bonus HIDDEN", 0.5) entity:SetAttributeValue("dmg from ranged reduced", 0.5) entity:AddHealth(100, 10) applyName(entity, entity.m_szNetname .. " (Overdrive)") local glow_orang = ents.CreateWithKeys("tf_glow", { GlowColor = "255 143 0 255", targetname = "screecher_glow", target = "bignet", Mode = "0", StartDisabled = 1 }) glow_orang.m_hTarget = entity glow_orang:AcceptInput("Enable") timer.Simple(30, function() entity:SetAttributeValue("CARD: move speed bonus", 1.0) -- function CEntity:SetAttributeValue(name, value) end entity:SetAttributeValue("CARD: health regen", 0) entity:SetAttributeValue("faster reload rate", 1) entity:SetAttributeValue("fire rate bonus HIDDEN", 1) entity:SetAttributeValue("dmg from ranged reduced", 1.0) applyName(entity, string.gsub(entity.m_szNetname, " %(Overdrive%)$", "")) glow_orang:AcceptInput("Disable") glow_orang:Remove() applyName(entity, entity.m_szNetname) end) end end end for i, player in ipairs(players) do player:Print(2, "SCREECHER BUFF ACTIVE, " .. tostring(enemies_buffed) .. " BUFFED ENEMIES") end end