June 9, 20196 yr On 7/26/2018 at 8:15 AM, Pegasus said: When I run it, it shows NullPointerException immediately. Script doesn't start if account hasn't logined / I turned off client auto login? onstart not being called before user is logged Uncaught exception! java.lang.NullPointerException at org.osbot.rs07.event.ScriptExecutor$3.run(kl:211) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Getting the same error
November 1, 20196 yr Author Updated with better error handling (allows you to determine if the account is banned etc.) (note, how you use the snippet has also changed, see the example).
November 14, 20196 yr Update request: - Handle for pvp worlds (id prefer not to login to these worlds myself)
December 3, 20196 yr This login handler is not working for me after the OSBot update today. Anyone else having this problem?
December 4, 20196 yr Ah. Is there nothing I can do about this. Perhaps an alternative to -allow norandoms? EDIT: Nevermind. This has been fixed in the latest OSBot version. Edited December 4, 20196 yr by dobin
December 5, 20196 yr I've added/implemented (and got this to work) the script above to my main.java in the onLoop method, however, this only works for the first login, and I cant figure out how to make the account re-log back in to get another login code, suchas when I am banned and forcibly logged out. I get the error code 5, and I have my script setup so it tries and log back in, using the same method as onStart does (and I know this works because the bot wont login if i comment this out). How I am logging in via onStart is with loginToAccount(email, pass) SUMMARY: if forcibly logged out, how do I get an error code, because the error code that is given when logged out is always a five, which means the account is already logged in, and this isnt a real error code that is associated with the account, usually it is either locked (18) or banned (dono the code). Thank you in advance! Feel free to dm me on discord nubonix#3648
March 15, 20205 yr Author Added fix for cases where sometimes the lobby screen is skipped and causes the login handler to hang for 30s. Fix was to add getClient().isLoggedIn() || On line 210 of LoginEvent. This breaks the 30s conditional sleep when the client is logged in, regardless of whether the lobby screen button is visible
April 17, 20205 yr I'm not sure what is causing this but the script starts running before the account is logged in. I have loginToAccount in onStart(), but the script jumps to onLoop even before it finishes logging in. This didn't happen before, started just now, but I didn't change anything in my script. Edited April 17, 20205 yr by gujarat6
April 29, 20205 yr I had to comment out the stop/resume of the main ScriptExecutor because for some reason the primary script would not resume after login, it'd just stop -- I adjusted the script to fix but yeah incase anyone has issues you might need to adjust some things
July 9, 20205 yr @Explv I am trying to get your LoginEvent to work using CLI, it is entering the password for the selected account however the username / email is not being changed from the previous session. Do you have a work around or anything that can fix this issue? Thanks
September 13, 20214 yr Having a bug where this repeatedly clicks the "Cancel" then the "Existing User" button any suggestions?
July 12, 20223 yr It gets stuck on the account banned screen so I added pressing the back button: private static final Rectangle BACK_BUTTON = new Rectangle(320, 313, 120, 20); private void login() { ... case 14: clickButton(BACK_BUTTON); break; } } Everything else is working great so far!
Create an account or sign in to comment