Return to post
- variables
- {
- global:
0: closestEnemy
1: enemiesInLOS
- 0: closestTarget
- 1: targetsInLOS
- 2: aimbotToggle
- }
- rule("Init")
- {
- event
- {
- Ongoing - Global;
- }
- actions
- {
- Global.aimbotToggle = True;
- }
- }
rule("Primary fire")
- rule("Primary fire / Secondary fire")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
Is Button Held(Event Player, Primary Fire) == True;
- (Is Button Held(Event Player, Primary Fire) || Is Button Held(Event Player, Secondary Fire)) == True;
- Hero Of(Event Player) == Hero(McCree);
- "McMachinegun for host only"
- disabled Host Player == Event Player;
- }
- actions
- {
- If(Global.aimbotToggle == True);
Global.enemiesInLOS = Filtered Array(All Players(All Teams), Is Alive(Current Array Element)
- Global.targetsInLOS = Filtered Array(All Players(All Teams), Is Alive(Current Array Element)
- == True && Event Player != Current Array Element && Is In Line of Sight(Eye Position(Event Player), Current Array Element,
- Barriers Do Not Block LOS) == True);
Global.closestEnemy = First Of(Sorted Array(Global.enemiesInLOS, Distance Between(Event Player, Current Array Element)));
- Global.closestTarget = First Of(Sorted Array(Global.targetsInLOS, Distance Between(Event Player, Current Array Element)));
- "If there are no enemies within line of sight"
If(Global.closestEnemy == 0);
- If(Global.closestTarget == 0);
- Start Facing(Event Player, Vector(X Component Of(Facing Direction Of(Event Player)), 0, Z Component Of(Facing Direction Of(
- Event Player))), 10, To World, Direction and Turn Rate);
- "target closest enemy within line of sight"
- Else;
Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Global.closestEnemy)), 10000, To World,
- Start Facing(Event Player, Direction Towards(Eye Position(Event Player), Eye Position(Global.closestTarget)), 10000, To World,
- Direction and Turn Rate);
- End;
- End;
- Press Button(Event Player, Ability 1);
- Cancel Primary Action(Event Player);
- Wait(0.016, Ignore Condition);
- Set Ability Cooldown(Event Player, Button(Ability 1), 0);
- Loop If Condition Is True;
- Wait(0.400, Ignore Condition);
- Stop Facing(Event Player);
- }
- }
- rule("Aimbot toggle")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Interact) == True;
- }
- actions
- {
- If(Global.aimbotToggle == True);
- Global.aimbotToggle = False;
- Small Message(Event Player, Custom String("aimbot off"));
- Else;
- Small Message(Event Player, Custom String("aimbot on"));
- Global.aimbotToggle = True;
- End;
- }
- }
- disabled rule("create dummy bot")
- {
- event
- {
- Ongoing - Each Player;
- All;
- All;
- }
- conditions
- {
- Is Button Held(Event Player, Ultimate) == True;
- }
- actions
- {
- Create Dummy Bot(Hero(Roadhog), All Teams, -1, Position Of(Event Player), Facing Direction Of(Event Player));
- }
- }