Results 1 to 2 of 2

Thread: DDTM's edge off MM

  1. #1
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default DDTM's edge off MM

    seeing as no one else seems to want to help....
    nearly all of my DDTM's are just clicking on the edge of the MM. here's everything....

    SCAR Code:
    RockDTM:Integer;
    TempDDTM:TDTM;
    WhichAngle:Extended;

    SCAR Code:
    procedure SetRockDDTM;
    var
      dtmMainPoint: TDTMPointDef;
      dtmSubPoints: Array [0..3] of TDTMPointDef;
    begin
      dtmMainPoint.x := 251;
      dtmMainPoint.y := 130;
      dtmMainPoint.AreaSize := 0;
      dtmMainPoint.AreaShape := 1;
      dtmMainPoint.Color := 7831424;//Road
      dtmMainPoint.Tolerance := 10;

      dtmSubPoints[0].x := 231;
      dtmSubPoints[0].y := 120;
      dtmSubPoints[0].AreaSize := 0;
      dtmSubPoints[0].AreaShape := 1;
      dtmSubPoints[0].Color := 4938579;//Rock
      dtmSubPoints[0].Tolerance := 10;

      dtmSubPoints[1].x := 227;
      dtmSubPoints[1].y := 113;
      dtmSubPoints[1].AreaSize := 0;
      dtmSubPoints[1].AreaShape := 1;
      dtmSubPoints[1].Color := 4938579;
      dtmSubPoints[1].Tolerance := 10;

      dtmSubPoints[2].x := 222;
      dtmSubPoints[2].y := 117;
      dtmSubPoints[2].AreaSize := 0;
      dtmSubPoints[2].AreaShape := 1;
      dtmSubPoints[2].Color := 4938579;
      dtmSubPoints[2].Tolerance := 10;

      dtmSubPoints[3].x := 222;
      dtmSubPoints[3].y := 123;
      dtmSubPoints[3].AreaSize := 0;
      dtmSubPoints[3].AreaShape := 1;
      dtmSubPoints[3].Color := 4938579;
      dtmSubPoints[3].Tolerance := 10;

      TempDDTM.MainPoint := dtmMainPoint;
      TempDDTM.SubPoints := dtmSubPoints;
      RockDTM := AddDTM(TempDDTM);
    end;

    SCAR Code:
    Function FindRocks:Integer;
    var
       xx, yy:Integer;
    begin
      SetRockDDTM;
      if FindDtmRotated(RockDTM, xx, yy, MMX1, MMY1, MMX2, MMY2, -PI*2, PI*2, 0.2,
         WhichAngle) then
      begin
        Result:=GetColor(xx,yy)
        Writeln('Rock Colour is:'+(IntToStr(GetColor(xx,yy)) ))
        Mouse(xx,yy,2,2,true)
        Flag;
      end;
    end;

    -RK

    Edit: it turns out for some reason all it does is click on the road, even if the rocks aren't anywhere near it...wacked out >.<
    Sleeping...

  2. #2
    Join Date
    Feb 2006
    Location
    L.A, USA
    Posts
    1,632
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try also using

    Code:
    if rs_OnMinimap(x, y) then
    It's a function that returns true when x, y is in the minimap circle.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. DDTM's
    By iroki_ in forum OSR Help
    Replies: 3
    Last Post: 04-22-2008, 09:37 AM
  2. DDTM's
    By quiescent_87 in forum OSR Help
    Replies: 6
    Last Post: 04-06-2008, 07:07 PM
  3. DDTM's
    By Floor66 in forum OSR Help
    Replies: 7
    Last Post: 02-14-2008, 12:08 PM
  4. Help with DDTM's
    By dark4mdawn in forum OSR Help
    Replies: 7
    Last Post: 09-07-2007, 02:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •