public static void plantFlower(String flowerCombo)
        {
            DialogResult confirmation;

            //check if plant button is (0,0). True means continue, not (0,0)
            if (BotFunctions.checkCoordinates("1"))
            {
                confirmation = MessageBox.Show("Press OK when ready to begin!", "", MessageBoxButtons.OKCancel);
                if (confirmation.Equals(DialogResult.Cancel))
                {
                    return;
                }
                Thread.Sleep(2000);
                getCoords("1");
                BotFunctions.MoveCursor(x, y);
                BotFunctions.DoMouseClick();
                Thread.Sleep(2000);
                checkBeans("2");

                char[] beans = flowerCombo.ToCharArray();
                selectBeans(flowerCombo, beans);
                pressPlantButton();
                Thread.Sleep(1500);
                MessageBox.Show("Done!");
            }
            else
            {
                BotFunctions.updateCoordinates("1");//update the plant flower button coords
                plantFlower(flowerCombo);
                Thread.Sleep(2000);
            }
        }
Example #2
0
        private void button5_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Press OK when ready to begin!");
            Thread.Sleep(2000);
            BotFunctions.DoMouseClick();
            Racing.startRacing();

            Rectangle bounds = Screen.GetWorkingArea(Point.Empty);

            using (Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height))
            {
                using (Graphics g = Graphics.FromImage(bitmap))
                {
                    g.CopyFromScreen(Point.Empty, Point.Empty, bounds.Size);
                }
                int x = 950;
                int y = 755;
                while (y <= 780 && x <= 970)
                {
                    richTextBox1.AppendText(BotFunctions.HexConverter(bitmap.GetPixel(x, y)) + "\n");
                    x++;
                    y++;
                }
            }
        }
 private static void send(String text)
 {
     BotFunctions.DoMouseClick();
     Thread.Sleep(500);
     InputSimulator.SimulateTextEntry(text);
     Thread.Sleep(500);
     SendKeys.SendWait("{ENTER}");
 }
Example #4
0
        public static void openSpeedChat()
        {
            Thread.Sleep(1000);
            //Below is the location for the SpeedChat button location
            //check if coordinates for the button is (0,0). True means they're not (0,0).
            if (BotFunctions.checkCoordinates("20"))
            {
                getCoords("20");
                BotFunctions.MoveCursor(x, y);
                BotFunctions.DoMouseClick();
                Thread.Sleep(1000);

                //Below is the location for pets tab
                //check if coordinates for the button is (0,0). True means they're not (0,0).
                if (BotFunctions.checkCoordinates("21"))
                {
                    getCoords("21");
                    BotFunctions.MoveCursor(x, y);
                    BotFunctions.DoMouseClick();
                    Thread.Sleep(1000);

                    //Below is the location for tricks tab
                    //check if coordinates for the button is (0,0). True means they're not (0,0).
                    if (BotFunctions.checkCoordinates("22"))
                    {
                        getCoords("22");
                        BotFunctions.MoveCursor(x, y);
                        BotFunctions.DoMouseClick();
                        Thread.Sleep(1000);
                    }
                    else
                    {
                        BotFunctions.updateCoordinates("22");
                        Thread.Sleep(2000);
                        openSpeedChat();
                    }
                }
                else
                {
                    BotFunctions.updateCoordinates("21");
                    Thread.Sleep(2000);
                    openSpeedChat();
                }
            }
            else//means it was (0,0) and needs updated
            {
                BotFunctions.updateCoordinates("20");
                Thread.Sleep(2000);
                openSpeedChat();
            }
        }
 private static void exitFishing()
 {
     if (BotFunctions.checkCoordinates("16"))//returns true if they are not 0,0
     {
         getCoords("16");
         BotFunctions.MoveCursor(x, y);
         BotFunctions.DoMouseClick();
     }
     else
     {
         BotFunctions.updateCoordinates("16");
         exitFishing();
     }
 }
        public static Boolean keepToonAwake(int min)
        {
            DateTime endTime = DateTime.Now.AddMinutes(min);

            BotFunctions.DoMouseClick();
            while (endTime > DateTime.Now)
            {
                SendKeys.SendWait("^");
                if (Control.ModifierKeys == Keys.Alt)//break out of loop
                {
                    return(true);
                }
            }
            return(false);
        }
 private static void selectYESToRemove()
 {
     if (BotFunctions.checkCoordinates("14"))
     {
         getCoords("14");
         BotFunctions.MoveCursor(x, y);
         BotFunctions.DoMouseClick();
     }
     else
     {
         BotFunctions.updateCoordinates("14");//update the plant flower button coords
         selectYESToRemove();
         Thread.Sleep(2000);
     }
 }
 private static void sellFish()
 {
     if (BotFunctions.checkCoordinates("17"))//returns true if they are not 0,0
     {
         Thread.Sleep(2100);
         getCoords("17");
         BotFunctions.MoveCursor(x, y);
         BotFunctions.DoMouseClick();
     }
     else
     {
         BotFunctions.updateCoordinates("17");
         sellFish();
     }
     Thread.Sleep(2000);
 }
 private static void clickOKAfterPlant()
 {
     if (BotFunctions.checkCoordinates("12"))
     {
         getCoords("12");
         BotFunctions.MoveCursor(x, y);
         BotFunctions.DoMouseClick();
         Thread.Sleep(2000);
     }
     else
     {
         BotFunctions.updateCoordinates("12");
         Thread.Sleep(2000);
         clickOKAfterPlant();
     }
 }
Example #10
0
 public static void scratchDoodle()
 {
     if (BotFunctions.checkCoordinates("19"))
     {
         getCoords("19");
         BotFunctions.MoveCursor(x, y);
         BotFunctions.DoMouseClick();
         Thread.Sleep(10000);
     }
     else
     {
         BotFunctions.updateCoordinates("19");
         Thread.Sleep(2000);
         scratchDoodle();
     }
 }
        private static void selectBeans(String flowerCombo, char[] beans)
        {
            for (int i = 0; i < flowerCombo.Length; i++)
            {
                switch (beans[i])
                {
                case 'r':
                    getCoords("2");
                    break;

                case 'g':
                    getCoords("3");
                    break;

                case 'o':
                    getCoords("4");
                    break;

                case 'u':
                    getCoords("5");
                    break;

                case 'b':
                    getCoords("6");
                    break;

                case 'i':
                    getCoords("7");
                    break;

                case 'y':
                    getCoords("8");
                    break;

                case 'c':
                    getCoords("9");
                    break;

                case 's':
                    getCoords("10");
                    break;
                }
                BotFunctions.MoveCursor(x, y);
                BotFunctions.DoMouseClick();
                Thread.Sleep(2000);
            }
        }
Example #12
0
 public static void feedDoodle()
 {
     //check if coordinates for the button is (0,0). True means they're not (0,0).
     if (BotFunctions.checkCoordinates("18"))
     {
         getCoords("18");
         BotFunctions.MoveCursor(x, y);
         BotFunctions.DoMouseClick();
         Thread.Sleep(11500);
     }
     else//means it was (0,0) and needs updated
     {
         BotFunctions.updateCoordinates("18");
         Thread.Sleep(2000);
         feedDoodle();
     }
 }
 public static void removePlant()
 {
     if (BotFunctions.checkCoordinates("1"))
     {
         getCoords("1");
         MessageBox.Show("Press OK when ready to begin!");
         Thread.Sleep(2000);
         BotFunctions.MoveCursor(x, y);
         BotFunctions.DoMouseClick();
         selectYESToRemove();
     }
     else
     {
         BotFunctions.updateCoordinates("1");//update the plant flower button coords
         removePlant();
         Thread.Sleep(2000);
     }
 }
 public static void waterPlant()
 {
     if (BotFunctions.checkCoordinates("13"))
     {
         getCoords("13");
         BotFunctions.MoveCursor(x, y);
         BotFunctions.DoMouseClick();
         Thread.Sleep(4000);
         BotFunctions.MoveCursor(x, y);
         BotFunctions.DoMouseClick();
         Thread.Sleep(2000);
     }
     else
     {
         BotFunctions.updateCoordinates("13");
         Thread.Sleep(2000);
         waterPlant();
     }
 }