Results 1 to 5 of 5

Thread: how to focus one 1 object out of many?

  1. #1
    Join Date
    Feb 2012
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default how to focus one 1 object out of many?

    how to focus one 1 object out of many identic others?

    so what i want to do is with a DTM (or TPA) draw a box around it and make the script focus on the first it find(DTM or TPA) and forget about the others.

    What i want the script to do:
    go to a place and click many times on one thing (but that thing is with many others). so how can i make it focus on a single one and forget the others? Make it focus on the first it finds

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

    Default

    Use TPA finding, then sort the TPA by the same method (eg. from centre) every time, then just click on the first index of the TPA. if your relative pos to your object dont change, it should result in the same obj being on the first (zeroth) index.

  3. #3
    Join Date
    Feb 2012
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    Simba Code:
    var
     MyTPA : TPointArray;
      MyPoint : TPoint;
       x, y, i : Integer;
       begin
       FindColorsSpiralTolerance(MSCX,MSCY,MyTPA,12539990,MSX1,MSY1,MSX2,MSY2,6);
       if Length(MyTPA) = 0 then
      FindColorsSpiralTolerance(MSCX,MSCY,MyTPA,12539990,MSX1,MSY1,MSX2,MSY2,6);
       for i := 0 to High(MyTPA)do
       begin
       MyPoint := MyTPA[i]
       MMouse (MyPoint.x, MyPoint.y, 3, 3);
       if (IsUpTextMultiCustom(['Icosa', 'ile','Pile','edron Pil','hedron','cosahedro','cosahedron Pil'])) then
       begin
       GetMousePos(x, y);
        Mouse(x, y, 0, 0, true);
        exit;
           end;
           end;

    this start searching from middle of the screen but sometimes it doesnt get the closest one

    thats what im using......works 50/50 of the times, im looking for something better =p

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

    Default

    You could possibly determine the direction of the object relative to you and only search within a radian of that direction?

    But why wouldn't you want to click on another identical object if it becomes nearer to the one you are clicking? What are you scripting this for?

  5. #5
    Join Date
    Feb 2012
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    the script is MTA enchant room. its to gather the rocks to enchant. and the procedure i posted sometimes goes wrong.......

    ex:
    im standing right in front of a pile, clicks it a bunch of times then it clicks on another one that is not the closest then it makes move the character and it click a bunch of piles while the account is moving......doesnt look human lol

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
  •