Results 1 to 8 of 8

Thread: Is my GetUpText wrong?

  1. #1
    Join Date
    Apr 2012
    Posts
    92
    Mentioned
    0 Post(s)
    Quoted
    23 Post(s)

    Default Is my GetUpText wrong?

    Hee,

    I was looking at this guide http://villavu.com/forum/showthread.php?t=90767 for TPA's.
    And I got this script. The only thing I changed was the uptext, because it's for 07scape. but for some reason it still doesn't work..
    It must be the GetUpText, because it can find the flax fine!

    Simba Code:
    program new;
    {$i SRL/SRL.simba}
    {$I P07Include.Simba}

    Procedure FindFlax;
    var
      tmpCTS, i, x, y, counter, r, l:integer;
      FlaxTPA:TPointArray;
    begin
      tmpCTS := GetToleranceSpeed;

      SetColorToleranceSpeed(2);
      SetToleranceSpeed2Modifiers(0.13, 1.22);

      FindColorsTolerance(FlaxTPA,608516 , MSX1, MSY1, MSX2, MSY2, 10);


      SetColorToleranceSpeed(tmpCTS);              //RIGHT AFTER we find our colors, we
      SetToleranceSpeed2Modifiers(0.02, 0.02);     //Change the CTS back.

      L := High(FlaxTPA)
      marktime(counter);
      for i := 0 to L do
        begin;
          r := random(L);
          Wait(RandomRange(60, 200));
          mmouse(FlaxTPA[r].x, FlaxTPA[r].y, 2, 2);
           if (P07_ContainsText(P07_GetUpText, ['ick', 'lax'] )) then
            Break;
          if timefrommark(counter) > 3000 then
            begin
              writeln('We failed to find the flax!');
              Terminatescript;
            end;
        end;
      writeln('We found the flax!');
      clickmouse2(mouse_right);
    end;

    begin
      SetupSRL;
      SetupP07Include;
      FindFlax;

    end.

  2. #2
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Try P07_isUptextMultiCustom instead

    Creds to DannyRS for this wonderful sig!

  3. #3
    Join Date
    Apr 2012
    Posts
    92
    Mentioned
    0 Post(s)
    Quoted
    23 Post(s)

    Default

    Quote Originally Posted by Sjoekeloe View Post
    Try P07_isUptextMultiCustom instead
    Simba Code:
    if P07_isUptextMultiCustom(['ick', 'lax', 'Fla', 'Pic'] ) then

    I did this, but still doesn't work

  4. #4
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by juunhoad View Post
    Simba Code:
    if P07_isUptextMultiCustom(['ick', 'lax', 'Fla', 'Pic'] ) then

    I did this, but still doesn't work
    Does this kick in? writeln('We failed to find the flax!');

    else move Clickmouse2(Mouse_right); after if P07_isUptextMultiCustom(['ick', 'lax', 'Fla', 'Pic'] ) then

    Creds to DannyRS for this wonderful sig!

  5. #5
    Join Date
    Apr 2012
    Posts
    92
    Mentioned
    0 Post(s)
    Quoted
    23 Post(s)

    Default

    Quote Originally Posted by Sjoekeloe View Post
    Does this kick in? writeln('We failed to find the flax!');

    else move Clickmouse2(Mouse_right); after if P07_isUptextMultiCustom(['ick', 'lax', 'Fla', 'Pic'] ) then
    Ya it says, We failed to find the flax! Is that a color problem?

  6. #6
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by juunhoad View Post
    Ya it says, We failed to find the flax! Is that a color problem?
    Could be , I usually write my TPA's ATPA's like this:

    Simba Code:
    program new;
    {$i SRL/SRL.simba}
    {$I P07Include.Simba}

    Procedure FindFlax;
    var
      tmpCTS, i, x, y, counter, r, l:integer;
      FlaxTPA:TPointArray;
    begin
      tmpCTS := GetToleranceSpeed;

      SetColorToleranceSpeed(2);
      SetToleranceSpeed2Modifiers(0.13, 1.22);

      if FindColorsTolerance(FlaxTPA,608516 , MSX1, MSY1, MSX2, MSY2, 10) then
      begin

         SetColorToleranceSpeed(tmpCTS);              //RIGHT AFTER we find our colors, we
         SetToleranceSpeed2Modifiers(0.02, 0.02);     //Change the CTS back.

         L := High(FlaxTPA)
         Marktime(counter);

         for i := 0 to L do
         begin;
           r := random(L);
           Wait(RandomRange(60, 200));
           mmouse(FlaxTPA[r].x, FlaxTPA[r].y, 2, 2);
           if P07_IsUptextMultiCustom(['Pic', 'ick', 'Fla']) then
           begin
              writeln('We found the flax!');
              clickmouse2(mouse_right);
              Exit;
           end;
           if TimeFromMark(Counter) > 3000 then
           begin
             writeln('We failed to find the flax!');
             Terminatescript;
           end;
         end;
      end;
    end;

    begin
      SetupSRL;  // I'm not sure if u have to call setupsrl;
      P07_DeclarePlayers;
      SetupP07Include;
      FindFlax;

    end.

    Try without setting setupsrl? I'm not sure if it's needed.

    Creds to DannyRS for this wonderful sig!

  7. #7
    Join Date
    Apr 2012
    Posts
    92
    Mentioned
    0 Post(s)
    Quoted
    23 Post(s)

    Default

    Try without setting setupsrl? I'm not sure if it's needed.
    Lol the problem was SetupSRL, why is it not needed?

  8. #8
    Join Date
    Oct 2006
    Posts
    206
    Mentioned
    2 Post(s)
    Quoted
    45 Post(s)

    Default

    its a simple problem. The text finding has to be loaded by using P07 custom SRL setup. Otherwise it will mess up with the fonts.

    Try this:

    Simba Code:
    program new;
    {$i SRL/SRL.simba}
    {$I P07Include.Simba}

    procedure FindFlax;
    var
      tmpCTS, i, x, y, counter, r, l: integer;
      FlaxTPA: TPointArray;
    begin
      tmpCTS := GetToleranceSpeed;
      SetColorToleranceSpeed(2);
      SetToleranceSpeed2Modifiers(0.13, 1.22);
      FindColorsTolerance(FlaxTPA, 608516, MSX1, MSY1, MSX2, MSY2, 10);
      SetColorToleranceSpeed(tmpCTS);
      SetToleranceSpeed2Modifiers(0.02, 0.02);
      L := High(FlaxTPA) marktime(counter);
      for i := 0 to L do
      begin
        r := random(L);
        Wait(RandomRange(60, 200));
        mmouse(FlaxTPA[r].x, FlaxTPA[r].y, 2, 2);
        if (P07_IsUpTextMultiCustom(['fla'])) then
        begin
          writeln('UpText found!');
          Break;
        end;
        if timefrommark(counter) > 3000 then
        begin
          writeln('We failed to find the flax!');
          Terminatescript;
        end;
      end;
      writeln('We found the flax!');
      Mouse(FlaxTPA[r].x, FlaxTPA[r].y, 1, 1, 1);
    end;

    begin
      SetupP07Include;
      FindFlax;
    end.
    Last edited by Eduard; 03-01-2013 at 10:38 PM.

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
  •