Results 1 to 16 of 16

Thread: ending a loop with a dtm search?

  1. #1
    Join Date
    May 2007
    Location
    in the forest
    Posts
    190
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default ending a loop with a dtm search?

    Im currently working on an auto wcing script and I need help with the dropper.
    My goal is to get it to drop until the dtm can no longer be found
    SCAR Code:
    begin
    if FindDTM(WillowLog, x, y, MIX1, MIY1, MIX2, MIY2) then
       begin
        repeat
        Mouse(x, y, 5, 5, false); //right clicks dtm
          ChooseOption('rop');   //drops the log
       until // heres where i need it
       end else
       writeln('no dtms');
    end;

    I was wondering what command i would use to get it to loop until like finddtm = false or if not finddtm or something Im not sure on what the command would be... any suggestions?
    At sea with the navy - not very active

  2. #2
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    you have it right... put
    SCAR Code:
    until not finddtm(WillowLog, x, y, MIX1, MIY1, MIX2, MIY2) or somethingelse;

  3. #3
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you would set a boolean to = false then

    until (NoDTM = False);

    SCAR Code:
    if not FindDTM(WillowLog, x, y, MIX1, MIY1, MIX2, MIY2) then (NoDTM:= False);
    until (NoDTM = False);

    Just for fun...
    SCAR Code:
    DropAll;

    Drops everything in the inventory. Might not want it if axe in inventory, but otherwise you're good to go.

  4. #4
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Quote Originally Posted by Aser View Post
    SCAR Code:
    if not FindDTM(WillowLog, x, y, MIX1, MIY1, MIX2, MIY2) then (NoDTM:= True);
    until NoDTM;
    that is how i would do what aser is saying...

  5. #5
    Join Date
    May 2007
    Location
    in the forest
    Posts
    190
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks you guys ill try em both and mayby even use one as a failsafe or w/e

    yeah Im not using DropAll; for that reason but it is lovely^^

    lol mormon you always seem to post when i need help fast
    what would srl be without ppl like you?
    At sea with the navy - not very active

  6. #6
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Quote Originally Posted by tazzin44 View Post
    lol mormon you always seem to post when i need help fast
    what would srl be without ppl like you?
    it would be like rsbot tbch...

  7. #7
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by mormonman View Post
    it would be like rsbot tbch...
    Please no.

  8. #8
    Join Date
    May 2007
    Location
    in the forest
    Posts
    190
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lolz
    At sea with the navy - not very active

  9. #9
    Join Date
    Sep 2008
    Location
    Chicago
    Posts
    224
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If you still need this here's how I would do it

    SCAR Code:
    While FindDTM(WillowLog, x, y, MIX1, MIY1, MIX2, MIY2) do
    begin
      Mouse(x, y, 5, 5, false); //right clicks dtm
      ChooseOption('rop');   //drops the log
    end;

  10. #10
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Heysus View Post
    If you still need this here's how I would do it

    SCAR Code:
    While FindDTM(WillowLog, x, y, MIX1, MIY1, MIX2, MIY2) do
    begin
      Mouse(x, y, 5, 5, false); //right clicks dtm
      ChooseOption('rop');   //drops the log
    end;
    End less loop..? Need break fail saves...
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  11. #11
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    He doesn't need break failsafes because if it doesn't find it it will exit the loop.

  12. #12
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by TViYH View Post
    He doesn't need break failsafes because if it doesn't find it it will exit the loop.
    What if RS fails and freezes?! it will sit there clickign a frozen screen.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  13. #13
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Either way, you can't use if not LoggedIn, because if it wasn't logged in then it wouldn't find the DTM.

    If you used not LoggedIn, then it would continue to click if the screen was frozen.

    What say ye now?

  14. #14
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by TViYH View Post
    Either way, you can't use if not LoggedIn, because if it wasn't logged in then it wouldn't find the DTM.

    If you used not LoggedIn, then it would continue to click if the screen was frozen.

    What say ye now?
    What about using a marktime timer..? No one ever said any thing about if not logged in Beat that !
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  15. #15
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    While do will work fine. It will continue to click until it doesn't find the tree.

  16. #16
    Join Date
    Dec 2008
    Posts
    70
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by tazzin44 View Post
    thanks you guys ill try em both and mayby even use one as a failsafe or w/e

    yeah Im not using DropAll; for that reason but it is lovely^^

    lol mormon you always seem to post when i need help fast
    what would srl be without ppl like you?
    SCAR Code:
    procedure DropAllExcept(A : Array of Integer);
    var
      i: Integer;
    begin
    For I:=1 To 28 Do
        if not(InIntArray(a, i)) then
          DropItem(i);
    end;

    DropAllExcept(1);
    So u dont drop ur axe

    u can combine it with
    SCAR Code:
    ArrangeInv;
    ( at the begging of the script )
    to insure that the axe is in the first slot if it isn't equiped
    BarbvilleCoalMinerAndBanker
    80% complete
    AutoPCTrainer
    60% complete

    Quote Originally Posted by whereyouat07 View Post
    [Runtime Error] : Out Of Range in line 68 in script C:\Users\Oliver\AppData\Local\Microsoft\Windows\Te mporary Internet Files\Low\Content.IE5\OB8J6FUC\LumbyNewbie%20V0.9[1].scar

    what the hell is this lol?
    Quote Originally Posted by TravisV10 View Post
    An error (h)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Breaking or ending a script
    By hahicx in forum OSR Help
    Replies: 4
    Last Post: 07-13-2008, 11:48 AM
  2. ending the script
    By cloutier15 in forum OSR Help
    Replies: 23
    Last Post: 05-11-2008, 01:01 AM
  3. Never-ending runescape prayer!
    By codx1 in forum RuneScape News and General
    Replies: 5
    Last Post: 08-10-2007, 11:40 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
  •