Results 1 to 5 of 5

Thread: IsUpText

  1. #1
    Join Date
    Jun 2014
    Location
    EastCoast
    Posts
    76
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default IsUpText

    Any ideas why my Uptext bit isn't working? I think it may have something to do with the previous search area being limited to ATPA tbox. This is for my new script of agility rooftops, thanks Wire.
    Simba Code:
    procedure VRoughWall;
    var
      RWallTPA, BWallTPA:TPointArray;
      RWallATPA:T2DPointArray;
      RWallBox:TBox;
      tmpCTs, i, l, r, counter:Integer;
    begin
      tmpCTS := GetToleranceSpeed;
      MakeCompass(315)
      SetColorToleranceSpeed(2);
      SetToleranceSpeed2Modifiers(0.48, 0.43);
      FindColorsTolerance(RWallTPA, 2111560, MSX1, MSY1, MSX2, MSY2, 1)

      L := High(RWallTPA) //Counts how many TP's are found
      marktime(counter);
      for i := 0 to L do
        begin
          wait(randomrange(60, 200));
          WriteLn('FoundColorWALL');
          RWallATPA := SplitTPAEx(RWallTPA, 5, 5); //Makes Arrays of TPAs
          SortATPASize(RWallATPA, True); //Sorts the ATPAs by size
          for i := 0 to high(RWallATPA) do
            begin
              WriteLn('TPA');
              RWallBox := GetTPABounds(RWallATPA[i]); //Searches within a TPA from sorted ATPAs
              SetColorSpeed2Modifiers(0.00, 0.23);
              if findcolorstolerance(BWallTPA, 4672588, RWallBox.x1, RWallBox.y1, RWallBox.x2, RWallBox.y2, 5) then     //Looks for color inside ATPAs
                begin
                  r := random(length(BWallTPA));
                  writeln('trying to click');
                  mmouse(BWallTPA[r].x, BWallTPA[r].y, 5, 7);  //changed from i to r
                  if WaitUpTextMulti(['Climb', 'lim', 'oug', 'Rough', 'all'], randomrange(200, 300)) then
                    begin
                      mouse(BWallTPA[r].x, BWallTPA[r].y, 2, 2, true);
                      WriteLn('Found Rough Wall');
                    end;
                end;
            end;
        end;
     SetColorToleranceSpeed(tmpCTS); //Returns base CTS
     SetToleranceSpeed2Modifiers(0.02, 0.02);  //Orginal CTS Mods
    end;

  2. #2
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    try to debug the uptext first.

    WriteLn('Uptext: ' + GetUpText);

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

  4. #4
    Join Date
    Jun 2014
    Location
    EastCoast
    Posts
    76
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    Set the CTS mods back to 0.2 before you check for upText.
    That fixed it, making them noob mistake day and night!

    Quote Originally Posted by hoodz View Post
    try to debug the uptext first.

    WriteLn('Uptext: ' + GetUpText);
    Will keep that in mind for the future thanks!


    Any ideas on how to get the ATPA search to stop after actually climb? I'm thinking something along the lines of
    Simba Code:
    begin
                      mouse(BWallTPA[r].x, BWallTPA[r].y, 2, 2, true);
                      WriteLn('Found Rough Wall');
                      Wait(1000+random(5000));
                        if DidYellowClick then
                          exit

    * that didn't work, maybe something with reflection? I'm trying to make this a strictly color bot, but will use reflection if needed.

  5. #5
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by Wire View Post
    Any ideas on how to get the ATPA search to stop after actually climb? I'm thinking something along the lines of
    Simba Code:
    begin
                      mouse(BWallTPA[r].x, BWallTPA[r].y, 2, 2, true);
                      WriteLn('Found Rough Wall');
                      Wait(1000+random(5000));
                        if DidYellowClick then
                          exit

    * that didn't work, maybe something with reflection? I'm trying to make this a strictly color bot, but will use reflection if needed.
    you can just exit after the wait. but be sure you reset CTS before you exit

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
  •