Results 1 to 5 of 5

Thread: Skipping a box

  1. #1
    Join Date
    Oct 2010
    Location
    Under a bridge
    Posts
    648
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Skipping a box

    Ok so im trying to skip a box when fishing as i want cage fishing and not net fishing. Ive have tryed to make a box and skip it, but it does not work
    Simba Code:
    Function FindFishingSpotTPA:Boolean;
    Var
      MyTPA      : TPointArray;
      PointT     : TPoint;
      x,y,i,trys : Integer;
      NotBox     : TBox;

    Begin
      If Not LoggedIn Then Exit;
      NotBox := IntToBox(0,0,0,0) //Just to reset it
      Repeat
        SetColorToleranceSpeed(2);
        SetColorspeed2Modifiers(0.34,1.18);
        FindColorsSpiralTolerance(x,y,MyTPA,11576479, MSx1, MSy1, MSx2, MSy2, 4);
        Inc(Trys);
        Wait(RandomRange(5,95));
      Until (Length(MyTPA) > 0) Or (Trys >= 12)
        If Trys >= 12 Then
        Begin
          writeln('Not found colour exiting :(');
          Result := False
          Exit;
        End;
      For i := 0 to High(MyTPA)Do
      Begin
        PointT := MyTPA[i]
        If Not PointInBox(PointT,NotBox) Then//X/Y in NotBOX which is a tbox
          MMouse (PointT.x, PointT.y, RandomRange(-5,5), RandomRange(-5,5));
        If  WaitUptext('age',4500) then
        Begin
          SetColorToleranceSpeed(1);
          GetMousePos(x, y);
          Result := True
          If Random(30) = 5 Then
          Begin
            Mouse(x, y, 0, 0, False);
            WaitOption('ag',4500);
          End Else Mouse(x,y,0,0,True);
          Exit;
        End Else Begin
          If IsUpText('et') Then
          Begin
            NotBox := IntToBox(x-15,y-15,x+15,y+15)
            writeln('We have found a net fishing spot now skiping box ');
          End;
        End;
      Wait(RandomRange(250,999));
      End;
    End;

    Thanks
    Quote Originally Posted by DD on IRC
    wanted to troll the troll

  2. #2
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    It would be beneficial to take a more dynamic approach to this.

    I would suggest searching for all fish spot color on the screen, and split them into an ATPA according to the width and height of the spots. Then, you can simply loop through the different arrays and mouse over each middleTPA until you have the one you want.

    Quick, simple, and effective.

    p.s. you can still assign 'NotBoxes' to the 'wrong' arrays if you would like, though they would clearly need to change every time you move..
    Last edited by NCDS; 01-09-2011 at 07:04 PM.

  3. #3
    Join Date
    Oct 2010
    Location
    Under a bridge
    Posts
    648
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by NCDS View Post
    It would be beneficial to take a more dynamic approach to this.

    I would suggest searching for all fish spot color on the screen, and split them into an ATPA according to the width and height of the spots. Then, you can simply loop through the different arrays and mouse over each middleTPA until you have the one you want.

    Quick, simple, and effective.

    p.s. you can still assign 'NotBoxes' to the 'wrong' arrays if you would like, though they would clearly need to change every time you move..
    Umm could you please show me how to turn it in to a ATPA and loop them please and explain/link me to a tut

    Thanks for helping
    Quote Originally Posted by DD on IRC
    wanted to troll the troll

  4. #4
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by Troll Man View Post
    Umm could you please show me how to turn it in to a ATPA and loop them please and explain/link me to a tut

    Thanks for helping
    Simba Code:
    function FindFishSpot: Boolean;
    var
      atpa: T2DPointArray;
      tpa: TPointArray;
      p: TPoint;
      i, x, y: Integer;
    begin
      FindColorTolerance(tpa, FishColor, ..); //Find the color points on screen
      if Length(tpa) < 5 then // Just to make sure we actually found some points
        Writeln('Failed to find points');

      atpa := TPAtoATPAEx(tpa, Width, Height); //Splits tpa into an atpa according to size specified by width and height.

      for i := 0 to High(atpa) do
      begin
        p := MiddleTPA(atpa[i]); //Set 'p' equal to the middle point in the array
        MMouse(p.x, p.y, 3, 3);
        if WaitUpText('age', 500) then
        begin
          GetMousePos(x, y);
          Mouse(x, y, 3, 3, True); //However you want to click it
        end;
      end;
    end;
    This would be the basic way of doing it I guess. This is a very simple outline, but should hopefully give you a good idea of how to do it.

  5. #5
    Join Date
    Oct 2010
    Location
    Under a bridge
    Posts
    648
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ahh i see

    Ok thanks that is great i see where to be going now, little bit of time andthey would be better then a skipbox thanks again
    Quote Originally Posted by DD on IRC
    wanted to troll the troll

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
  •