Results 1 to 4 of 4

Thread: "Break" definition

  1. #1
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    "Break" definition

    I was wandering what Break means? People use it like if, then, break. what does the break do? Please give as much as detail as possible. And anyone also show me what the break in this script does? :
    SCAR Code:
    procedure MinedaRock;
    var BlackText: string;
    begin
      MakeCompass('N');
      SetAngle(True);
      repeat
        if Not(LoggedIn) then exit;
        Replylaugh;
        if not FindObjCustom(x, y, ['ocks', 'ine'], [2832993], 3) then
        Wait(900 +random(250));
        if FindObjCustom(x, y, ['ocks', 'ine'], [2832993], 3) then
        Makesurepick;
        FindGas;
        Leveled;
        Mouse(x, y, 1, 1, True);
        Myrandom;
        If (Pos('anage', BlackText) <> 0) or (Pos('vailable', BlackText) <> 0) then break;
        If (Pos('wing', BlackText) <> 0)then
        Wait(1950+ random(150));
        If (Pos('anage', BlackText) <> 0) or (Pos('vailable', BlackText) <> 0) then break;
        Wait(WaitPerRock +random(500));
      until InvFull;
      if InvFull then
      begin
        writeln( 'Inventory Full walking to bank.' );
      end;
    end;

    ALL HELP WOULD BE APPRECIATED AND REPPED!

  2. #2
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    "Break" exits out of the current loop and continues on with the lines below it in the procedure. Unlike exit where it just exits the procedure all together.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  3. #3
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Like this.
    SCAR Code:
    Repeat
      WaitN;
      AntiRandoms;
      AntiBan;
    If (Invfull) then Break;
    Until ( False)
    If you put break before the repeat you get the
    SCAR Code:
    Not in a Loop in the Script
    error


  4. #4
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    And to answer your other question, in that script, if it finds parts of words to do with mining, mainly when you mine a rock or someone else gets the ore, then it says something in the chatbox, then it will break out of the mining loop and continue with the lines underneath (starting with the 'if InvFull then' line).
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 05-17-2008, 12:48 PM
  2. action="www.site.com" method="post"
    By Jason2gs in forum General
    Replies: 4
    Last Post: 05-17-2007, 11:50 PM
  3. Replies: 3
    Last Post: 04-19-2007, 03:44 AM
  4. Replies: 5
    Last Post: 10-26-2006, 11:30 PM

Posting Permissions

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