Page 3 of 3 FirstFirst 123
Results 51 to 55 of 55

Thread: The Almighty TPA Tutorial

  1. #51
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Quote Originally Posted by riwu View Post
    Yeah that was what i did ytd, there was no observable difference with anything below 100 (empty) loops (both took 0 milliseconds). Just tried again increasing the loop to 10k and there is actually a difference of ~15000 milliseconds in total, of which the increasing difficulty of High functions to count a larger number also attributes to its increasing significance.

    So basically dont bother with declaring another variable if your loop is under 100. Not common for a RS script to go over even 20 anyway. (and even if it's at 10k, it will only save u 1.5milliseconds/loop)
    The difference is 0ms if you're using La-pe, though

  2. #52
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Can't even run examples...
    Code:
    [Error] (1:1): Unexpected end of file at line 0
    Compiling failed.
    so then i changed it to:
    Simba Code:
    Procedure TPAColorExample(StartX, StartY, Color, x1, y1, x2, y2: Integer);
    Var
      TPA: TPointArray;
      I: Integer;
    Begin
      FindColorsSpiralTolerance(StartX, StartY, TPA, Color, x1, y1, x2, y2, 0);
      Writeln('Now, we go through the points found by FindColorsSpiralTolerance');
      For I := 0 To High(TPA) Do
      Begin
        MoveMouse(TPA[i].x, TPA[i].y);
        Wait(100);
      End;
      FindColorsTolerance(TPA, Color, x1, y1, x2, y2, 0);
      Writeln('Now we go through the points from FindColorsTolerance');
      For I := 0 To High(TPA) Do
      Begin
        MoveMouse(TPA[i].x, TPA[i].y);
        Wait(100);
      End;
    End;
    begin
    procedure TPAColorExample;
    End.
    Code:
    [Error] (23:1): Identifier expected at line 22
    Compiling failed.

  3. #53
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Quote Originally Posted by rjj95 View Post
    Can't even run examples...
    Code:
    [Error] (1:1): Unexpected end of file at line 0
    Compiling failed.
    so then i changed it to:
    Simba Code:
    Procedure TPAColorExample(StartX, StartY, Color, x1, y1, x2, y2: Integer);
    Var
      TPA: TPointArray;
      I: Integer;
    Begin
      FindColorsSpiralTolerance(StartX, StartY, TPA, Color, x1, y1, x2, y2, 0);
      Writeln('Now, we go through the points found by FindColorsSpiralTolerance');
      For I := 0 To High(TPA) Do
      Begin
        MoveMouse(TPA[i].x, TPA[i].y);
        Wait(100);
      End;
      FindColorsTolerance(TPA, Color, x1, y1, x2, y2, 0);
      Writeln('Now we go through the points from FindColorsTolerance');
      For I := 0 To High(TPA) Do
      Begin
        MoveMouse(TPA[i].x, TPA[i].y);
        Wait(100);
      End;
    End;
    begin
    procedure TPAColorExample;
    End.
    Code:
    [Error] (23:1): Identifier expected at line 22
    Compiling failed.
    When you call a procedure, just call the name:
    Simba Code:
    begin
      TPAColorExample;
    end.

  4. #54
    Join Date
    Dec 2011
    Location
    Lubbock, Texas
    Posts
    225
    Mentioned
    3 Post(s)
    Quoted
    93 Post(s)

    Default

    I find this concept soo confusing. Maybe some examples of how to actually use in rs besides the players such as object finding!

  5. #55
    Join Date
    Sep 2015
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Wow thanks for this simple tutorial! It's helping me a lot when finding objects for my script.

Page 3 of 3 FirstFirst 123

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Using Almighty TPA's for object finding
    By Timothegreat in forum OSR Advanced Scripting Tutorials
    Replies: 21
    Last Post: 11-04-2008, 06:02 PM
  2. RS Tutorial Bot
    By Jorogan in forum OSR Help
    Replies: 2
    Last Post: 11-25-2007, 01:47 AM
  3. need a tutorial
    By mark9510 in forum RS3 Outdated / Broken Scripts
    Replies: 12
    Last Post: 11-05-2007, 03:56 AM
  4. Replies: 8
    Last Post: 08-23-2007, 08:13 AM
  5. Array Tutorial - (Old Tutorial)
    By XxKanexX in forum Outdated Tutorials
    Replies: 1
    Last Post: 04-12-2006, 03:36 PM

Posting Permissions

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