Results 1 to 5 of 5

Thread: Am I using this right?

  1. #1
    Join Date
    Oct 2011
    Location
    Australia, Vic
    Posts
    1,517
    Mentioned
    2 Post(s)
    Quoted
    120 Post(s)

    Default Am I using this right?

    I trying to find This:


    via this code:
    Simba Code:
    Function InGame: Boolean;
    var
    x, y: integer;
    begin
      if FindTextTPAEx(2070783, 20, MSX1, MSY2, MSX2, MSY2, x, y, 'ew', 'e', Nothing) then
      begin
        WriteLn('We Arent in Game')
        WriteLn('X = ' + IntToStr(x) + '' + 'Y = ' + IntToStr(y) + '');
      end else
      WriteLn('We Are in a game');
      WriteLn('X = ' + IntToStr(x) + ' ' + 'Y = ' + IntToStr(y) + '');
    end;
    I cant seem to get it to work.

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Try GetTextAtExWrap
    I am Ggzz..
    Hackintosher

  3. #3
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    you don't need to find the text. As you know the words "New game" is always present when you are in the waiting area. And they have a certain length of that color.

    So If you know the area where the texts are present you just do
    Simba Code:
    If FindColorsTolerance( X, Y, TPA, TextCol, TextStartX, TextStartY, TextEndX, TextEndY, TextTol)  Then
      If Length( TPA) > LengthOfNewGameText Then
        InGame := True;


    This way avoids jagex's uptext font update and will keep your script working also it should be more accurate as the find text and ocr isn't 100% (its like 99%)
    Last edited by Main; 06-11-2012 at 08:35 AM.
    Oh Hai Dar

  4. #4
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    FindTextAtExWrap doesn't work here, just saying, all the fonts are wrong for it, tried everyone, got nothing correct.

  5. #5
    Join Date
    May 2012
    Location
    Iowa
    Posts
    316
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I would go with Main's idea i've never thought of that way!

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
  •