Page 2 of 2 FirstFirst 12
Results 26 to 28 of 28

Thread: TPAs<!<!<!< [im sorry! i just dont get it ='( ]

  1. #26
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    oh ok well w/e y go advance if it works


    dont fix somthing that isnt broke

  2. #27
    Join Date
    Jul 2009
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    whoa lol turning a little of topic and into an argument... sheesh who cares? just teach me...

  3. #28
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    im no tpa expert but, i broke down one of my old tpointarrays to help u understand
    SCAR Code:
    {*******************************************************************************
    function OpenTrapdoor: Boolean;
    by: Smarter Child
    description: Opens the trapdoor(entering the dungeon), if so it results true.
    *******************************************************************************}

    function OpenTrapdoor: Boolean;   //function name, it will result as true or false
    var                             //variables
       x, y: integer;              //x and y are the co-ordinates
       TPA: TPointArray;          //an Array of a TPoint or more than one tpoint
       i: integer;               // ull see later on
       aTPA: T2DPointArray;     //an array of 2 dimensional points
       Colors: TIntegerArray;  //an array of numbers in this case the colors
    begin
      Result := False;         //not needed :p
      if not LoggedIn then exit; //just in case
      Colors := [2112071, 5071986, 2112071, 4868688, 6118756];  //Declares all the colors of the trapdoor
      for i := 0 to 4 do  //i is the amount of the array..like the amount of colors color 0, 1, 2, 3, 4
      begin
        FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colors[i], MSX1, MSY1, MSX2, MSY2, 7);  //Finds a color with tolerance using a spiral, starts at centre of screen
        if Length(TPA) = 0 then Continue;  //if the tpa length is 0 continue script
        ATPA := SplitTPA(TPA, 22);        //splits the TPA, with the distances in pixels (coords)
        for i := 0 to High(ATPA) do       //if i is 0 to the highest index
        begin
          MiddleTPAEx(ATPA[i], x, y);   //middle tpoints
          MMouse(x, y, 3, 3);           //moves mouse
          if IsUpText('apdoor') then    //checks uptext
          begin
            Wait(100 + Random(200));    //random wait
            Mouse(x, y, 4, 4, False);   //right clicks
            Wait(400 + Random(200));   //random wait
            ChooseOption('pen');       //chooses option
            WriteLn('Opening Door');   //reports in debug
            Result:= True;            //everything worked!, results true
          end;
        end;
      end;
    end;

    Check me on msn for more help: wowplayermaster@hotmail.com


    Edit: some brief explanation-
    -
    TpointArrays are great for tons of things, its one of my main ways to detect rocks/tree that you want to mine in the runescape client. Although TpointArrays may seem advanced they really aren't, like J_Pizzle, it doesn't matter if its an advanced TPA, the mains question is: Does it work most of the time?
    Theres also a kinda premade tPa in objects.scar called FindObjTPA: http://freddy1990.com/srlmanual/SRL/core/Object.html
    Scroll down. Also check in scar folder, and go to scripting tools, open up Auto Color Aid2.exe , it helps with TPointArrays and create ones for you, if you need examples.
    Last edited by Smarter Child; 07-29-2009 at 09:21 AM.

Page 2 of 2 FirstFirst 12

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
  •