Results 1 to 6 of 6

Thread: Fishing spots?

  1. #1
    Join Date
    Nov 2006
    Posts
    181
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Fishing spots?

    I've been trying for a long time now finding a way for a script to find them.
    There is too much white on the screen meaning color won't work, I can grid it all up since I want the character to move.

    A lot of people told me to use TPAs, but I don't know how to use it for the fishing spots?

    Thanks in advance.

  2. #2
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    take a look in my script, Powerskills. It does a good job on fishing spot identification. If that is too confusing, look at my edgeville fisher.
    “Ignorance, the root and the stem of every evil.”

  3. #3
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I suggest you
    1. Make an autocolor for the fishing bubbles using ACA(Auto Color Aid). That should be somewhere in your scar folder.
    2. Collect the colors found from your autocolor in a TPA. (FindColorSpiralTolerance)

    If you don't know how to use TPAs go here:
    http://villavu.com/forum/showthread.php?t=21786
    http://villavu.com/forum/showthread.php?t=26006

  4. #4
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    http://villavu.com/repositories/srl-...l/Fishing.scar

    SCAR Code:
    // * function FindFishSpotsTPA(var VTPA:TPointArray): Boolean;     // by Rasta Magician, fixed by Marpis
    // * Function FindFishSpot(var xx, yy: integer; which: string): Boolean;  // by Rasta Magician

    {*******************************************************************************
    function FindFishSpotsTPA(var VTPA:TPointArray): Boolean;
    By: Rasta Magician, fixed by Marpis
    Description: Finds all possible Fish Spots and stores them in the given TPA
                 Returns true if found at least one, false if none
    *******************************************************************************}

    function FindFishSpotsTPA(var VTPA:TPointArray): Boolean;
    var
      TPA, tempTPA:  TPointArray;
      ATPA: T2DPointArray;
      i, tmpCTS, VTPASize, T: Integer;
      TP: TPoint;
     
    begin
      Result := False;
      if (not LoggedIn) then exit;

      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.12, 0.27);

      T := GetSystemTime + 700;
      repeat
        FindColorsSpiralTolerance(MSCX, MSCY, tempTPA, 11117214, MSX1, MSY1, MSX2, MSY2, 3);
        TPA := CombineTPA(tempTPA, TPA);
      until(GetSystemTime > T);

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (Length(TPA) < 1) then exit;

      VTPASize := 1;
      SetLength(VTPA, 1);
      ATPA := SplitTPA(TPA, 10);
      SortATPAFrom(ATPA, Point(MSCX, MSCY));
      SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
      for i := 0 to High(ATPA) do
      begin
        TP := MiddleTPA(ATPA[i]);

        VTPA[VTPASize - 1] := TP;
        Inc(VTPASize);
        SetLength(VTPA, VTPASize);
      end;
      Result := (VTPASize > 1);
    end;

    {*******************************************************************************
    function FindFishSpot(var xx, yy: integer; which: string): Boolean;
    By: Rasta Magician
    Description: Finds a fishing spot, according to your needs.
                 Stores (x, y) coordinates to the given variables.
                 which:
                   'harpoon'          -> Harpoon fishing
                   'cage', 'lobster'  -> Cage Fishing
                   'fly', 'flyfish'   -> Fly Fishing
                   'rod', 'bait'      -> Bait Fishing
                   'net'              -> Net Fishing
    *******************************************************************************}

    function FindFishSpot(var X, Y: Integer; Which: string): Boolean;
    var
      TPA:  TPointArray;
      s: string;
      i: integer;
    begin
      if (not FindFishSpotsTPA(TPA)) then exit;

      case lowercase(which) of
        'harpoon':         S := 'arpoon Fis';
        'cage', 'lobster': S := 'age Fis';
        'fly', 'flyfish':  S := 'ure Fis';
        'rod', 'bait':     S := 'ait Fis';
        'net':             S := 'et Fis';
      end;

      for i := 0 to High(TPA) do
      begin
        MMouse(TPA[i].x, TPA[i].y, 5, 5);
        if WaitUpText(S, 375) then
        begin
          GetMousePos(X, Y);
          Wait(Random(100));
          Result := True;
          Exit;
        end else
        begin
          GetMousePos(X, Y);
          Mouse(X, Y, 0, 0, False);
          if WaitOptionEx(S, 'all', Nothing, 375) then
          begin
            ChooseOption('ancel');
            Result := True;
            Exit;
          end;
          ChooseOption('ancel');
        end;
      end;
    end;

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  5. #5
    Join Date
    Nov 2006
    Posts
    181
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks, one more thing:

    I tried uptext(), though it couldn't find any.

    Is there a way maybe configuring it to work?
    Or maybe find on the whole screen or in a certain box certain text?
    I think it's the same font as RS has.

  6. #6
    Join Date
    Oct 2006
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Use
    SCAR Code:
    MMouse(x, y, 3, 3);//mousing over the thing that will make the uptext
    Wait(150 + random(50)); // this is needed because the uptext takes a small amount of time before it appears.
    IsUpText('part of text here')

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
  •