Results 1 to 3 of 3

Thread: DDTM help needed

  1. #1
    Join Date
    Jun 2007
    Location
    Belgium
    Posts
    333
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default DDTM help needed

    I'm replacing the walking in my script with DDTM, been testing them for a few days now and i allways come up with the same problem. After a few runs, it suddenly can't find the DDTM. I've tryed remaking them, with the same result. I've recheck the colors at the time of problems and they still match.
    I was using Scar 3.12c with rev#10, i switched to 3.13, still the same result.
    Script starts, DDTM's work as they should, after a few runs bam, can't find them, just stands there and gets logged out.
    SCAR Code:
    Procedure LakeToRuin0;
    Var
      Point0, i: Integer;
    Begin
      DTM.MainPoint.Areashape := 0;
      DTM.MainPoint.Areasize := 1;
      DTM.MainPoint.Color := 3959670;
      DTM.MainPoint.Tolerance := 422;
      DTM.MainPoint.x := 640;
      DTM.MainPoint.y := 79;

      SetArrayLength(DTM.SubPoints, 4);

      DTM.SubPoints[0].Areashape := 0;
      DTM.SubPoints[0].Areasize := 3;
      DTM.SubPoints[0].Color := TreeColor;
      DTM.SubPoints[0].Tolerance := 1;
      DTM.SubPoints[0].x := 637;
      DTM.SubPoints[0].y := 42;

      DTM.SubPoints[1].Areashape := 0;
      DTM.SubPoints[1].Areasize := 3;
      DTM.SubPoints[1].Color := TreeColor;
      DTM.SubPoints[1].Tolerance := 1;
      DTM.SubPoints[1].x := 608;
      DTM.SubPoints[1].y := 52;

      DTM.SubPoints[2].Areashape := 0;
      DTM.SubPoints[2].Areasize := 3;
      DTM.SubPoints[2].Color := TreeColor;
      DTM.SubPoints[2].Tolerance := 1;
      DTM.SubPoints[2].x := 606;
      DTM.SubPoints[2].y := 98;

      DTM.SubPoints[3].Areashape := 0;
      DTM.SubPoints[3].Areasize := 3;
      DTM.SubPoints[3].Color := PalmColor;
      DTM.SubPoints[3].Tolerance := 1;
      DTM.SubPoints[3].x := 593;
      DTM.SubPoints[3].y := 88;

      Point0 := AddDTM(DTM);

      MakeCompass('n');
      if(DTMRotated(Point0, x, y, MMX1, MMY1, MMX2, MMY2))then
      begin
        Mouse(x, y, 2, +2, True);
        FFlag(0);
        Wait(100 + Random(50));
        FreeDTM(Point0);
      end;
    end;

    Tryed it with replacing this in the end
    SCAR Code:
    if(not(DTMRotated(Point0, x, y, MMX1, MMY1, MMX2, MMY2)))then
      begin
        repeat
          FreeDTM(Point0);
          Wait(100 + Random(50));
          Point0 := AddDTM(DTM);
          Wait(400 + Random(50))
          result := DTMRotated(Point0, x, y, MMX1, MMY1, MMX2, MMY2);
          Inc(i);
        until(Result)or(i>=5)
        Mouse(x, y, 2, 2, True);
      end else
        Mouse(x, y, 2, 2, True);
      FFlag(0);
      Wait(100 + Random(50));
      FreeDTM(Point0);
    end;

    Also tryed to make the areasize value bigger on each try, but then it just found a wrong spot in the end

  2. #2
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It should work -.-

    Try messing FindDTMRotated instead of DTMrotated...

    And btw, since it creats dtm in angle you are, there is no point messing with DTMrotated, execpt when you use areasize > 1, I use normal FindDTM with DDTMs and works great
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  3. #3
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    If Negaals way doesn't fix it, try raising some of the tolerances as it looks like it's for trees (by the TreeColor const/var) and trees can be very varied in their colours.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. If there is a DDTM....
    By Claymore in forum OSR Help
    Replies: 6
    Last Post: 07-07-2008, 03:43 AM
  2. DDTM help
    By [S]paz in forum OSR Help
    Replies: 12
    Last Post: 02-16-2008, 06:18 PM
  3. Help with DDTM
    By stampede10343 in forum OSR Help
    Replies: 3
    Last Post: 01-23-2008, 10:53 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
  •