Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to manually login to accounts?

Featured Replies

Hey guys,

I'm trying to make my script manually login to my accounts but for some reason clicking/typing doesn't work when I'm logged off. This is what I got:

 

Triggering my state:

if(!client.isLoggedIn())
return State.LOGIN;

Code in my case:

case LOGIN:
mouse.click(460, 290, false);
getKeyboard().typeString("USERNAME HERE", true);
sleep(random(500, 1500));
getKeyboard().typeString("PASSWORD HERE", true);
sleep(random(4000,5000));
mouse.click(380, 330, false);
sleep(random(4000,5000));
break;

For some reason it seems to "work" when I'm online, but when I'm offline it just doesn't seem to trigger.

 

Thanks alot in advance!

 

Cheers,

ForcaNL

Edited by ForcaNL

The AUTO_LOGIN Random Solver should automatically activate when logged out, granted that you're using a profile

if you want, I'm pretty sure you can unregister random behavior AUTOLOGIN, and then write your own handler for it, I just don't see a point really.

  • Author

Hey FrostBug,

Thanks a lot for the suggestion, but I really think I need to do this manually since I want to have the ability to switch accounts and put my own breaking system in place.

I'm not sure if it's still possible to unregister or hook autologin, I used to do that but it stopped working at some point. However, you can do something hacky like:

 

try {
         Field f = bot.getClass().getSuperclass().getDeclaredField("account");
         f.setAccessible(true);
         f.set(bot, new RSAccount());
        } catch (NoSuchFieldException e) {
            log("bad mkay");

        } catch (IllegalAccessException e) {
            log("bad mkay");
        }

Which makes sure the autologin doesn't trigger. You definitely don't want to push something like that to the SDN, but it's fine for private usage. At this point nothing happens because the scriptexecutor doesn't call onLoop() when the client is not logged in.

To solve this you could create a Thread in onStart which runs in the background
 

new Thread(() -> {

            while(running && !Thread.interrupted()) {

                if(!client.isLoggedIn()) {
                    log("Logging in!");

                    try {

                        mouse.click(460, 290, false);
                        getKeyboard().typeString("USERNAME HERE", true);
                        sleep(random(500, 1500));
                        getKeyboard().typeString("PASSWORD HERE", true);
                        sleep(random(4000,5000));
                        mouse.click(380, 330, false);
                        sleep(random(4000,5000));

                    } catch (InterruptedException e) {
                    }

                }


                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                }
            }

        }).start();

Seems to work for me :)

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.