Results 1 to 3 of 3

Thread: Human like object finding?

  1. #1
    Join Date
    Apr 2007
    Location
    Rimmington
    Posts
    168
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Question Human like object finding?

    Hey People =]

    Looking to find a way off collecting an object that there are multiples off from floor not a problem pretty easy right well as usual ive become stuck with making this more human like it kind off collects were ever it wants to and not from closest.

    Ive tried using TPA’s and just finding colour (findcoloursprial) but both return the same result random clicking off the objects all over the screen =[

    Any idea’s on how I can make it search and collect more human like

    [deleted all my code snippets in anger *face palm*


    im trying to get the bot to collect an item until it has an iv but it keeps running all over the place to get them if it helps im collecting bones
    Learning To Code - So Excuse the n00b questions!

  2. #2
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default

    Use FindColorsSpiralTolerance to get a TPA that has all the color co-ordinates stored. Then use SplitTPAEx to make an ATPA that has multiple splitted TPA's stored. Then you can sort the ATPA from size or just from the closest point near your character. Then you can use MiddleTPA to get the middle point, move the mouse there, check for uptext, if the uptext is correct loot the item. Then wait until walking or wait until a new item has been added to your inventory. Then repeat that process.

    Example
    Simba Code:
    function RopeFail: Boolean;
    var
      X, Y, i: Integer;
      LadderCl: TPointArray;
      LadderClSplit: Array of TPointArray;

    begin
      ColorToleranceSpeed(2);
      SetColorspeed2Modifiers(0.12, 1.01);
      if FindColorsSpiralTolerance(X, Y, LadderCl, 3030082, MSCX-100, MSCY-50, MSCX, MSCY+50, 11) then
        begin
          SplitTPAExWrap(LadderCl, 1, 1, LadderClSplit);
          SortATPASize(LadderClSplit, True);
          for i:=0 to High(LadderClSplit) do
            begin
              MiddleTPAEx(LadderClSplit[i], X, Y);
              MMouse(X, Y, RandomRange(-2, 2), RandomRange(-2, 2));
              if WaitUpTextMulti(['limb', 'up', 'adder', 'Climb', 'Ladder'], 500) then
                begin
                  ClickMouse2(1);
                  Wait(4000 + Random(1000));
                  Result:=True;
                  Break;
                end;
            end;
        end;
    end;

    Script source code available here: Github

  3. #3
    Join Date
    Apr 2007
    Location
    Rimmington
    Posts
    168
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    thanks will have to have a look in to it i think i have used this method but with no luck will have to give it another go
    Learning To Code - So Excuse the n00b questions!

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
  •