Results 1 to 6 of 6

Thread: Fishing Spot Help

  1. #1
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Fishing Spot Help

    I created this function:
    SCAR Code:
    Function FindSpots : Boolean;
    Var
      Bx, By : Integer;
      TPA : Array Of TPoint;
      ATPA : T2DPointArray;
      I : Integer;

    Begin
       FindColorsSpiralTolerance(Bx, By, TPA, 13221816, MSX1, MSY1, MSX2, MSY2, 16)
        Begin
          ATPA := SplitTPA(TPA, 10);
            For I := 0 To High(ATPA) Do
             If MiddleTPAEX(ATPA[i], Bx, By) Then
              MMouse(Bx, By, 1, 1);
               If IsUpText('ishin') Then
                Begin
                 Result := True;
                end else
              Result := False;
              Exit;
         end;
    end;

    and this procedure to go with it:
    SCAR Code:
    procedure FindFish;
    begin
      CheckInventory;
      if not LoggedIn then TerminateScript;
      if FindSpots then
      begin
        if IsUpText('et') then
        begin
          Mouse(x, y, 5, 5, False);
          ChooseOption('arpoon');
          NoRandoms;
          AntiBan(50);
          if(GetAnimation = 5108) then
          begin
            FFDebug('We are fishing.');
            WaitUntilNotFishing;
            Exit;
            if not FindSpots then
            begin
              RandomCompass;
            end;
            if not(GetAnimation = 5108) then
            begin
              FFDebug('Unable to fish..');
              CheckInventory;
              AntiBan(50);
            end;
          end;
        end;
      end;
    end;

    Here's my issue, it finds the fishing spot, but the cursor then goes to the upper left corner and does not right click or anything. Can you guys help me?

  2. #2
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    scar Code:
    Function FindSpots : Boolean;
    Var
      Bx, By : Integer;
      TPA : TPointArray;
      ATPA : T2DPointArray;
      I : Integer;
    Begin
       FindColorsSpiralTolerance(Bx, By, TPA, 13221816, MSX1, MSY1, MSX2, MSY2, 16)
       ATPA := SplitTPA(TPA, 10);
       For I := 0 To High(ATPA) Do
       Begin
         If MiddleTPAEX(ATPA[i], Bx, By) Then
         Begin
           MMouse(Bx, By, 1, 1);
           Wait(100 + Random(50));
           If IsUpText('ishin') Then
           Begin
            Result := True;
            Exit;
           End;
         End;
       end;
    end;
    begin-ends are needed for more than one line


  3. #3
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    It isn't that(didn't fix it) , it's that when it does ChooseOption the cursor goes to the top left.

  4. #4
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    You have to add var x,y:integer; to the findfish function and add this: GetMousePos(x, y); before this line Mouse(x, y, 5, 5, False);
    Edit: Yea i think you need to add what cazax told you also
    Quote Originally Posted by DeSnob View Post
    ETA's don't exist in SRL like they did in other communities. Want a faster update? Help out with updating, otherwise just gotta wait it out.

  5. #5
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Here, I just made it more logical.
    SCAR Code:
    Function FindSpots(var x, y: Integer) : Boolean;
    Var
      bx, by: INteger;
      TPA : Array Of TPoint;
      ATPA : T2DPointArray;
      I : Integer;
    Begin
      //it searches from the center (mcsx, mcsy)
      FindColorsSpiralTolerance(MCSX, MCSY, TPA, 13221816, MSX1, MSY1, MSX2, MSY2, 16)
      if length(TPA) = 0 then//checks to see if it found the colour
      Begin
        writeln('Couldnt find spot!');
        exit;
      end;
      ATPA := TPAToATPAEx(Spott, 6, 6);
      For I := 0 To High(ATPA) Do
      begin
        MiddleTPAEX(ATPA[i], Bx, By);
        MMouse(Bx, By, 1, 1);
        wait(100+random(100));//wait for uptext
        If IsUpText('ishin') Then
        Begin
          Result := True;
          getmousepos(x, y);
          exit;
        end;
      end;
      writeln('Couldnt find fishing spot!');
    end;
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  6. #6
    Join Date
    Oct 2007
    Location
    Denmark
    Posts
    409
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Just specify the client. Happened for me too when using ChooseOption.

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
  •