Universal Mining Open Source

mail@pastecode.io avatar
unknown
java
2 years ago
2.4 kB
4
Indexable
Never
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 UniversalPickaxe
    {
        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()
        {
            String name = "";
            if (Inventory.Contains("Copper ore"))
            {
                name = "Copper rock";
            }
            else if (Inventory.Contains("Iron ore"))
            {
                name = "Iron rock";
            }
            else if (Inventory.Contains("Coal"))
            {
                name = "Coal rock";
            }
            else if (Inventory.Contains("Mithril ore"))
            {
                name = "Mithril rock";
            }
            else if (Inventory.Contains("Adamantite ore"))
            {
                name = "Adamantite rock";
            }
            else if (Inventory.Contains("Luminite ore"))
            {
                name = "Luminite rock";
            }
            else if (Inventory.Contains("Runite ore"))
            {
                name = "Runite rock";
            }


            while (true)
            {
                if (Inventory.Full())
                {

                    for (int i = 0; i <= 24; i++)
                    {
                        Rabot.Hardware.Keyboard.SendKey(Keys.D1);
                        Thread.Sleep(400);
                    }
                }
                Rabot.API.Objects.GetNearest(name).Action(MiniMenu.OPTION1);
                Thread.Sleep(3000);
                MoveCameraRandomly();
                
            }
        }
    }
}