using Rabot.Hardware;
using Rabot.API;
using System.Threading;
using System.Windows.Forms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Script
{
public class NewBurAgility
{
private void WaitMovement()
{
int securityCounter = 0;
var player = Rabot.API.Players.Self();
Thread.Sleep(250);
do
{
Thread.Sleep(1500);
if (player.Update().idle) ++securityCounter;
} while (securityCounter <= 2);
}
public void Wait()
{
var player = Rabot.API.Players.Self();
WaitMovement();
while (player.Update().animation != -1)
Thread.Sleep(1000);
}
public void MoveCameraRandomly()
{
int num1 = new Random().Next(18, 22);
int num2 = 0;
int num3 = num2;
int num4;
if (num1 <= num3)
{
num4 = num2 + 1;
}
else
{
num4 = 0;
int num5 = new Random().Next(15, 726);
Rabot.Hardware.Keyboard.HoldKey(Keys.Down, num5);
Rabot.Hardware.Keyboard.HoldKey(Keys.Up, num5);
Rabot.Hardware.Keyboard.HoldKey(Keys.Left, num5);
}
}
public void Main()
{
while (true)
{
var pers_coordinates = Rabot.API.Players.Self().coordinates;
do
{
Objects.GetNearest("Log beam").Action(MiniMenu.OPTION1);
Wait();
pers_coordinates = Rabot.API.Players.Self().coordinates;
} while (pers_coordinates.x != 2916);
do
{
Objects.GetNearest("Wall").Action(MiniMenu.OPTION1);
Wait();
pers_coordinates = Rabot.API.Players.Self().coordinates;
} while (pers_coordinates.x != 2912);
do
{
Objects.GetNearest("Balancing ledge").Action(MiniMenu.OPTION1);
Wait();
pers_coordinates = Rabot.API.Players.Self().coordinates;
} while (pers_coordinates.x != 2910);
do
{
Objects.GetNearest("Obstacle low wall").Action(MiniMenu.OPTION1);
Wait();
pers_coordinates = Rabot.API.Players.Self().coordinates;
} while (pers_coordinates.x != 2912);
do
{
Objects.GetNearest("Rope swing").Action(MiniMenu.OPTION1);
Wait();
pers_coordinates = Rabot.API.Players.Self().coordinates;
} while (pers_coordinates.x != 2912);
do
{
Objects.GetNearest("Monkey bars").Action(MiniMenu.OPTION1);
Wait();
pers_coordinates = Rabot.API.Players.Self().coordinates;
} while (pers_coordinates.x != 2921);
do
{
Objects.GetNearest("Ledge").Action(MiniMenu.OPTION1);
Wait();
pers_coordinates = Rabot.API.Players.Self().coordinates;
} while (pers_coordinates.x != 2922);
MoveCameraRandomly();
}
}
}
}