Back to home

Advanced Bots Practice Range

5MAPT
click to copy
This game is archived.
If you with to unarchive it, click the "restore" button in the options menu.
This code can also be found at workshop.codes/5MAPT

Category:
Training / Drills / Tools

Author:
GîvéMêHànzô

Rating:
7

Version:
10.2.0

Posted:
10 months ago

Last updated:
about 1 month ago

Tags:
genji hitscan training widow practice aim bots pve

Project Links

Share this workshop!

Options

https://youtu.be/fKyXD8kgqeY Video is on the older version, the new version using Havana map provide a longer range for heros like Widow or Ana practice long range aiming.

variables
{
	global:
		12: tanks
		13: randomtank
		26: checkdummy
		27: botattack
		28: tankindex

	player:
		1: takingDMG
		4: bubbleteammate
		6: Zaryabubbletimer
}

rule("ai swap varible")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Global.J[0] = Vector(77.897, 8, -51.183);
		Global.J[1] = Vector(77.972, 8, -53.153);
		Global.J[2] = Vector(77.916, 8, -55.077);
		Global.J[3] = Vector(77.916, 8, -57.202);
		Global.J[4] = Vector(78.005, 8, -59.511);
		Global.J[5] = Vector(87.618, 7.800, -51.326);
		Global.J[6] = Vector(84.546, 8, -51.395);
		Global.J[7] = Vector(85.691, 8.544, -51.396);
		Global.J[8] = Vector(87.422, 8, -55.288);
		Global.J[9] = Vector(85.104, 8, -57.121);
		Global.J[10] = Vector(80.948, 8, -61.563);
		Global.J[11] = Vector(82.520, 8, -60.011);
		Global.J[12] = Vector(76.228, 8, -61.603);
		Global.J[13] = Vector(76.189, 8, -64.236);
		Global.J[14] = Vector(94.601, 8, -36.991);
		Global.J[15] = Vector(94.460, 8, -40.073);
		Global.J[16] = Vector(76.699, 8, -43.244);
		Global.J[17] = Vector(76.770, 8, -41.320);
		Global.botattack = True;
		Global.Y = 20;
		Global.J[18] = Vector(78.716, 8, -46.464);
		Global.J[19] = Vector(75.765, 8, -67.122);
		Global.J[20] = Vector(75.920, 8, -69.343);
		Global.J[21] = Vector(94.559, 8.600, -40.054);
		Global.J[22] = Vector(76.757, 8.200, -38.295);
		Global.J[23] = Vector(76.846, 8.200, -36.097);
		Global.J[24] = Vector(76.729, 8.200, -34);
		Global.J[25] = Vector(76.757, 8.600, -38.295);
	}
}

rule("positions and varible")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Global.A[1] = Vector(57.724, 4.200, -68.315);
		Global.A[2] = Vector(88.212, 5.500, -60.575);
		Global.A[3] = Vector(132.387, 7.628, -46.438);
		Global.B = 0;
		Global.A[4] = Vector(89.567, 8, -37.271);
		Global.A[5] = Vector(89.706, 8, -39.527);
		Global.A[6] = Vector(89.585, 8, -46.845);
		Global.A[7] = Vector(89.754, 8, -48.869);
		Global.C = 100;
		Global.X = True;
		Global.Z = 0;
		Global.E = Null;
		Global.G = False;
		Global.P = Vector(100.246, 8, -46.098);
		Global.H = Hero(Torbjörn);
		Global.I = False;
		Global.O[0] = Hero(Genji);
		Global.O[1] = Hero(Doomfist);
		Global.O[2] = Hero(Pharah);
		Global.D = 100;
		Global.A[10] = Vector(127.699, 7.579, -46.315);
		Global.L[0] = Hero(Zenyatta);
		Global.L[1] = Hero(Widowmaker);
		Global.L[2] = Hero(Lúcio);
		Global.L[3] = Hero(Moira);
		Global.L[4] = Hero(Soldier: 76);
		Global.L[5] = Hero(Symmetra);
		Global.L[6] = Hero(Sombra);
		Global.B = 0;
		Global.Q = False;
		Global.A[13] = Vector(134.012, 18, -45.381);
		Global.R = 0;
		Global.L[7] = Hero(McCree);
		Global.L[8] = Hero(Hanzo);
		Global.T = False;
		Global.U = False;
		Set Match Time(2400);
		"Blocking doors for bots"
		Global.A[14] = Vector(133.018, 7.548, -59.947);
		"Blocking doors for bots"
		Global.A[15] = Vector(134.401, 7.579, -32.187);
		"Blocking doors for bots"
		Global.A[16] = Vector(126.653, 7.633, -34.712);
		"Blocking doors for bots"
		Global.A[17] = Vector(125.104, 7.548, -52.351);
		"Impulse direction for doors"
		Global.A[18] = Vector(142.606, 7, -46.237);
	}
}

rule("strafe slot4")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Slot 4;
	}

	actions
	{
		Start Throttle In Direction(Event Player, Vector(100, 0, Random Integer(0, 10)), 1, To Player, Replace existing throttle,
			Direction and Magnitude);
		Wait(Random Real(0.150, 0.800), Ignore Condition);
		Start Throttle In Direction(Event Player, Vector(-100, 0, Random Integer(-10, 0)), 1, To Player, Replace existing throttle,
			Direction and Magnitude);
		Wait(Random Real(0.150, 0.800), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("strafe ana")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Ana;
	}

	conditions
	{
		Is Alive(Event Player) == True;
	}

	actions
	{
		Start Throttle In Direction(Event Player, Vector(100, 0, 0), 1, To Player, Replace existing throttle, Direction and Magnitude);
		Wait(Random Real(0.150, 1), Ignore Condition);
		Start Throttle In Direction(Event Player, Vector(-100, 0, 0), 1, To Player, Replace existing throttle, Direction and Magnitude);
		Wait(Random Real(0.150, 1), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("ana facing")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Ana;
	}

	conditions
	{
		Event Player.D == False;
		Is Alive(Event Player) == True;
	}

	actions
	{
		Set Facing(Event Player, Vector(Random Integer(-100, 100), 0, Random Real(-100, 100)), To Player);
		Wait(Random Real(2, 7), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("slot 4 facing")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Slot 4;
	}

	conditions
	{
		Event Player.D == True;
		Global.botattack != True;
		Is Alive(Event Player) == True;
	}

	actions
	{
		Set Facing(Event Player, Vector(Random Integer(-100, 100), 0, Random Real(-100, 100)), To Player);
		Wait(Random Real(2, 6), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("bots default move speed")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		All;
	}

	actions
	{
		Set Move Speed(Event Player, Global.C);
	}
}

rule("tp ring spawn")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create Effect(All Players(All Teams), Light Shaft, Green, Global.A[1], 2, Visible To Position and Radius);
		Create In-World Text(All Players(All Teams), String("Join"), Global.A[1], 1, Do Not Clip, Visible To Position and String, White,
			Default Visibility);
		Create Effect(All Players(All Teams), Ring, Blue, Global.P, 3.500, Visible To Position and Radius);
	}
}

rule("tp player")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Distance Between(Event Player, Global.A[1]) <= 2;
	}

	actions
	{
		Teleport(Event Player, Nearest Walkable Position(Vector(95.509, 8.178, -53.159)));
		Set Facing(Event Player, Direction Towards(Event Player, Global.A[3]), To World);
	}
}

rule("tp ring  back to spawn")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create Effect(All Players(All Teams), Light Shaft, Green, Global.A[2], 2, Visible To Position and Radius);
		Create In-World Text(All Players(All Teams), String("Spawn"), Global.A[2], 1, Do Not Clip, Visible To Position and String, White,
			Default Visibility);
	}
}

rule("tp player back to spawn")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Distance Between(Event Player, Global.A[2]) <= 2;
		Hero Of(Event Player) != Hero(Mercy);
	}

	actions
	{
		Teleport(Event Player, Nearest Walkable Position(Vector(64.845, 5.547, -65.188)));
	}
}

rule("tp bots back to point(Except Rein)")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		All;
	}

	conditions
	{
		Distance Between(Event Player, Global.A[13]) > Global.Y;
		Is Using Ultimate(Event Player) != True;
		Hero Of(Event Player) != Hero(Reinhardt);
	}

	actions
	{
		Teleport(Event Player, Nearest Walkable Position(Global.A[3]));
		Apply Impulse(Event Player, Left, Random Integer(-15, 15), To Player, Cancel Contrary Motion);
	}
}

rule("bots control switch rings")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create Effect(All Players(All Teams), Ring, Yellow, Global.A[4], 1, Visible To Position and Radius);
		Create Effect(All Players(All Teams), Ring, White, Global.A[5], 1, Visible To Position and Radius);
		Create In-World Text(All Players(All Teams), String("Next Level"), Global.A[4], 1, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), String("Off"), Global.A[5], 1, Clip Against Surfaces, Visible To Position and String,
			White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("Bots Healing"), Vector(89.169, 8.548, -38.531), 1.500, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
		Create Effect(All Players(All Teams), Ring, Green, Global.A[6], 1, Visible To Position and Radius);
		Create Effect(All Players(All Teams), Ring, White, Global.A[7], 1, Visible To Position and Radius);
		Create In-World Text(All Players(All Teams), String("Next Level"), Global.A[6], 1, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), String("Normal"), Global.A[7], 1, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), Custom String("Bots Speed"), Vector(89.365, 8.452, -48.086), 1.500, Do Not Clip,
			Visible To Position and String, White, Default Visibility);
	}
}

rule("bots healing add")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Distance Between(Event Player, Global.A[4]) <= Absolute Value(1.500);
		Is Crouching(Event Player) == True;
	}

	actions
	{
		Start Heal Over Time(All Players(Team 2), Null, 9999, 20);
		Play Effect(All Players(All Teams), Buff Impact Sound, White, Event Player, 20);
		Global.R  = 20;
	}
}

rule("bots healing off")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Distance Between(Event Player, Global.A[5]) <= Absolute Value(1.500);
		Is Crouching(Event Player) == True;
	}

	actions
	{
		Stop All Heal Over Time(All Players(Team 2));
		Play Effect(All Players(All Teams), Ring Explosion Sound, White, Event Player, 20);
		Global.R = 0;
	}
}

rule("healing speed hud")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create In-World Text(All Players(All Teams), String("{0} sec", Global.R), Vector(89.494, 8.551, -41.623), 2, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(All Teams), String("{0}%", Global.C), Vector(89.555, 8.399, -49.918), 2, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
	}
}

rule("bots speed add")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Distance Between(Event Player, Global.A[6]) <= Absolute Value(1.500);
		Is Crouching(Event Player) == True;
	}

	actions
	{
		Global.C  = 10;
		Play Effect(All Players(All Teams), Buff Impact Sound, White, Event Player, 200);
		Set Move Speed(All Players(Team 2), Global.C);
	}
}

rule("bots speed reset")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Distance Between(Event Player, Global.A[7]) <= Absolute Value(1.500);
		Is Crouching(Event Player) == True;
	}

	actions
	{
		Global.C = 10;
		Play Effect(All Players(All Teams), Ring Explosion Sound, White, Event Player, 200);
		Set Move Speed(All Players(Team 2), Global.C);
	}
}

rule("slow mo")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Is Button Held(Event Player, Interact) == True;
	}

	actions
	{
		Set Slow Motion(20);
	}
}

rule("reset slow mo")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Is Button Held(Event Player, Interact) == False;
	}

	actions
	{
		Set Slow Motion(100);
	}
}

rule("player var")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	actions
	{
		Event Player.V = False;
		Event Player.Z = Absolute Value(0);
	}
}

rule("start score count")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Is Button Held(Event Player, Interact) == True;
		Distance Between(Event Player, Global.P) <= Absolute Value(3.500);
		Event Player.V == False;
	}

	actions
	{
		Event Player.S = 0;
		Event Player.T = 60;
		Chase Player Variable At Rate(Event Player, T, 0, 1, Destination and Rate);
		Event Player.V = True;
		Big Message(Event Player, String("Started"));
		Play Effect(Event Player, Ring Explosion Sound, White, Event Player, 60);
		Play Effect(All Players(All Teams), Good Explosion, Blue, Event Player, 3);
	}
}

rule("player gain score normal kill")
{
	event
	{
		Player Dealt Final Blow;
		All;
		All;
	}

	conditions
	{
		Event Player.V == True;
	}

	actions
	{
		Event Player.S  = 2;
	}
}

rule("player gain score dmg")
{
	event
	{
		Player Dealt Damage;
		All;
		All;
	}

	conditions
	{
		Event Player.V == True;
	}

	actions
	{
		Event Player.S  = Event Damage / 4;
	}
}

rule("player gain score crit kill")
{
	event
	{
		Player Dealt Final Blow;
		All;
		All;
	}

	conditions
	{
		Event Player.V == True;
		Event Was Critical Hit == True;
	}

	actions
	{
		Event Player.S  = 20;
	}
}

rule("player gain score distance kill")
{
	event
	{
		Player Dealt Final Blow;
		All;
		All;
	}

	conditions
	{
		Event Player.V == True;
		Distance Between(Event Player, Victim) > Absolute Value(25);
	}

	actions
	{
		Event Player.S  = 10;
	}
}

rule("game over")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Event Player.T == Absolute Value(0);
	}

	actions
	{
		Event Player.V = False;
		Big Message(Event Player, String("{0} {1}", String("Game"), String("Over")));
		Play Effect(Event Player, Debuff Impact Sound, White, Event Player, 100);
		Play Effect(All Players(All Teams), Bad Explosion, Red, Event Player, 3);
	}
}

rule("hud")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	actions
	{
		Create HUD Text(Event Player, String("{0} sec", Event Player.T), Null, Null, Top, 0, Yellow, White, White, Visible To and String,
			Default Visibility);
		Create HUD Text(Event Player, String("{0}: {1}", String("Score"), Event Player.S), Null, Null, Right, 0, Green, White, White,
			Visible To and String, Default Visibility);
		Create HUD Text(Event Player, String("{0} {1} {2}", Custom String("Your "), Custom String("Best Score"), Event Player.Z), Null,
			Null, Left, 2, White, White, White, Visible To and String, Default Visibility);
		Create HUD Text(Event Player, String("{0} {1} {2}", Global.E, String("{0} - {1}", Hero Icon String(Global.H), String("{0} {1}",
			String("Best"), String("Score"))), Global.Z), Null, Null, Left, 0, Blue, White, White, Visible To and String,
			Default Visibility);
	}
}

rule("compare score player")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Event Player.S > Event Player.Z;
	}

	actions
	{
		Event Player.Z = Event Player.S;
	}
}

rule("compare score lobby")
{
	event
	{
		Ongoing - Each Player;
		All;
		All;
	}

	conditions
	{
		Event Player.S > Global.Z;
	}

	actions
	{
		Global.Z = Event Player.S;
		Global.E = Event Player;
		Global.H = Hero Of(Event Player);
	}
}

rule("Air movement on")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Global.G == False;
		Is Communicating(Event Player, Group Up) == True;
	}

	actions
	{
		Global.X = False;
		Global.G = True;
		Global.C = 100;
		Set Move Speed(All Players(Team 2), Global.C);
		Global.I = False;
		Play Effect(All Players(All Teams), Buff Explosion Sound, White, Event Player, 60);
		Wait(7, Ignore Condition);
		Stop Throttle In Direction(All Players(Team 2));
	}
}

rule("Air movement off")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Global.G == True;
		Is Communicating(Event Player, Thanks) == True;
	}

	actions
	{
		Global.G = False;
		Play Effect(All Players(All Teams), Explosion Sound, White, Event Player, 80);
	}
}

rule("air movement")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		All;
	}

	conditions
	{
		Global.G == True;
	}

	actions
	{
		Apply Impulse(Event Player, Up, Random Real(6, 14), To World, Incorporate Contrary Motion);
		Wait(0.250, Ignore Condition);
		Apply Impulse(Event Player, Left, Random Real(-8, 8), To Player, Incorporate Contrary Motion);
		Wait(0.250, Ignore Condition);
		Apply Impulse(Event Player, Forward, Random Real(-8, 8), To Player, Incorporate Contrary Motion);
		Wait(Random Real(1, 2), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("player end score")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Event Player.V == True;
		Is Button Held(Event Player, Interact) == True;
		Is Crouching(Event Player) == True;
	}

	actions
	{
		Event Player.T = 0;
	}
}

rule("dummy bots")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create Dummy Bot(Hero(Ana), Team 2, 3, Vector(140.607, 7.545, -40.398), Vector(0, 0, 0));
		Create Dummy Bot(Hero(Sombra), Team 2, 4, Vector(139.908, 7.612, -49.678), Vector(0, 0, 0));
		Create Dummy Bot(Hero(Tracer), Team 2, 0, Global.A[3], Vector(0, 0, 0));
		Players In Slot(1, Team 2).F = False;
	}
}

rule("tracer strafe")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Tracer;
	}

	conditions
	{
		Is Alive(Event Player) == True;
		Global.T != True;
	}

	actions
	{
		Start Throttle In Direction(Event Player, Vector(Random Integer(-1, 1), 0, Random Integer(-1, 1)), 100, To Player,
			Replace existing throttle, Direction and Magnitude);
		Wait(Random Real(0.200, 1), Ignore Condition);
		Start Throttle In Direction(Event Player, Vector(Random Integer(-1, 1), 0, Random Integer(-1, 1)), 100, To Player,
			Replace existing throttle, Direction and Magnitude);
		Wait(Random Real(0.200, 1), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("tracer dash")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Tracer;
	}

	conditions
	{
		Global.T != True;
		Is Alive(Event Player) == True;
	}

	actions
	{
		Press Button(Event Player, Ability 1);
		Wait(Random Real(0.500, 4), Ignore Condition);
		Loop;
	}
}

rule("tracer racall")
{
	event
	{
		Player Took Damage;
		Team 2;
		Tracer;
	}

	conditions
	{
		Health(Event Player) < Random Real(70, 120);
	}

	actions
	{
		Press Button(Event Player, Ability 2);
		Wait(4, Ignore Condition);
	}
}

rule("ai swap ring")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create Effect(All Players(Team 1), Ring, Red, Global.J[0], 1, Visible To Position and Radius);
		Create Effect(All Players(Team 1), Ring, Red, Global.J[1], 1, Visible To Position and Radius);
		Create Effect(All Players(Team 1), Ring, Red, Global.J[2], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), Hero Icon String(Hero(Genji)), Global.J[0], 1, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(Team 1), Hero Icon String(Hero(Doomfist)), Global.J[1], 1, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(Team 1), Hero Icon String(Hero(Pharah)), Global.J[2], 1, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(Team 1), String("{0} {1}", Custom String("Remove"), String("Hero")), Global.J[3], 1,
			Clip Against Surfaces, Visible To Position and String, White, Default Visibility);
		Create Effect(All Players(Team 1), Ring, White, Global.J[3], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), String("{0} {1}", Custom String("Random bot"), String("Hero")), Global.J[4], 1,
			Clip Against Surfaces, Visible To Position and String, White, Default Visibility);
		Create Effect(All Players(Team 1), Ring, Orange, Global.J[4], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), Custom String("Bots Higher Damage"), Global.J[5], 1, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
		Create Effect(All Players(Team 1), Ring, Red, Global.J[5], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), String("{0} {1}", Custom String("Bots lower"), String("Damage")), Global.J[6], 1,
			Clip Against Surfaces, Visible To Position and String, White, Default Visibility);
		Create Effect(All Players(Team 1), Ring, Orange, Global.J[6], 1, Visible To Position and Radius);
		Create In-World Text(All Players(All Teams), String("{0}%", Global.D), Global.J[7], 1, Clip Against Surfaces,
			Visible To Position and String, Red, Default Visibility);
		Create In-World Text(All Players(Team 1), String("{0} {1}", Hero(Ana), String("Sleep")), Global.J[8], 1, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
		Create Effect(All Players(Team 1), Ring, Red, Global.J[8], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), String("{0} {1}", String("No"), String("Sleep")), Global.J[9], 1, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
		Create Effect(All Players(Team 1), Ring, White, Global.J[9], 1, Visible To Position and Radius);
		Create Effect(All Players(Team 1), Ring, Blue, Global.J[10], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), String("{0} - {1}", String("Teammate"), Hero(Mercy)), Global.J[10], 1,
			Clip Against Surfaces, Visible To Position and String, White, Default Visibility);
		Create Effect(All Players(Team 1), Ring, White, Global.J[11], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), String("{0} - {1}", String("No"), Hero(Mercy)), Global.J[11], 1, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
		Create Effect(All Players(Team 1), Ring, Red, Global.J[12], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), String("{0} - {1}", String("Enemy"), Hero(Mercy)), Global.J[12], 1,
			Clip Against Surfaces, Visible To Position and String, White, Default Visibility);
		Create Effect(All Players(Team 1), Ring, White, Global.J[13], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), String("{0} - {1}", String("No"), Hero(Mercy)), Global.J[13], 1, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
		Create Effect(All Players(Team 1), Ring, Orange, Global.J[14], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), String("{0} - {1}", Custom String("Enable Random"), String("Hero")), Global.J[14], 1,
			Clip Against Surfaces, Visible To Position and String, White, Default Visibility);
		Create Effect(All Players(Team 1), Ring, Blue, Global.J[15], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), String("{0} - {1}", String("Next Hero"), Global.L[Global.B]), Global.J[15], 1,
			Clip Against Surfaces, Visible To Position and String, Sky Blue, Default Visibility);
		Create Effect(All Players(Team 1), Ring, Red, Global.J[16], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), Custom String("Bots Attack On"), Global.J[16], 1, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
		Create Effect(All Players(Team 1), Ring, Blue, Global.J[17], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), Custom String("Bots Attack Off"), Global.J[17], 1, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
		Create Effect(All Players(Team 1), Ring, Purple, Global.J[18], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), String("{0} - {1}", Custom String("Bots Allowed Radius"), Global.Y), Global.J[18], 1,
			Clip Against Surfaces, Visible To Position and String, Blue, Default Visibility);
		Create Effect(All Players(Team 1), Ring, Red, Global.J[19], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), Custom String("Tracer Chase On"), Global.J[19], 1, Clip Against Surfaces,
			Visible To Position and String, Orange, Default Visibility);
		Create Effect(All Players(Team 1), Ring, White, Global.J[20], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), Custom String("Tracer Chase OFF"), Global.J[20], 1, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(Team 1), String("{0} - {1}", String("Current Hero"), Hero Icon String(Hero Of(Players In Slot(4,
			Team 2)))), Global.J[21], 1, Clip Against Surfaces, Visible To Position and String, Yellow, Default Visibility);
		Create In-World Text(All Players(Team 1), Custom String("Bots with ablities!"), Global.J[1]   Vector(0, 2, 0), 1,
			Clip Against Surfaces, Visible To Position and String, Red, Default Visibility);
	}
}

rule("spawn genji")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Is Crouching(Event Player) == True;
		Distance Between(Event Player, Global.J[0]) <= Absolute Value(1.500);
	}

	actions
	{
		Play Effect(All Players(All Teams), Buff Impact Sound, White, Event Player, 80);
		Destroy Dummy Bot(Team 2, Absolute Value(1));
		Wait(0.250, Ignore Condition);
		Create Dummy Bot(Hero(Genji), Team 2, Absolute Value(1), Global.A[3], Vector(0, 0, 0));
		Global.S = False;
		Set Damage Dealt(Players In Slot(1, Team 2), Global.D);
	}
}

rule("spawn doomfist")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Is Crouching(Event Player) == True;
		Distance Between(Event Player, Global.J[1]) <= Absolute Value(1.500);
	}

	actions
	{
		Play Effect(All Players(All Teams), Buff Impact Sound, White, Event Player, 80);
		Destroy Dummy Bot(Team 2, Absolute Value(1));
		Wait(0.250, Ignore Condition);
		Create Dummy Bot(Hero(Doomfist), Team 2, Absolute Value(1), Global.A[3], Vector(0, 0, 0));
		Global.S = False;
		Set Damage Dealt(Players In Slot(1, Team 2), Global.D);
	}
}

rule("spawn pharah")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Is Crouching(Event Player) == True;
		Distance Between(Event Player, Global.J[2]) <= Absolute Value(1.500);
	}

	actions
	{
		Play Effect(All Players(All Teams), Buff Impact Sound, White, Event Player, 80);
		Destroy Dummy Bot(Team 2, Absolute Value(1));
		Wait(0.250, Ignore Condition);
		Create Dummy Bot(Hero(Pharah), Team 2, Absolute Value(1), Global.A[3], Vector(0, 0, 0));
		Global.S = False;
		Set Damage Dealt(Players In Slot(1, Team 2), Global.D);
	}
}

rule("slot1 strafe")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Slot 1;
	}

	conditions
	{
		Is Using Ultimate(Event Player) == False;
	}

	actions
	{
		Start Throttle In Direction(Event Player, Vector(Random Integer(0, 100), 0, Random Integer(0, 100)), 1, To Player,
			Replace existing throttle, Direction and Magnitude);
		Wait(Random Real(0.180, 1.200), Ignore Condition);
		Start Throttle In Direction(Event Player, Vector(Random Integer(-100, 0), 0, Random Integer(-100, 0)), 1, To Player,
			Replace existing throttle, Direction and Magnitude);
		Wait(Random Real(0.180, 1.200), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("slot1 facing")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Slot 1;
	}

	conditions
	{
		Event Player.F == False;
		Is Using Ultimate(Event Player) == False;
	}

	actions
	{
		Set Facing(Event Player, Vector(Random Integer(-100, 100), 0, Random Real(-100, 100)), To Player);
		Wait(Random Real(1.500, 5), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("genji double jump")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Genji;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Genji);
		Is Alive(Event Player) == True;
	}

	actions
	{
		Press Button(Event Player, Jump);
		Wait(Random Real(0.100, 0.800), Ignore Condition);
		Press Button(Event Player, Jump);
		Wait(Random Integer(0.300, 3.500), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("genji dash")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Genji;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Genji);
		Is Alive(Event Player) == True;
	}

	actions
	{
		Wait(Random Integer(0.200, 0.600), Ignore Condition);
		If(Is Using Ultimate(Event Player) == True);
			Press Button(Event Player, Ability 1);
			Wait(Random Integer(0.200, 1.800), Ignore Condition);
			Loop If Condition Is True;
		Else;
			Wait(Random Integer(2, 8), Ignore Condition);
			Press Button(Event Player, Ability 1);
			Loop If Condition Is True;
	}
}

rule("genji deflect")
{
	event
	{
		Player Took Damage;
		Team 2;
		Genji;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Genji);
		Is Using Ultimate(Event Player) != True;
		Is Alive(Event Player) == True;
	}

	actions
	{
		Event Player.F = True;
		Start Facing(Event Player, Direction Towards(Event Player, Attacker), 10000, To World, Direction and Turn Rate);
		Wait(Random Real(0.100, 0.500), Ignore Condition);
		Press Button(Event Player, Ability 2);
		Wait(2, Ignore Condition);
		Stop Facing(Event Player);
		Event Player.F = False;
		Wait(Random Real(3, 5), Ignore Condition);
	}
}

rule("pharah fly")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Pharah;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Pharah);
		Is In Air(Event Player) == True;
		Is Alive(Event Player) == True;
	}

	actions
	{
		Start Holding Button(Event Player, Jump);
		Wait(Random Real(0.120, 0.800), Ignore Condition);
		Stop Holding Button(Event Player, Jump);
		Wait(Random Real(0.125, 0.900), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("pharah rocket jump")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Pharah;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Pharah);
	}

	actions
	{
		Press Button(Event Player, Ability 1);
		Wait(Random Real(3, 9), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("doomfist combo")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Doomfist;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Doomfist);
		Global.botattack == True;
		Array Contains(Players Within Radius(Event Player, 25, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
		Is Alive(Event Player) == True;
	}

	actions
	{
		Wait(Random Real(1.600, 3), Ignore Condition);
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 25, Team 1, Surfaces), Is Alive(
			Current Array Element)), Distance Between(Event Player, Current Array Element));
		Abort If(First Of(Event Player.A) == Null);
		Event Player.F = True;
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Event Player.A))), Random Integer(
			200, 1200), To World, Direction and Turn Rate);
		Wait(0.100, Ignore Condition);
		Press Button(Event Player, Ability 2);
		Wait(Random Real(0.600, 1.500), Ignore Condition);
		Press Button(Event Player, Ability 1);
		Wait(Random Real(0.600, 2), Ignore Condition);
		Stop Facing(Event Player);
		If(Is In Line of Sight(Eye Position(Event Player), Eye Position(Closest Player To(Event Player, Team 1)),
			Barriers Do Not Block LOS) == True);
			disabled Skip If(Is In Line of Sight(Event Player, Closest Player To(Event Player, Team 1), Barriers Do Not Block LOS), 1);
			disabled Skip(7);
			Start Holding Button(Event Player, Secondary Fire);
			Start Facing(Event Player, Direction Towards(Event Player, Closest Player To(Event Player, Team 1)), 10000, To World,
				Direction and Turn Rate);
			Wait(Random Real(0.400, 1.300), Ignore Condition);
			Stop Holding Button(Event Player, Secondary Fire);
			Stop Facing(Event Player);
			Event Player.F = False;
			Loop If Condition Is True;
		Else;
			Event Player.F = False;
			Loop If Condition Is True;
	}
}

rule("Doomfist primary fire")
{
	event
	{
		Player Dealt Damage;
		Team 2;
		Doomfist;
	}

	conditions
	{
		Is Button Held(Event Player, Primary Fire) == False;
	}

	actions
	{
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Closest Player To(Event Player, Team 1))),
			400, To World, Direction and Turn Rate);
		Start Holding Button(Event Player, Primary Fire);
		Wait(Random Real(2, 1.500), Ignore Condition);
		Stop Holding Button(Event Player, Primary Fire);
		Wait(1.500, Ignore Condition);
	}
}

rule("pharah rocket jump ground")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Pharah;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Pharah);
		Is On Ground(Event Player) == True;
	}

	actions
	{
		Wait(Random Real(0.500, 2.500), Ignore Condition);
		Press Button(Event Player, Ability 1);
	}
}

rule("remove slot 1hero")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Is Crouching(Event Player) == True;
		Distance Between(Event Player, Global.J[3]) <= Absolute Value(1.500);
	}

	actions
	{
		Destroy Dummy Bot(Team 2, 1);
		Play Effect(All Players(All Teams), Explosion Sound, White, Event Player, 80);
		Global.S = False;
	}
}

rule("pharah blast")
{
	event
	{
		Player Took Damage;
		Team 2;
		Pharah;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Pharah);
		Global.botattack == True;
		Is Alive(Event Player) == True;
	}

	actions
	{
		Event Player.F = True;
		Wait(Random Real(0.200, 1), Ignore Condition);
		Start Facing(Event Player, Direction Towards(Event Player, Attacker), 10000, To World, Direction and Turn Rate);
		Press Button(Event Player, Ability 2);
		Wait(0.300, Ignore Condition);
		Stop Facing(Event Player);
		Event Player.F = False;
		Wait(5, Ignore Condition);
	}
}

rule("auto switch hero switchs")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Is Crouching(Event Player) == True;
		Distance Between(Event Player, Global.J[4]) <= Absolute Value(1.500);
	}

	actions
	{
		Global.S = True;
		Play Effect(All Players(All Teams), Ring Explosion Sound, White, Event Player, 80);
		Create Dummy Bot(Random Value In Array(Global.O), Team 2, Absolute Value(1), Global.A[3], Vector(0, 0, 0));
		Set Damage Dealt(Players In Slot(1, Team 2), Global.D);
	}
}

rule("auto switch hero on")
{
	event
	{
		Player Dealt Final Blow;
		Team 1;
		All;
	}

	conditions
	{
		Global.S == True;
		Victim == Players In Slot(1, Team 2);
	}

	actions
	{
		Wait(1, Ignore Condition);
		Destroy Dummy Bot(Team 2, 1);
		Wait(0.500, Ignore Condition);
		Create Dummy Bot(Random Value In Array(Global.O), Team 2, Absolute Value(1), Global.A[3], Vector(0, 0, 0));
		Set Damage Dealt(Players In Slot(1, Team 2), Global.D);
	}
}

rule("bots Higher Damage")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Is Crouching(Event Player) == True;
		Distance Between(Event Player, Global.J[5]) <= Absolute Value(1.500);
	}

	actions
	{
		Global.D  = 20;
		Play Effect(All Players(All Teams), Debuff Impact Sound, White, Event Player, 80);
		Set Damage Dealt(All Players(Team 2), Global.D);
	}
}

rule("bots Lower Damage")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Is Crouching(Event Player) == True;
		Distance Between(Event Player, Global.J[6]) <= Absolute Value(1.500);
	}

	actions
	{
		Global.D -= 20;
		Play Effect(All Players(All Teams), Buff Impact Sound, White, Event Player, 80);
		Set Damage Dealt(All Players(Team 2), Global.D);
	}
}

rule("genji deflect2- close proximity")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Genji;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Genji);
		Distance Between(Event Player, Closest Player To(Event Player, Team 1)) <= Absolute Value(10);
		Is Using Ultimate(Event Player) != True;
	}

	actions
	{
		Event Player.F = True;
		Event Player.C = Random Integer(0, 2);
		Start Facing(Event Player, Direction Towards(Event Player, Closest Player To(Event Player, Team 1)), 10000, To World,
			Direction and Turn Rate);
		Skip If(Event Player.C == 1, 1);
		Press Button(Event Player, Ability 2);
		Wait(2.500, Ignore Condition);
		Stop Facing(Event Player);
		Event Player.F = False;
		Wait(Random Real(3, 6), Ignore Condition);
	}
}

rule("Tracer facing")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Tracer;
	}

	conditions
	{
		Distance Between(Event Player, Closest Player To(Event Player, Team 1)) <= Absolute Value(25);
		Global.T != True;
	}

	actions
	{
		Start Facing(Event Player, Direction Towards(Event Player, Closest Player To(Event Player, Team 1)), 100, To World,
			Direction and Turn Rate);
		Wait(Random Real(4, 8), Ignore Condition);
		Stop Facing(Event Player);
		Wait(Random Real(1, 3), Ignore Condition);
	}
}

rule("Ana sleep ON")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Is Crouching(Event Player) == True;
		Distance Between(Event Player, Global.J[8]) <= Absolute Value(1.500);
		Global.F != True;
	}

	actions
	{
		Global.F = True;
		Play Effect(All Players(All Teams), Debuff Impact Sound, White, Event Player, 80);
	}
}

rule("Ana sleep OFF")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Is Crouching(Event Player) == True;
		Distance Between(Event Player, Global.J[9]) <= Absolute Value(1.500);
		Global.F != False;
	}

	actions
	{
		Global.F = False;
		Play Effect(All Players(All Teams), Ring Explosion Sound, White, Event Player, 80);
	}
}

rule("Ana sleep dart")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Ana;
	}

	conditions
	{
		Global.F == True;
	}

	actions
	{
		Skip If(Distance Between(Event Player, Closest Player To(Event Player, Team 1)) >= 14, 8);
		Skip If(Is In Line of Sight(Event Player, Closest Player To(Event Player, Team 1), Barriers Do Not Block LOS), 1);
		Skip(6);
		Start Facing(Event Player, Direction Towards(Event Player, Closest Player To(Event Player, Team 1)), 10000, To World,
			Direction and Turn Rate);
		Wait(Random Real(0.100, 2), Ignore Condition);
		Press Button(Event Player, Ability 1);
		Wait(0.500, Ignore Condition);
		Stop Facing(Event Player);
		Wait(Random Real(2.500, 6), Ignore Condition);
		Wait(1, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("wake from sleep dart")
{
	event
	{
		Player Took Damage;
		Team 1;
		All;
	}

	conditions
	{
		Hero Of(Attacker) == Hero(Ana);
	}

	actions
	{
		Wait(1, Ignore Condition);
		Damage(Event Player, Players In Slot(4, Team 2), 5);
	}
}

rule("MERCY FOLLOWS YOU")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Mercy;
	}

	conditions
	{
		Is Dummy Bot(Event Player) == True;
		Is Alive(Event Player) == True;
	}

	actions
	{
		Start Throttle In Direction(Event Player, Direction Towards(Position Of(Event Player), Nearest Walkable Position(World Vector Of(
			Vector(Random Real(-2, 2), 0, Random Real(-2, -3)), First Of(Remove From Array(Sorted Array(Players Within Radius(Position Of(
			Event Player), 1000, Team Of(Event Player), Off), Distance Between(Position Of(Event Player), Position Of(
			Current Array Element))), Event Player)), Rotation And Translation))), 1, To World, Replace existing throttle, None);
		Wait(1, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("MERCY FACES YOU")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Mercy;
	}

	conditions
	{
		Is Dummy Bot(Event Player) == True;
	}

	actions
	{
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Remove From Array(Sorted Array(
			Players Within Radius(Position Of(Event Player), 1000, Team Of(Event Player), Surfaces), Distance Between(Position Of(
			Event Player), Position Of(Current Array Element))), Event Player)))), 250, To World, Direction and Turn Rate);
	}
}

rule("MERCY RANDOMLY JUMPS")
{
	event
	{
		Ongoing - Each Player;
		All;
		Mercy;
	}

	conditions
	{
		Is Dummy Bot(Event Player) == True;
		Is Alive(Event Player) == True;
		Is On Ground(Event Player) == True;
	}

	actions
	{
		Wait(Random Integer(1, 5), Ignore Condition);
		Press Button(Event Player, Jump);
		Loop If Condition Is True;
	}
}

rule("MERCY HEALS YOU")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Mercy;
	}

	conditions
	{
		Is Dummy Bot(Event Player) == True;
		Is Alive(Event Player) == True;
		Normalized Health(First Of(Remove From Array(Sorted Array(Players Within Radius(Position Of(Event Player), 1000, Team Of(
			Event Player), Off), Distance Between(Position Of(Event Player), Position Of(Current Array Element))), Event Player))) < 1;
	}

	actions
	{
		Stop Holding Button(Event Player, Secondary Fire);
		Start Holding Button(Event Player, Primary Fire);
	}
}

rule("MERCY DAMAGE BOOSTS YOU")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Mercy;
	}

	conditions
	{
		Is Dummy Bot(Event Player) == True;
		Is Alive(Event Player) == True;
		Normalized Health(First Of(Remove From Array(Sorted Array(Players Within Radius(Position Of(Event Player), 1000, Team Of(
			Event Player), Off), Distance Between(Position Of(Event Player), Position Of(Current Array Element))), Event Player))) == 1;
	}

	actions
	{
		Stop Holding Button(Event Player, Primary Fire);
		Start Holding Button(Event Player, Secondary Fire);
	}
}

rule("MERCY USES ABILITIES")
{
	event
	{
		Ongoing - Each Player;
		All;
		Mercy;
	}

	actions
	{
		Stop Holding Button(Event Player, Ability 1);
		Stop Holding Button(Event Player, Ability 2);
		Wait(0.020, Ignore Condition);
		Start Holding Button(Event Player, Ability 1);
		Start Holding Button(Event Player, Ability 2);
	}
}

rule("MERCY USES ANGELIC DESCENT")
{
	event
	{
		Ongoing - Each Player;
		All;
		Mercy;
	}

	conditions
	{
		Is Dummy Bot(Event Player) == True;
		Is In Air(Event Player) == True;
	}

	actions
	{
		Start Holding Button(Event Player, Jump);
	}
}

rule("MERCY STOPS USING ANGELIC DESCENT")
{
	event
	{
		Ongoing - Each Player;
		All;
		Mercy;
	}

	conditions
	{
		Is Dummy Bot(Event Player) == True;
		Is Alive(Event Player) == True;
		Is In Air(Event Player) == False;
	}

	actions
	{
		Stop Holding Button(Event Player, Jump);
	}
}

rule("tp Mercy back to point")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Mercy;
	}

	conditions
	{
		Distance Between(Event Player, Global.A[10]) > Absolute Value(20);
	}

	actions
	{
		Teleport(Event Player, Nearest Walkable Position(Global.A[10]));
		Apply Impulse(Event Player, Left, Random Integer(-20, 20), To Player, Cancel Contrary Motion);
	}
}

rule("Spawn friendly mercy")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Is Crouching(Event Player) == True;
		Distance Between(Event Player, Global.J[10]) <= Absolute Value(1.500);
	}

	actions
	{
		Play Effect(All Players(All Teams), Buff Impact Sound, White, Event Player, 80);
		Destroy Dummy Bot(Team 1, Absolute Value(5));
		Wait(0.250, Ignore Condition);
		Create Dummy Bot(Hero(Mercy), Team 1, Absolute Value(5), Global.A[10], Vector(0, 0, 0));
	}
}

rule("remove friendly mercy")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Is Crouching(Event Player) == True;
		Distance Between(Event Player, Global.J[11]) <= Absolute Value(1.500);
	}

	actions
	{
		Destroy Dummy Bot(Team 1, 5);
		Play Effect(All Players(All Teams), Explosion Sound, White, Event Player, 80);
	}
}

rule("Spawn enemy mercy")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Is Crouching(Event Player) == True;
		Distance Between(Event Player, Global.J[12]) <= Absolute Value(1.500);
	}

	actions
	{
		Play Effect(All Players(All Teams), Buff Impact Sound, White, Event Player, 80);
		Destroy Dummy Bot(Team 2, Absolute Value(2));
		Wait(0.250, Ignore Condition);
		Create Dummy Bot(Hero(Mercy), Team 2, Absolute Value(2), Global.A[3], Vector(0, 0, 0));
	}
}

rule("remove enemy mercy")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Is Crouching(Event Player) == True;
		Distance Between(Event Player, Global.J[13]) <= Absolute Value(1.500);
	}

	actions
	{
		Destroy Dummy Bot(Team 2, 2);
		Play Effect(All Players(All Teams), Explosion Sound, White, Event Player, 80);
	}
}

rule("MERCY FOLLOWS Team2")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Mercy;
	}

	conditions
	{
		Is Alive(Event Player) == True;
	}

	actions
	{
		Skip If(Global.checkdummy == True, 3);
		Start Throttle In Direction(Event Player, Direction Towards(Position Of(Event Player), Nearest Walkable Position(World Vector Of(
			Vector(Random Real(-2, 2), 0, Random Real(-2, -3)), First Of(Remove From Array(Sorted Array(Players Within Radius(Position Of(
			Event Player), 1000, Team Of(Event Player), Off), Distance Between(Position Of(Event Player), Position Of(
			Current Array Element))), Event Player)), Rotation And Translation))), 1, To World, Replace existing throttle, None);
		Wait(1, Ignore Condition);
		Skip(2);
		Start Throttle In Direction(Event Player, Direction Towards(Position Of(Event Player), Nearest Walkable Position(World Vector Of(
			Vector(Random Real(-2, 2), 0, Random Real(-2, -3)), Players In Slot(1, Team 2), Rotation And Translation))), 1, To World,
			Replace existing throttle, None);
		Wait(1, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("MERCY FACES Team2")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Mercy;
	}

	conditions
	{
		Is Hero Being Played(Hero(Pharah), Team 2) == False;
	}

	actions
	{
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Remove From Array(Sorted Array(
			Players Within Radius(Position Of(Event Player), 1000, Team Of(Event Player), Surfaces), Distance Between(Position Of(
			Event Player), Position Of(Current Array Element))), Event Player)))), 250, To World, Direction and Turn Rate);
		Wait(2, Ignore Condition);
		Stop Facing(Event Player);
		Loop If Condition Is True;
	}
}

rule("MERCY FACES slot1(Pharah)")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Mercy;
	}

	conditions
	{
		Is Hero Being Played(Hero(Pharah), Team 2) == True;
	}

	actions
	{
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Players In Slot(1, Team 2))), 1000, To World,
			Direction and Turn Rate);
		Wait(2, Ignore Condition);
		Stop Facing(Event Player);
		Loop If Condition Is True;
	}
}

rule("MERCY HEALS Team2")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Mercy;
	}

	conditions
	{
		Is Alive(Event Player) == True;
	}

	actions
	{
		Start Holding Button(Event Player, Primary Fire);
		Wait(3, Ignore Condition);
		Stop Holding Button(Event Player, Primary Fire);
		Wait(0.400, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("I need healing reset cooldown ultcharge and health")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Is Communicating(Event Player, Need Healing) == True;
	}

	actions
	{
		Play Effect(Event Player, Buff Impact Sound, White, Event Player, 70);
		Event Player.H = Hero Of(Event Player);
		Wait(0.100, Ignore Condition);
		Start Forcing Player To Be Hero(Event Player, Hero(Zenyatta));
		Wait(0.100, Ignore Condition);
		Start Forcing Player To Be Hero(Event Player, Event Player.H);
		Set Ultimate Charge(Event Player, 100);
		Wait(0.100, Ignore Condition);
		Stop Forcing Player To Be Hero(Event Player);
	}
}

rule("ana facing2")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Ana;
	}

	conditions
	{
		Distance Between(Event Player, Closest Player To(Event Player, Team 1)) < Absolute Value(50);
	}

	actions
	{
		Event Player.D = True;
		Start Facing(Event Player, Direction Towards(Event Player, Closest Player To(Event Player, Team 1)), 80, To World,
			Direction and Turn Rate);
		Wait(Random Real(3, 5), Ignore Condition);
		Stop Facing(Event Player);
		Wait(Random Real(1, 2), Ignore Condition);
		Event Player.D = False;
		Loop If Condition Is True;
	}
}

rule("slot 4 facing2")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Slot 4;
	}

	conditions
	{
		Distance Between(Event Player, Closest Player To(Event Player, Team 1)) < Absolute Value(60);
		Hero Of(Event Player) != Hero(McCree);
		Hero Of(Event Player) != Hero(Hanzo);
		Hero Of(Event Player) != Hero(Widowmaker);
		Hero Of(Event Player) != Hero(Soldier: 76);
		Event Player.F != True;
	}

	actions
	{
		Event Player.D = True;
		Start Facing(Event Player, Direction Towards(Event Player, Closest Player To(Event Player, Team 1)), 80, To World,
			Direction and Turn Rate);
		Wait(Random Real(3, 6), Ignore Condition);
		Stop Facing(Event Player);
		Wait(Random Real(1, 2), Ignore Condition);
		Event Player.D = False;
		Loop If Condition Is True;
	}
}

rule("strafe ana front and back")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Ana;
	}

	actions
	{
		Start Throttle In Direction(Event Player, Vector(0, 0, 1), 1, To Player, Replace existing throttle, Direction and Magnitude);
		Wait(Random Real(0.250, 1.200), Ignore Condition);
		Start Throttle In Direction(Event Player, Vector(0, 0, -1), 1, To Player, Replace existing throttle, Direction and Magnitude);
		Wait(Random Real(1.800, 2.500), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("strafe slot4 front and back")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Slot 4;
	}

	actions
	{
		Start Throttle In Direction(Event Player, Vector(0, 0, 1), 1, To Player, Replace existing throttle, Direction and Magnitude);
		Wait(Random Real(0.250, 1.200), Ignore Condition);
		Start Throttle In Direction(Event Player, Vector(0, 0, -1), 1, To Player, Replace existing throttle, Direction and Magnitude);
		Wait(Random Real(1, 2), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("auto switch slot 4 hero switchs")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Is Crouching(Event Player) == True;
		Distance Between(Event Player, Global.J[14]) <= Absolute Value(1.500);
	}

	actions
	{
		Destroy Dummy Bot(Team 2, 4);
		Wait(0.100, Ignore Condition);
		Global.K = True;
		Play Effect(All Players(All Teams), Ring Explosion Sound, White, Event Player, 80);
		Create Dummy Bot(Random Value In Array(Global.L), Team 2, Absolute Value(4), Global.A[3], Vector(0, 0, 0));
	}
}

rule("auto switch hero on")
{
	event
	{
		Player Dealt Final Blow;
		Team 1;
		All;
	}

	conditions
	{
		Global.K == True;
		Victim == Players In Slot(4, Team 2);
	}

	actions
	{
		Wait(1, Ignore Condition);
		Destroy Dummy Bot(Team 2, 4);
		Wait(0.500, Ignore Condition);
		Create Dummy Bot(Random Value In Array(Global.L), Team 2, Absolute Value(4), Global.A[3], Closest Player To(Global.A[3], Team 1));
		Set Damage Dealt(Players In Slot(4, Team 2), Global.D);
	}
}

rule("Slot 4 next hero")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Is Crouching(Event Player) == True;
		Distance Between(Event Player, Global.J[15]) <= Absolute Value(1.500);
	}

	actions
	{
		Global.K = False;
		Play Effect(All Players(All Teams), Ring Explosion Sound, White, Event Player, 60);
		Destroy Dummy Bot(Team 2, 4);
		Wait(0.250, Ignore Condition);
		Create Dummy Bot(Global.L[Global.B], Team 2, Absolute Value(4), Global.A[3], Closest Player To(Global.A[3], Team 1));
		Global.B  = 1;
		Set Damage Dealt(Players In Slot(4, Team 2), Global.D);
	}
}

rule("Global variable B reset(slot4 Hero index)")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Global.B == Absolute Value(9);
	}

	actions
	{
		Global.B = 0;
	}
}

rule("bot crouch spam")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		All;
	}

	conditions
	{
		Is Dummy Bot(Event Player) == True;
		Global.Q == True;
	}

	actions
	{
		Start Holding Button(Event Player, Crouch);
		Wait(Random Real(0.200, 0.300), Ignore Condition);
		Stop Holding Button(Event Player, Crouch);
		Wait(Random Real(0.200, 0.300), Ignore Condition);
		Start Holding Button(Event Player, Crouch);
		Wait(Random Real(0.200, 0.300), Ignore Condition);
		Stop Holding Button(Event Player, Crouch);
		Wait(Random Real(0.200, 0.500), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("crouch spam on")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Global.Q != True;
		Is Communicating(Event Player, Acknowledge) == True;
	}

	actions
	{
		Play Effect(All Players(All Teams), Buff Impact Sound, White, Event Player, 80);
		Global.Q = True;
	}
}

rule("crouch spam off")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Global.Q == True;
		Is Communicating(Event Player, Thanks) == True;
	}

	actions
	{
		Play Effect(All Players(All Teams), Explosion Sound, White, Event Player, 80);
		Global.Q = False;
	}
}

rule("preload hero")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	actions
	{
		Preload Hero(Event Player, Hero(Zenyatta));
	}
}

rule("preload currerent hero")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Hero Of(Event Player) != Hero(Zenyatta);
		Is Alive(Event Player) == True;
	}

	actions
	{
		Preload Hero(Event Player, Hero Of(Event Player));
		Wait(10, Ignore Condition);
		Loop;
	}
}

rule("Moira fade")
{
	event
	{
		Player Took Damage;
		Team 2;
		Moira;
	}

	conditions
	{
		Health(Event Player) < Random Integer(20, 180);
	}

	actions
	{
		Press Button(Event Player, Ability 1);
		Wait(2, Ignore Condition);
	}
}

rule("Lucio boop")
{
	event
	{
		Player Took Damage;
		Team 2;
		Lúcio;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Lúcio);
		Distance Between(Attacker, Event Player) < Absolute Value(7);
	}

	actions
	{
		Start Facing(Event Player, Direction Towards(Event Player, Attacker), 10000, To World, Direction and Turn Rate);
		Wait(Random Real(0.100, 0.300), Ignore Condition);
		Press Button(Event Player, Secondary Fire);
		Wait(0.500, Ignore Condition);
		Stop Facing(Event Player);
	}
}

rule("Sombra Hack")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Sombra;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Sombra);
		Distance Between(Closest Player To(Event Player, Team 1), Event Player) < Absolute Value(12);
		Is In Line of Sight(Event Player, Closest Player To(Event Player, Team 1), Barriers Do Not Block LOS) == True;
		Event Player.F != True;
	}

	actions
	{
		Start Facing(Event Player, Direction Towards(Event Player, Closest Player To(Event Player, Team 1)), 10000, To World,
			Direction and Turn Rate);
		Wait(Random Real(0.100, 0.200), Ignore Condition);
		Start Holding Button(Event Player, Secondary Fire);
		Wait(0.800, Ignore Condition);
		Stop Facing(Event Player);
		Stop Holding Button(Event Player, Secondary Fire);
		Wait(Random Integer(2, 8), Ignore Condition);
	}
}

rule("Sombra attack")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Sombra;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Sombra);
		Global.botattack == True;
		Is Alive(Event Player) == True;
		Array Contains(Players Within Radius(Event Player, 20, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
	}

	actions
	{
		Event Player.F = True;
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 20, Team 1, Surfaces), Is Alive(
			Current Array Element)), Distance Between(Event Player, Current Array Element));
		Abort If(First Of(Event Player.A) == Null);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Event Player.A))), Random Integer(
			200, 1200), To World, Direction and Turn Rate);
		Start Holding Button(Event Player, Primary Fire);
		Wait(Random Integer(1, 3), Ignore Condition);
		Stop Holding Button(Event Player, Primary Fire);
		Stop Facing(Event Player);
		Event Player.F = False;
		Wait(Random Integer(0.800, 2), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Widow attack")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Widowmaker;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Widowmaker);
		Array Contains(Players Within Radius(Event Player, 60, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
		Global.botattack == True;
		Is Alive(Event Player) == True;
	}

	actions
	{
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 60, Team 1, Surfaces), Is Alive(
			Current Array Element)), Player Closest To Reticle(Event Player, Team 1));
		Abort If(First Of(Event Player.A) == Null);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Event Player.A))), Random Integer(
			200, 2000), To World, Direction and Turn Rate);
		Wait(Absolute Value(0.100), Ignore Condition);
		Start Holding Button(Event Player, Secondary Fire);
		Wait(Random Integer(0.500, 1.200), Ignore Condition);
		Skip If(!Is In Line of Sight(Eye Position(Event Player), Eye Position(Player Closest To Reticle(Event Player, Team 1)),
			Barriers Do Not Block LOS), 2);
		Press Button(Event Player, Primary Fire);
		Wait(0.150, Ignore Condition);
		Stop Facing(Event Player);
		Stop Holding Button(Event Player, Secondary Fire);
		Wait(Random Integer(0.200, 1.500), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Soldier attack")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Soldier: 76;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Soldier: 76);
		Global.botattack == True;
		Is Alive(Event Player) == True;
		Array Contains(Players Within Radius(Event Player, 60, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
	}

	actions
	{
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 60, Team 1, Surfaces), Is Alive(
			Current Array Element)), Player Closest To Reticle(Event Player, Team 1));
		Abort If(First Of(Event Player.A) == Null);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Event Player.A))   Vector(0,
			Random Real(-1.200, 0.500), 0)), 400, To World, Direction and Turn Rate);
		Start Holding Button(Event Player, Primary Fire);
		Wait(Random Integer(0.600, 2.500), Ignore Condition);
		Stop Holding Button(Event Player, Primary Fire);
		Stop Facing(Event Player);
		Wait(Random Integer(0.200, 1.800), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Bot attack")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Global.botattack == False;
		Distance Between(Event Player, Global.J[16]) <= Absolute Value(1.500);
		Is Crouching(Event Player) == True;
	}

	actions
	{
		Global.botattack = True;
		Play Effect(All Players(All Teams), Buff Explosion Sound, White, Event Player, 60);
	}
}

rule("Bot no attack")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Global.botattack == True;
		Distance Between(Event Player, Global.J[17]) <= Absolute Value(1.500);
		Is Crouching(Event Player) == True;
	}

	actions
	{
		Global.botattack = False;
		Play Effect(All Players(All Teams), Explosion Sound, White, Event Player, 60);
	}
}

rule("Auto Healing for Players")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Is Alive(Event Player) == True;
		Has Spawned(Event Player) == True;
	}

	actions
	{
		Start Heal Over Time(Event Player, Event Player, 9999, 50);
	}
}

rule("Widow engage attacker")
{
	event
	{
		Player Took Damage;
		Team 2;
		Widowmaker;
	}

	conditions
	{
		Attacker != Player Closest To Reticle(Event Player, Team 1);
	}

	actions
	{
		Stop Facing(Event Player);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Attacker)), Random Integer(200, 1000),
			To World, Direction and Turn Rate);
		Wait(Random Real(0.800, 1.500), Ignore Condition);
		Stop Facing(Event Player);
	}
}

rule("Soldier engage attacker")
{
	event
	{
		Player Took Damage;
		Team 2;
		Soldier: 76;
	}

	conditions
	{
		Attacker != Player Closest To Reticle(Event Player, Team 1);
	}

	actions
	{
		Stop Facing(Event Player);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Attacker)), Random Integer(200, 1000),
			To World, Direction and Turn Rate);
		Wait(Random Real(1, 2), Ignore Condition);
		Stop Facing(Event Player);
	}
}

rule("Moira attack")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Moira;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Moira);
		Global.botattack == True;
		Is Alive(Event Player) == True;
		Array Contains(Players Within Radius(Event Player, 20, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
	}

	actions
	{
		Event Player.F = True;
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 20, Team 1, Surfaces), Is Alive(
			Current Array Element)), Distance Between(Event Player, Current Array Element));
		Abort If(First Of(Event Player.A) == Null);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Event Player.A))), Random Integer(
			240, 2000), To World, Direction and Turn Rate);
		Start Holding Button(Event Player, Secondary Fire);
		Wait(Random Integer(1, 3), Ignore Condition);
		Stop Holding Button(Event Player, Secondary Fire);
		Stop Facing(Event Player);
		Wait(Random Integer(0.200, 1), Ignore Condition);
		Loop If Condition Is True;
		Event Player.F = False;
	}
}

rule("Sym attack")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Symmetra;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Symmetra);
		Global.botattack == True;
		Array Contains(Players Within Radius(Event Player, 12, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
		Is Alive(Event Player) == True;
	}

	actions
	{
		Event Player.F = True;
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 12, Team 1, Surfaces), Is Alive(
			Current Array Element)), Distance Between(Event Player, Current Array Element));
		Abort If(First Of(Event Player.A) == Null);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Event Player.A))), Random Integer(
			240, 2000), To World, Direction and Turn Rate);
		Start Holding Button(Event Player, Primary Fire);
		Wait(Random Integer(1, 3), Ignore Condition);
		Stop Holding Button(Event Player, Primary Fire);
		Stop Facing(Event Player);
		Wait(Random Integer(0.200, 1), Ignore Condition);
		Loop If Condition Is True;
		Event Player.F = False;
	}
}

rule("Bots moving Radius")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Distance Between(Event Player, Global.J[18]) <= Absolute Value(1.500);
		Is Crouching(Event Player) == True;
	}

	actions
	{
		Global.Y  = 6;
		Play Effect(All Players(All Teams), Buff Explosion Sound, White, Event Player, 60);
		Skip If(Global.Y <= 26, 1);
		Global.Y = 14;
	}
}

rule("Mcree attack")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		McCree;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(McCree);
		Global.botattack == True;
		Is Alive(Event Player) == True;
		Array Contains(Players Within Radius(Event Player, 60, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
	}

	actions
	{
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 60, Team 1, Surfaces), Is Alive(
			Current Array Element)), Distance Between(Event Player, Current Array Element));
		Abort If(First Of(Event Player.A) == Null);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Event Player.A))   Vector(0,
			Random Real(-1, 0.300), 0)), 400, To World, Direction and Turn Rate);
		Start Holding Button(Event Player, Primary Fire);
		Wait(Random Integer(0.400, 2.500), Ignore Condition);
		Stop Holding Button(Event Player, Primary Fire);
		Stop Facing(Event Player);
		Wait(Random Integer(0.200, 1.500), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Mcree roll")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		McCree;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(McCree);
		Is Alive(Event Player) == True;
	}

	actions
	{
		Wait(Random Integer(6, 10), Ignore Condition);
		Press Button(Event Player, Ability 1);
		Loop If Condition Is True;
	}
}

rule("Mcree Flash")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		McCree;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(McCree);
		Distance Between(Event Player, Closest Player To(Event Player, Team 1)) < Absolute Value(7);
		Is In Line of Sight(Event Player, Closest Player To(Event Player, Team 1), Barriers Do Not Block LOS) == True;
		Is Alive(Event Player) == True;
		Is Alive(Closest Player To(Event Player, Team 1)) == True;
	}

	actions
	{
		Start Facing(Event Player, Direction Towards(Event Player, Closest Player To(Event Player, Team 1)), 400, To World,
			Direction and Turn Rate);
		Wait(Random Real(0.150, 0.300), Ignore Condition);
		Press Button(Event Player, Ability 2);
		Wait(0.400, Ignore Condition);
		Start Holding Button(Event Player, Secondary Fire);
		Wait(0.500, Ignore Condition);
		Stop Facing(Event Player);
		Stop Holding Button(Event Player, Secondary Fire);
		Wait(9.200, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Hanzo attack")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Hanzo;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Hanzo);
		Global.botattack == True;
		Is Alive(Event Player) == True;
		Array Contains(Players Within Radius(Event Player, 60, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
	}

	actions
	{
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 60, Team 1, Surfaces), Is Alive(
			Current Array Element)), Distance Between(Event Player, Current Array Element));
		Abort If(First Of(Event Player.A) == Null);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Event Player.A))), Random Integer(
			240, 2000), To World, Direction and Turn Rate);
		Start Holding Button(Event Player, Primary Fire);
		Wait(Random Integer(0.600, 1), Ignore Condition);
		Stop Holding Button(Event Player, Primary Fire);
		Stop Facing(Event Player);
		Wait(Random Integer(0.200, 1), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Hanzo lunge")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Hanzo;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Hanzo);
		Is Alive(Event Player) == True;
	}

	actions
	{
		Press Button(Event Player, Jump);
		Wait(Random Real(0.200, 0.500), Ignore Condition);
		Press Button(Event Player, Jump);
		Wait(Random Integer(5, 7), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Tracer Chase")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Tracer;
	}

	conditions
	{
		Global.T == True;
		Is Alive(Event Player) == True;
	}

	actions
	{
		Skip If(Distance Between(Event Player, Closest Player To(Event Player, Team 1)) > 20, 5);
		Press Button(Event Player, Ability 1);
		Start Throttle In Direction(Event Player, Direction Towards(Event Player, Nearest Walkable Position(World Vector Of(Vector(
			Random Real(-2, 2), 0, Random Real(-2, 2)), Closest Player To(Event Player, Team 1), Rotation And Translation))), 1, To World,
			Replace existing throttle, Direction and Magnitude);
		Wait(Random Integer(0.500, 2), Ignore Condition);
		Start Throttle In Direction(Event Player, Backward, 100, To Player, Replace existing throttle, Direction and Magnitude);
		Wait(Random Real(0.400, 1.400), Ignore Condition);
		Start Throttle In Direction(Event Player, Vector(Random Integer(-1, 1), 0, Random Integer(-1, 1)), 100, To Player,
			Replace existing throttle, Direction and Magnitude);
		Wait(Random Real(0.200, 0.800), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Tracer chase attack")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Tracer;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Tracer);
		Distance Between(Closest Player To(Event Player, Team 1), Event Player) < Absolute Value(20);
		Is In Line of Sight(Eye Position(Event Player), Eye Position(Closest Player To(Event Player, Team 1)), Barriers Do Not Block LOS)
			== True;
		Global.T == True;
		Is Alive(Event Player) == True;
	}

	actions
	{
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Closest Player To(Event Player, Team 1))),
			Absolute Value(360), To World, Direction and Turn Rate);
		Skip If(Global.botattack == False, 3);
		Start Holding Button(Event Player, Primary Fire);
		Wait(Random Integer(0.600, 1.100), Ignore Condition);
		Stop Holding Button(Event Player, Primary Fire);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Closest Player To(Event Player, Team 1))),
			Absolute Value(200), To World, Direction and Turn Rate);
		Wait(Random Integer(0.800, 2.800), Ignore Condition);
		Press Button(Event Player, Ability 1);
		Loop If Condition Is True;
		Stop Facing(Event Player);
	}
}

rule("Tracer facing-long range")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Tracer;
	}

	conditions
	{
		Distance Between(Event Player, Closest Player To(Event Player, Team 1)) > Absolute Value(20);
		Global.T == True;
	}

	actions
	{
		Start Facing(Event Player, Direction Towards(Event Player, Random Value In Array(All Living Players(Team 1))), 80, To World,
			Direction and Turn Rate);
		Wait(Random Real(4, 8), Ignore Condition);
		Stop Facing(Event Player);
		Wait(Random Real(1, 3), Ignore Condition);
	}
}

rule("Tracer Chase ON")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Global.T == False;
		Distance Between(Event Player, Global.J[19]) <= Absolute Value(1.500);
		Is Crouching(Event Player) == True;
	}

	actions
	{
		Global.T = True;
		Play Effect(All Players(All Teams), Buff Explosion Sound, White, Event Player, 60);
	}
}

rule("Tracer Chase OFF")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Global.T == True;
		Distance Between(Event Player, Global.J[20]) <= Absolute Value(1.500);
		Is Crouching(Event Player) == True;
	}

	actions
	{
		Global.T = False;
		Play Effect(All Players(All Teams), Explosion Sound, White, Event Player, 60);
	}
}

rule("Pharah Attack")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Pharah;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Pharah);
		Distance Between(Closest Player To(Event Player, Team 1), Event Player) < Absolute Value(55);
		Is In Line of Sight(Eye Position(Event Player), Eye Position(Closest Player To(Event Player, Team 1)), Barriers Do Not Block LOS)
			== True;
		Global.botattack == True;
		Is Alive(Event Player) == True;
	}

	actions
	{
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Closest Player To(Event Player, Team 1))),
			Absolute Value(360), To World, Direction and Turn Rate);
		Start Holding Button(Event Player, Primary Fire);
		Wait(Random Integer(0.600, 2), Ignore Condition);
		Stop Holding Button(Event Player, Primary Fire);
		Stop Facing(Event Player);
		Wait(Random Integer(0.200, 1), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Widow sudo Grapple")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Widowmaker;
	}

	conditions
	{
		Is Alive(Event Player) == True;
	}

	actions
	{
		Apply Impulse(Event Player, Up, Random Real(8, 20), To World, Incorporate Contrary Motion);
		Wait(0.250, Ignore Condition);
		Apply Impulse(Event Player, Left, Random Real(-8, 8), To Player, Incorporate Contrary Motion);
		Wait(Random Real(6, 10), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Bots Random Crouch or Jump")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		All;
	}

	conditions
	{
		Event Player != Players In Slot(1, Team 2);
		Is Alive(Event Player) == True;
		Global.U == True;
	}

	actions
	{
		Event Player.R = Random Integer(0, 2);
		Skip If(Event Player.R != 2, 8);
		Start Holding Button(Event Player, Crouch);
		Wait(Random Real(0.200, 0.300), Ignore Condition);
		Stop Holding Button(Event Player, Crouch);
		Wait(Random Real(0.200, 0.300), Ignore Condition);
		Start Holding Button(Event Player, Crouch);
		Wait(Random Real(0.200, 0.300), Ignore Condition);
		Stop Holding Button(Event Player, Crouch);
		Wait(Random Real(0.200, 0.500), Ignore Condition);
		Skip If(Event Player.R != 1, 1);
		Press Button(Event Player, Jump);
		Wait(Random Integer(0.800, 3), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Random Crouch jump on")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Global.U != True;
		Is Communicating Any Voice line(Event Player) == True;
	}

	actions
	{
		Play Effect(All Players(All Teams), Buff Impact Sound, White, Event Player, 80);
		Global.U = True;
	}
}

rule("Random Crouch jump off")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	conditions
	{
		Global.U == True;
		Is Communicating(Event Player, Thanks) == True;
	}

	actions
	{
		Play Effect(All Players(All Teams), Explosion Sound, White, Event Player, 80);
		Global.U = False;
	}
}

rule("Match Ends")
{
	event
	{
		Ongoing - Global;
	}

	conditions
	{
		Match Time <= Absolute Value(5);
	}

	actions
	{
		Declare Team Victory(Team 1);
	}
}

disabled rule("Server Performance check")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		Slot 0;
	}

	actions
	{
		Create HUD Text(All Players(All Teams), Server Load, Server Load Average, Server Load Peak, Top, 2, White, White, White,
			Visible To and String, Default Visibility);
	}
}

rule("Block doors for bots")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		All;
	}

	conditions
	{
		Is Alive(Event Player) == True;
		Distance Between(Event Player, Global.A[14]) < Absolute Value(1.800);
	}

	actions
	{
		Apply Impulse(Event Player, Direction Towards(Event Player, Global.A[3]), 14, To World, Cancel Contrary Motion);
		Wait(0.200, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Block doors for bots")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		All;
	}

	conditions
	{
		Is Alive(Event Player) == True;
		Distance Between(Event Player, Global.A[15]) < Absolute Value(1.800);
	}

	actions
	{
		Apply Impulse(Event Player, Direction Towards(Event Player, Global.A[3]), 14, To World, Cancel Contrary Motion);
		Wait(0.200, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Block doors for bots")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		All;
	}

	conditions
	{
		Is Alive(Event Player) == True;
		Distance Between(Event Player, Global.A[16]) < Absolute Value(1.800);
	}

	actions
	{
		Apply Impulse(Event Player, Direction Towards(Event Player, Global.A[3]), 14, To World, Cancel Contrary Motion);
		Wait(0.200, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Block doors for bots")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		All;
	}

	conditions
	{
		Is Alive(Event Player) == True;
		Distance Between(Event Player, Global.A[17]) < Absolute Value(1.800);
	}

	actions
	{
		Apply Impulse(Event Player, Direction Towards(Event Player, Global.A[3]), 14, To World, Cancel Contrary Motion);
		Wait(0.200, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Bots ult charge")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		All;
	}

	conditions
	{
		Ultimate Charge Percent(Event Player) < Absolute Value(60);
		Has Spawned(Event Player) == True;
	}

	actions
	{
		Set Ultimate Charge(Event Player, Random Real(60, 90));
	}
}

rule("Genji attack")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Genji;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Genji);
		Global.botattack == True;
		Is Alive(Event Player) == True;
		Array Contains(Players Within Radius(Event Player, 50, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
		Event Player.F != True;
		Is Using Ultimate(Event Player) != True;
	}

	actions
	{
		Event Player.F = True;
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 50, Team 1, Surfaces), Is Alive(
			Current Array Element)), Distance Between(Event Player, Current Array Element));
		Abort If(First Of(Event Player.A) == Null);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Event Player.A))), Random Integer(
			200, 1200), To World, Direction and Turn Rate);
		If(Distance Between(First Of(Event Player.A), Event Player) > 12);
			Start Holding Button(Event Player, Primary Fire);
			Wait(Random Integer(1, 3), Ignore Condition);
			Stop Holding Button(Event Player, Primary Fire);
			Stop Facing(Event Player);
			Wait(Random Integer(0.800, 2), Ignore Condition);
			Loop If Condition Is True;
			Event Player.F = False;
		Else;
			Start Holding Button(Event Player, Secondary Fire);
			Wait(Random Integer(1, 3), Ignore Condition);
			Stop Holding Button(Event Player, Secondary Fire);
			Stop Facing(Event Player);
			Wait(Random Integer(0.800, 2), Ignore Condition);
			Loop If Condition Is True;
			Event Player.F = False;
	}
}

rule("Genji use ult")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Genji;
	}

	conditions
	{
		Is Alive(Event Player) == True;
		Is Using Ultimate(Event Player) == False;
		Ultimate Charge Percent(Event Player) == Absolute Value(100);
		Array Contains(Players Within Radius(Event Player, 18, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
		Global.botattack == True;
		Normalized Health(Event Player) >= 0.500;
	}

	actions
	{
		Wait(Random Real(0.250, 4), Ignore Condition);
		Loop If Condition Is False;
		If(Distance Between(Event Player, Closest Player To(Event Player, Team 1)) < 11);
			Set Facing(Event Player, Up, To World);
			Wait(0.250, Ignore Condition);
			Press Button(Event Player, Ability 1);
			Wait(Random Real(0.600, 1.200), Ignore Condition);
			Press Button(Event Player, Ultimate);
			Wait(1.200, Ignore Condition);
			Press Button(Event Player, Ability 1);
		Else;
			Press Button(Event Player, Ultimate);
			Wait(1.200, Ignore Condition);
			Press Button(Event Player, Ability 1);
	}
}

rule("Genji Dragonblade")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Genji;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Genji);
		Is Alive(Event Player) == True;
		Is Using Ultimate(Event Player) == True;
		Array Contains(Players Within Radius(Event Player, 20, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
	}

	actions
	{
		Start Throttle In Direction(Event Player, Forward, 1, To Player, Replace existing throttle, Direction and Magnitude);
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 20, Team 1, Surfaces), Is Alive(
			Current Array Element)), Distance Between(Event Player, Current Array Element));
		Wait(0.100, Ignore Condition);
		Skip If(First Of(Event Player.A) == Null, 3);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Event Player.A))), Absolute Value(
			400), To World, Direction and Turn Rate);
		Start Holding Button(Event Player, Primary Fire);
		Wait(Random Integer(0.300, 0.600), Ignore Condition);
		Loop If Condition Is True;
		Stop Facing(Event Player);
		Stop Throttle In Direction(Event Player);
		Stop Holding Button(Event Player, Primary Fire);
	}
}

rule("cancel player heal")
{
	event
	{
		Player Died;
		Team 1;
		All;
	}

	actions
	{
		Stop All Heal Over Time(Event Player);
	}
}

rule("Next tank(spawn tank)")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Distance Between(Event Player, Global.J[22]) <= Absolute Value(1.500);
		Is Crouching(Event Player) == True;
	}

	actions
	{
		Small Message(All Players(All Teams), Custom String("Tank has been Spawned!"));
		Global.randomtank = False;
		Play Effect(All Players(All Teams), Ring Explosion Sound, White, Event Player, 60);
		Destroy Dummy Bot(Team 2, 5);
		Wait(0.250, Ignore Condition);
		Create Dummy Bot(Global.tanks[Global.tankindex], Team 2, Absolute Value(5), Global.A[3], Closest Player To(Global.A[3], Team 1));
		Set Damage Dealt(Players In Slot(5, Team 2), Global.D);
		If(Global.tankindex == 3);
			Global.tankindex = 0;
		Else;
			Global.tankindex  = 1;
	}
}

rule("Tank array")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Global.tanks[0] = Hero(Reinhardt);
		Global.tanks[1] = Hero(Zarya);
		Global.tanks[2] = Hero(Roadhog);
		Global.tanks[3] = Hero(Sigma);
	}
}

rule("auto switch hero on(tanks)")
{
	event
	{
		Player Dealt Final Blow;
		Team 1;
		All;
	}

	conditions
	{
		Global.randomtank == True;
		Victim == Players In Slot(5, Team 2);
	}

	actions
	{
		Wait(1, Ignore Condition);
		Destroy Dummy Bot(Team 2, 5);
		Wait(0.500, Ignore Condition);
		Create Dummy Bot(Random Value In Array(Global.tanks), Team 2, Absolute Value(5), Global.A[3], Closest Player To(Global.A[3],
			Team 1));
		Set Damage Dealt(Players In Slot(5, Team 2), Global.D);
	}
}

rule("auto switch tank hero switchs")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Is Crouching(Event Player) == True;
		Distance Between(Event Player, Global.J[23]) <= Absolute Value(1.500);
	}

	actions
	{
		Destroy Dummy Bot(Team 2, 5);
		Wait(0.100, Ignore Condition);
		Global.randomtank = True;
		Play Effect(All Players(All Teams), Ring Explosion Sound, White, Event Player, 80);
		Create Dummy Bot(Random Value In Array(Global.tanks), Team 2, Absolute Value(5), Global.A[3], Vector(0, 0, 0));
		Small Message(All Players(All Teams), Custom String("Spawn random tanks!"));
	}
}

rule("Remove tank")
{
	event
	{
		Ongoing - Each Player;
		Team 1;
		All;
	}

	conditions
	{
		Is Crouching(Event Player) == True;
		Distance Between(Event Player, Global.J[24]) <= Absolute Value(1.500);
	}

	actions
	{
		Destroy Dummy Bot(Team 2, 5);
		Play Effect(All Players(All Teams), Explosion Sound, White, Event Player, 80);
	}
}

rule("Tank Control rings")
{
	event
	{
		Ongoing - Global;
	}

	actions
	{
		Create Effect(All Players(Team 1), Ring, Blue, Global.J[22], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), Custom String("Spawn/Next Tank"), Global.J[22], 1, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
		Create In-World Text(All Players(Team 1), String("{0} - {1}", String("Current Hero"), Hero Icon String(Hero Of(Players In Slot(5,
			Team 2)))), Global.J[25], 1, Clip Against Surfaces, Visible To Position and String, Yellow, Default Visibility);
		Create Effect(All Players(Team 1), Ring, Orange, Global.J[23], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), Custom String("Random Tank"), Global.J[23], 1, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
		Create Effect(All Players(Team 1), Ring, White, Global.J[24], 1, Visible To Position and Radius);
		Create In-World Text(All Players(Team 1), Custom String("Remove Tank"), Global.J[24], 1, Clip Against Surfaces,
			Visible To Position and String, White, Default Visibility);
	}
}

rule("strafe Tanks(except rein)")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Slot 5;
	}

	conditions
	{
		Hero Of(Event Player) != Hero(Reinhardt);
	}

	actions
	{
		If(Distance Between(Event Player, Global.A[3]) < 10);
			Start Throttle In Direction(Event Player, Vector(100, 0, Random Integer(0, 10)), 1, To Player, Replace existing throttle,
				Direction and Magnitude);
			Wait(Random Real(0.160, 1.200), Ignore Condition);
			Start Throttle In Direction(Event Player, Vector(-100, 0, Random Integer(-10, 0)), 1, To Player, Replace existing throttle,
				Direction and Magnitude);
			Wait(Random Real(0.160, 1.200), Ignore Condition);
			Loop If Condition Is True;
		Else;
			Start Throttle In Direction(Event Player, Direction Towards(Event Player, Global.A[3]), 1, To World, Replace existing throttle,
				Direction and Magnitude);
			Wait(Random Real(0.500, 3), Ignore Condition);
			Loop If Condition Is True;
	}
}

disabled rule("Ana Nano boost genji")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Ana;
	}

	conditions
	{
		Ultimate Charge Percent(Event Player) == Absolute Value(100);
		Is Using Ultimate(Players In Slot(1, Team 2)) == True;
	}

	actions
	{
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Players In Slot(1, Team 2))), 10000,
			To World, Direction and Turn Rate);
		Wait(Random Real(0.500, 1.200), Ignore Condition);
		Press Button(Event Player, Ultimate);
		Wait(0.200, Ignore Condition);
		Stop Facing(Event Player);
	}
}

rule("Tanks facing")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Slot 5;
	}

	conditions
	{
		Distance Between(Event Player, Closest Player To(Event Player, Team 1)) > Absolute Value(20);
		Hero Of(Event Player) != Hero(Reinhardt);
		Hero Of(Event Player) != Hero(Roadhog);
		Event Player.F != True;
	}

	actions
	{
		Start Facing(Event Player, Direction Towards(Event Player, Random Value In Array(All Living Players(Team 1))), 300, To World,
			Direction and Turn Rate);
		Wait(Random Real(1, 3), Ignore Condition);
		Stop Facing(Event Player);
		Wait(Random Real(1, 3), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Rein using barrier")
{
	event
	{
		Player Took Damage;
		Team 2;
		Reinhardt;
	}

	conditions
	{
		Is Alive(Event Player) == True;
		Distance Between(Event Player, Attacker) > Absolute Value(3);
	}

	actions
	{
		Wait(Random Real(0.100, 1), Ignore Condition);
		Start Facing(Event Player, Direction Towards(Event Player, Attacker), 280, To World, Direction and Turn Rate);
		Start Holding Button(Event Player, Secondary Fire);
		Wait(Random Real(1, 5), Ignore Condition);
		Stop Holding Button(Event Player, Secondary Fire);
		Stop Facing(Event Player);
		Wait(Random Real(1, 5), Ignore Condition);
	}
}

rule("Rein firestrike")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Reinhardt;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Reinhardt);
		Global.botattack == True;
		Is Alive(Event Player) == True;
		Array Contains(Players Within Radius(Event Player, 60, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
	}

	actions
	{
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 60, Team 1, Surfaces), Is Alive(
			Current Array Element)), Distance Between(Event Player, Current Array Element));
		Abort If(First Of(Event Player.A) == Null);
		Abort If(Distance Between(Event Player, First Of(Event Player.A)) < 3);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Event Player.A))), Random Integer(
			360, 2000), To World, Direction and Turn Rate);
		Press Button(Event Player, Ability 2);
		Wait(Random Integer(0.600, 1), Ignore Condition);
		Stop Facing(Event Player);
		Wait(Random Integer(4, 7), Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Rein close range attack")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Reinhardt;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Reinhardt);
		Is Alive(Event Player) == True;
		Array Contains(Players Within Radius(Event Player, 7, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
	}

	actions
	{
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 7, Team 1, Surfaces), Is Alive(
			Current Array Element)), Distance Between(Event Player, Current Array Element));
		Abort If(First Of(Event Player.A) == Null);
		Start Throttle In Direction(Event Player, Forward, 1, To Player, Replace existing throttle, Direction and Magnitude);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Event Player.A))), Absolute Value(
			300), To World, Direction and Turn Rate);
		Start Holding Button(Event Player, Primary Fire);
		Wait(Random Integer(0.400, 0.800), Ignore Condition);
		Stop Holding Button(Event Player, Primary Fire);
		Loop If Condition Is True;
		Stop Facing(Event Player);
		Stop Throttle In Direction(Event Player);
	}
}

rule("Rein earth shatter")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Reinhardt;
	}

	conditions
	{
		Is Alive(Event Player) == True;
		Is Using Ultimate(Event Player) == False;
		Ultimate Charge Percent(Event Player) == Absolute Value(100);
		Array Contains(Players Within Radius(Event Player, 16, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
		Global.botattack == True;
	}

	actions
	{
		Wait(Random Real(0.500, 5), Ignore Condition);
		Loop If Condition Is False;
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 16, Team 1, Surfaces), Is Alive(
			Current Array Element)), Distance Between(Event Player, Current Array Element));
		Abort If(First Of(Event Player.A) == Null);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Event Player.A))), Absolute Value(
			400), To World, Direction and Turn Rate);
		Wait(Random Real(0.400, 1), Ignore Condition);
		Press Button(Event Player, Ultimate);
		Wait(Absolute Value(1.800), Ignore Condition);
		Press Button(Event Player, Ability 1);
		Wait(0.600, Ignore Condition);
		Press Button(Event Player, Ability 1);
		Stop Facing(Event Player);
		Stop Throttle In Direction(Event Player);
		Wait(0.400, Ignore Condition);
		Stop Throttle In Direction(Event Player);
	}
}

rule("Zarya using barrier")
{
	event
	{
		Player Took Damage;
		Team 2;
		Zarya;
	}

	conditions
	{
		Is Alive(Event Player) == True;
	}

	actions
	{
		Wait(Random Real(0.150, 1.200), Ignore Condition);
		Press Button(Event Player, Ability 1);
		Wait(Random Real(2, 4), Ignore Condition);
	}
}

rule("Zarya bubble teammate")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Zarya;
	}

	conditions
	{
		Is Alive(Event Player) == True;
		Event Player.Zaryabubbletimer == Absolute Value(0);
		Is Using Ability 2(Event Player) == False;
	}

	actions
	{
		Event Player.F = True;
		Event Player.bubbleteammate = Filtered Array(All Players(Team 2), Current Array Element.bubbleteammate == True);
		"Bubble teammate that taking damage"
		If(First Of(Event Player.bubbleteammate) != Null);
			Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Random Value In Array(
				Event Player.bubbleteammate))), 1200, To World, Direction and Turn Rate);
			Wait(Random Real(0.400, 0.800), Ignore Condition);
			Press Button(Event Player, Ability 2);
			Wait(0.250, Ignore Condition);
			Stop Facing(Event Player);
			Event Player.F = False;
			Wait(Random Integer(4, 7), Ignore Condition);
			Loop If Condition Is True;
		"No teammate currerently taking damage"
		Else;
			Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Random Value In Array(Filtered Array(
				All Living Players(Team 2), Hero Of(Current Array Element) != Hero(Zarya))))), 1200, To World, Direction and Turn Rate);
			Wait(Random Real(0.400, 0.800), Ignore Condition);
			Press Button(Event Player, Ability 2);
			Wait(0.250, Ignore Condition);
			Stop Facing(Event Player);
			Event Player.F = False;
			Wait(Random Integer(4, 7), Ignore Condition);
			Loop If Condition Is True;
	}
}

rule("Team2 being attacked signal")
{
	event
	{
		Player Took Damage;
		Team 2;
		All;
	}

	conditions
	{
		Slot Of(Event Player) != Absolute Value(5);
		Is Hero Being Played(Hero(Zarya), Team 2) == True;
	}

	actions
	{
		Event Player.takingDMG = True;
		Wait(2, Ignore Condition);
		Event Player.takingDMG = False;
		Wait(2, Ignore Condition);
	}
}

rule("Team2 reset attacked signal on death")
{
	event
	{
		Player Died;
		Team 2;
		All;
	}

	conditions
	{
		Slot Of(Event Player) != Absolute Value(5);
		Is Hero Being Played(Hero(Zarya), Team 2) == True;
	}

	actions
	{
		Event Player.takingDMG = False;
	}
}

rule("Zarya Used bubble")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Zarya;
	}

	conditions
	{
		Is Using Ability 2(Event Player) == True;
	}

	actions
	{
		Event Player.Zaryabubbletimer = Random Integer(9, 10);
		Chase Player Variable At Rate(Event Player, Zaryabubbletimer, 0, 1, Destination and Rate);
	}
}

rule("Zarya Attack")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Zarya;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Zarya);
		Is Alive(Event Player) == True;
		Array Contains(Players Within Radius(Event Player, 16, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
		Event Player.F == False;
	}

	actions
	{
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 16, Team 1, Surfaces), Is Alive(
			Current Array Element)), Distance Between(Event Player, Current Array Element));
		Abort If(First Of(Event Player.A) == Null);
		Start Throttle In Direction(Event Player, Forward, 1, To Player, Replace existing throttle, Direction and Magnitude);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Event Player.A))), Absolute Value(
			400), To World, Direction and Turn Rate);
		Start Holding Button(Event Player, Primary Fire);
		Wait(Random Integer(0.600, 1.500), Ignore Condition);
		Stop Holding Button(Event Player, Primary Fire);
		Loop If Condition Is True;
		Stop Facing(Event Player);
		Stop Throttle In Direction(Event Player);
	}
}

rule("Zarya grav")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Zarya;
	}

	conditions
	{
		Is Alive(Event Player) == True;
		Is Using Ultimate(Event Player) == False;
		Ultimate Charge Percent(Event Player) == Absolute Value(100);
		Array Contains(Players Within Radius(Event Player, 16, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
		Global.botattack == True;
		Event Player.F == False;
	}

	actions
	{
		Wait(Random Real(1.500, 8), Ignore Condition);
		Abort If Condition Is False;
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 16, Team 1, Surfaces), Is Alive(
			Current Array Element)), Distance Between(Event Player, Current Array Element));
		Abort If(First Of(Event Player.A) == Null);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), First Of(Event Player.A) - Vector(0, -1.400, 0)),
			Absolute Value(600), To World, Direction and Turn Rate);
		Wait(Random Real(0.400, 1), Ignore Condition);
		Press Button(Event Player, Ultimate);
		Stop Facing(Event Player);
	}
}

rule("Roadhog attack")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Roadhog;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Roadhog);
		Global.botattack == True;
		Is Alive(Event Player) == True;
		Array Contains(Players Within Radius(Event Player, 50, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
		Event Player.F != True;
		Is Using Ultimate(Event Player) != True;
	}

	actions
	{
		Event Player.F = True;
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 50, Team 1, Surfaces), Is Alive(
			Current Array Element)), Distance Between(Event Player, Current Array Element));
		Abort If(First Of(Event Player.A) == Null);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Event Player.A))), Random Integer(
			200, 1200), To World, Direction and Turn Rate);
		If(Distance Between(First Of(Event Player.A), Event Player) > 12);
			Start Holding Button(Event Player, Secondary Fire);
			Wait(Random Integer(1, 3), Ignore Condition);
			Stop Holding Button(Event Player, Secondary Fire);
			Stop Facing(Event Player);
			Wait(Random Integer(0.800, 2), Ignore Condition);
			Loop If Condition Is True;
			Event Player.F = False;
		Else;
			Start Holding Button(Event Player, Primary Fire);
			Wait(Random Integer(1, 3), Ignore Condition);
			Stop Holding Button(Event Player, Primary Fire);
			Stop Facing(Event Player);
			Wait(Random Integer(0.800, 2), Ignore Condition);
			Loop If Condition Is True;
			Event Player.F = False;
	}
}

rule("Roadhog hook")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Roadhog;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Roadhog);
		Distance Between(Event Player, Closest Player To(Event Player, Team 1)) < Absolute Value(18);
		Is In Line of Sight(Event Player, Closest Player To(Event Player, Team 1), Barriers Do Not Block LOS) == True;
		Is Alive(Event Player) == True;
		Is Alive(Closest Player To(Event Player, Team 1)) == True;
	}

	actions
	{
		Start Facing(Event Player, Direction Towards(Event Player, Closest Player To(Event Player, Team 1)), 500, To World,
			Direction and Turn Rate);
		Wait(Random Real(0.150, 0.300), Ignore Condition);
		Press Button(Event Player, Ability 1);
		Wait(0.400, Ignore Condition);
		Start Holding Button(Event Player, Primary Fire);
		Wait(1, Ignore Condition);
		Stop Facing(Event Player);
		Stop Holding Button(Event Player, Primary Fire);
		Wait(7.500, Ignore Condition);
		Loop If Condition Is True;
	}
}

rule("Roadhog taking breather")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Roadhog;
	}

	conditions
	{
		Normalized Health(Event Player) <= 0.500;
		Is Alive(Event Player) == True;
	}

	actions
	{
		Wait(Random Real(0.100, 2), Ignore Condition);
		Press Button(Event Player, Ability 2);
	}
}

rule("Sigma using barrier")
{
	event
	{
		Player Took Damage;
		Team 2;
		Sigma;
	}

	conditions
	{
		Is Alive(Event Player) == True;
		Distance Between(Event Player, Attacker) > Absolute Value(6);
	}

	actions
	{
		Wait(Random Real(0.100, 1), Ignore Condition);
		Start Facing(Event Player, Direction Towards(Event Player, Attacker), 360, To World, Direction and Turn Rate);
		Start Holding Button(Event Player, Secondary Fire);
		Wait(Random Real(0.300, 0.800), Ignore Condition);
		Stop Holding Button(Event Player, Secondary Fire);
		Stop Facing(Event Player);
		Wait(Random Real(2, 5), Ignore Condition);
		Press Button(Event Player, Secondary Fire);
		Wait(Random Real(1, 4), Ignore Condition);
	}
}

rule("Sigma use rock")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Sigma;
	}

	conditions
	{
		Hero Of(Event Player) == Hero(Sigma);
		Distance Between(Event Player, Closest Player To(Event Player, Team 1)) < Absolute Value(20);
		Is In Line of Sight(Event Player, Closest Player To(Event Player, Team 1), Barriers Do Not Block LOS) == True;
		Is Alive(Event Player) == True;
		Is Alive(Closest Player To(Event Player, Team 1)) == True;
	}

	actions
	{
		Event Player.F = True;
		Start Facing(Event Player, Direction Towards(Event Player, Closest Player To(Event Player, Team 1)), 500, To World,
			Direction and Turn Rate);
		Wait(Random Real(0.150, 0.300), Ignore Condition);
		Press Button(Event Player, Ability 2);
		Wait(0.800, Ignore Condition);
		Press Button(Event Player, Primary Fire);
		Wait(0.100, Ignore Condition);
		Stop Facing(Event Player);
		Event Player.F = False;
		Wait(10, Ignore Condition);
	}
}

rule("Sigma using grasp")
{
	event
	{
		Player Took Damage;
		Team 2;
		Sigma;
	}

	conditions
	{
		Is Alive(Event Player) == True;
		Normalized Health(Event Player) <= 0.600;
	}

	actions
	{
		Event Player.F = True;
		Wait(Random Real(0.150, 1), Ignore Condition);
		Press Button(Event Player, Ability 1);
		Start Facing(Event Player, Direction Towards(Event Player, Attacker), 400, To World, Direction and Turn Rate);
		Wait(Absolute Value(2.200), Ignore Condition);
		Stop Facing(Event Player);
		Event Player.F = False;
		Wait(10, Ignore Condition);
	}
}

rule("Sigma Attack")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Sigma;
	}

	conditions
	{
		Is Alive(Event Player) == True;
		Array Contains(Players Within Radius(Event Player, 20, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
		Event Player.F == False;
		Is Using Ultimate(Event Player) == False;
	}

	actions
	{
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 20, Team 1, Surfaces), Is Alive(
			Current Array Element)), Distance Between(Event Player, Current Array Element));
		Abort If(First Of(Event Player.A) == Null);
		Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(First Of(Event Player.A))), Absolute Value(
			400), To World, Direction and Turn Rate);
		Start Holding Button(Event Player, Primary Fire);
		Wait(Random Integer(0.600, 2.500), Ignore Condition);
		Stop Holding Button(Event Player, Primary Fire);
		Loop If Condition Is True;
		Stop Facing(Event Player);
	}
}

rule("Delay respawn for bots")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		All;
	}

	conditions
	{
		Has Spawned(Event Player) == True;
	}

	actions
	{
		Set Respawn Max Time(Event Player, 2);
	}
}

rule("Respawn players")
{
	event
	{
		Player Died;
		Team 1;
		All;
	}

	actions
	{
		Wait(1, Ignore Condition);
		Teleport(Event Player, Global.P);
		Set Facing(Event Player, Direction Towards(Event Player, Global.A[3]), To World);
		Set Status(Event Player, Null, Invincible, 4);
	}
}

rule("Heal bots using ult")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		All;
	}

	conditions
	{
		Is Using Ultimate(Event Player) == True;
	}

	actions
	{
		Heal(Event Player, Null, 200);
	}
}

rule("Sigma Ult")
{
	event
	{
		Ongoing - Each Player;
		Team 2;
		Sigma;
	}

	conditions
	{
		Is Alive(Event Player) == True;
		Is Using Ultimate(Event Player) == False;
		Ultimate Charge Percent(Event Player) == Absolute Value(100);
		Array Contains(Players Within Radius(Event Player, 18, Team 1, Surfaces), Is True For Any(All Living Players(Team 1), True))
			== True;
		Global.botattack == True;
	}

	actions
	{
		Wait(Random Real(1.200, 5), Ignore Condition);
		Abort If Condition Is False;
		Event Player.A = Sorted Array(Filtered Array(Players Within Radius(Event Player, 18, Team 1, Surfaces), Is Alive(

Changelog

about 1 month ago 10.2.0

-Added option to enable unlimted ammo option. Press melee and reload button together to enable, to disable, switch to another hero.

-"I need healing" Voiceline will now toggle enable/disable fast ult charge and no ablities cooldown mode. Good for practice ablities such as sleep dart or roadhog hook.

5MAPT
click to copy
7 months ago 10.0.0

-Improved bots targeting, Mcree and soldier bots won't lazer headshot players across the map, the will miss and hit more body shots. -Server Performance optimized -Doomfist bot can now use hand cannon combined with abilities. -Genji bot can use both primary and secondary attacks, also dragon blade!!! (Great to practice ana sleep darts) -Added new tank bots options!!! Rein, Zarya, Roadhog and Sigma. Those tank bots can use all abilities, and ultimate(excluding roadhog). -When player got killed, they will insta respawn near the blue ring, no longer need to walk from spawn. -Bot mercy will only pocket Pharah, and treat other bots equally when no Pharah on their team. -Prevent bots from walking into rooms.

5MAPT
click to copy
10 months ago 9.6.0

Bug fixes.

Improved bots targering, the bots will ignore dead and out of LOS players.

Performance optimized, less rules running concurrent.

Sombra bot will also attack player.

9R7YQ
click to copy
10 months ago 9.5.1

Bug fixes. Adding a new option which enable bots to randomly jump or crouch spam. Host player can use voice line acknowledge to enable this feature.

7SJX6
click to copy
10 months ago 9.4.0

Added new bots ablities -Moria fade when taking damage -Lucio boop when taking damage from a nearby player. -Sombra will hack nearby players.

Added some bots function to attack players. Tracer, Mcree, Widow,Hanzo, Pharah, Moria, Sym, etc.

Tracer now has two mode, normal strafe mode like previous or following mode, which will engage nearby players.

Added radius control to allow bots move to more open area.

2X0TN
click to copy
10 months ago 9.1.0

Added new bots ablities -Moria fade when taking damage -Lucio boop when taking damage from a nearby player. -Sombra will hack nearby players.

BHX3F
click to copy
10 months ago 9.0.0

This revision contains no notes

H2YVM
click to copy