-- HEY -- You have no business here! -- Titanium Thieves lua shit -- everything below was written by washy, just reused here from bauernhof function OnWaveStart() waveActive = true timer.Simple(0.5,function() ents.FindByName("plot_trigger_2"):AddCallback(ON_START_TOUCH, function(_, player) if player:IsRealPlayer() then player.InteractWith = "plot_button_2" end end) ents.FindByName("plot_trigger_2"):AddCallback(ON_END_TOUCH, function(_, player) if player:IsRealPlayer() then player.InteractWith = "nothing" player:Print(2,"") end end) ents.FindByName("plot_trigger_5"):AddCallback(ON_START_TOUCH, function(_, player) if player:IsRealPlayer() then player.InteractWith = "plot_button_5" end end) ents.FindByName("plot_trigger_5"):AddCallback(ON_END_TOUCH, function(_, player) if player:IsRealPlayer() then player.InteractWith = "nothing" player:Print(2,"") end end) ents.FindByName("datalink_hint"):AddCallback(ON_START_TOUCH, function(_, player) if player:IsRealPlayer() then player.InteractWith = "datalink_button" end end) ents.FindByName("datalink_hint"):AddCallback(ON_END_TOUCH, function(_, player) if player:IsRealPlayer() then player.InteractWith = "nothing" player:Print(2,"") end end) ents.FindByName("plot_trigger_7"):AddCallback(ON_START_TOUCH, function(_, player) if player:IsRealPlayer() then player.InteractWith = "plot_button_7" end end) ents.FindByName("plot_trigger_7"):AddCallback(ON_END_TOUCH, function(_, player) if player:IsRealPlayer() then player.InteractWith = "nothing" player:Print(2,"") end end) ents.FindByName("plot_trigger_8"):AddCallback(ON_START_TOUCH, function(_, player) if player:IsRealPlayer() then player.InteractWith = "plot_button_8" end end) ents.FindByName("plot_trigger_8"):AddCallback(ON_END_TOUCH, function(_, player) if player:IsRealPlayer() then player.InteractWith = "nothing" player:Print(2,"") end end) end) end function OnGameTick() for _, player in pairs(ents.GetAllPlayers()) do if player:IsRealPlayer() then if player.m_bUsingActionSlot == 1 and player.InteractCooldown ~= true then player.HoldTime = player.HoldTime + 1 if player.HoldTime > 33 and player.InteractWith ~= "nothing" then Interact(player) player.InteractCooldown = true player.HoldTime = 0 timer.Simple(1, function() player.InteractCooldown = false end) end else player.holdTime = 0 end end end end function Interact(player) if player.InteractWith == "plot_button_2" then ents.FindByName("plot_button_2"):AcceptInput("Press",_,player) timer.Simple(1, function() player.InteractCooldown = true end) timer.Simple(2.3, function() player.InteractCooldown = false end) end if player.InteractWith == "plot_button_5" then ents.FindByName("plot_button_5"):AcceptInput("Press",_,player) timer.Simple(1, function() player.InteractCooldown = true end) timer.Simple(2.3, function() player.InteractCooldown = false end) end if player.InteractWith == "datalink_button" then ents.FindByName("datalink_button"):AcceptInput("Press",_,player) timer.Simple(1, function() player.InteractCooldown = true end) timer.Simple(2.3, function() player.InteractCooldown = false end) end if player.InteractWith == "plot_button_7" then ents.FindByName("plot_button_7"):AcceptInput("Press",_,player) timer.Simple(1, function() player.InteractCooldown = true end) timer.Simple(2.3, function() player.InteractCooldown = false end) end if player.InteractWith == "plot_button_8" then ents.FindByName("plot_button_8"):AcceptInput("Press",_,player) timer.Simple(1, function() player.InteractCooldown = true end) timer.Simple(2.3, function() player.InteractCooldown = false end) end if player.InteractWith == "revive_button" then -- trigger_multiple attached to reanimator ents.FindByName("revive_button"):AcceptInput("Press",_,player) timer.Simple(1, function() player.InteractCooldown = true end) timer.Simple(2.3, function() player.InteractCooldown = false end) end end -- and everything below is written by Sntr function respawnlogic(_,activator) if activator:InCond(129) == 0 then -- activator:DisplayTextChat("Cancel warp, player doesn't have 129") return -- if we don't have this condition, do not spawn warp end -- revivelogic immediately removes it from the player if activator:InCond(51) == 1 then activator:RemoveCond(129) -- activator:DisplayTextChat("Cancel warp, player has 51") return end local allPlayers = ents.GetAllPlayers() for _, warpguy in pairs(allPlayers) do if warpguy:InCond(129) == 0 and warpguy:IsAlive() and warpguy.m_iTeamNum == 2 and warpguy:GetHandleIndex() ~= activator:GetHandleIndex() then -- don't teleport to a dead red player or YOURSELF activator:Teleport(warpguy:GetAbsOrigin()) activator:AddCond(51,2) activator:RemoveCond(129) -- activator:PlaySoundToSelf("vo/burp02.mp3") end end end function spawn_revive_marker(_,activator) for k, marker in pairs(ents.FindAllByClass("entity_revive_marker")) do if marker.m_hOwner == activator then templateEnts = ents.SpawnTemplate("Revivemarker", {parent = marker}) ents.FindByName("revive_trigger"):AddCallback(ON_START_TOUCH, function(_, player) if player:IsRealPlayer() and player:IsAlive() then -- IsAlive is so dead people somehow don't interact with the button player.InteractWith = "revive_button" end end) ents.FindByName("revive_trigger"):AddCallback(ON_END_TOUCH, function(_, player) if player:IsRealPlayer() then player.InteractWith = "nothing" player:Print(2,"") end end) end end end function revivelogic(_,activator) activator:TauntFromItem("Laugh Taunt") timer.Simple(0.65, function() for _, reanimator in pairs(ents.FindInSphere(activator:GetAbsOrigin(), 150)) do if reanimator:GetClassname() == "entity_revive_marker" then reanimator.m_hOwner:ForceRespawnDead() reanimator.m_hOwner:PlaySoundToSelf("mvm/mvm_revive.wav") reanimator.m_hOwner:SpeakResponseConcept("TLK_RESURRECTED") activator:PlaySoundToSelf("mvm/mvm_revive.wav") reanimator.m_hOwner:Teleport(activator:GetAbsOrigin()) reanimator.m_hOwner:AddCond(51,2) -- give invulnerability to revived players reanimator.m_hOwner:RemoveCond(129) activator:StunPlayer(0.2,1,TF_STUNFLAG_BONKSTUCK) end end end) end