2 Replies Latest reply on Oct 6, 2010 11:02 AM by 800413

    Help: WoW fishing

      Earlier this year, a friend of mine bet that I would'nt be able to make a fishing bot for
      world of warcraft. So now im trying. Not planning on making any gfx or anything, just
      make it as a proof to him.

      Currently my verson works pretty good (at times), just that when the enviroment im fishing in changes,
      i got to change the RBG it looks for to find the fishing blobb (i dont mind this), and i got to keep changing and
      trying other values at some other variables aswell..

      How it works:
      1. Program presses button '1' at keyboard by using the Java Robot.
      2. Takes a picture of the screen with the robot class.
      3. Scans through the image (pixel by pixel), and checks if it finds any pixels that meets the requirements
      (example: Red has a value between 50 - 70, green between 30 - 60 and blue between 10 - 30).
      4. When found, it takes pictures from the location of the blobb (which it found in the scan at point nr 3). It takes a little picture of the top of the blobb.
      This is so that when a fish bites, the blobb moves down a bit, and it will then move abit out of the picture im taking (the picture im taking at the moment, is about 30x15 pixels).
      The blobb itself is pretty much bigger, but can vary in size depending on the distance it is from the player (random distance each time you throw out the line).
      5. When it sees in one of the images its taking (once every 50 ms), that the color it was looking for disapeared (since the blobb moves abit away from the current location), it goes
      to the recorded position, and right clicks it (to open).
      6. Repeat from number 1.

      This works great at some places (when i got the RBG scale between numbers that usualy fits).
      Sometimes the enviroment makes the blobb darker or lighter, something that reflects in the RBG values.
      So my problem is that I always have to change the RBG values, and find the most fitting values for it at the current location (Where the player is).
      What im asking, is if anyone got another idea on how to do this, or got another view on the problem? (Cant use memory injection)

      Code for the fisher:
          private boolean findBlobb() {
              BufferedImage img = myRobot.createScreenCapture(getScreenRectangle());
              for (int i = 0; i < getScreenRectangle().width; i++) {
                  for (int j = 0; j < getScreenRectangle().height; j++) {
                      if (informationObject.RGBAccept(img.getRGB(i, j))) { // CHECKS IF ITS WITHIN THE SET RANGE (Example: R > 30 && R < 60, G > 10 && G < 20, B > 20 && B < 40)
                          Rectangle rect = new Rectangle();
                          rect.setLocation(i - 12, j - 12);
                          printImage(rect, String.valueOf(informationObject.numberOfFishes)); // TAKES A PICTURE, SAVES IT, SO I CAN SEE THE PICTURE OF THE BLOBB AND COMFIRM CORRECT
                          return true;
              return false;
          private void monitorBlobb(Rectangle rect) {
              for (int i = 0; i < 320; i++) {
                  BufferedImage img = myRobot.createScreenCapture(rect);
                  if (!checkBlobbMovement(img)) {
          private boolean checkBlobbMovement(BufferedImage img) {
              boolean isOk = false;
              for (int i = 0; i < img.getWidth(); i++) {
                  for (int j = 0; j < img.getHeight(); j++) {
                      if (informationObject.RGBAccept(img.getRGB(i, j))) { // SAME AS OTHER ONE. IS TO SEE IF THE COLOR IT IS LOOKING FOR IN THE IMAGE, HAS BEEN MOVED OUT OF THE IMG.
                          isOk = true;
              return isOk;
      For those that wonder what the blobb looks like:
      [Image 1|http://wow.zuggaming.com/wp-content/uploads/fishing_gold_tips.jpg]
      [Google Images|http://www.google.co.uk/images?hl=en&q=World%20of%20warcraft%20fishing&um=1&ie=UTF-8&source=og&sa=N&tab=wi&biw=1420&bih=769]