Results 1 to 3 of 3

Thread: [rs2] Auto Login!

  1. #1
    Join Date
    Apr 2006
    Location
    I live in NH
    Posts
    611
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Arrow [rs2] Auto Login!

    RuneScape Auto Login

    I saw some people asking for it so I made it! Just have scar open ready to run the script. Then have every other window closed. Fill out the const such as the username, password, detail, and if you're a member or free. Don't worry the script doesn't send out any password or any kind of information. The ONLY problem is that it might be detectable.

    The script is in beta and even though I worked hard on it. I still need some help. I added thanks to the people who helped me today when I had a question every 5 minutes lol.

    It works perfectly well for Firefox and Internet Explorer. This script is fully commented and is helpful for people just learning scar.

    Well.. Here it is.
    Code:
    {.Script Info:
    # ScriptName  = RuneScape Auto Login
    # Author      = Ron from moparisthebest.com
    # Description = Open it. Run it. Play it.
    # Version     = .1 BETA
    # Date        = July 2, 2006
    # Comments    = - Your browser shortcut icon must be on your desktop.
                    - Your browser can be either IE or Firefox.
                    - Also, please close every window except for SCAR.
                    - File out the Const on line 20.
    # Credits     = ME of course, Aftermath_96, Prince of Randomness,
                    Bebemycat2, and Pwnd.
    # Bugs        = None so far that I can see.
                    Please post any bugs or suggestions on my topic.
    /Script Info}
    
    Program RuneScapeLogin;
    
    Const
         Username = 'username';    // RuneScape Username
         Password = 'password';    // RuneScape Password
         Detail = 'high';          // high or low
         MoF = 'member';           // member or free
         
         // Choosing a world isn't an option at this time. Sorry.
         // This script will automatically choose the best world for you
         // according to www.runescape.com
    
    {=========================================================================}
    {        Please don't edit below unless you know what you're doing        }
    {=========================================================================}
    
    Var
       ff, ie, play, high, low, free, member, exi, login : Integer; // Bitmaps.
       x, y, i : Integer; // Miscellaneous integers.
    
    // Loads all the Bitmaps.
    Procedure Load;
    Begin
      ff := BitmapFromString(5, 5, 'B13709AE451DC1663149372F3975A' +
           '0B43C0CD4682EE85D0BE7B27730698FE59A5BF1D19AE3D2A0577F' +
           '8A317EAEEA953CB79D785C6D6E286F98338CC4F1A74B857A5A225' +
           '58127407A2F69A7');
      ie := BitmapFromString(5, 8, '2AA0E72A9EE62DA1E934A6F03DAFF' +
           '5299BE5299BE52C9DE8319FEB38A8F2299AE62B98E62C99E72E9B' +
           'E934A1EE2B9AE62B98E62C98E62E99E8329CEC2C99E72C96E62D9' +
           '6E72F96E9339AEC2D97E72D95E62E96E83097E9339AEC2D96E72F' +
           '95E83096E93397EB379BEE3096E93096E93396EB3699EF3A9EF2');
      play := BitmapFromString(9, 10, 'z78DA9590411203210804BF24A020' +
           '4741F3FF27C52C9B941EACDA5C060FD30E4C0713F1FE58556B291' +
           '6EF9CA9612323C44C15C71C993A41ADC20556CA6B7B09DF1410A3' +
           'AE14113AA6D053EEE6FF66CD7405E9854F597FDC95E63FFDB9DFB' +
           '4218FD8EAE47137120D673569C5C23FEF2C7077B8DEB2E9DA5242' +
           'C6B45157574FA88F82FFB23A0C1A73FA918A862FF60D00AC78B6');
      low := BitmapFromString(6, 7, '4E09046B1B23883644B17781CA7A' +
           '6CCF99A13802018C524ACF99A1AA75704D17232801014D1723CF9' +
           '9A1FBDBE3572A31120D055828258E5C60FEFEFEFEFEFE02020134' +
           '2919380201B69895FEFEFEFAE6D80202014E50484D1723CF99A1F' +
           'EFEFED8E3D50E11072E3029280101B69895FEFEFED7CFC80D1313' +
           '120D054E0904');
      high := BitmapFromString(8, 8, 'z78DA4D8F4B0EC4300843AFC427' +
           '0458429ADEFF48931977A40AC90BEBD9C06C6ED17949B2AECC997' +
           'CD79E57BC75775B53959B532C9351F0DB22C31F1DE1FE90F7FE0D' +
           '1AA4D71A1A6C64EA1C3C258889A1706E5EDDE9D3D20C297329655' +
           '12E2A16BAFED9B57AD4423F1ADE77C2195352EC69FB9148A10724' +
           'FEC555489D1F7426F8D6EC5292330C726C4A3A5F7C1DA4CA33628' +
           '08F9DEC1B3CC8373F5C2669492C7FB6B73457789E191F7FD0561A');
      free := BitmapFromString(5, 5, '302923312A222D301F5A5D4C8E8' +
           'B7C2F2A243132227E8967AAB491AFA8952E29238E8C7DAAB190AD' +
           'B391B7AF9C544D45B0A89DB3AA99B2A9986F655B888073B4A89AB' +
           '6A89B77695E372D24');
      member := BitmapFromString(5, 5, '46381D433518463519786443A' +
           '9966C3D3713494218AB966BD0B586CDB47E423A13A3986ACFB884' +
           'D2B47ED2B782715F3BCBB98BCEB57DCEB57D887145A38B65CEB68' +
           '6CFB67D917A4448360E');
      exi := BitmapFromString(6, 6, 'z78DA73734300130B1347531308E' +
           '9862CEE62E266EAE88603188001440DA64A032480DF1C13231313' +
           '135762ECC2653EB23800E5BC35BC');
      login := BitmapFromString(6, 5, 'z78DA737343000330307635763' +
           '3B14426DD30D49818999898B8229358D45898389A9A2093A4AAC1' +
           '0500FD5D2B24');
    End;
    
    // Starts the script by clearing the debug and minimize SCAR.
    Procedure StartScript;
    Begin
         // Clears the little panel right below the coding panel.
         ClearDebug;
    
         // While i is above 0...
         i := 0;
         While (i > 0) do
         begin
              // Write this each time in the Status bar.
              Status('Script will start in ' + IntToStr(i) + ' second[s] and minimize itself.');
    
              // Decrease i by 1 each time.
              i := i-1;
              
              // Wait 1 second each time.
              Wait(1000);
         End;
         
         // Reverts Status bar back to what it was.
         Status('Running Script...');
    
         // Minimizes SCAR.
         GetApplication.MINIMIZE;
    End;
    
    // Procedure to Click on a bmp like this: ClickBmp(ff);
    Procedure ClickBmp(bitmap:Integer);
    Begin
         // If it finds the bitmap then...
         If(FindBitmap(bitmap, x, y))then
         Begin
              Wait(50+random(100));
         
              // Click on it.
              ClickMouse(x, y, true);
         End Else
         Begin
              // Displays error message.
              WriteLn('Could not find the bitmap ' + IntToStr(bitmap) + '.');
    
              // Terminates Script.
              TerminateScript;
         End;
    End;
    
    // Procedure just like ClickBmp() but this doesn't terminate script.
    // This is for loops.
    Procedure ClickBmp2(bitmap:Integer);
    Begin
         // If it finds the bitmap then...
         If(FindBitmap(bitmap, x, y))then
         Begin
              // Click on it.
              ClickMouse(x, y, true);
         End;
    End;
    
    // Opens your browser. - Could not use ClickBmp procedure...
    Procedure OpenBrowser;
    Begin
         Wait(100);
         
         // If the bitmap ff or ie is found then...
         If(FindBitmap(ff, x, y)) or (FindBitmap(ie, x, y))then
         Begin
              // Double click on it.
              ClickMouse(x, y, true);
              Wait(50);
              ClickMouse(x, y, true);
         End;
    End;
    
    // Goes to RuneScape website.
    Procedure GoToWebsite;
    Begin
         // Presses Alt+D.
         KeyDown(18);
         KeyDown(GetKeyCode('D'));
    
         Wait(50);
         
         // Releases Alt+D.
         KeyUp(GetKeyCode('D'));
         KeyUp(18);
    
         // Presses Backspace.
         SendKeys(Chr(8));
         Wait(100);
    
         // Types in www.runescape.com.
         SendKeys('www.runescape.com');
         Wait(100);
    
         // Presses Enter.
         SendKeys(Chr(13));
    End;
    
    // Opens browser and goes to the RuneScape website.
    Procedure BrowWeb;
    Begin
         // Opens browser.
         OpenBrowser;
         
         Wait(5000);
    
         // Goes to the RuneScape website.
         GoToWebsite;
    End;
    
    // Find Detail High Bitmap.
    Procedure FindHigh;
    Begin
         // If detail is high then...
         If(Detail = 'high')then
         Begin
              // Click on the bitmap high.
              ClickBmp2(high);
         End;
    End;
    
    // Find Detail Low Bitmap.
    Procedure FindLow;
    Begin
         // If detail is low then...
         If(Detail = 'low')then
         Begin
              // Click on the bitmap low.
              ClickBmp2(low);
         End;
    End;
    
    // Find MoF Member Bitmap.
    Procedure FindMember;
    Begin
         // If detail is high then...
         If(MoF = 'member')then
         Begin
              // Click on the bitmap high.
              ClickBmp2(member);
         End;
    End;
    
    // Find MoF Free Member Bitmap.
    Procedure FindFree;
    Begin
         // If detail is low then...
         If(MoF = 'free')then
         Begin
              // Click on the bitmap low.
              ClickBmp2(free);
         End;
    End;
    
    // Opens the RuneScape game.
    Procedure OpenRS;
    Begin
         // Loop to find the bitmap play and click on it.
         Repeat
               FindBitmap(play, x, y);
               Wait(1000);
         Until(FindBitmap(play, x, y))
         
         ClickBmp(play);
         
         // Loop to find your detail bitmap and click on it.
         Repeat
               FindHigh;
               FindLow;
               Wait(1000);
         Until(FindBitmap(member, x, y))
    
         // Loop to find what type of member you are and click on it.
         Repeat
               FindMember;
               FindFree;
               Wait(1000);
         Until(FindBitmap(member, x, y))
    End;
    
    // Logs in with your username and password into RuneScape.
    Procedure LoginToRS;
    Begin
         Wait(10000);
         
         {// Loop to find the Existing Bitmap and click on it. - Doesn't work..
         Repeat
               ClickBmp(exi);
               Wait(1000+random(200));
         Until(FindBitmap(exi, x, y))}
    
         ClickBmp(exi);
    
         // Random Waits.
         Wait(50+random(100));
         
         // Types in your username with humanlike key strokes.
         SendKeys(Username);
         
         // Random Waits.
         Wait(50+random(100));
         
         // Presses Enter.
         SendKeys(Chr(13));
         
         // Types in your password with humanlike key strokes.
         SendKeys(Password);
         
         // Random Waits.
         Wait(500+random(200));
         
         // Clicks the login button.
         ClickBmp(login);
    End;
    
    Begin
         // Loads all the Bitmaps.
         Load;
    
         // Starts the script and minimizes SCAR.
         StartScript;
         
         // Goes to the browser you use then goes to the RuneScape website.
         BrowWeb;
         
         // Opens the RuneScape game.
         OpenRS;
    
         // Logs in with your username and password into RuneScape.
         LoginToRS;
    End.
    I need to fix the bug where for some weird reason it doesn't click on the Existing User button. Though when I test out the bmp using a separate script once the RS Game has already loaded and then it works fine!
    I need to add better random waits after the RS2 game has opened up.
    I need to add human like keystrokes instead of SendKeys. I don't know how to do that, but I have seen people use functions like SendKeysHuman but when I use it, I get an error... always. I didn't see it in the scar manual, so I'm betting it's in someone's include.

    If you find any bugs or want to add a suggestion that would be wonderful! Enjoy!

    ~Ron

  2. #2
    Join Date
    May 2006
    Location
    Sask, Canada
    Posts
    62
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Works good except for the existing user, yeah it doesn't click it. Maybe try making it a smaller bitmap or look for text?

    Otherwise works good, and there should be a function if you want to use FF or IE, because IE is dumb.

    Also theres a function in RSCI, typesend, it has very human like typing.

    Here:

    Code:
    procedure TypeByte(k : Byte);
    begin
     KeyDown(k);
     wait(10 + Random(50));
     KeyUp(k);
    end;
    
    procedure TypeSend(text:string);
    var
      i : Integer;
    begin
      for i := 1 to Length(Text) do
      begin
        TypeByte(GetKeyCode(Text[i]));
        Wait(50 + Random(120));
      end;
      wait(200 + Random(500));
      TypeByte(13);
    end;
    You have to have typebyte in there for it to work, you could use that. Typesend('');

  3. #3
    Join Date
    Apr 2006
    Location
    I live in NH
    Posts
    611
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    In the next update, I'll be sure to include that thank you.

    Well the problem with the existing user button is weird, but it's not the picture. I know that because I used a whole new scar script just to click on the existing user button, after the RuneScape java applet was loaded. And that worked fine. So the bitmap works, but the way I'm checking for it, just doesn't work.

    Maybe it could be the java applet. Could it be sending some weird characters that are blocking some things in the script? and How do I look for text? Thanks.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Auto-login
    By kingstun in forum RS3 Outdated / Broken Scripts
    Replies: 3
    Last Post: 02-17-2007, 05:16 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
  •