-- thanks therealscroob! -- made by Zilloy function reprogKnife(damage, activator, caller) --if the caller is a giant or can't be backstabbed - give up local cannotBeBackstabbed = caller:GetAttributeValue("cannot be backstabbed") or 0 if caller.m_bIsMiniBoss == 1 or cannotBeBackstabbed > 0 then return end -- local durationUpgrade = ((activator:GetAttributeValue("throwable fire speed") or 1) - 1) * 5 -- print(durationUpgrade) -- local reprogDuration = 20 + durationUpgrade --this is not a good way to detect backstabs, but it will have to do. local spyLookDirection = activator["m_angEyeAngles[1]"] local callerLookDirection = caller["m_angEyeAngles[1]"] -- print(spyLookDirection) -- print(callerLookDirection) --if the target is not facing you, trigger the effect. Should be identical to actual backstab hit detection. if (callerLookDirection - spyLookDirection) < 90 or (callerLookDirection - spyLookDirection) > 270 then --reprogram caller for 20 seconds and say the Attacker did it. caller:AddCond(43, 20, Attacker) -- caller:AddCond(43, reprogDuration, Attacker) --brief stun on success. more feedback caller:AddCond(71, 0.5, Attacker) caller:SetAttributeValue("not solid to players", 1) caller:SetAttributeValue("cannot be teleported", 1) caller:SetAttributeValue("cannot be sapped", 1) caller:SetAttributeValue("crit mod disabled", 0) caller:SetAttributeValue("use robot voice", 1) caller:SetAttributeValue("patient overheal penalty", -5) caller:SetAttributeValue("health from packs decreased", 0) caller:SetAttributeValue("mult_health_fromhealers_penalty_active", 0.25) --timers do not make the script wait for them to end before continuing, both will be started --at the same time timer.Simple(5, function() if caller:IsAlive() == false then return end --make caller take friendly fire after 5 seconds caller:SetAttributeValue("receive friendly fire", 1) caller:SetAttributeValue("mult dmg friendly fire", 0) caller:SetAttributeValue("penetrate teammates", 1) end) --mark for death when only 3 seconds left + stun after reprogram wears off timer.Simple(17, function() -- timer.Simple(reprogDuration - 3, function() if caller:IsAlive() == false then return end caller:AddCond(30, 6, Attacker) end) --purge friendly fire attribute after 20 seconds (reprog is removed by cond duration) timer.Simple(20, function() -- timer.Simple(reprogDuration, function() if caller:IsAlive() == false then return end caller:SetAttributeValue("receive friendly fire", 0) caller:SetAttributeValue("not solid to players", 0) caller:SetAttributeValue("cannot be teleported", 0) caller:SetAttributeValue("cannot be sapped", 0) caller:SetAttributeValue("patient overheal penalty", 1) caller:SetAttributeValue("mult dmg friendly fire", 1) caller:SetAttributeValue("penetrate teammates", 0) caller:SetAttributeValue("health from packs decreased", 1) caller:SetAttributeValue("mult_health_fromhealers_penalty_active", 1) --stun target when reprogram wears off caller:AddCond(71, 3, Attacker) caller:SetAttributeValue("cannot be backstabbed", 1) --while stuned after getting reprogammed gain temporary backstab immunity timer.Simple(3, function() if caller:IsAlive() == false then return end caller:SetAttributeValue("cannot be backstabbed", 0) end) end) end --Zilloy was here end function testReprogKnife(damage, activator, caller) --if the caller is a giant, can't be backstabbed, ubered, same team or already reprogrammed - give up local cannotBeBackstabbed = caller:GetAttributeValue("cannot be backstabbed") or 0 local isMyTeammate = activator.m_iTeamNum == caller.m_iTeamNum --just in case local isUbered = caller:InCond(5) or caller:InCond(8) or caller:InCond(51) or caller:InCond(52) or caller:InCond(57) if caller.m_bIsMiniBoss == 1 or cannotBeBackstabbed > 0 or isMyTeammate or caller:InCond(43) or isUbered then return end --upgradeable reprogramming duration -- local durationUpgrade = ((activator:GetAttributeValue("throwable fire speed") or 1) - 1) * 5 -- print(durationUpgrade) -- local reprogDuration = 20 + durationUpgrade --this is not a good way to detect backstabs, but it will have to do. local spyLookDirection = activator["m_angEyeAngles[1]"] local callerLookDirection = caller["m_angEyeAngles[1]"] -- print("Spy: ", spyLookDirection) -- print("Trg: ", callerLookDirection) local lookDirectionCheck = callerLookDirection - spyLookDirection local isStunned = caller:InCond(71) or caller:InCond(50) -- print("Result: ", lookDirectionCheck) --if the target is not facing you or stunned - trigger the effect. --Should be identical to actual backstab hit detection. if ((lookDirectionCheck < 90) and (lookDirectionCheck > -90)) or ((lookDirectionCheck < -270) or (lookDirectionCheck > 270)) or isStunned then --reprogram caller for 20 seconds and say the Attacker did it. caller:AddCond(43, 20, Attacker) -- caller:AddCond(43, reprogDuration, Attacker) --play this sound when successfully reprogrammed a robot caller:PlaySound("weapons/sapper_plant.wav") if isStunned then --if stunned - unstun, play special sound caller:PlaySound("ambient/energy/spark5.wav") timer.Simple(1, function() if caller:IsAlive() == false then return end caller:RemoveCond(50) caller:RemoveCond(71) end) else --brief stun on success. caller:AddCond(71, 0.5, Attacker) end caller:SetAttributeValue("not solid to players", 1) caller:SetAttributeValue("cannot be teleported", 1) caller:SetAttributeValue("cannot be sapped", 1) caller:SetAttributeValue("crit mod disabled", 0) caller:SetAttributeValue("use robot voice", 1) caller:SetAttributeValue("patient overheal penalty", -5) caller:SetAttributeValue("health from packs decreased", 0) caller:SetAttributeValue("mult_health_fromhealers_penalty_active", 0.25) caller:SetAttributeValue("force distribute currency on death", 1) caller:SetAttributeValue("collect currency on kill", 1) --make caller go mobber, unless it's a medic, sniper with SR or spy local callerPrimary = caller:GetPlayerItemBySlot(LOADOUT_POSITION_PRIMARY) local callerSecondary = caller:GetPlayerItemBySlot(LOADOUT_POSITION_SECONDARY) local callerMelee = caller:GetPlayerItemBySlot(LOADOUT_POSITION_MELEE) local returnCase = 0 caller:RunScriptCode("self.LeaveSquad()", caller) --change bot behaviour script --if holding medigun - do medic stuff if callerSecondary and caller.m_hActiveWeapon == callerSecondary and callerSecondary:GetClassname() == "tf_weapon_medigun" then callerSecondary.m_hHealingTarget = nil callerSecondary.m_bAttacking = 0 caller:AcceptInput("$botcommand", "$switch_action medic") caller:RunScriptCode("self.AddBotAttribute(1024)", caller) --IgnoreEnemies -- print("") returnCase = 1 --if sniper: elseif caller.m_iClass == 2 then --if bowman or holds secondary - go mobber if (callerPrimary and callerPrimary:GetClassname() == "tf_weapon_compound_bow") or (callerSecondary and caller.m_hActiveWeapon == callerSecondary) then caller:AcceptInput("$botcommand", "$switch_action mobber") -- print("") --if holds melee - wait 2 seconds elseif callerMelee and caller.m_hActiveWeapon == callerMelee then -- print("") timer.Simple(2, function() --if holds melee - go mobber, else don't change if callerMelee and caller.m_hActiveWeapon == callerMelee then caller:AcceptInput("$botcommand", "$switch_action mobber") -- print("") end end) else --don't change, but mark a special return case -- print("") returnCase = 3 end --if spy - undisguise and make spy elseif caller.m_iClass == 8 then caller:RemoveCond(TF_COND_DISGUISED) caller:RemoveCond(TF_COND_DISGUISING) caller:AcceptInput("$botcommand", "$switch_action spy") -- print("") returnCase = 2 --else just make mobber else -- print("") caller:AcceptInput("$botcommand", "$switch_action mobber") end --if caller dies or unreprograms - cancel the script and undo the attributes local unReprogTimer unReprogTimer = timer.Create(0.05, function() -- print("unReprogTimer is working") if caller:IsAlive() == false or caller:InCond(43) == false then -- print("STOP AND UNDO") caller:SetAttributeValue("receive friendly fire", nil) caller:SetAttributeValue("mult dmg friendly fire", nil) caller:SetAttributeValue("penetrate teammates", nil) caller:SetAttributeValue("not solid to players", nil) caller:SetAttributeValue("cannot be teleported", nil) caller:SetAttributeValue("cannot be sapped", nil) caller:SetAttributeValue("crit mod disabled", nil) caller:SetAttributeValue("use robot voice", nil) caller:SetAttributeValue("patient overheal penalty", nil) caller:SetAttributeValue("health from packs decreased", nil) caller:SetAttributeValue("mult_health_fromhealers_penalty_active", nil) caller:SetAttributeValue("force distribute currency on death", nil) caller:SetAttributeValue("collect currency on kill", nil) if returnCase == 2 then -- print(">This is spy<") caller:RemoveCond(TF_COND_DISGUISED) caller:RemoveCond(TF_COND_DISGUISING) caller:AcceptInput("$botcommand", "$switch_action default") elseif returnCase == 1 then -- print(">This is medic<") caller:RunScriptCode("self.RemoveBotAttribute(1024)", caller) caller:AcceptInput("$botcommand", "$switch_action default") elseif returnCase == 0 then -- print(">This is whatever<") caller:AcceptInput("$botcommand", "$switch_action default") end --stun target when reprogram wears off --while stunned after getting reprogammed gain temporary backstab immunity if caller:IsAlive() then caller:AddCond(71, 3, Attacker) caller:SetAttributeValue("cannot be backstabbed", 1) timer.Simple(5, function() if caller:IsAlive() == false then return end caller:SetAttributeValue("cannot be backstabbed", nil) end) end -- print("Stop timer unReprogTimer") timer.Stop(unReprogTimer) -- print("Stop timer friendlyFireTimer") if friendlyFireTimer then timer.Stop(friendlyFireTimer) end -- print("Stop timer markTimer") if markTimer then timer.Stop(markTimer) end end end, 0) --make caller take friendly fire after 5 seconds local friendlyFireTimer friendlyFireTimer = timer.Create(5, function() if caller:IsAlive() == false then return end -- print("||Adding friendly fire||") caller:SetAttributeValue("receive friendly fire", 1) caller:SetAttributeValue("mult dmg friendly fire", 0) caller:SetAttributeValue("penetrate teammates", 1) end, 1) --mark for death when only 3 seconds left + stun after reprogram wears off local markTimer markTimer = timer.Create(17, function() if caller:IsAlive() == false then return end -- print("|[Marking for death]|") -- markTimer = timer.Create(reprogDuration - 3, function() caller:AddCond(30, 6, Attacker) end, 1) -- else --deal butterknife damage -- caller:TakeDamage() --need to figure this one out end --Zilloy was here end function KnifeThievingBackstabbed(damage, activator, caller) --if target cannot be backstabbed or is a teammate - give up local cannotBeBackstabbed = caller:GetAttributeValue("cannot be backstabbed") or 0 local isMyTeammate = activator.m_iTeamNum == caller.m_iTeamNum if cannotBeBackstabbed > 0 or isMyTeammate then return end --this is not a good way to detect backstabs, but it will have to do. --only activate the class thieving on backstab kill local spyLookDirection = activator["m_angEyeAngles[1]"] local callerLookDirection = caller["m_angEyeAngles[1]"] -- print("Spy: ", spyLookDirection) -- print("Trg: ", callerLookDirection) local lookDirectionCheck = callerLookDirection - spyLookDirection local isStunned = caller:InCond(71) or caller:InCond(50) -- print("Result: ", lookDirectionCheck) --if the target is not facing you or stunned - trigger the effect. --Should be identical to actual backstab hit detection. if ((lookDirectionCheck < 90) and (lookDirectionCheck > -90)) or ((lookDirectionCheck < -270) or (lookDirectionCheck > 270)) or isStunned then local getCallClass = caller.m_iClass if getCallClass == 8 or getCallClass == 9 then activator:AcceptInput("$DisplayTextChat", "{Red}Spies and Engineers aren't allowed. Denied.") return end local userBulletRes = activator:GetAttributeValue("dmg taken from bullets reduced") or 1 local userBlastRes = activator:GetAttributeValue("dmg taken from blast reduced") or 1 local userFireRes = activator:GetAttributeValue("dmg taken from fire reduced") or 1 local userCritRes = activator:GetAttributeValue("dmg taken from crit reduced") or 1 local userMoveSpeed = activator:GetAttributeValue("move speed bonus") or 1 local userRegen = activator:GetAttributeValue("health regen") or 0 activator.copyItems = {} -- function OnKillSteal(_, _, caller) activator:SwitchClassInPlace(getCallClass) activator:AcceptInput("$DisplayTextChat", "{yellow}You Are Now {blue}"..tostring(caller:GetPlayerName())) activator:AcceptInput("SetCustomModelWithClassAnimations", tostring(caller.m_ModelName)) activator:PlaySound("misc/halloween/spell_teleport.wav") activator:AcceptInput("RunScriptCode","DispatchParticleEffect(`teleported_red`,self.GetOrigin(),Vector(-90, 0, 0))") activator.copyItems = caller:GetAllItems() -- PrintTable(activator.copyItems) timer.Simple(0.22, function() for i, items in pairs(activator.copyItems) do activator:GiveItem(activator.copyItems[i]:GetItemName(), activator.copyItems[i]:GetAllAttributeValues()) end end) -- activator:SetAbsOrigin(caller:GetAbsOrigin) -- activator:SnapEyeAngles(caller["m_angEyeAngles"]) -- activator:SetAttributeValue("not solid to players", 1) --get yourself unstuck from players -- timer.Simple(1.5, function() -- activator:SetAttributeValue("not solid to players", nil) -- activator:SetAttributeValue("displace touched enemies", 1) --push away if stuck -- timer.Simple(1, function() -- activator:SetAttributeValue("displace touched enemies", nil) -- end) -- end) timer.Simple(0.1, function() --thanks Wacev for this bit for attr,val in pairs(caller:GetAllAttributeValues()) do --get all attrs and their values from caller / attr = attribute name / val = attribute value activator:SetAttributeValue(attr, val) end if caller.m_bIsMiniBoss == 1 then activator.m_flModelScale = 1.4 activator:AddHealth(1750, true) if getCallClass ~= 1 then activator:SetAttributeValue("SET BONUS: move speed set bonus", 0.75) end -- activator:SetAttributeValue("dmg from ranged reduced", 0.80) -- activator:SetAttributeValue("hidden primary max ammo bonus", 1.80) activator:SetAttributeValue("override footstep sound set", 6) activator:SetAttributeValue("heal rate bonus", 5) activator:SetAttributeValue("ubercharge rate bonus", 5) activator:SetAttributeValue("patient overheal penalty", -5) activator.m_bIsMiniBoss = 1 activator:SetAttributeValue("not solid to players", 1) --get yourself unstuck from players timer.Simple(1.5, function() activator:SetAttributeValue("not solid to players", nil) activator:SetAttributeValue("displace touched enemies", 1) --push away if stuck timer.Simple(1, function() activator:SetAttributeValue("displace touched enemies", nil) end) end) else activator:AddHealth(200, true) -- activator:SetAttributeValue("dmg from ranged reduced", 0.80) activator:SetAttributeValue("heal rate bonus", 2.5) activator:SetAttributeValue("ubercharge rate bonus", 5) activator:SetAttributeValue("patient overheal penalty", 0) -- activator.m_flModelScale = caller.activator.m_flModelScale end -- if caller.IsBotOfType(1337) then activator:SetAttributeValue("hidden primary max ammo bonus", 10) activator:SetAttributeValue("hidden secondary max ammo penalty", 10) activator:SetAttributeValue("ammo regen", 1) -- end activator:SetAttributeValue("dmg taken from bullets reduced", userBulletRes) activator:SetAttributeValue("dmg taken from blast reduced", userBlastRes) activator:SetAttributeValue("dmg taken from fire reduced", userFireRes) activator:SetAttributeValue("dmg taken from crit reduced", userCritRes) activator:SetAttributeValue("move speed bonus", userMoveSpeed) activator:SetAttributeValue("health regen", userRegen) activator:SetAttributeValue("cannot upgrade", 1) activator:SetAttributeValue("ignored by bots", 1) timer.Simple(1, function() activator:SetAttributeValue("ignored by bots", nil) end) end) local classSwapTime = 30 SwapBackToClass = timer.Create(1, function () classSwapTime = classSwapTime - 1 if classSwapTime <= 5 and classSwapTime > 0 then activator:PlaySoundToSelf("weapons/det_pack_timer.wav") end activator:AcceptInput("$DisplayTextCenter", "Class copy ends in: "..classSwapTime, activator) --revert on timer if classSwapTime <= 0 then activator:SwitchClassInPlace(8) activator:AcceptInput("SetCustomModelWithClassAnimations", "") classSwapTime = 30 activator:SetAttributeValue("SET BONUS: move speed set bonus", nil) activator:SetAttributeValue("dmg from ranged reduced", nil) activator:SetAttributeValue("hidden primary max ammo bonus", nil) activator:SetAttributeValue("override footstep sound set", nil) activator:SetAttributeValue("heal rate bonus", nil) activator:SetAttributeValue("patient overheal penalty", nil) activator:SetAttributeValue("cannot upgrade", nil) activator.m_bIsMiniBoss = 0 activator.m_flModelScale = 1 activator:PlaySound("misc/halloween/spell_stealth.wav") activator:AcceptInput("RunScriptCode","DispatchParticleEffect(`teleported_red`,self.GetOrigin(),Vector(-90, 0, 0))") end --revert early if activator:IsAlive() == false then activator:SwitchClass(8) activator:AcceptInput("SetCustomModelWithClassAnimations", "") classSwapTime = 30 timer.Stop(SwapBackToClass) activator:SetAttributeValue("SET BONUS: move speed set bonus", nil) activator:SetAttributeValue("dmg from ranged reduced", nil) activator:SetAttributeValue("hidden primary max ammo bonus", nil) activator:SetAttributeValue("override footstep sound set", nil) activator:SetAttributeValue("heal rate bonus", nil) activator:SetAttributeValue("patient overheal penalty", nil) activator:SetAttributeValue("cannot upgrade", nil) activator.m_bIsMiniBoss = 0 activator.m_flModelScale = 1 end end, 30) -- end function OnWaveInit(wave) classSwapTime = 0 timer.Stop(SwapBackToClass) activator:SwitchClass(8) activator:AcceptInput("SetCustomModelWithClassAnimations", "") activator:SetAttributeValue("SET BONUS: move speed set bonus", nil) activator:SetAttributeValue("dmg from ranged reduced", nil) activator:SetAttributeValue("hidden primary max ammo bonus", nil) activator:SetAttributeValue("override footstep sound set", nil) activator:SetAttributeValue("heal rate bonus", nil) activator:SetAttributeValue("patient overheal penalty", nil) activator:SetAttributeValue("cannot upgrade", nil) activator.m_bIsMiniBoss = 0 activator.m_flModelScale = 1 activator:PlaySound("misc/halloween/spell_stealth.wav") activator:AcceptInput("RunScriptCode","DispatchParticleEffect(`teleported_red`,self.GetOrigin(),Vector(-90, 0, 0))") end end end function CopyCatRevolver(damage, activator, caller) local isCritBot = 0 local getCallClass = caller.m_iClass if getCallClass == 8 or getCallClass == 9 then activator:AcceptInput("$DisplayTextChat", "{Red}Spies and Engineers aren't allowed. Denied.") return end local userBulletRes = activator:GetAttributeValue("dmg taken from bullets reduced") or 1 local userBlastRes = activator:GetAttributeValue("dmg taken from blast reduced") or 1 local userFireRes = activator:GetAttributeValue("dmg taken from fire reduced") or 1 local userCritRes = activator:GetAttributeValue("dmg taken from crit reduced") or 1 local userMoveSpeed = activator:GetAttributeValue("move speed bonus") or 1 local userRegen = activator:GetAttributeValue("health regen") or 0 if caller:InCond(34) and not caller:IsRealPlayer() then isCritBot = 1 end activator.copyItems = {} activator:SwitchClassInPlace(getCallClass) activator:AcceptInput("$DisplayTextChat", "{yellow}You Are Now {blue}"..tostring(caller:GetPlayerName())) activator:AcceptInput("SetCustomModelWithClassAnimations", tostring(caller.m_ModelName)) activator:PlaySound("misc/halloween/spell_teleport.wav") activator:AcceptInput("RunScriptCode","DispatchParticleEffect(`teleported_red`,self.GetOrigin(),Vector(-90, 0, 0))") activator.copyItems = caller:GetAllItems() -- PrintTable(activator.copyItems) timer.Simple(0.22, function() for i, items in pairs(activator.copyItems) do activator:GiveItem(activator.copyItems[i]:GetItemName(), activator.copyItems[i]:GetAllAttributeValues()) end end) timer.Simple(0.1, function() --thanks Wacev for this bit for attr,val in pairs(caller:GetAllAttributeValues()) do --get all attrs and their values from caller / attr = attribute name / val = attribute value if attr ~= "hidden maxhealth non buffed" then activator:SetAttributeValue(attr, val) end end if caller.m_bIsMiniBoss == 1 then activator.m_flModelScale = 1.4 activator:AddHealth(1750, true) if getCallClass ~= 1 then activator:SetAttributeValue("SET BONUS: move speed set bonus", 0.75) end -- activator:SetAttributeValue("dmg from ranged reduced", 0.80) -- activator:SetAttributeValue("hidden primary max ammo bonus", 1.80) activator:SetAttributeValue("override footstep sound set", 6) activator:SetAttributeValue("heal rate bonus", 5) activator:SetAttributeValue("ubercharge rate bonus", 5) activator:SetAttributeValue("patient overheal penalty", -5) activator.m_bIsMiniBoss = 1 activator:SetAttributeValue("not solid to players", 1) --get yourself unstuck from players timer.Simple(1.5, function() activator:SetAttributeValue("not solid to players", nil) activator:SetAttributeValue("displace touched enemies", 1) --push away if stuck timer.Simple(1, function() activator:SetAttributeValue("displace touched enemies", nil) end) end) else activator:AddHealth(200, true) -- activator:SetAttributeValue("dmg from ranged reduced", 0.80) activator:SetAttributeValue("heal rate bonus", 2.5) activator:SetAttributeValue("ubercharge rate bonus", 5) activator:SetAttributeValue("patient overheal penalty", 0) -- activator.m_flModelScale = caller.activator.m_flModelScale end if not caller.IsRealPlayer() then activator:SetAttributeValue("hidden primary max ammo bonus", 10) activator:SetAttributeValue("hidden secondary max ammo penalty", 10) activator:SetAttributeValue("ammo regen", 1) end activator:SetAttributeValue("dmg taken from bullets reduced", userBulletRes) activator:SetAttributeValue("dmg taken from blast reduced", userBlastRes) activator:SetAttributeValue("dmg taken from fire reduced", userFireRes) activator:SetAttributeValue("dmg taken from crit reduced", userCritRes) activator:SetAttributeValue("move speed bonus", userMoveSpeed) activator:SetAttributeValue("health regen", userRegen) activator:SetAttributeValue("cannot upgrade", 1) if isCritBot == 1 then activator:AddCond(37, 30, Attacker) end end) local classSwapTime = 30 SwapBackToClass = timer.Create(1, function () classSwapTime = classSwapTime - 1 if classSwapTime <= 5 and classSwapTime > 0 then activator:PlaySoundToSelf("weapons/det_pack_timer.wav") end activator:AcceptInput("$DisplayTextCenter", "Class copy ends in: "..classSwapTime, activator) --revert on timer if classSwapTime <= 0 then activator:SwitchClassInPlace(8) activator:AcceptInput("SetCustomModelWithClassAnimations", "") classSwapTime = 30 activator:SetAttributeValue("SET BONUS: move speed set bonus", nil) activator:SetAttributeValue("dmg from ranged reduced", nil) activator:SetAttributeValue("hidden primary max ammo bonus", nil) activator:SetAttributeValue("override footstep sound set", nil) activator:SetAttributeValue("heal rate bonus", nil) activator:SetAttributeValue("patient overheal penalty", nil) activator:SetAttributeValue("cannot upgrade", nil) activator.m_bIsMiniBoss = 0 activator.m_flModelScale = 1 activator:PlaySound("misc/halloween/spell_stealth.wav") activator:AcceptInput("RunScriptCode","DispatchParticleEffect(`teleported_red`,self.GetOrigin(),Vector(-90, 0, 0))") end --revert early if activator:IsAlive() == false then activator:SwitchClass(8) activator:AcceptInput("SetCustomModelWithClassAnimations", "") classSwapTime = 30 timer.Stop(SwapBackToClass) activator:SetAttributeValue("SET BONUS: move speed set bonus", nil) activator:SetAttributeValue("dmg from ranged reduced", nil) activator:SetAttributeValue("hidden primary max ammo bonus", nil) activator:SetAttributeValue("override footstep sound set", nil) activator:SetAttributeValue("heal rate bonus", nil) activator:SetAttributeValue("patient overheal penalty", nil) activator:SetAttributeValue("cannot upgrade", nil) activator.m_bIsMiniBoss = 0 activator.m_flModelScale = 1 end end, 30) function OnWaveInit(wave) classSwapTime = 0 if SwapBackToClass then timer.Stop(SwapBackToClass) --this spews out an error on map reset, how to fix? end activator:SwitchClass(8) activator:AcceptInput("SetCustomModelWithClassAnimations", "") activator:SetAttributeValue("SET BONUS: move speed set bonus", nil) activator:SetAttributeValue("dmg from ranged reduced", nil) activator:SetAttributeValue("hidden primary max ammo bonus", nil) activator:SetAttributeValue("override footstep sound set", nil) activator:SetAttributeValue("heal rate bonus", nil) activator:SetAttributeValue("patient overheal penalty", nil) activator:SetAttributeValue("cannot upgrade", nil) activator.m_bIsMiniBoss = 0 activator.m_flModelScale = 1 activator:PlaySound("misc/halloween/spell_stealth.wav") activator:AcceptInput("RunScriptCode","DispatchParticleEffect(`teleported_red`,self.GetOrigin(),Vector(-90, 0, 0))") end end