Results 1 to 8 of 8

Thread: Me, Again!

  1. #1
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default Me, Again!

    Same Issue, New Procedure:

    My fishing function doesn't find the fish. Any suggestions?

    SCAR Code:
    {*******************************************************************************
    Function FishRiver: boolean;
    By: Nava2 and XxXx Toxin XxXx
    Description: (Not Working) Clicks on Fishing Spot, results true if finds it,
                 False if it cannot.
    *******************************************************************************}


    function FishRiver: Boolean;
    var FishColor: Array [0..6] of integer;
        i, SearchFSpotTime: integer;
    begin
      FishColor[0]:= 14731196;
      FishColor[1]:= 16249337;
      FishColor[2]:= 15519165;
      FishColor[3]:= 15328218;
      FishColor[4]:= 13282459;
      FishColor[5]:= 15328235;
      FishColor[6]:= 14787705;
      if (not (LoggedIn)) then Exit;
      MarkTime(SearchFSpotTime);
      AntiBan;
      FindRandoms;
      CheckEquipt;
      if (CheckEquipt=False) then Exit;
      SetAngle(false);
      if not (FindObjTPA(x, y, FishColor[random(6)], 10, -1, 10, 10, 20, ['ishing','spot', 'ure'])) then
      begin
        MakeCompass('E');
        Writeln('Cannot find Fishing Spot, Searching');
        Wait(500+random(300));
      end else
      if (FindObjTPA(x, y, FishColor[random(6)], 10, -1, 10, 10, 20, ['ishing','spot', 'ure'])) then
      begin
        Mouse(x, y, random(5), random(5), true);
        Writeln('Found Fishing Spot, Fishing...');
        MakeCompass('W');
        SetAngle(true);
        Result:= True;
      end;
      if (TimeFromMark(SearchFSpotTime)>15000) then
      begin
        Result:= False;
        Writeln('Could not find Fishing Spot, Walking to Different Part of River.');
      end;
    end;

    I updated to use TPA's, but the Fishing Moles are still too freaking spontaneous I think. It doesn't register and it won't fish.

    Help?

    Thanks to those who have already tried!

    Nava2
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  2. #2
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    FindObjCustom is a bit weird at the moment. Pop this in above your prrocedure and rename FindObjCustom to FindObjCustom2 in your procedure.

    SCAR Code:
    {*******************************************************************************
    function FindObjCustom2(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray;
      Tolerance: Integer): Boolean;
    By: Stupid3ooo, Starblaster100 and edit by Hy71194
    Description: Finds Object with custom amount of colors and custom amount of Uptext
    Use: FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5)
    *******************************************************************************}

    function FindObjCustom2(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray; Tolerance: Integer): Boolean;
    var
      a, b, c, i, x1, y1, x2, y2: Integer;
      Start: Boolean;
    begin
      for b := 0 to (GetArrayLength(Color)-1) do
      begin
        if (FindColorSpiralTolerance(cx, cy, color[b], MSX1, MSY1, MSX2, MSY2, Tolerance)) then
        begin
          Start := True;
          Break;
        end;
      end;
      if(Start)then
      begin
        x1 := 245;
        y1 := 165;
        x2 := 277;
        y2 := 185;
        repeat
          if not(LoggedIn)then break;
          a := a + 1;
          if (a = 1) then
            c := c + 1
          else if (a = 3) then
            c := c + 1;
          for i := 1 to c do
          begin
            if (a = 1) then
            begin
              x1 := x1 + 30;
              x2 := x2 + 30;
            end else
            if (a = 2) then
            begin
              y1 := y1 - 20;
              y2 := y2 - 20;
            end else
            if (a = 3) then
            begin
              x1 := x1 - 30;
              x2 := x2 - 30;
            end else
            if (a = 4) then
            begin
              y1 := y1 + 20;
              y2 := y2 + 20;
            end;
            if (x1 = 485) and (x2 = 517) then
              x2 := x2 - 2;
            if (y1 = 325) and (y2 = 345) then
              y2 := y2 - 7;
            if (x2 > 515) then
              Break;
            for b := 0 to (GetArrayLength(Color)-1) do
            begin
              if (FindColorTolerance(cx, cy, Color[b], x1, y1, x2, y2, tolerance)) then
              begin
                MMouse(cx, cy, 10, 10);
                Wait(5+Random(10));
                if (IsUpTextMultiCustom(Text)) then
                begin
                  Result := True;
                  Exit;
                end;
              end;
            end;
          end;
          if (a = 4) then
            a := 0;
        until (x2 > 515) or (Result = True);
      end;
    end;

    @Timer: Good idea too


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  3. #3
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try TPA's?

  4. #4
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Nvm, I think I got it.
    Give me a few mins to try it out. Thanks again.

    Nava2

    Edit* It still doesn't find the little buggers, any suggestions?
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  5. #5
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    SCAR Code:
    {*******************************************************************************
    function FindObjCustom2(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray;
      Tolerance: Integer): Boolean;
    By: Stupid3ooo, Starblaster100 and edit by Hy71194
    Description: Finds Object with custom amount of colors and custom amount of Uptext
    Use: FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5)
    *******************************************************************************}

    function FindObjCustom2(var cx, cy: Integer; Text: TStringArray; Color: TIntegerArray; Tolerance: Integer): Boolean;
    var
      a, b, c, i, x1, y1, x2, y2: Integer;
      Start: Boolean;
    begin
      for b := 0 to (GetArrayLength(Color)-1) do
      begin
        if (FindColorSpiralTolerance(cx, cy, color[b], MSX1, MSY1, MSX2, MSY2, Tolerance)) then
        begin
          Start := True;
          Break;
        end;
      end;
      if(Start)then
      begin
        x1 := 245;
        y1 := 165;
        x2 := 277;
        y2 := 185;
        repeat
          if not(LoggedIn)then break;
          a := a + 1;
          if (a = 1) then
            c := c + 1
          else if (a = 3) then
            c := c + 1;
          for i := 1 to c do
          begin
            if (a = 1) then
            begin
              x1 := x1 + 30;
              x2 := x2 + 30;
            end else
            if (a = 2) then
            begin
              y1 := y1 - 20;
              y2 := y2 - 20;
            end else
            if (a = 3) then
            begin
              x1 := x1 - 30;
              x2 := x2 - 30;
            end else
            if (a = 4) then
            begin
              y1 := y1 + 20;
              y2 := y2 + 20;
            end;
            if (x1 = 485) and (x2 = 517) then
              x2 := x2 - 2;
            if (y1 = 325) and (y2 = 345) then
              y2 := y2 - 7;
            if (x2 > 515) then
              Break;
            for b := 0 to (GetArrayLength(Color)-1) do
            begin
              if (FindColorTolerance(cx, cy, Color[b], x1, y1, x2, y2, tolerance)) then
              begin
                MMouse(cx, cy, 10, 10);
                Wait(5+Random(10));
                if (IsUpTextMultiCustom(Text)) then
                begin
                  Result := True;
                  Exit;
                end;
              end;
            end;
          end;
          if (a = 4) then
            a := 0;
        until (x2 > 515) or (Result = True);
      end;
    end;
    I edited it in the post right after you said that xD


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  6. #6
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Edit:

    Changed the script to incorporate TPA's. The fishing spots are still too fast. Anyone else have ideas?

    Nava2
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  7. #7
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    TPA = TPoint Arrays

    Try Somthing Like...

    FindColorsSpiralTolerance(MSCX, MSCY, FishPoints, 15459804, MSX1, MSY1, MSX2, MSY2, 50);

  8. #8
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Timer View Post
    TPA = TPoint Arrays

    Try Somthing Like...

    FindColorsSpiralTolerance(MSCX, MSCY, FishPoints, 15459804, MSX1, MSY1, MSX2, MSY2, 50);
    ReRead Tut. Thanks, not sure if it works yet.. did some major re-works.

    Nava2
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

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
  •