Results 1 to 4 of 4

Thread: help with Tpoint error

  1. #1
    Join Date
    Mar 2007
    Location
    Ohio
    Posts
    138
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default help with Tpoint error

    Its keeps saying Out of range, when i use the Tpoint to click
    SCAR Code:
    begin
      AntiBan;
      if(not(LoggedIn))then Exit;
      if(Fighting(x, y))then exit;
      cx := MSCX;
      cy := MSCY;
      for i := 0 to 9 do
      begin
        FindColorsSpiralTolerance(cx, cy, RedPoints, 923755, MSX1, MSY1, MSX2, MSY2, 10);
        h := High(RedPoints)
        for a := 0 to h do
        begin
          FindColorsTolerance(ChickenPoints, 36936862, RedPoints[a].x - 15, RedPoints[a].y - 15, RedPoints[a].x + 15, RedPoints[a].x + 15, 8);
          SplitTPA(ChickenPoints, 10);
          MMouse(ChickenPoints[a].x, ChickenPoints[a].y, 5, 5);// here!!
          GetMousePos(ChickenPoints[a].x, ChickenPoints[a].y);
          wait(10 + random(5));
          if(IsUpTextMulti('tack', 'hicken', 'cken'))then
          begin
            break;
            Mouse(ChickenPoints[a].x, ChickenPoints[a].y, 0, 0, true);
            FFlag(0);
            FTWait(2);
            FindNormalRandoms;
            if(FindBlackChatMessage('can''t reach that'))then CheckGate;
            if(i = 9)then Callibrate;
            if(Random(30) = 2)then
            begin
              if(dbug)then writeln('Random Skill Check');
              HoverSkill(Players[CurrentPlayer].Skill, false);
              wait(700 + random(500));
            end;
          end;
        end;
      inc(Chickens);
      inc(Players[CurrentPlayer].Integers[3]);
      inc(ReportVars[0]);
      CheckGate;
      end;
    end;

  2. #2
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Ok well first..
    in this line you have a small mistake
    SCAR Code:
    FindColorsTolerance(ChickenPoints, 36936862, RedPoints[a].x - 15, RedPoints[a].y - 15, RedPoints[a].x + 15, RedPoints[a].x + 15, 8);
    I think the last point 'RedPoints[a].x + 15,' was supposed to be 'RedPoints[a].y + 15,'?
    =]

    Lol but anyways I think it's because of the 'for loop' that it is in.
    It is in:
    for a := 0 to h do

    then you have:
    MMouse(ChickenPoints[a].x, ChickenPoints[a].y, 5, 5);

    so if the array 'ChickenPoints' doesn't go as high as 'RedPoints' did then it would be out of range.

    I would either do another for loop.. Like this:
    SCAR Code:
    for a := 0 to h do
        begin
          FindColorsTolerance(ChickenPoints, 36936862, RedPoints[a].x - 15, RedPoints[a].y - 15, RedPoints[a].x + 15, RedPoints[a].x + 15, 8);
          SplitTPA(ChickenPoints, 10);
          for o := 0 to High(ChickenPoints) do
          begin
            MMouse(ChickenPoints[o].x, ChickenPoints[o].y, 5, 5);// here!!
            GetMousePos(ChickenPoints[o].x, ChickenPoints[o].y);
            wait(10 + random(5));
            if(IsUpTextMulti('tack', 'hicken', 'cken'))then
            begin
              break;
              Mouse(ChickenPoints[o].x, ChickenPoints[o].y, 0, 0, true);
              FFlag(0);
              FTWait(2);
              FindNormalRandoms;
              if(FindBlackChatMessage('can''t reach that'))then CheckGate;
              if(i = 9)then Callibrate;
              if(Random(30) = 2)then
              begin
                if(dbug)then writeln('Random Skill Check');
                HoverSkill(Players[CurrentPlayer].Skill, false);
                wait(700 + random(500));
              end;
            end;
          end;
        end;
    or just only go to ONE point:
    SCAR Code:
    for a := 0 to h do
        begin
          FindColorsTolerance(ChickenPoints, 36936862, RedPoints[a].x - 15, RedPoints[a].y - 15, RedPoints[a].x + 15, RedPoints[a].x + 15, 8);
          SplitTPA(ChickenPoints, 10);
          MMouse(ChickenPoints[0].x, ChickenPoints[0].y, 5, 5);// here!!
          GetMousePos(ChickenPoints[0].x, ChickenPoints[0].y);
          wait(10 + random(5));
          if(IsUpTextMulti('tack', 'hicken', 'cken'))then
          begin
            break;
            Mouse(ChickenPoints[0].x, ChickenPoints[0].y, 0, 0, true);
            FFlag(0);
            FTWait(2);
            FindNormalRandoms;
            if(FindBlackChatMessage('can''t reach that'))then CheckGate;
            if(i = 9)then Callibrate;
            if(Random(30) = 2)then
            begin
              if(dbug)then writeln('Random Skill Check');
              HoverSkill(Players[CurrentPlayer].Skill, false);
              wait(700 + random(500));
            end;
          end;
        end;

  3. #3
    Join Date
    Mar 2007
    Location
    Ohio
    Posts
    138
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks i knew it would be simple but i have "biased" eyes lol thanks for the little error help though

  4. #4
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Just a tip - you should probably add a failsafe incase RedPoints[a].x etc. is smaller than 15 as it would give you a canvas error if it took 15 away from 14 and smaller (as it would try to look/move to a point outside of the client).

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. TPoint
    By Shuttleu in forum OSR Help
    Replies: 6
    Last Post: 08-07-2008, 05:38 PM
  2. Seperate Tpoint
    By 13om13e12 in forum OSR Help
    Replies: 2
    Last Post: 06-07-2008, 04:29 PM
  3. Tpoint help.
    By Wade007 in forum OSR Help
    Replies: 3
    Last Post: 02-22-2008, 06:20 PM
  4. Function():TPoint ?
    By A G E N T in forum OSR Help
    Replies: 9
    Last Post: 12-08-2007, 01:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •