Results 1 to 10 of 10

Thread: dtmFrogCrown - Edited by me

  1. #1
    Join Date
    Mar 2007
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default dtmFrogCrown - Edited by me

    I needed to try and make a new frog crown DTM, and I@m not sure how, or even if this will work properly.


    So if you don't mind testing?..

    Incase the DTM I made does NOT work; he is the SolveFrogSwamp function:

    SCAR Code:
    function SolveFrogSwamp: Boolean;
    var
      arPoolPoints: TPointArray;
      AveragePoint: TPoint;
      i, fx, fy, dtmFrogCrown, OptionMark, FrogMark, tcts: Integer;
    begin
      dtmFrogCrown := DTMFromString('78DA63CC616460D8C480027E9C9265B001D24' +
        '01986FF40C0988F50C30C5573798D345C0D08306603591B50D5FC' +
        '3E6F86AA0664D71654359F8FC9A2AAC9C4B4EBE57E54350015B91' +
        '3ED');
      MarkTime(FrogMark);
      repeat;
        tcts := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorspeed2Modifiers(0.2, 10.0);
        FindColorsTolerance(arPoolPoints, 6189364, MMX1, MMY1, MMX2, MMY2, 50);
        SetColorspeed2Modifiers(0.2, 0.2);
        ColorToleranceSpeed(tcts);
        if(GetArrayLength(arPoolPoints) = 0)then
        begin
          Writeln('Failed to find the center of the frog cave.');
          Result := False;
          FreeDTM(dtmFrogCrown);
          Exit;
        end;
        for i := 0 to GetArrayLength(arPoolPoints) - 1 do
        begin
          AveragePoint.x := AveragePoint.x + arPoolPoints[i].x;
          AveragePoint.y := AveragePoint.y + arPoolPoints[i].y;
        end;
        AveragePoint.x := AveragePoint.x / (GetArrayLength(arPoolPoints) - 1);
        AveragePoint.y := AveragePoint.y / (GetArrayLength(arPoolPoints) - 1);
        MFNF(AveragePoint.x, AveragePoint.y, 5, 5);
        Flag;
        MarkTime(OptionMark);
        repeat;
          if(FindDTM(dtmFrogCrown, fx, fy, 90, 102, 473, 334))then
          begin
            Mouse(fx, fy, 0, 0, False);
            Wait(200 + Random(500));
            if(ChooseOption('Talk'))then
              Break;
          end else Break;
        until(TimeFromMark(OptionMark) > 30000);
        if(TimeFromMark(OptionMark) > 30000)then
          Logout;
        if not(LoggedIn)then
        begin
          WriteLn('******** FROG RANDOM MISSED ********');
          WriteFileString(TheFile, '******** FROG RANDOM MISSED ********' + Chr(13));
          Players[CurrentPlayer].Rand := 'Frog Random';
          Players[CurrentPlayer].Active := False;
          Result := False;
          NoFrogs := NoFrogs + 1;
          FreeDTM(dtmFrogCrown);
          Exit;
        end;
        Flag;
        Wait(300 + Random(500));
      until(FindText(fx, fy, 'mph', NPCChars, MCX1, MCY1, MCX2, MCY2)) or
           (TimeFromMark(FrogMark) > 60000);
      if (TimeFromMark(FrogMark) > 60000) then Logout;
      repeat;
        if not (LoggedIn) then
        begin
          WriteLn('******** FROG RANDOM MISSED ********');
          WriteFileString(TheFile, '******** FROG RANDOM MISSED ********' + Chr(13))
            Players[CurrentPlayer].Rand := 'Frog Random'; //Players[CurrentPlayer].Loc := 'Frog Random';
          Players[CurrentPlayer].Active := False;
          Result := False;
          NoFrogs := NoFrogs + 1;
          FreeDTM(dtmFrogCrown);
          Exit;
        end;
        ClickToContinue;
        Wait(500 + Random(500));
      until not (DetectFrogCave);
      Result := True;
      TakeScreen('Solved Frog Cave');
      Frogs := Frogs + 1;
      FreeDTM(dtmFrogCrown);
      WriteLn('******** FROG RANDOM SOLVED ********');
      WriteFileString(TheFile, '******** FROG RANDOM SOLVED ********' + Chr(13))
    end;

    And the new one with the edited DTM:

    SCAR Code:
    function SolveFrogSwamp: Boolean;
    var
      arPoolPoints: TPointArray;
      AveragePoint: TPoint;
      i, fx, fy, dtmFrogCrown, OptionMark, FrogMark, tcts: Integer;
    begin
      dtmFrogCrown := DTMFromString('78DA63BCCDC0C060C88002762CE660F80FA41' +
           '981F83F10305E02327450D5AC992C0BA619A17CC6AB40C20455CD' +
           'D7AB82A86AEE01095D543587962AA3AAB90924F450D53C5DC280A' +
           'AE6169030433347440C55CD754C737EEFE3265DCD0D4C35CF364B' +
           '61BA591B55CDEC6A23143500C1AD1E75' +
        '3ED');
      MarkTime(FrogMark);
      repeat;
        tcts := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorspeed2Modifiers(0.2, 10.0);
        FindColorsTolerance(arPoolPoints, 6189364, MMX1, MMY1, MMX2, MMY2, 50);
        SetColorspeed2Modifiers(0.2, 0.2);
        ColorToleranceSpeed(tcts);
        if(GetArrayLength(arPoolPoints) = 0)then
        begin
          Writeln('Failed to find the center of the frog cave.');
          Result := False;
          FreeDTM(dtmFrogCrown);
          Exit;
        end;
        for i := 0 to GetArrayLength(arPoolPoints) - 1 do
        begin
          AveragePoint.x := AveragePoint.x + arPoolPoints[i].x;
          AveragePoint.y := AveragePoint.y + arPoolPoints[i].y;
        end;
        AveragePoint.x := AveragePoint.x / (GetArrayLength(arPoolPoints) - 1);
        AveragePoint.y := AveragePoint.y / (GetArrayLength(arPoolPoints) - 1);
        MFNF(AveragePoint.x, AveragePoint.y, 5, 5);
        Flag;
        MarkTime(OptionMark);
        repeat;
          if(FindDTM(dtmFrogCrown, fx, fy, 90, 102, 473, 334))then
          begin
            Mouse(fx, fy, 0, 0, False);
            Wait(200 + Random(500));
            if(ChooseOption('Talk'))then
              Break;
          end else Break;
        until(TimeFromMark(OptionMark) > 30000);
        if(TimeFromMark(OptionMark) > 30000)then
          Logout;
        if not(LoggedIn)then
        begin
          WriteLn('******** FROG RANDOM MISSED ********');
          WriteFileString(TheFile, '******** FROG RANDOM MISSED ********' + Chr(13));
          Players[CurrentPlayer].Rand := 'Frog Random';
          Players[CurrentPlayer].Active := False;
          Result := False;
          NoFrogs := NoFrogs + 1;
          FreeDTM(dtmFrogCrown);
          Exit;
        end;
        Flag;
        Wait(300 + Random(500));
      until(FindText(fx, fy, 'mph', NPCChars, MCX1, MCY1, MCX2, MCY2)) or
           (TimeFromMark(FrogMark) > 60000);
      if (TimeFromMark(FrogMark) > 60000) then Logout;
      repeat;
        if not (LoggedIn) then
        begin
          WriteLn('******** FROG RANDOM MISSED ********');
          WriteFileString(TheFile, '******** FROG RANDOM MISSED ********' + Chr(13))
            Players[CurrentPlayer].Rand := 'Frog Random'; //Players[CurrentPlayer].Loc := 'Frog Random';
          Players[CurrentPlayer].Active := False;
          Result := False;
          NoFrogs := NoFrogs + 1;
          FreeDTM(dtmFrogCrown);
          Exit;
        end;
        ClickToContinue;
        Wait(500 + Random(500));
      until not (DetectFrogCave);
      Result := True;
      TakeScreen('Solved Frog Cave');
      Frogs := Frogs + 1;
      FreeDTM(dtmFrogCrown);
      WriteLn('******** FROG RANDOM SOLVED ********');
      WriteFileString(TheFile, '******** FROG RANDOM SOLVED ********' + Chr(13))
    end;

    Also could someone tell me what the "'3ED'" thing is? Do I have to change this too?


    Credits too:

    Entire SRL Team
    YoHoJo's DTM tutorial


    Thanks,

    Please post if it works or not..

  2. #2
    Join Date
    Jun 2007
    Location
    Ohio
    Posts
    341
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you can't find an npc with a dtm.

    or at least its very hard--nearly impossible to do

  3. #3
    Join Date
    Mar 2007
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It only searches for then crown, since I think it's the only gold thing within the area.

  4. #4
    Join Date
    Jun 2007
    Location
    Ohio
    Posts
    341
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ill try it. heck, if it works then ill post back. but i won't be autoing for a few days

  5. #5
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    did u use DTMRotated(DTM, x, y, MSX1, MSY1, MSX2, MSY2) ?

  6. #6
    Join Date
    Mar 2007
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Think so.

  7. #7
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Don't want to discourage you, but why did you make one since SRL has got one? Last time my SRL succesfully solved a frog was yesterday.

  8. #8
    Join Date
    Mar 2007
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Because mine didn't, why else.

  9. #9
    Join Date
    Nov 2007
    Location
    Nowhereville
    Posts
    1,155
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    I think that frogs talk? Don't they? Just make a new one for SRL by yourself. I don't think this will work though. Well if this doesn't work, searching for the npc, search for the color of the crown, then do click it I guess....

    ~ Cut em2 it
    Formerly known as Cut em2 it

  10. #10
    Join Date
    Mar 2007
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The DTM I edited was only to FIND the frogs crown; the gold parts is what I used.

    THe rest of the procedure is done by the rest of the script which I didn't make.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Clan leader Edited
    By vikrant60 in forum News and General
    Replies: 1
    Last Post: 10-18-2008, 02:11 AM
  2. Clan leader Edited
    By vikrant60 in forum News and General
    Replies: 0
    Last Post: 10-18-2008, 02:10 AM
  3. Edited stats?
    By vcvv in forum RuneScape News and General
    Replies: 31
    Last Post: 01-28-2008, 04:41 AM
  4. new road walk(edited a little bit) not tested!
    By Killerdou in forum Research & Development Lounge
    Replies: 14
    Last Post: 08-17-2007, 07:22 AM

Posting Permissions

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