Results 1 to 10 of 10

Thread: 07 Scape UpText fix with Bitmap?

  1. #1
    Join Date
    Feb 2013
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default 07 Scape UpText fix with Bitmap?

    Is there anyway to use a bitmap to detect Uptext?
    Here's my bitmap, uploaded as a PNG.
    MineUpText.png

    If not is there a way to specify 07 text for the chars?..

    Here's my code:
    Simba Code:
    program FindObject;
    {$i SRL\SRL.simba}
    {$I SRL/SRL/Misc/Debug.Simba}
    {$I P07Include.Simba}

    var
      x, y: Integer;

    function FindIron(var fx, fy: Integer): Boolean;
    var
      arP, arAP: TPointArray;
      arC, arUC: TIntegerArray;
      ararP: T2DPointArray;
      tmpCTS, i, j, arL, arL2: Integer;
      P: TPoint;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.14, 0.31);

      if not(FindColorsTolerance(arP, 2174026, MSX1, MSY1, MSX2, MSY2, 7)) then
      begin
        Writeln('Failed to find the color, no object found.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      arUC := arC;
      ClearSameIntegers(arUC);
      arL := High(arUC);
      arL2 := High(arC);

      for i := 0 to arL do
      begin
        ColorToXYZ(arC[i], X, Y, Z);

        if (X >= 1.91) and (X <= 6.90) and (Y >= 1.65) and (Y <= 5.76) and (Z >= 1.01) and (Z <= 3.05) then
        begin
          for j := 0 to arL2 do
          begin
            if (arUC[i] = arC[j]) then
            begin
              SetLength(arAP, Length(arAP) + 1);
              arAP[High(arAP)] := arP[j];
            end;
          end;
        end;
      end;

      SortTPAFrom(arAP, Point(MSCX, MSCY));
      ararP := SplitTPAEx(arAP, 10, 10);
      arL := High(ararP);

      for i := 0 to arL do
      begin
        if (Length(ararP[i]) < 10) then Continue;
        P := MiddleTPA(ararP[i]);
        MMouse(P.x, P.y, 5, 5);
        Wait(100 + Random(100));
          if P07_IsUpTextMultiCustom(['Mine', 'ine', 'ne']) then
        begin;
        ClickMouse2 (mouse_left);
          Result := True;
          Break;
        end;
      end;

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

      if (i = arL + 1) then
      begin
        Writeln('FindObject could not find object.');
        Exit;
      end;

      GetMousePos(fx, fy);
    end;


    begin
      SetupSRL;
      FindIron(x, y);
    end.

  2. #2
    Join Date
    Jul 2012
    Posts
    437
    Mentioned
    10 Post(s)
    Quoted
    165 Post(s)

    Default

    if your using
    Simba Code:
    P07_IsUpTextMultiCustom()
    it should use 07 font from dannyRS's unofficial include
    if it isn't reading the font correctly try
    Simba Code:
    if P07_IsUpTextMultiCustom(['Mine', 'ine', 'ne','Rock','ock'])

  3. #3
    Join Date
    Feb 2013
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default

    Quote Originally Posted by bob_saget View Post
    if your using
    Simba Code:
    P07_IsUpTextMultiCustom()
    it should use 07 font from dannyRS's unofficial include
    if it isn't reading the font correctly try
    Simba Code:
    if P07_IsUpTextMultiCustom(['Mine', 'ine', 'ne','Rock','ock'])
    Yes that still doesn't work, Is it possible to add a 'else' bitmap fallback?

  4. #4
    Join Date
    Feb 2013
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default

    Quote Originally Posted by bob_saget View Post
    check out the folder simba\fonts\P07UPCHARS
    I know they're there I just don't really know what to do.

  5. #5
    Join Date
    Feb 2013
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default

    Quote Originally Posted by bob_saget View Post
    Have you tried right clicking then using
    P07_ChooseOptionMultiCustom(['Mine', 'ine', 'ne'])
    I'll try that to see if I can get basic functionality, but obviously can't keep this for 100% of the time

  6. #6
    Join Date
    Dec 2011
    Location
    United States
    Posts
    960
    Mentioned
    21 Post(s)
    Quoted
    504 Post(s)

    Default

    Simba Code:
    SRL_EnableNavBar;  
    if P07_IsUpTextMultiCustom(['Mine', 'ne', 'ock']) then
    begin
    ClickMouse2(mouse_left);  
    end;

  7. #7
    Join Date
    Feb 2013
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default

    Quote Originally Posted by Wetish View Post
    Simba Code:
    SRL_EnableNavBar;  
    if P07_IsUpTextMultiCustom(['Mine', 'ne', 'ock']) then
    begin
    ClickMouse2(mouse_left);  
    end;
    Thanks for this!

    Anyway to pick the closest to make it seem less random?

    Quote Originally Posted by bob_saget View Post
    upchars should be working soon
    Wetish's method seems to work reasonably well. Looks a lot like a colour bot in action though..
    Last edited by Le_don; 02-28-2013 at 08:23 PM.

  8. #8
    Join Date
    May 2012
    Posts
    60
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Did you get the UpText to work?

    Otherwise a solution like this might work, but it's far from as good as using UpText.
    Simba Code:
    procedure MineRock;
    begin
      Mine := BitmapFromString(bitmapstringhere);
        If FindBitmap(Mine, x, y) Then
        MMouse(x, y, 3, 3);
        ClickMouse2(mouse_left);
      FreeBitmap(Mine);
    end;

  9. #9
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by Prayer94 View Post
    Anyone who is having uptext issues,

    I am 90% sure you have two 07upchars folders one being inside the other, remove the first so that you only have one folder 07upchars with the files inside and providing you can solve the anti leech for the script you are using your clicking will now work
    Check for this error in your setup guys


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  10. #10
    Join Date
    Feb 2013
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    Check for this error in your setup guys
    Don't think this is the case, I unzipped the Chars and placed them in Fonts.

    Wasn't a second folder inside that folder..

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
  •