Results 1 to 7 of 7

Thread: Wont Find My DDTM's what am i doing wrong?

  1. #1
    Join Date
    Jul 2008
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Wont Find My DDTM's what am i doing wrong?

    Ok so im trying to make my script walk from the willows to the bank in draynor so i did a DDTM of the bankers in the bank set the parent point tolerance to 225 and the sub points to 5. Heres the walk to bank script and the DeclareDTMs script:

    WalkToBank:
    SCAR Code:
    function WalkToBank: boolean;
    var
    Tries, BankDTM: Integer;
    begin
      BankDTM := DeclareDTMs(2);
        repeat
      if DTMRotated(BankDTM, x, y, MMx1, MMy1, MMx2, MMy2) then
      begin
        Result := True;
        MakeCompass('N')
          Mouse(x, y, 5, 5, True)
          writeln('Walking to Bank')
          FFlag(0);
      end else
        Result := False;
        Tries := Tries + 1;
        writeln('Could not find BankDTM Tries: '+IntToStr(Tries))
      until(Result = True) or (Tries = 25)
      FreeDTM(BankDTM);
    end;

    and the Declare DTMs function the bank is the second case:
    SCAR Code:
    function DeclareDTMs(WalkNumber: Integer): Integer;
    var
    dtmMainPoint: TDTMPointDef;
    dtmSubPoints: array[0..4] of TDTMPointDef;
    TempTDTM: TDTM;
    begin
    case WalkNumber of
    1: begin
    dtmMainPoint.x := 746;
      dtmMainPoint.y := 220;
      dtmMainPoint.AreaSize := 0;
      dtmMainPoint.AreaShape := 0;
      dtmMainPoint.Color := 3244424;
      dtmMainPoint.Tolerance := 255;


      dtmSubPoints[0].x := 737;
      dtmSubPoints[0].y := 219;
      dtmSubPoints[0].AreaSize := 4;
      dtmSubPoints[0].AreaShape := 0;
      dtmSubPoints[0].Color := 3240840;
      dtmSubPoints[0].Tolerance := 0;

      dtmSubPoints[1].x := 751;
      dtmSubPoints[1].y := 216;
      dtmSubPoints[1].AreaSize := 4;
      dtmSubPoints[1].AreaShape := 0;
      dtmSubPoints[1].Color := 3310731;
      dtmSubPoints[1].Tolerance := 0;

      dtmSubPoints[2].x := 747;
      dtmSubPoints[2].y := 227;
      dtmSubPoints[2].AreaSize := 4;
      dtmSubPoints[2].AreaShape := 0;
      dtmSubPoints[2].Color := 3244424;
      dtmSubPoints[2].Tolerance := 0;

      dtmSubPoints[3].x := 740;
      dtmSubPoints[3].y := 224;
      dtmSubPoints[3].AreaSize := 4;
      dtmSubPoints[3].AreaShape := 0;
      dtmSubPoints[3].Color := 3242632;
      dtmSubPoints[3].Tolerance := 0;

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

      dtmMainPoint.x := 778;
      dtmMainPoint.y := 310;
      dtmMainPoint.AreaSize := 0;
      dtmMainPoint.AreaShape := 0;
      dtmMainPoint.Color := 283232;
      dtmMainPoint.Tolerance := 255;


      dtmSubPoints[0].x := 769;
      dtmSubPoints[0].y := 291;
      dtmSubPoints[0].AreaSize := 4;
      dtmSubPoints[0].AreaShape := 0;
      dtmSubPoints[0].Color := 7040116;
      dtmSubPoints[0].Tolerance := 7;

      dtmSubPoints[1].x := 785;
      dtmSubPoints[1].y := 297;
      dtmSubPoints[1].AreaSize := 4;
      dtmSubPoints[1].AreaShape := 0;
      dtmSubPoints[1].Color := 4342599;
      dtmSubPoints[1].Tolerance := 10;

      dtmSubPoints[2].x := 785;
      dtmSubPoints[2].y := 316;
      dtmSubPoints[2].AreaSize := 4;
      dtmSubPoints[2].AreaShape := 0;
      dtmSubPoints[2].Color := 4342599;
      dtmSubPoints[2].Tolerance := 27;

      dtmSubPoints[3].x := 769;
      dtmSubPoints[3].y := 317;
      dtmSubPoints[3].AreaSize := 4;
      dtmSubPoints[3].AreaShape := 0;
      dtmSubPoints[3].Color := 4342599;
      dtmSubPoints[3].Tolerance := 255;

      TempTDTM.MainPoint := dtmMainPoint;
      TempTDTM.SubPoints := dtmSubPoints;
      Result := AddDTM(TempTDTM);
    end;
    end;
    end;
    Last edited by Minkino; 06-13-2009 at 11:33 PM.

  2. #2
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Do a seperate one for each so:
    SCAR Code:
    Function RockDDTM : Integer;
    dtmMainPoint.x := 818;
      dtmMainPoint.y := 105;
      dtmMainPoint.AreaSize := 0;
      dtmMainPoint.AreaShape := 0;
      dtmMainPoint.Color := 2782325;
      dtmMainPoint.Tolerance := 255;

      dtmSubPoints[0].x := 818;
      dtmSubPoints[0].y := 105;
      dtmSubPoints[0].AreaSize := 0;
      dtmSubPoints[0].AreaShape := 0;
      dtmSubPoints[0].Color := 2782325;
      dtmSubPoints[0].Tolerance := 255;

      dtmSubPoints[1].x := 813;
      dtmSubPoints[1].y := 103;
      dtmSubPoints[1].AreaSize := 0;
      dtmSubPoints[1].AreaShape := 0;
      dtmSubPoints[1].Color := 1265707;
      dtmSubPoints[1].Tolerance := 5;

      dtmSubPoints[2].x := 804;
      dtmSubPoints[2].y := 95;
      dtmSubPoints[2].AreaSize := 0;
      dtmSubPoints[2].AreaShape := 0;
      dtmSubPoints[2].Color := 1265707;
      dtmSubPoints[2].Tolerance := 5;

      dtmSubPoints[3].x := 825;
      dtmSubPoints[3].y := 106;
      dtmSubPoints[3].AreaSize := 0;
      dtmSubPoints[3].AreaShape := 0;
      dtmSubPoints[3].Color := 1265707;
      dtmSubPoints[3].Tolerance := 5;

      dtmSubPoints[4].x := 821;
      dtmSubPoints[4].y := 119;
      dtmSubPoints[4].AreaSize := 0;
      dtmSubPoints[4].AreaShape := 0;
      dtmSubPoints[4].Color := 1265707;
      dtmSubPoints[4].Tolerance := 5;

      dtmSubPoints[5].x := 826;
      dtmSubPoints[5].y := 135;
      dtmSubPoints[5].AreaSize := 0;
      dtmSubPoints[5].AreaShape := 0;
      dtmSubPoints[5].Color := 1265707;
      dtmSubPoints[5].Tolerance := 5;

      TempTDTM.MainPoint := dtmMainPoint;
      TempTDTM.SubPoints := dtmSubPoints;
      Result := AddDTM(TempTDTM);
    end;
    No idea if it is for the rock but you understand what i mean

    T~M

  3. #3
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    You've repeated the Main point as your first sub point. Not sure if thats the problem but you shouldn't do that.

    Also you're messing a set of begin and ends:

    SCAR Code:
    if DTMRotated(BankDTM, x, y, MMx1, MMy1, MMx2, MMy2) then
      begin
        Result := True;
        MakeCompass('N')
          Mouse(x, y, 5, 5, True)
          writeln('Walking to Bank')
          FFlag(0);
      end else
      begin  //here
        Result := False;
        Tries := Tries + 1;
        writeln('Could not find BankDTM Tries: '+IntToStr(Tries))
      end; //and here.

  4. #4
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Bigger issue, increase your area size for ALL of your sub-points. Make it ~4.

    Also, if you are using rock colours, I suggest using an auto colour.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  5. #5
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yes your tolerance is waaay to low, and you dont have any area size. Increase your tolerance to 25-50 or more or use an autocolor.
    “Ignorance, the root and the stem of every evil.”

  6. #6
    Join Date
    Oct 2006
    Location
    Ontario,Canada
    Posts
    1,718
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Blumblebee View Post
    yes your tolerance is waaay to low, and you dont have any area size. Increase your tolerance to 25-50 or more or use an autocolor.
    for bankers? 15-25 tolerance should be good. really a bank dtm does not need to be dynamic. [aside] ive used the same dtm (not dynamic) for the bankers for 2 years now. [/aside]

  7. #7
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by XcanadamanX View Post
    for bankers? 15-25 tolerance should be good. really a bank dtm does not need to be dynamic. [aside] ive used the same dtm (not dynamic) for the bankers for 2 years now. [/aside]
    i didnt realize it was for a banker, its flat out useless to have a ddtm for that, no need for dynamic. Also, you wouldnt even need tolerance on the dots, 19.... is a constant color on them.
    “Ignorance, the root and the stem of every evil.”

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
  •