Results 1 to 2 of 2

Thread: While... Do

  1. #1
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default While... Do

    If i want my script to cut down a tree, and i want it to look for the congrats text for when it grows a level... And if it finds it, it adds a level to levels gained, and restarts the cutting thing. How would i do that.. Say my cutting procedure goes like this...
    SCAR Code:
    Procedure ChopTree;
    begin
     MakeCompass('S')
      FindAxeHeadColor;
        repeat
          if(not (LoggedIn)) then break;
          MakeCompass('S')
          FindObj(x,y,'Oak', OakC, 5);
          Mouse(x,y,2,2,true);
          wait(1000+random(500));
          FindEnt(OakC)
          FindNormalRandoms;
          FindHead;
          wait(Waittime + Random(1000))
         until(Invfull)
    end;
    How would i get it to look for the text and restart the procedure if it finds it?

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  2. #2
    Join Date
    Feb 2006
    Location
    L.A, USA
    Posts
    1,632
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    procedure FindRandoms;
    begin
      FindEnt(OakC)
      FindNormalRandoms;
      FindHead;
    end;

    procedure ChopTree;
    begin
      MakeCompass('S');
      FindAxeHeadColor;
      repeat
        if(not (LoggedIn)) then break;
        MakeCompass('S')
        if(FindObj(x,y,'Oak', OakC, 5))then
          Mouse(x,y,2,2,true);
        MarkTime(Mark);
        while (TimeFromMark(Mark) < WaitTime + random(1000) do
        begin
          Wait(100 + random(100));
          FindRandoms;
          if(IsChatMessage('gain')) or (ClickToContinue) then
            Break;
        end;
      until(Invfull)
    end;

    Ask if you don't get something.

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
  •