Results 1 to 17 of 17

Thread: Best procedure/function for finding fishing spot

  1. #1
    Join Date
    Feb 2009
    Location
    Denmark.
    Posts
    359
    Mentioned
    12 Post(s)
    Quoted
    64 Post(s)

    Default Best procedure/function for finding fishing spot

    Hello everyone

    What's the best way to find a fishing spot?

    It's easy to find still things, like ores etc. But fishing spots are moving, would appreciate your input/ideas

  2. #2
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by Semtex View Post
    Hello everyone

    What's the best way to find a fishing spot?

    It's easy to find still things, like ores etc. But fishing spots are moving, would appreciate your input/ideas
    When I found fishing spots in crey crey evertim I first looked for the blue water colour, got it's bounds, and then looked for the white spot colour within those bounds. So basically looking for the fishing spot within the water.

  3. #3
    Join Date
    Feb 2009
    Location
    Denmark.
    Posts
    359
    Mentioned
    12 Post(s)
    Quoted
    64 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    When I found fishing spots in crey crey evertim I first looked for the blue water colour, got it's bounds, and then looked for the white spot colour within those bounds. So basically looking for the fishing spot within the water.
    are you using TPA's for that or dtm?

  4. #4
    Join Date
    Dec 2010
    Posts
    483
    Mentioned
    30 Post(s)
    Quoted
    328 Post(s)

    Default

    I found looking for a certain color (the white spots) and then building a small TBox around that and searching for pixel shifting within that box to be highly reliable.

    Ultimately use the mouse text to make sure you have infact found the right location, otherwise search again.

  5. #5
    Join Date
    Feb 2009
    Location
    Denmark.
    Posts
    359
    Mentioned
    12 Post(s)
    Quoted
    64 Post(s)

    Default

    I'm trying to make a fishing guild script, i got the sps walking and banking down, but the fishing is a thoughy, been looking at other peoples fishing scripts for idea's, but most of them doesn't work very well

  6. #6
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by Semtex View Post
    I'm trying to make a fishing guild script, i got the sps walking and banking down, but the fishing is a thoughy, been looking at other peoples fishing scripts for idea's, but most of them doesn't work very well
    This is the spot snippet. Write this a while ago so it's a bit bloated but you will get the general idea

    Simba Code:
    function findSpot(): boolean;
    var
      x, y, i: integer;
      TPAwater, TPAspot: TPointArray;
      ATPAwater, ATPAspot: T2DPointArray;
    begin
       if not isLoggedIn() then exit;
                                     // look for the water colour
      findColorsSpiralTolerance(x, y, TPAwater, 9064239, mainScreen.getBounds(), 6, colorSetting(2, 0.11, 0.57));
      debug('Water TPA length: ' + toStr(length(TPAwater)));

      if length(TPAwater) > 0 then
      begin
        mainScreen.filterPointsPlayer(TPAwater);
        ATPAwater := TPAwater.cluster(10);   // split into an ATPA and filter out small TPAs
        ATPAwater.filterBetween(1, 100);
        debug('Water ATPA length: ' + toStr(length(ATPAwater)));

        if length(ATPAwater) > 0 then
        begin
          ATPAwater.sortFromMidPoint(mainScreen.playerPoint); // Sort all water TPAs from player
          paintDebug('atpa', ATPAwater);

          for i := 0 to high(ATPAwater) do  // Looping through water TPAs (although there is probably only 1)
          begin
            findColorsSpiralTolerance(x, y, TPAspot, 14468515, ATPAwater[i].getBounds(), 12, colorSetting(2, 0.28, 0.25));
            debug('Spot TPA length: ' + toStr(length(TPAspot)));  // looking for spot colour, inside water TPA bounds

            if length(TPAspot) > 0 then
            begin
              mainScreen.filterPointsPlayer(TPAspot);
              ATPAspot := TPAspot.cluster(10);    // Split into individual fishing spots
              ATPAspot.filterBetween(1, 3);
              debug('Spot ATPA length: ' + toStr(length(ATPAspot)));

              if length(ATPAspot) > 0 then
              begin
                ATPAwater.sortFromMidPoint(mainScreen.playerPoint);
                paintDebug('atpa', ATPAspot);

                for i := 0 to high(ATPAspot) do  // Loop through each potential fishing spot, check overText
                begin
                  mouseBox(ATPAspot[i].getBounds(), MOUSE_MOVE);
                  if isMouseOverText(['age']) then
                  begin
                    debug('Found spot mouseOverText');

                    if randomClick(10, ['age']) then
                    begin
                      randomMouse(10, false, 500, 1300);
                      result := true;
                      break;
                    end;

                  end else
                    debug('Spot mouseOverText didn''t match');
                end;

                paintDebug('clear');

              end else
                debug('Spot ATPA length = 0 after filter');

            end;
          end;
        end;
      end;
    end;

  7. #7
    Join Date
    Feb 2009
    Location
    Denmark.
    Posts
    359
    Mentioned
    12 Post(s)
    Quoted
    64 Post(s)

    Default

    @The Mayor; Thanks i will try with the code you provided, if that's okay?

    Although when i'm compiling it, it doesnt like the debug commands or the random mouse


    I've out commented the lines it wont compile, the error is: Unknown declaration for all of them
    Simba Code:
    function findSpot(): boolean;
    var
      x, y, i: integer;
      TPAwater, TPAspot: TPointArray;
      ATPAwater, ATPAspot: T2DPointArray;
    begin
       if not isLoggedIn() then exit;
                                     // look for the water colour
      findColorsSpiralTolerance(x, y, TPAwater, 9064239, mainScreen.getBounds(), 6, colorSetting(2, 0.11, 0.57));
      //debug('Water TPA length: ' + toStr(length(TPAwater)));

      if length(TPAwater) > 0 then
      begin
        mainScreen.filterPointsPlayer(TPAwater);
        ATPAwater := TPAwater.cluster(10);   // split into an ATPA and filter out small TPAs
        ATPAwater.filterBetween(1, 100);
        //debug('Water ATPA length: ' + toStr(length(ATPAwater)));

        if length(ATPAwater) > 0 then
        begin
          ATPAwater.sortFromMidPoint(mainScreen.playerPoint); // Sort all water TPAs from player
          //paintDebug('atpa', ATPAwater);

          for i := 0 to high(ATPAwater) do  // Looping through water TPAs (although there is probably only 1)
          begin
            findColorsSpiralTolerance(x, y, TPAspot, 14468515, ATPAwater[i].getBounds(), 12, colorSetting(2, 0.28, 0.25));
            //debug('Spot TPA length: ' + toStr(length(TPAspot)));  // looking for spot colour, inside water TPA bounds

            if length(TPAspot) > 0 then
            begin
              mainScreen.filterPointsPlayer(TPAspot);
              ATPAspot := TPAspot.cluster(10);    // Split into individual fishing spots
              ATPAspot.filterBetween(1, 3);
              //debug('Spot ATPA length: ' + toStr(length(ATPAspot)));

              if length(ATPAspot) > 0 then
              begin
                ATPAwater.sortFromMidPoint(mainScreen.playerPoint);
                //paintDebug('atpa', ATPAspot);

                for i := 0 to high(ATPAspot) do  // Loop through each potential fishing spot, check overText
                begin
                  mouseBox(ATPAspot[i].getBounds(), MOUSE_MOVE);
                  if isMouseOverText(['age']) then
                  begin
                    //debug('Found spot mouseOverText');

                    //if randomClick(10, ['age']) then
                    begin
                      //randomMouse(10, false, 500, 1300);
                      result := true;
                      break;
                    end;

                  end else
                    //debug('Spot mouseOverText didn''t match');
                end;

                //paintDebug('clear');

              end else
                //debug('Spot ATPA length = 0 after filter');

            end;
          end;
        end;
      end;
    end;

  8. #8
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Yea, those are some other procedure I had in that script. You can just change the debug to writeLn, and the mouse stuff to soemthing like

    Simba Code:
    for i := 0 to high(ATPAspot) do
    begin
      mouseBox(ATPAspot[i].getBounds(), MOUSE_MOVE);

      if isMouseOverText(['age']) then
      begin
        fastClick(MOUSE_RIGHT)
        if chooseOption.select(['age']) then
          exit(true);
      end;
    end;

  9. #9
    Join Date
    Feb 2009
    Location
    Denmark.
    Posts
    359
    Mentioned
    12 Post(s)
    Quoted
    64 Post(s)

    Default

    @The Mayor;

    Simba Code:
    function findSpot(): boolean;
    var
      x, y, i: integer;
      TPAwater, TPAspot: TPointArray;
      ATPAwater, ATPAspot: T2DPointArray;
    begin
       if not isLoggedIn() then exit;
                                     // look for the water colour
      findColorsSpiralTolerance(x, y, TPAwater, 9064239, mainScreen.getBounds(), 6, colorSetting(2, 0.11, 0.57));
      writeLn('Water TPA length: ' + toStr(length(TPAwater)));

      if length(TPAwater) > 0 then
      begin
        mainScreen.filterPointsPlayer(TPAwater);
        ATPAwater := TPAwater.cluster(10);   // split into an ATPA and filter out small TPAs
        ATPAwater.filterBetween(1, 100);
        writeLn('Water ATPA length: ' + toStr(length(ATPAwater)));

        if length(ATPAwater) > 0 then
        begin
          ATPAwater.sortFromMidPoint(mainScreen.playerPoint); // Sort all water TPAs from player
          writeLn('atpa', ATPAwater);

          for i := 0 to high(ATPAwater) do  // Looping through water TPAs (although there is probably only 1)
          begin
            findColorsSpiralTolerance(x, y, TPAspot, 14468515, ATPAwater[i].getBounds(), 12, colorSetting(2, 0.28, 0.25));
            writeLn('Spot TPA length: ' + toStr(length(TPAspot)));  // looking for spot colour, inside water TPA bounds

            if length(TPAspot) > 0 then
            begin
              mainScreen.filterPointsPlayer(TPAspot);
              ATPAspot := TPAspot.cluster(10);    // Split into individual fishing spots
              ATPAspot.filterBetween(1, 3);
              writeLn('Spot ATPA length: ' + toStr(length(ATPAspot)));

              if length(ATPAspot) > 0 then
              begin
                ATPAwater.sortFromMidPoint(mainScreen.playerPoint);
                writeLn('atpa', ATPAspot);

                for i := 0 to high(ATPAspot) do  // Loop through each potential fishing spot, check overText
                begin
                  mouseBox(ATPAspot[i].getBounds(), MOUSE_MOVE);
                  if isMouseOverText(['net']) then
                  begin
                    writeLn('Found spot mouseOverText');

                   for i := 0 to high(ATPAspot) do
                      begin
                        mouseBox(ATPAspot[i].getBounds(), MOUSE_MOVE);

                        if isMouseOverText(['net']) then
                          begin
                            fastClick(MOUSE_RIGHT)
                            if chooseOption.select(['harpoon']) then
                            exit(true);
                          end;
                      end;

                  end else
                    writeLn('Spot mouseOverText didn''t match');
                end;

                writeLn('clear');

              end else
                writeLn('Spot ATPA length = 0 after filter');

            end;
          end;
        end;
      end;
    end;

    Like this?

    One other thing, i followed your aio guide to scripting(really good btw), and the sps was quite simple, but when it came to finding finding colors for deposit box/banker, i had some trouble.

    I chose one color at a time and pressed show color, if it marked what i wanted it to mark i let it be, if it didnt, i deleted it.

    But i could never get to mark the entire banker, like you do in your guide, is there a good trick to using aca for color collecting?

  10. #10
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by Semtex View Post
    @The Mayor;


    Like this?

    One other thing, i followed your aio guide to scripting(really good btw), and the sps was quite simple, but when it came to finding finding colors for deposit box/banker, i had some trouble.

    I chose one color at a time and pressed show color, if it marked what i wanted it to mark i let it be, if it didnt, i deleted it.

    But i could never get to mark the entire banker, like you do in your guide, is there a good trick to using aca for color collecting?
    Nah, you still have half of the old loop in there. Delete all the red stuff



    The simply rule with ACA is the more colours you can pick the better. Even if it matches good, pick more. Change worlds and pick more. The more colours you use to generate the best colour, the more stable your colour will be.

  11. #11
    Join Date
    Feb 2009
    Location
    Denmark.
    Posts
    359
    Mentioned
    12 Post(s)
    Quoted
    64 Post(s)

    Default

    @The Mayor; Thanks alot
    i just needed to figure out how to add colors
    I'll let you know if it works or not, when i'm done collecting colors!
    Last edited by Semtex; 08-17-2015 at 08:40 PM.

  12. #12
    Join Date
    Feb 2009
    Location
    Denmark.
    Posts
    359
    Mentioned
    12 Post(s)
    Quoted
    64 Post(s)

    Default

    @The Mayor;
    Hiyo mate, the function is working perfectly!

    Now i just have to make it identify that it's fishing, because it will click the spot over and over again.

    You don't have to actually give the function/procedure this time just guide me in the right direction :P

    Regards Semtex

  13. #13
    Join Date
    Apr 2015
    Location
    FireFox
    Posts
    528
    Mentioned
    10 Post(s)
    Quoted
    227 Post(s)

    Default

    Quote Originally Posted by Semtex View Post
    @The Mayor;
    Hiyo mate, the function is working perfectly!

    Now i just have to make it identify that it's fishing, because it will click the spot over and over again.

    You don't have to actually give the function/procedure this time just guide me in the right direction :P

    Regards Semtex
    You can mess around with the this eg. changing the 300
    Simba Code:
    while (mainScreen.isPlayerAnimating(minShift: integer = 300)) do
    begin
      antiban();
      wait(50 + random(50));
    end;
    Scripting with ogLib

  14. #14
    Join Date
    Feb 2009
    Location
    Denmark.
    Posts
    359
    Mentioned
    12 Post(s)
    Quoted
    64 Post(s)

    Default

    Quote Originally Posted by srlMW View Post
    You can mess around with the this eg. changing the 300
    Simba Code:
    while (mainScreen.isPlayerAnimating(minShift: integer = 300)) do
    begin
      antiban();
      wait(50 + random(50));
    end;
    Cheers will try that

  15. #15
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by Semtex View Post
    @The Mayor;
    Hiyo mate, the function is working perfectly!

    Now i just have to make it identify that it's fishing, because it will click the spot over and over again.

    You don't have to actually give the function/procedure this time just guide me in the right direction :P

    Regards Semtex
    You can just look at the original script: https://villavu.com/forum/showthread.php?t=110722

  16. #16
    Join Date
    Feb 2009
    Location
    Denmark.
    Posts
    359
    Mentioned
    12 Post(s)
    Quoted
    64 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    You can just look at the original script: https://villavu.com/forum/showthread.php?t=110722
    Cheers

    Another question though.

    Is there a way where you limit the part of the screen it's fishing for.

    For example, at the fishing guild, when zoomed out so you can see all the north docks fishing spots, you can also see the south docks fishing spots, to prevent it from clicking spots there, then make it look for spots within a predefined X-Y coords on the mainscreen?

  17. #17
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by Semtex View Post
    Cheers

    Another question though.

    Is there a way where you limit the part of the screen it's fishing for.

    For example, at the fishing guild, when zoomed out so you can see all the north docks fishing spots, you can also see the south docks fishing spots, to prevent it from clicking spots there, then make it look for spots within a predefined X-Y coords on the mainscreen?
    Well, instead of searching for colours in mainScreen.getBounds(), make your own TBox.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •