;--------------------------------------------------------------------
;STRIPPER CFG BY MOLTARD http://steamcommunity.com/id/0123456789ABC/
;--------------------------------------------------------------------
;DON'T LAGCOMP THIS SHIT (1073741824 is the anti-lagcomp flag)
;-------------------------------------------------------------
modify:
{
	match:
	{
		"targetname" "MovingStairs_Tp"
		"classname" "trigger_teleport"
		"spawnflags" "1"
	}
	replace:
	{
		"spawnflags" "1073741825"
	}
}

;---------------------------------------
;EXTRA SPAWN TRIGGER FOR THE SIDE ROOMS
;---------------------------------------

add:
{
	"model" "*210"
	"targetname" "Map_InitTr"
	"StartDisabled" "0"
	"spawnflags" "1"
	"origin" "-560 96 74"
	"classname" "trigger_once"
	"OnStartTouch" "Map_Init,Trigger,,0,1"
}



;---------------------------------
;FIXING TELEHOP BOOST IN BIG ROOM
;---------------------------------

; Triggers on the left side, where they bhop boost
add:
{
	"model" "*320"
	"wait" "1"
	"targetname" "ANTI_BHOP_BOOST_BIG_AREA"
	"StartDisabled" "0"
	"spawnflags" "1"
	"origin" "10432 -10048 1472"
	"filtername" "Filter_Zombies"
	"classname" "trigger_multiple"
	"OnStartTouch" "SPEEDMOD_ANTI_INFECT,ModifySpeed,0.99,0,-1"
}

; Speedmod Flag 64 = no attack
add:
{
	"targetname" "SPEEDMOD_ANTI_INFECT"
	"spawnflags" "64"
	"origin" "10432 -10048 1472"
	"classname" "player_speedmod"
}


; Trigger on the stairs so it fix the attack of legit zombie
add:
{
	"model" "*135"
	"wait" "1"
	"targetname" "ANTI_BHOP_BOOST_BIG_AREA_RESET"
	"StartDisabled" "0"
	"spawnflags" "1"
	"origin" "10096 -10880 2080"
	"filtername" "Filter_Zombies"
	"classname" "trigger_multiple"
	"OnStartTouch" "SPEEDMOD_ANTI_INFECT,ModifySpeed,1,0,-1"
}


; Trigger at the Khazad dest for zm
add:
{
	"model" "*135"
	"wait" "1"
	"targetname" "ANTI_BHOP_BOOST_BIG_AREA_RESET"
	"StartDisabled" "0"
	"spawnflags" "1"
	"origin" "13792 -11088 112"
	"filtername" "Filter_Zombies"
	"classname" "trigger_multiple"
	"OnStartTouch" "SPEEDMOD_ANTI_INFECT,ModifySpeed,1,0,-1"
}

; Trigger at spawn for round restart
add:
{
	"model" "*295"
	"wait" "1"
	"targetname" "ANTI_BHOP_BOOST_SPAWN_RESET"
	"StartDisabled" "0"
	"spawnflags" "1"
	"origin" "560 80 384"
	"classname" "trigger_multiple"
	"OnStartTouch" "SPEEDMOD_ANTI_INFECT,ModifySpeed,1,0,-1"
}


;============================
; UNLOZE EVENT MARCH 2022
; Special Stuff
;============================

; Permanent entities

modify:
{
	match:
	{
		"targetname" "Map_Init"
		"classname" "logic_relay"
	}
	insert:
	{
		"OnTrigger" "Stripper_Event_Init,FireUser1,,0,1"
		"OnTrigger" "4EchoEvent_AllItemSpawn_BRANCH,Test,,3,1"
		"OnTrigger" "4EchoEvent_StrongerDoor2_BRANCH,Test,,3,1"
		"OnTrigger" "4EchoEvent_StrongerDoor3_BRANCH,Test,,3,1"
		"OnTrigger" "4EchoEvent_StrongerDoor4_BRANCH,Test,,3,1"
	}
}

add:
{
	"targetname" "Stripper_Event_Init"
	"origin" "3722 -1142 -954"
	"classname" "info_target"
	"OnUser1" "Template_PermStripperEventMode,ForceSpawn,,0,1"
	"OnUser1" "4EchoEvent_AllItemSpawn_BRANCH,AddOutput,classname info_target,0.03,1"
	"OnUser1" "4EchoEvent_StrongerDoor2_BRANCH,AddOutput,classname info_target,0.03,1"
	"OnUser1" "4EchoEvent_StrongerDoor3_BRANCH,AddOutput,classname info_target,0.03,1"
	"OnUser1" "4EchoEvent_StrongerDoor4_BRANCH,AddOutput,classname info_target,0.03,1"
	"OnUser1" "!self,Kill,,0.06,1"
}

add:
{
	"targetname" "Template_PermStripperEventMode"
	"origin" "3722 -1142 -954"
	"Template01" "4EchoEvent_AllItemSpawn_BRANCH"
	"Template02" "4EchoEvent_StrongerDoor2_BRANCH"
	"Template03" "4EchoEvent_StrongerDoor3_BRANCH"
	"Template04" "4EchoEvent_StrongerDoor4_BRANCH"
	"spawnflags" "2"
	"classname" "point_template"
	"OnEntitySpawned" "!self,Kill,,0,-1"
}


; ++ GANDALF AND SARUMAN STAFF SPAWN ON EACH ROUND ++

add:
{
	"model" "*195"
	"targetname" "4EchoEvent_AllItemSpawn_ON"
	"wait" "2"
	"unlocked_sound" "0"
	"unlocked_sentence" "0"
	"speed" "5"
	"spawnflags" "1024"
	"sounds" "0"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"origin" "3722 -1142 -954"
	"movedir" "90 0 0"
	"locked_sound" "0"
	"locked_sentence" "0"
	"lip" "2"
	"health" "0"
	"disablereceiveshadows" "0"
	"classname" "func_button"
	"OnPressed" "4EchoEvent_AllItemSpawn_BRANCH,SetValue,1,0,-1"
	"OnPressed" "Server,Command,say ** An admin enabled ALL ITEMS FOR EACH ROUND **,0,-1"
}
add:
{
	"model" "*195"
	"targetname" "4EchoEvent_AllItemSpawn_OFF"
	"wait" "2"
	"unlocked_sound" "0"
	"unlocked_sentence" "0"
	"speed" "5"
	"spawnflags" "1024"
	"sounds" "0"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"origin" "3722 -1142 -954"
	"movedir" "90 0 0"
	"locked_sound" "0"
	"locked_sentence" "0"
	"lip" "2"
	"health" "0"
	"disablereceiveshadows" "0"
	"classname" "func_button"
	"OnPressed" "4EchoEvent_AllItemSpawn_BRANCH,SetValue,0,0,-1"
	"OnPressed" "Server,Command,say ** An admin disabled ALL ITEMS FOR EACH ROUND **,0,-1"
}


; this branch is turned into a permanent entity
add:
{
	"targetname" "4EchoEvent_AllItemSpawn_BRANCH"
	"origin" "3722 -1142 -954"
	"InitialValue" "0"
	"classname" "logic_branch"
	
	"OnTrue" "Server,Command,say ** [EVENT] GANDALF & SARUMAN STAFF WILL AUTOMATICALLY SPAWN **,8,-1"
	"OnTrue" "4EchoEvent_AllItemSpawn_TEST,SetValue,1,8,-1"
}

add:
{
	"targetname" "4EchoEvent_AllItemSpawn_TEST"
	"origin" "3722 -1142 -954"
	"InitialValue" "0"
	"classname" "logic_branch"
	
	"OnFalse" "Room3_DoorCase,PickRandom,,0,1"
	"OnTrue" "Room3_DoorCase,FireUser1,,0,1"
	"OnTrue" "Room3_DoorCase,FireUser2,,0,1"
	"OnTrue" "Room3_DoorCase,FireUser3,,0,1"
}

modify:
{
	match:
	{
		"targetname" "Room3_Trigger"
		"origin" "2092.52 -3551.43 2192"
		"classname" "trigger_once"
		"hammerid" "191808"
	}
	delete:
	{
		"OnStartTouch" "Room3_DoorCase,PickRandom,,3,1"
	}
	insert:
	{
		"OnStartTouch" "4EchoEvent_AllItemSpawn_TEST,Test,,3,1"
	}
	
}



; ++ BALIN'S TOMB DOORS STRONGER ++

; BaseHP of the doors
; Door1_Break0 = 450 hp
; Door2_Break0 = 450 hp
; Door1_Break1 to Door1_Break6 = 250 hp
; Door2_Break1 to Door2_Break6 = 250 hp
; Door1_BreakX = 150 hp
; Door2_BreakX = 150 hp


; STRONGER X2

add:
{
	"model" "*195"
	"targetname" "4EchoEvent_StrongerDoor2_ON"
	"wait" "2"
	"unlocked_sound" "0"
	"unlocked_sentence" "0"
	"speed" "5"
	"spawnflags" "1024"
	"sounds" "0"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"origin" "3722 -1142 -954"
	"movedir" "90 0 0"
	"locked_sound" "0"
	"locked_sentence" "0"
	"lip" "2"
	"health" "0"
	"disablereceiveshadows" "0"
	"classname" "func_button"
	"OnPressed" "4EchoEvent_StrongerDoor2_BRANCH,SetValue,1,0,-1"
	"OnPressed" "Server,Command,say ** An admin enabled STRONGER BALIN'S TOMB DOORS (X2) **,0,-1"
}
add:
{
	"model" "*195"
	"targetname" "4EchoEvent_StrongerDoor2_OFF"
	"wait" "2"
	"unlocked_sound" "0"
	"unlocked_sentence" "0"
	"speed" "5"
	"spawnflags" "1024"
	"sounds" "0"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"origin" "3722 -1142 -954"
	"movedir" "90 0 0"
	"locked_sound" "0"
	"locked_sentence" "0"
	"lip" "2"
	"health" "0"
	"disablereceiveshadows" "0"
	"classname" "func_button"
	"OnPressed" "4EchoEvent_StrongerDoor2_BRANCH,SetValue,0,0,-1"
	"OnPressed" "Server,Command,say ** An admin disabled STRONGER BALIN'S TOMB DOORS (X2) **,0,-1"
}


; this branch is turned into a permanent entity
add:
{
	"targetname" "4EchoEvent_StrongerDoor2_BRANCH"
	"origin" "3722 -1142 -954"
	"InitialValue" "0"
	"classname" "logic_branch"
	
	"OnTrue" "Server,Command,say ** [EVENT] BALIN'S TOMB DOORS ARE 2 TIMES STRONGER **,8,-1"
	"OnTrue" "4EchoEvent_StrongerDoor2_RELAY,Trigger,,8,-1"
}

add:
{
	"origin" "3722 -1142 -954"
	"targetname" "4EchoEvent_StrongerDoor2_RELAY"
	"spawnflags" "1"
	"classname" "logic_relay"
	"OnTrigger" "Door1_Break0,SetHealth,900,0,1"
	"OnTrigger" "Door2_Break0,SetHealth,900,0,1"
	"OnTrigger" "Door1_Break*,SetHealth,500,0.1,1"
	"OnTrigger" "Door2_Break*,SetHealth,500,0.1,1"
	"OnTrigger" "Door1_BreakX,SetHealth,300,0.2,1"
	"OnTrigger" "Door2_BreakX,SetHealth,300,0.2,1"
}


; STRONGER X3

add:
{
	"model" "*195"
	"targetname" "4EchoEvent_StrongerDoor3_ON"
	"wait" "2"
	"unlocked_sound" "0"
	"unlocked_sentence" "0"
	"speed" "5"
	"spawnflags" "1024"
	"sounds" "0"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"origin" "3722 -1142 -954"
	"movedir" "90 0 0"
	"locked_sound" "0"
	"locked_sentence" "0"
	"lip" "2"
	"health" "0"
	"disablereceiveshadows" "0"
	"classname" "func_button"
	"OnPressed" "4EchoEvent_StrongerDoor3_BRANCH,SetValue,1,0,-1"
	"OnPressed" "Server,Command,say ** An admin enabled STRONGER BALIN'S TOMB DOORS (X3) **,0,-1"
}
add:
{
	"model" "*195"
	"targetname" "4EchoEvent_StrongerDoor3_OFF"
	"wait" "2"
	"unlocked_sound" "0"
	"unlocked_sentence" "0"
	"speed" "5"
	"spawnflags" "1024"
	"sounds" "0"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"origin" "3722 -1142 -954"
	"movedir" "90 0 0"
	"locked_sound" "0"
	"locked_sentence" "0"
	"lip" "2"
	"health" "0"
	"disablereceiveshadows" "0"
	"classname" "func_button"
	"OnPressed" "4EchoEvent_StrongerDoor3_BRANCH,SetValue,0,0,-1"
	"OnPressed" "Server,Command,say ** An admin disabled STRONGER BALIN'S TOMB DOORS (X3) **,0,-1"
}


; this branch is turned into a permanent entity
add:
{
	"targetname" "4EchoEvent_StrongerDoor3_BRANCH"
	"origin" "3722 -1142 -954"
	"InitialValue" "0"
	"classname" "logic_branch"
	
	"OnTrue" "Server,Command,say ** [EVENT] BALIN'S TOMB DOORS ARE 3 TIMES STRONGER **,8,-1"
	"OnTrue" "4EchoEvent_StrongerDoor3_RELAY,Trigger,,8,-1"
}

add:
{
	"origin" "3722 -1142 -954"
	"targetname" "4EchoEvent_StrongerDoor3_RELAY"
	"spawnflags" "1"
	"classname" "logic_relay"
	"OnTrigger" "Door1_Break0,SetHealth,1350,0,1"
	"OnTrigger" "Door2_Break0,SetHealth,1350,0,1"
	"OnTrigger" "Door1_Break*,SetHealth,750,0.1,1"
	"OnTrigger" "Door2_Break*,SetHealth,750,0.1,1"
	"OnTrigger" "Door1_BreakX,SetHealth,450,0.2,1"
	"OnTrigger" "Door2_BreakX,SetHealth,450,0.2,1"
}

; STRONGER X4

add:
{
	"model" "*195"
	"targetname" "4EchoEvent_StrongerDoor4_ON"
	"wait" "2"
	"unlocked_sound" "0"
	"unlocked_sentence" "0"
	"speed" "5"
	"spawnflags" "1024"
	"sounds" "0"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"origin" "3722 -1142 -954"
	"movedir" "90 0 0"
	"locked_sound" "0"
	"locked_sentence" "0"
	"lip" "2"
	"health" "0"
	"disablereceiveshadows" "0"
	"classname" "func_button"
	"OnPressed" "4EchoEvent_StrongerDoor4_BRANCH,SetValue,1,0,-1"
	"OnPressed" "Server,Command,say ** An admin enabled STRONGER BALIN'S TOMB DOORS (X4) **,0,-1"
}
add:
{
	"model" "*195"
	"targetname" "4EchoEvent_StrongerDoor4_OFF"
	"wait" "2"
	"unlocked_sound" "0"
	"unlocked_sentence" "0"
	"speed" "5"
	"spawnflags" "1024"
	"sounds" "0"
	"rendermode" "0"
	"renderfx" "0"
	"rendercolor" "255 255 255"
	"renderamt" "255"
	"origin" "3722 -1142 -954"
	"movedir" "90 0 0"
	"locked_sound" "0"
	"locked_sentence" "0"
	"lip" "2"
	"health" "0"
	"disablereceiveshadows" "0"
	"classname" "func_button"
	"OnPressed" "4EchoEvent_StrongerDoor4_BRANCH,SetValue,0,0,-1"
	"OnPressed" "Server,Command,say ** An admin disabled STRONGER BALIN'S TOMB DOORS (X4) **,0,-1"
}

; this branch is turned into a permanent entity
add:
{
	"targetname" "4EchoEvent_StrongerDoor4_BRANCH"
	"origin" "3722 -1142 -954"
	"InitialValue" "0"
	"classname" "logic_branch"
	
	"OnTrue" "Server,Command,say ** [EVENT] BALIN'S TOMB DOORS ARE 4 TIMES STRONGER **,8,-1"
	"OnTrue" "4EchoEvent_StrongerDoor4_RELAY,Trigger,,8,-1"
}
add:
{
	"origin" "3722 -1142 -954"
	"targetname" "4EchoEvent_StrongerDoor4_RELAY"
	"spawnflags" "1"
	"classname" "logic_relay"
	"OnTrigger" "Door1_Break0,SetHealth,1800,0,1"
	"OnTrigger" "Door2_Break0,SetHealth,1800,0,1"
	"OnTrigger" "Door1_Break*,SetHealth,1000,0.1,1"
	"OnTrigger" "Door2_Break*,SetHealth,1000,0.1,1"
	"OnTrigger" "Door1_BreakX,SetHealth,600,0.2,1"
	"OnTrigger" "Door2_BreakX,SetHealth,600,0.2,1"
}
