Results 1 to 7 of 7

Thread: Help with script

  1. #1
    Join Date
    Apr 2007
    Location
    The Buckeye State
    Posts
    482
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with script

    In my autotyper below, i specified that I want it to writeln credits in the debug box, but when i run the script, it does not write the credits in the debug box.

    Any help as to why it's not doing writeln?

    Also-

    why am i getting

    this- Line 174: [Hint] (182:43): Variable 'NEWLINE' never used in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\Globals.scar

    SCAR Code:
    program EZTyper;
    {.include SRL\SRL.SCAR}
    {.include SRL/SRL/Misc/Trade.scar}

    const

    Message1='Hey';//Type First Message Here
    Message2='Whats up?';//Type Second Message Here
    Message3='lol';//Type Third Messaage Here
    TalkWait= 7000;//Set This to How Long to Wait Between Sent Messages


    AntiBanExtra=True;

    procedure DeclarePlayers;
    begin
    HowManyPlayers := 1;
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer:= 0;

    Players[0].Name :='Enter Here';//Enter your RuneScape Account name here
    Players[0].Pass :='Password';//Enter the account's password here
    Players[0].Nick :='Nickname';//Enter 3 lower-case letters of your account name
    Players[0].Active:=True;
    end;

    //======================Do not add or delete anything under this, but feel free to use it for your own script.===============

    Const
    Credits1='EZTyper presented to you by';
    Credits2=' _______  _______  ________  _______  _____  __     _ ';
    Credits3='|  _____||  _____||___  ___||   _   ||  _  ||   \  | |';
    Credits4='| |_____ | |_____    |  |   |  |_/ / | |_| ||  \ \ | |';
    Credits5='|  _____||_____  |   |  |   |   _ |  |  _  ||  |\ \| |';
    Credits6='| |_____  _____| |   |  |   |  |_\ \ | | | ||  | \   |';
    Credits7='|_______||_______|   |__|   |_______||_| |_||__|  \__|';
    Credits8='With thanks to jarlaxe for guidance from his script';
    procedure Nickname;
    begin
    NickNameBMP := CreateBitmapMaskFromText(Players[0].Nick, UpChars);
    end;

    procedure credits;
    begin
    wait(1000+Random(100));
    writeln(Credits1+chr(13));
    wait(1000+Random(100));
    writeln(Credits2+chr(13));
    writeln(Credits3+chr(13));
    writeln(Credits4+chr(13));
    writeln(Credits5+chr(13));
    writeln(Credits6+chr(13));
    writeln(Credits7+chr(13));
    Wait(1000+Random(100));
    writeln(Credits8+chr(13));
    writeln('[------------------------------]')
    writeln('Worked For : 0 Minutes ' + ScriptTime2(2))
    writeln('[------------------------------]')
    end;

    procedure Messages;
    begin
    TypeSend(Message1+chr(13));
    wait(TalkWait+Random(500))
    TypeSend(Message2+chr(13));
    wait(TalkWait+Random(500))
    TypeSend(Message3+chr(13));
    wait(TalkWait+Random(500))
    end;

    begin
    SetupSRL;
    FindNormalRandoms;
    DeclarePlayers;
    LoginPlayer;
    repeat
    Messages;
    Wait(5000+Random(750))
    FindNormalRandoms;
    Wait(200+Random(100))
    until(false)
    end.

  2. #2
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    umm, because you never called your "credits" procedure?

    Add credits; right after setupSRL;

  3. #3
    Join Date
    Sep 2006
    Posts
    179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well the newline thing isnt anything to worry about. and im not sure but u might have to have all constants at the top of the script i suggest you change them to variables and put them in the credits procedure though.

    EDIT: and wht he said too ^.^ didnt read all the script lol yeah add "credits;" to ur main loop
    http://www.fenjer.com/adnan/SRLStats/391.png
    http://img341.imageshack.us/img341/4...irbypb6lf8.gif
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig
    i <3 jagex

  4. #4
    Join Date
    Jun 2006
    Location
    Tennessee, USA
    Posts
    2,603
    Mentioned
    1 Post(s)
    Quoted
    46 Post(s)

    Default

    Well to clear it all up, here is exactly why it won't work. Like omg said, you didn't call on the procedure "credits" in your mainloop.

    And no, you don't have to have all const at the beginning of a script, although it is how most people do it so it is easier to read. And don't change them to vars.

    You also don't need the chr(13) at the end of your WriteLn's. And I'm confused as of why you wrote your credits in a const then made it say that stuff in a procedure? No one should be changing the credits so there is no need to put them in a const. Just WriteLn() in a procedure.

  5. #5
    Join Date
    Apr 2007
    Location
    The Buckeye State
    Posts
    482
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the help.

    one more thing-

    why, when it types the credits into the debug box, at the end of each line of credits, it adds "[]"?

  6. #6
    Join Date
    Jun 2006
    Location
    Tennessee, USA
    Posts
    2,603
    Mentioned
    1 Post(s)
    Quoted
    46 Post(s)

    Default

    Heres how I suggest on doing the credits.

    SCAR Code:
    program EZTyper;
    {.include SRL\SRL.SCAR}
    {.include SRL/SRL/Misc/Trade.scar}

    const

      Message1 = 'Hey'; //Type First Message Here
      Message2 = 'Whats up?'; //Type Second Message Here
      Message3 = 'lol'; //Type Third Messaage Here
      TalkWait = 7000; //Set This to How Long to Wait Between Sent Messages


      AntiBanExtra = True;

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := 'Enter Here'; //Enter your RuneScape Account name here
      Players[0].Pass := 'Password'; //Enter the account's password here
      Players[0].Nick := 'Nickname'; //Enter 3 lower-case letters of your account name
      Players[0].Active := True;
    end;


    procedure credits;
    begin
      wait(1000 + Random(100));
      writeln('EZTyper presented to you by:');
      wait(1000 + Random(100));
      writeln(' _______  _______  ________  _______  _____  __     _ ');
      writeln('|  _____||  _____||___  ___||   _   ||  _  ||   \  | |');
      writeln('| |_____ | |_____    |  |   |  |_/ / | |_| ||  \ \ | |');
      writeln('|  _____||_____  |   |  |   |   _ |  |  _  ||  |\ \| |');
      writeln('| |_____  _____| |   |  |   |  |_\ \ | | | ||  | \   |');
      writeln('|_______||_______|   |__|   |_______||_| |_||__|  \__|');
      Wait(1000 + Random(100));
      writeln('With thanks to jarlaxe for guidance from his script!');
      Wait(300 + Random(200));
      writeln('[------------------------------]')
        writeln('Worked For : 0 Minutes ' + ScriptTime2(2))
        writeln('[------------------------------]')
    end;

    procedure Messages;
    begin
      TypeSend(Message1 + chr(13));
      wait(TalkWait + Random(500))
        TypeSend(Message2 + chr(13));
      wait(TalkWait + Random(500))
        TypeSend(Message3 + chr(13));
      wait(TalkWait + Random(500))
    end;

    begin
      SetupSRL;
      Credits;
      ActivateClient;
      FindNormalRandoms;
      DeclarePlayers;
      LoginPlayer;
      repeat
        Messages;
        Wait(5000 + Random(750))
          FindNormalRandoms;
        Wait(200 + Random(100))
      until (false)
    end.

    Notice how I got rid of your credits that you put in a const and just put them in a procedure. And I called on the "credits" procedure in the mainloop then put an activate client which will put the specified client on top.

    And also, I didn't change it, but the thing where you tell how long the script is running at the end of the credits won't work because this only printed at the beginning of script startup. So there would be no reason in doing that because it would always be at 0 minutes.

  7. #7
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    the chr(13) is confusing scar.
    writeln automatically only prints on one line, so adding the character enter makes scar try and print another character. Since it doesn't know what "enter" looks like, it gives you that funny symbol.

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
  •