Results 1 to 5 of 5

Thread: if DTMRotated(var DDTM, x,y,x1,y1,x2,y2:integer) then begin Mouse(x,y,2,2,true);

  1. #1
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default if DTMRotated(var DDTM, x,y,x1,y1,x2,y2:integer) then begin Mouse(x,y,2,2,true);

    hey guys so i am having a problem with my DDTMs... ok first off here's the DDTM the procedure is calling on...

    SCAR Code:
    function RoadDDTM:Integer;
    var
      dtmMainPoint: TDTMPointDef;
      dtmSubPoints: Array [0..6] of TDTMPointDef;
      TempTDTM: TDTM;
      ACvar:integer;
    begin
      ACvar := FindVarrockRoadColor

      dtmMainPoint.x := 669;
      dtmMainPoint.y := 107;
      dtmMainPoint.AreaSize := 1;
      dtmMainPoint.AreaShape := 0;
      dtmMainPoint.Color := ACvar;
      dtmMainPoint.Tolerance := ddtmTolerance;

      dtmSubPoints[0].x := 669;
      dtmSubPoints[0].y := 107;
      dtmSubPoints[0].AreaSize := 1;
      dtmSubPoints[0].AreaShape := 0;
      dtmSubPoints[0].Color := ACvar;
      dtmSubPoints[0].Tolerance := ddtmTolerance;

      dtmSubPoints[1].x := 679;
      dtmSubPoints[1].y := 101;
      dtmSubPoints[1].AreaSize := 1;
      dtmSubPoints[1].AreaShape := 0;
      dtmSubPoints[1].Color := ACvar;
      dtmSubPoints[1].Tolerance := ddtmTolerance;

      dtmSubPoints[2].x := 661;
      dtmSubPoints[2].y := 100;
      dtmSubPoints[2].AreaSize := 1;
      dtmSubPoints[2].AreaShape := 0;
      dtmSubPoints[2].Color := ACvar;
      dtmSubPoints[2].Tolerance := ddtmTolerance;

      dtmSubPoints[3].x := 662;
      dtmSubPoints[3].y := 112;
      dtmSubPoints[3].AreaSize := 1;
      dtmSubPoints[3].AreaShape := 0;
      dtmSubPoints[3].Color := ACvar;
      dtmSubPoints[3].Tolerance := ddtmTolerance;

      dtmSubPoints[4].x := 677;
      dtmSubPoints[4].y := 109;
      dtmSubPoints[4].AreaSize := 1;
      dtmSubPoints[4].AreaShape := 0;
      dtmSubPoints[4].Color := ACvar;
      dtmSubPoints[4].Tolerance := ddtmTolerance;

      dtmSubPoints[5].x := 670;
      dtmSubPoints[5].y := 111;
      dtmSubPoints[5].AreaSize := 1;
      dtmSubPoints[5].AreaShape := 0;
      dtmSubPoints[5].Color := ACvar;
      dtmSubPoints[5].Tolerance := ddtmTolerance;

      dtmSubPoints[6].x := 668;
      dtmSubPoints[6].y := 104;
      dtmSubPoints[6].AreaSize := 1;
      dtmSubPoints[6].AreaShape := 0;
      dtmSubPoints[6].Color := ACvar;
      dtmSubPoints[6].Tolerance := ddtmTolerance;

      TempTDTM.MainPoint := dtmMainPoint;
      TempTDTM.SubPoints := dtmSubPoints;
      Result := AddDTM(TempTDTM);
    end;

    and here's the procedure
    SCAR Code:
    procedure WalkToBurnPlace;
    begin
     FixCam;
     if DTMRotated(RoadDDTM,x,y,651,76,351,40) then
     begin
      mouse(x,y,2,2,true);
      writeln('walking to burning spot...');
     end;
     {else
     begin
      error := 'couldnt find RoadDDTM';
      TerminateScript;
     end;}

     flag;
    end;

    what it does is click the DDTM on the mm, and then it stops the script!?!?! why is this? btw the commented out part in WalkToBurnPlace are my failsafes, which i commented out because i thought they might have been causing the probelm.

    That is a pice of road in Varrock, just southwest of Zaff's Staffs. i followed BlumbleBee's tutorial to make & autocolor that DDTM.

    thanks,
    TT

  2. #2
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    It may be because after the first point, it's not finding the second point. Also, instead of making your own box for the MM you can use MMX1, MMY1, MMX2, MMY2, that could also be your issue - your box could be wrong.

  3. #3
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    It may be because after the first point, it's not finding the second point. Also, instead of making your own box for the MM you can use MMX1, MMY1, MMX2, MMY2, that could also be your issue - your box could be wrong.
    the box thing isn't it, it if i use MMX/MMY, it selects another, similar piece of road. those coord's select the proper one (it works, it's tested) - it just terminates after it clicks it!

  4. #4
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by TomTuff View Post
    the box thing isn't it, it if i use MMX/MMY, it selects another, similar piece of road. those coord's select the proper one (it works, it's tested) - it just terminates after it clicks it!
    Then I would say that it can't find the second point. Try remaking the points, but this time make them closer together. I don't know that much about DDTMs, but that's the only thing I can think of.

  5. #5
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    i guess that could work :[
    trying it now

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
  •