Results 1 to 3 of 3

Thread: Look Over

  1. #1
    Join Date
    Jul 2007
    Location
    Mo-Town
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Look Over

    Hey Everyone. I just got back into SRL/Runescape after over a year.
    I Have decided to make a fletching script. When I am done this script will Make unstrung bows, string the bows, and (if wanted) will sell the completed bows on the G.E.

    I have Done a basic outline and some of the more minor parts of the script. I was wondering if anyone would go over the outline if they have time and tell me if there is anything wrong or anything I missed and Either PM or Post here. Still got a lot to go but it's a start.

    To anyone who helps, Thanks in advance.

    Script is attached.

    or

    Below:

    SCAR Code:
    program NethingsLeetFletcher;
    {.include srl/srl.scar}
    {
    |-------------------------------------------------------------------------------|
    |                             Nething's Leet Fletcher                           |
    |-------------------------------------------------------------------------------|
    |                                 First! Credits!                               |
    |                            BobboHobbo - AutoResponder                         |
    |-------------------------------------------------------------------------------|
    |                                  Instructions                                 |
    |                       1. Position Players In Varrock Bank                     |
    |                 2. Have Logs, Knife, and(if Stringing) BowStrings             |
    |                       3. Setup Const. And Declare Players                     |
    |                                 4. Start Script                               |
    |                        AND THE FINAL, MOST IMPORTANT STEP!                    |
    |         5. Post ProgressReport On SRL and Post Comments/Feedback/Errors!      |
    |-------------------------------------------------------------------------------|
    }

    Const
    MySRLID       = '2439';//Your SRL ID
    MySRLPassword = '3500220';//Your SRL Password
    TimePerPlayer = 30;//Time In Minutes Before Switching
    TakeBreak     = True;//Take Break Before Next Player?

    Var
    LogDTM, StringDTM, PlayerMark, CurrentLevel, UncutDTM, StrungDTM, Responded, TalkTimer, NumberCut, NumberStrung, Talked:Integer;
     
    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      SRLID := MySRLID;
      SRLPassword := MySRLPassword;

      Players[0].Name := ''; //username
      Players[0].Pass := ''; //password
      Players[0].Nick := ''; //3-4 letters from your username
      Players[0].Active := True;
      Players[0].Strings[0] := 'Yew'; //"Regular","Oak","Willow","Maple","Yew",or "Magic"
      Players[0].Booleans[0] := True; //Do You Want To String The Bows?
      Players[0].Booleans[1] := True; //Sell Bows On G.E. When Done?
      Players[0].Integers[0] := 0; //Don't Touch This

      ClearDeBug;
      Writeln('Player(s): ' + IntToStr(HowManyPlayers) + ';');
    end;

    procedure ProgressReport;
    begin
      Wait(1000 + Random(500));
      WriteLn('|--------------------------------------------|');
      WriteLn('|          Nething''s Leet Fletcher           |');
      WriteLn('|--------------------------------------------|');
      WriteLn('|Ran For ' + TimeRunning);
      WriteLn('|Cut ' + inttostr(NumberCut) + ' Bows');
      WriteLn('|Strung ' + IntToStr(NumberStrung) + ' Bows');
      WriteLn('|Responded ' + IntToStr(Responded) + ' Times');
      WriteLn('|--------------------------------------------|');
    //  WriteLn('|Current Player: ' + Players[CurrentPlayer].Nick);
    //  WriteLn('|Start Lvl: ' + IntToStr(Players[CurrentPlayer].Integers[0]));
    //  WriteLn('|Current Lvl: ' + IntToStr(CurrentLevel));
    //  WriteLn('|Levels Gained: ' + IntToStr(CurrentLevel - Players[CurrentPlayer].Integers[0]));
      SRLRandomsReport;
    end;

    Procedure PlayerSetup;
    begin
      If not LoggedIn Then NextPlayer(True);
      Wait(1000 + Random(500));
      MarkTime(PlayerMark);
      if Players[CurrentPlayer].Integers[0] = 0 then
      begin
        Players[CurrentPlayer].Integers[0] := GetSkillInfo('Fletching', False);
      end;
    end;

    Function Randoms: Boolean;
    begin
      If FindFight then
        RunAway('N', true, 1, 10000 + random(5000));

      If FindDead then
      begin
        Writeln('Damn It, You Died.');
        LogOut;
        Exit;
      end;
     
      If FindNormalRandoms then
        Result:= True;
    end;

    function InChatMulti(Text: TStringArray): Boolean; Forward;
    procedure AutoResponder; Forward;

    Procedure AntiBan;
    Begin
       If Not LoggedIn Then Exit;
       Randoms;
       If AutoRespond Then AutoResponder;
       Case Random(40) of
         0: HoverSkill('Fletching', False);
         1: HoverSkill('Random', False);
         2,9,10: BoredHuman;
         3: RandomRClick;
         4: PickUpMouse;
         5: RandomMovement;
         6,7,8: RandomRClick;
         11,12,13: Randoms;
       end;
       Randoms;
       GetSkillInfo('Fletching', False);
    End;

    function InChatMulti(Text: TStringArray): Boolean;// By BobboHobbo (used with permission)
    var
      s,d: string;
      i, n: Integer;
    begin
      if GetLastChatText(s) then
      begin
      n := Length(Text) - 1;
      for i := 0 to n do
        if (Pos(Text[i], s) > 0) then
        begin
          Result := True;
          SaveToChatLog;
          Marktime(Talked);
          Exit;
        end;
      end;
    end;


    procedure AutoResponder;// By BobboHobbo (used with permission)
    var
      OldName: string;

    begin
      SaveToChatLog;
      if (TimeFromMark(Talked) < 25000) then
        Exit;
      if (OldLine = TheLine) or (TheName = OldName) or (pos(Players[CurrentPlayer].Nick, TheName) <> 0) then
        Exit;
      if InChatMulti(['hello', 'hi', 'yo', 'sup', 'hey']) then
      begin
        Wait(1000 + Random(500));
        case Random(6) of
          0: Typesend('hello');
          1: Typesend('hey sup?');
          2: Typesend('yo');
          3: Typesend('hey');
          4: Typesend('sup');
          5: Typesend('heey');
          6: Typesend('gooday');
        end;
        Responded := Responded + 1;
      end;
      if InChatMulti([Players[CurrentPlayer].Nick]) then
      begin
        Wait(1000 + Random(500));
        case Random(6) of
          0: Typesend('hello');
          1: Typesend('hey');
          2: Typesend('yo');
          3: Typesend('heyz');
          4: Typesend('sup');
          5: Typesend('hi');
          6: Typesend('?');
        end;
        Responded := Responded + 1;
      end;
      if InChatMulti(['wc', 'woodcut', 'cut']) and
        InChatMulti(['lv', 'leve']) and
        not (InChatMulti(['Cong', 'lations'])) then
      begin
        Wait(1000 + Random(500));
        case Random(4) of
          0: TypeSend(IntToStr(Players[CurrentPlayer].Integers[2]));
          1: TypeSend(IntToStr(Players[CurrentPlayer].Integers[2]) + ' u?');
          2: TypeSend(IntToStr(Players[CurrentPlayer].Integers[2]) + ' here');
          3: TypeSend(IntToStr(Players[CurrentPlayer].Integers[2]) + ' :)');
        end;
        Responded := Responded + 1;
      end;
    end;

    Procedure WithdrawLogs;
    Begin
    End;

    Procedure CutBows;
    Begin
    End;

    Procedure BankBows;
    Begin
    End;

    Procedure WithdrawBows;
    Begin
    End;

    Procedure WithdrawStrings;
    Begin
    End;

    Procedure StringBows;
    Begin
    end;

    Procedure BankCompleted;
    Begin
    End;

    Procedure WithdrawAllBows;
    Begin
    End;

    Procedure GEWalk;
    Begin
    End;

    Procedure SellBows;
    Begin
    end;

    Procedure BankWalk;
    Begin
    End;

    Procedure DoBreak;
    Begin
    End;

    Procedure SetupScript;
    begin
      SetupSRL;
      DeclarePlayers;
      ActivateClient;
      PlayerSetup;
    end;

    {
    |---------------------------------|
    |            Main Loop            |
    |---------------------------------|
    }


    begin
      SetupScript;
      Repeat
        Repeat
          WithdrawLogs;
          CutBows;
          BankBows;
          ProgressReport;
        Until Not FindLogs or (TimeFromMark(PlayerMark)>=(TimePerPlayer*60000))
        If(Players[CurrentPlayer].Booleans[0] = True) then
        Begin
          If(TimeFromMark(PlayerMark)>=(TimePerPlayer*60000)) Then Exit;
          Repeat
            WithdrawBows;
            WithdrawStrings;
            StringBows;
            BankCompleted;
          Until Not FindStrings or (TimeFromMark(PlayerMark)>=(TimePerPlayer*60000))
        end else NextPlayer(True);
        If(Players[CurrentPlayer].Booleans[1] = True) then
        Begin
          If(TimeFromMark(PlayerMark)>=(TimePerPlayer*60000)) Then Exit;
          WithdrawAllBows;
          GEWalk;
          SellBows;
          BankWalk;
        End else NextPlayer(True);
      If TakeBreak Then DoBreak;
      NextPlayer(True);
      Until(False);
    end.

    EDIT:::
    Oops just noticed something wrong, Fixed now.
    Quote Originally Posted by Napolean
    In Politics, Stupidity is Not a Handicap
    Quote Originally Posted by Unknown
    Marriage is like a bank. You put it in, Pull it out, then lose interest.

  2. #2
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    WOwww NIICEE!, thats a really good fletching procedure you have there! very succinct at least
    ~ Metagen

  3. #3
    Join Date
    Jul 2007
    Location
    Mo-Town
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ty, Don't see anything wrong so far then?

    I could combine a lot of the procedures but I figured it would be easier to fix problems and make it more solid if they were all seperate. Keep it simple.
    Quote Originally Posted by Napolean
    In Politics, Stupidity is Not a Handicap
    Quote Originally Posted by Unknown
    Marriage is like a bank. You put it in, Pull it out, then lose interest.

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
  •