Results 1 to 4 of 4

Thread: Loop help?

  1. #1
    Join Date
    Aug 2007
    Posts
    984
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Loop help?

    SCAR Code:
    ///Auto B0ner! - First Script
    ///Place Bones in 2nd down 4th over bank spot
    ///Have Fun! - use big bones or regular
    ///Fast Random etc..
    ///Thanks To Srl Forums/Team
    /// By: Boker

    program AutoBoner;
    {.include SRL\SRL.scar}
    const
      LoadsToDo=5;  /// Loads??????? Help bellow


    {Loads 1 = 28 bones
           2 = 56
           3 = 84
           4 = 112
           5 = 140
           10 = 280
           20 = 560            }

           
    Var
    loats, bones, BuryTimes, Berror, Fightzormode, x, y : Integer;
    BonesInInv, Kmouse, bonecolor, bonetol, load : integer;
    FoundBonesDTM, UseTalkk, MouseKill : Boolean;
    UseTalkForNow, UseTalk : Boolean;
    RunDir : String;



    Procedure SetUpDTM;
    begin
      BonesInInv := DTMFromString('78DA6314626060E06740038C4824906605127' +
           'C04D480E42508A89105122204D44802095E026A048004077E3500' +
           '679700DC');
    end;


    Procedure DeclarePlayers; //Don't have to use if starting logged in
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := '----';  //usernamen
      Players[0].Pass := '-----'; //password
      Players[0].Nick := '----'; //3 - 4 letters of you username
      Players[0].pin  :=0000;// Pin keep 0000 if none
      Players[0].Active := True;

    end;

    function Bank: Boolean;
    var
      x, y, f: Integer;
    begin
      Status('Openning Bank...');
      if not(LoggedIn) then exit;
      Flag;
      Wait(350 + random(150));
      if not BankScreen then
        repeat
          if FindObjCustom(x, y, ['ank', 'ooth', 'booth'], [864829,4086384], 5) then
            Mouse(x, y, 4, 4, False);
          Wait(250);
          if (ChooseOption('Use-quickly')) then
            begin
              FFlag(0);
              wait(1000);
              if(PinScreen) then
                repeat
                  Wait(500);
                  InPin(IntToStr(Players[CurrentPlayer].Pin));
                  Inc(f);
                until (BankScreen) or (f > 5);
                if not(BankScreen) then logout;
            end;
            until (BankScreen);
      Result := BankScreen;
      Writeln('Bank Open w00t!');
    end;


    Procedure Withdrawbones;
    begin
    if not(BankScreen) then
       begin
       Writeln ('Bank Not Open....?');
       exit;
       end;
    Fixbank;
    Withdraw(4,2,0);
    GameTab(4);
    CloseBank;
    Writeln('B0ner Time..!');
    end;

    function FindFastRandoms: Boolean; //Credits go to WT-Fakawi.
    var
      i: Integer;
    begin
      for i := 1 to 8 do
      begin
        case I of
          1: if FindDead then
              Result := True;
          2: if FindMod then
              Result := True;
          3: if FindMime then
              Result := True;
          4: if FindMaze then
              Result := True;
          5: if FindQuiz then
              Result := True;
          6: if FindDemon then
              Result := True;
          7: begin
              if NoGameTab then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'No GameTab';
                Logout;
                Exit;
              end;
            end;
          7: begin
              if InBlack then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'InBlack';
                Logout;
                Exit;
              end;
            end;
          8: RC;
        end;
        wait(1);
      end;
    end;

    procedure AntiRandoms;
    begin
      if(not(LoggedIn))then
      Exit;
      FindTalk;
      FindNormalRandoms;
      if (FindFight = true) then
      begin
        RunAwayDirection('N');
        Wait(10000 + random(3005));
        RunBack;
        FindFastRandoms;// Credits go to WT-Fakawi
        FindTalk;
      end;
    end;

    Procedure BuryTheBones2;  /////Thank you MasterKill
    begin
      MakeCompass('n');
      repeat                                                                                                                                                                         //
        if FindDTM(BonesInInv, x, y, 525, 182, 745, 473) then
        begin
          FoundBonesDTM := True;
          MoveMouseSmooth(x, y);
          if IsUpTextMulti('Bones', 'ones', 'nes') then
          begin
            Wait(500);
            MoveMouseSmooth(x, y);
            ClickMouse(x, y, True);
            Wait(1000 + random(200) + random(200))
            Bones := Bones + 1
              WriteLn('     burying');
          end;
        end;
        if (not(FindDTM(BonesInInv,x, y, 525, 182, 745, 473))) then
        begin
          FoundBonesDTM := False;
          WriteLn('     all bones in ifentory are buried!');
          Wait(2000);
    end;

     Procedure FreeDTMS;
    Begin
      FreeDTM(Bone);
    Procedure SetupScript;
         Begin
          ClearDebug;
           SetupSRL;
            DeclarePlayers;
            SetUpDTM;
            ActivateClient;
           LoginPlayer;
           end;
           
           ////loop

          Begin
       SetupScript;
        Repeat
           Bank;
      Withdrawbones;
      BuryTheBones2;
           Begin
        CloseBank;
       Logout;
       end;
       FreeDTMS;
    end.

    ok i get an error here:
    Line 177: [Error] (14858:1): Identifier expected in script
    SCAR Code:
    Procedure FreeDTMS;

    any thoughts?
    SRL > Runescape

    Quote Originally Posted by brent8900 View Post
    when i download it its a FAWG.rar how to i get it to FAWG.exe

  2. #2
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    You have no until(whatever) in the procedure above that.
    :-)

  3. #3
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Your also leaving out an end in the procedure above that. This is why you use standards it should go nice and tidy right to the left side if everything is there.

  4. #4
    Join Date
    Aug 2007
    Posts
    984
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    soo umm...

    SCAR Code:
    Until((BonesDone >= LoadsToDo))
         If (BonesDone >= LoadsToDo)then
        Begin
        CloseBank;
       Logout;
       end;
       FreeDtms
      end.
    SRL > Runescape

    Quote Originally Posted by brent8900 View Post
    when i download it its a FAWG.rar how to i get it to FAWG.exe

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. need for to do loop help
    By Raskolnikov in forum OSR Help
    Replies: 6
    Last Post: 07-02-2008, 03:21 AM
  2. Need help with Loop
    By Brenth in forum OSR Help
    Replies: 2
    Last Post: 12-31-2007, 05:35 PM
  3. loop
    By fausco in forum OSR Help
    Replies: 2
    Last Post: 11-16-2007, 11:12 PM
  4. Help with loop
    By skullbr00d in forum OSR Help
    Replies: 0
    Last Post: 05-29-2007, 09:23 PM
  5. loop
    By macromacro123 in forum OSR Help
    Replies: 4
    Last Post: 03-18-2007, 07:50 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
  •