Results 1 to 14 of 14

Thread: How can i repeat until not find DTM?

  1. #1
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default How can i repeat until not find DTM?

    How can i keep high alching until not found the herb DTM??

    Simba Code:
    Procedure HighAlchItem;
    Begin
     HighAlchDTM := DTMFromString('mggAAAHicY2NgYHBmYmDwBGJ/IA4C4lAoO4ERguOAOBGIo6H0xV0SYPzqdghDfzkrQ+Kp7wzrpvAysALNwoYZcWAIAABJeA4k');
           GameTab(Tab_Magic);
           wait(randomrange(400,500));
    repeat
     if FindDTM(HighAlchDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
      Begin
           GameTab(Tab_Magic);
           wait(randomrange(100,150));

                MMouse(X, Y + 3, 0, 0);

                If WaitUptextMulti(['High', 'Alchemy'], 500) Then
                Begin
                Writeln ('Found High Alch spell')
                  ClickMouse2(true);

                   wait(300);


    //Clicking Herb DTM ( Not added yet )

    ///////HERE

    until not found CleanHerbDTM??
    I was away for a long time, but i'm back!

  2. #2
    Join Date
    Jun 2011
    Location
    Anywhere that has WIFI
    Posts
    669
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by kipjes bende View Post
    How can i keep high alching until not found the herb DTM??

    Simba Code:
    Procedure HighAlchItem;
    Begin
     HighAlchDTM := DTMFromString('mggAAAHicY2NgYHBmYmDwBGJ/IA4C4lAoO4ERguOAOBGIo6H0xV0SYPzqdghDfzkrQ+Kp7wzrpvAysALNwoYZcWAIAABJeA4k');
           GameTab(Tab_Magic);
           wait(randomrange(400,500));
    repeat
     if FindDTM(HighAlchDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
      Begin
           GameTab(Tab_Magic);
           wait(randomrange(100,150));

                MMouse(X, Y + 3, 0, 0);

                If WaitUptextMulti(['High', 'Alchemy'], 500) Then
                Begin
                Writeln ('Found High Alch spell')
                  ClickMouse2(true);

                   wait(300);


    //Clicking Herb DTM ( Not added yet )

    ///////HERE

    until not found CleanHerbDTM??
    You could just have a clean herb in the last inv spot and then just alch that until you have alched it x amount of times. X would be 28-How many items are in your inventory. Keep the same amount of itmes in your inventory at all times except clean herbs obviously.

    Edit: Im pretty sure there is an If not find DTM or something along those lines if you look.

  3. #3
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    You do it exactly as how you said:

    Simba Code:
    repeat
      yadayada
    until (not FindDTM(HerbDTM, x, y, xs ,ys, xe, ye);

  4. #4
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Either use:
    until (not(FindDTM(HerbDTM, x, y, xs ,ys, xe, ye)));

    or, if you find that confusing:

    until (FindDTM(HerbDTM, x, y, xs ,ys, xe, ye) = false);
    Working on: Tithe Farmer

  5. #5
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Thanks guys!
    @ Jokester: Its for my DungFarmer. the herbs are not noted/stackable.
    I was away for a long time, but i'm back!

  6. #6
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Is it also possible to add in main loop??

    Thanks guys!
    @ Jokester: Its for my DungFarmer. the herbs are not noted/stackable.

    EDIT: Is it also possible to add it in my main loop???


    EG:

    Simba Code:
    CleaningHerbs;

       repeat
           HighAlchItem;
            CleanHerbDTM;
    until (not FindDTM(CleanHerbDTM, x, y, xs ,ys, xe, ye);
    I was away for a long time, but i'm back!

  7. #7
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Yes it is possible to add in your mainlopp. Just put in it there like that.
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  8. #8
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Thanks!

    EDIT:

    Giving a error i cant find whats wrong..

    The Procedure AlchingTheHerbs; light up orange...

    Simba Code:
    Procedure AlchingTheHerbs;
    Begin
     CleanHerbDTM := DTMFromString('mLgAAAHicY2JgYAhiYmAIBeJERgaGOCDWN9Fg0NCTZ2AGyoEwIxQzMAAASwgCdw==');
          wait(randomrange(400,500));

     if FindDTM(CleanHerbDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
      Begin
           wait(randomrange(100,150));

                MMouse(X, Y + 3, 0, 0);
                Writeln ('Found Clean herb, Clicking.')

                wait(randomrange(100,150));
                  ClickMouse2(true);

               wait(randomrange(400,500));
               FreeDTM(CleanHerbDTM);

                   end;
                end;

    The loop:

    Simba Code:
    repeat
           HighAlchItem;
           wait(randomrange(400,500));
            AlchingTheHerbs;

    until (not FindDTM(CleanHerbDTM, x, y, MIX1, MIY1, MIX2, MIY2);
    Last edited by bas; 04-29-2012 at 04:35 PM.
    I was away for a long time, but i'm back!

  9. #9
    Join Date
    Jun 2011
    Location
    Anywhere that has WIFI
    Posts
    669
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by kipjes bende View Post
    Thanks guys!
    @ Jokester: Its for my DungFarmer. the herbs are not noted/stackable.
    Due to the newest dung update raw resources in the dungeon including grimy herbs are stackable. Clean herbs however are not.

  10. #10
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by Jokester View Post
    Due to the newest dung update raw resources in the dungeon including grimy herbs are stackable. Clean herbs however are not.
    Sadly enough not no would be easyer. lol
    I was away for a long time, but i'm back!

  11. #11
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by kipjes bende View Post
    Thanks!

    EDIT:

    Giving a error i cant find whats wrong..

    The Procedure AlchingTheHerbs; light up orange...

    Simba Code:
    Procedure AlchingTheHerbs;
    Begin
     CleanHerbDTM := DTMFromString('mLgAAAHicY2JgYAhiYmAIBeJERgaGOCDWN9Fg0NCTZ2AGyoEwIxQzMAAASwgCdw==');
          wait(randomrange(400,500));

     if FindDTM(CleanHerbDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
      Begin
           wait(randomrange(100,150));

                MMouse(X, Y + 3, 0, 0);
                Writeln ('Found Clean herb, Clicking.')

                wait(randomrange(100,150));
                  ClickMouse2(true);

               wait(randomrange(400,500));
               FreeDTM(CleanHerbDTM);

                   end;
                end;

    The loop:

    Simba Code:
    repeat
           HighAlchItem;
           wait(randomrange(400,500));
            AlchingTheHerbs;

    until (not FindDTM(CleanHerbDTM, x, y, MIX1, MIY1, MIX2, MIY2);
    Post the error that you get

  12. #12
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by putonajonny View Post
    Post the error that you get
    [Error] (236:6): Identifier expected at line 235
    Compiling failed.
    I was away for a long time, but i'm back!

  13. #13
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Simba Code:
    Procedure AlchingTheHerbs;
    Begin
     //Removed line
          wait(randomrange(400,500));

     if FindDTM(CleanHerbDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
      Begin
           wait(randomrange(100,150));

                MMouse(X, Y + 3, 0, 0);
                Writeln ('Found Clean herb, Clicking.'); //added ;

                wait(randomrange(100,150));
                  ClickMouse2(true);

               wait(randomrange(400,500));
               //removed line

                   end;
                end;

    The loop:

    Simba Code:
    CleanHerbDTM := DTMFromString('mLgAAAHicY2JgYAhiYmAIBeJERgaGOCDWN9Fg0NCTZ2AGyoEwIxQzMAAASwgCdw=='); //added line
    repeat
           HighAlchItem;
           wait(randomrange(400,500));
            AlchingTheHerbs;

    until (not FindDTM(CleanHerbDTM, x, y, MIX1, MIY1, MIX2, MIY2)); //added )
    FreeDTM(CleanHerbDTM); //added line

    I'm sure it was needed. The DTM wasn't loaded when you called it in the until loop cause you freed them earlier. An identifier expected error mostly occurs when you forgot a ; the previous line.

    Edit:
    Try it again.
    Last edited by masterBB; 04-29-2012 at 04:52 PM.
    Working on: Tithe Farmer

  14. #14
    Join Date
    Nov 2011
    Location
    Netherlands
    Posts
    156
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by masterBB View Post
    Simba Code:
    Procedure AlchingTheHerbs;
    Begin
     //Removed line
          wait(randomrange(400,500));

     if FindDTM(CleanHerbDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
      Begin
           wait(randomrange(100,150));

                MMouse(X, Y + 3, 0, 0);
                Writeln ('Found Clean herb, Clicking.')

                wait(randomrange(100,150));
                  ClickMouse2(true);

               wait(randomrange(400,500));
               //removed line

                   end;
                end;

    The loop:

    Simba Code:
    CleanHerbDTM := DTMFromString('mLgAAAHicY2JgYAhiYmAIBeJERgaGOCDWN9Fg0NCTZ2AGyoEwIxQzMAAASwgCdw=='); //added line
    repeat
           HighAlchItem;
           wait(randomrange(400,500));
            AlchingTheHerbs;

    until (not FindDTM(CleanHerbDTM, x, y, MIX1, MIY1, MIX2, MIY2)); //added )
    FreeDTM(CleanHerbDTM); //added line
    I dont think it has something to do with the DTM there.
    All my DTM's are like that, never had any errors.
    But i tried what you said, and still get the errorr.

    Edit: Forget a end; at other procedure..... lol.
    Last edited by bas; 04-29-2012 at 05:09 PM.
    I was away for a long time, but i'm back!

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
  •