Results 1 to 6 of 6

Thread: Choosing a random DTM

  1. #1
    Join Date
    Dec 2012
    Posts
    86
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default Choosing a random DTM

    So I have this
    Simba Code:
    repeat

     if (FindDTM(essencerock, x, y, 5, 5, 513, 336)) then
      repeat
        WriteLn('Found Essence Rock');
        FindDTM(essencerock, x, y, 6, 10, 514, 336);
        AL_AccurateMMouse(point(x, y), 5, 5);
        Wait(500+random(500));
      if FindColor(x, y, 15395359, 42, 9, 160, 29) then
        AL_FastClick(mouse_left);
        Wait(5000+random(1000));
        CheckInv;
      until (InvIsFull) or (not (FindDTM(essencerock, x, y, 5, 5, 513, 336)));

    the problem is it keeps hovering over the same DTM every time it loops. how do i get it to choose a different point when it repeats?

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

    Default

    You will need knowledge of TPAs.
    Use FindDTMs which will store all the points in the var p and then just loop through the TPA.

  3. #3
    Join Date
    Dec 2012
    Posts
    86
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    oh thanks by chance i just started reading about TPAs after i posted this.

  4. #4
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    What is the DTM of(mainscreen/inventory)? Is this for a private server/actual RS?

    How come you find the DTM then search for it again then move the mouse and check for a colour?

  5. #5
    Join Date
    Dec 2012
    Posts
    86
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by P1ng View Post
    What is the DTM of(mainscreen/inventory)? Is this for a private server/actual RS?

    How come you find the DTM then search for it again then move the mouse and check for a colour?
    The DTM is of the essence rock, main screen. it's for a private server.

    i search for the DTM after i find it because i was to include the FindDTM in the repeat loop. and it checks for the color after it moves that mouse because that color is for the uptext since uptext doesn't work for private servers

  6. #6
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Unfortunately I don't have a lot of time, but take a look at this. It should work. Or at the very least help you on your path to TPAs.

    Simba Code:
    procedure FindRock;
    var
      TPA: TPointArray;
      H, i, x, y, EssenceRock: Integer;
    begin
      if FindDTMs(EssenceRock, TPA, 6, 10, 514, 336) then
      begin
        WriteLn('Found Essence Rock');
        H := High(TPA);

        for i := 0 to H do
        begin
          if InvIsFull then
            Break;

          AL_AccurateMMouse(point(TPA[i].x, TPA[i].y), 5, 5);
          Wait(500+random(500));

          if FindColor(x, y, 15395359, 42, 9, 160, 29) then
          begin
            AL_FastClick(mouse_left);
            Wait(5000+random(1000));
            CheckInv;
          end;
        end;
      end;
    end;

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
  •