Package org.dreambot.api.methods.login
Class LoginUtility
- java.lang.Object
-
- org.dreambot.api.methods.login.LoginUtility
-
public class LoginUtility extends java.lang.ObjectThis is an API class used to give easier access to scripters to writing their own login handlers. Created by Nezz on 2/20/2018.
-
-
Constructor Summary
Constructors Constructor Description LoginUtility()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleancloseWorldScreen()Closes the world select screenstatic voidenterPassword(java.lang.String password)static voidenterUsername(java.lang.String username)static java.awt.RectanglegetAcceptTOSButton()static intgetAccountStatus()Gets the account status, only used to determine locked vs banned in login screen.static java.awt.RectanglegetBackButton()static java.awt.RectanglegetBackButtonOnLauncher()static java.awt.RectanglegetCancelLoginButton()static java.awt.RectanglegetCancelWorldButton()static java.awt.RectanglegetContinueButton()static java.awt.RectanglegetDisabledBackButton()static java.awt.RectanglegetDisconnectedBackButton()static java.awt.RectanglegetDobBackButton()static java.awt.RectanglegetExistingUserButton()Gets the "Existing user" button rectanglestatic intgetHopWorld()static intgetIndex()Gets the current login index of the game.static java.lang.StringgetLoginEmail()Deprecated.static java.lang.StringgetLoginPassword()Gets the currently typed text in the password field of the login screen.static java.awt.RectanglegetMembersBackButton()static java.awt.RectanglegetMustAcceptTosBackButton()static java.awt.RectanglegetPlayNowButton()static java.awt.RectanglegetPlayNowTryAgainButton()static java.awt.RectanglegetRememberUsernameButton()static RSLoginResponsegetResponse()Gets the current login response of the login screen, based on the response text in the login screen.static LoginStagegetStage()static java.awt.RectanglegetTryAgainButton()static booleanisEnterToLogin()See setEnterToLoginstatic booleanisEscToCancel()static booleanisNoInputLogin()static booleanisRememberUsername()static booleanisWorldScreenOpen()Checks if the world select screen is openstatic RSLoginResponselogin()Logs in to the client with the currently set Accountstatic RSLoginResponselogin(java.lang.String email, java.lang.String password)Logs in to the client with the given email and passwordstatic RSLoginResponselogin(org.dreambot.core.Account account)Logs in to the client with the given Accountstatic voidsetAccount(org.dreambot.core.Account account)static voidsetEnterToLogin(boolean b)At the login screen you can hit enter instead of clicking the login button to open up the email/password interface This sets a boolean to true/false as to whether or not to use enter instead of clicking.static voidsetEscToCancel(boolean b)At the login screen you can hit escape instead of clicking the cancel buttonstatic voidsetHopWorld(int hopWorld)static voidsetNoInputLogin(boolean useSetters)static voidsetRememberUsername(boolean rememberUsername)static booleanshouldHopOnError()
-
-
-
Method Detail
-
isEnterToLogin
public static boolean isEnterToLogin()
See setEnterToLogin- Returns:
-
setEnterToLogin
public static void setEnterToLogin(boolean b)
At the login screen you can hit enter instead of clicking the login button to open up the email/password interface This sets a boolean to true/false as to whether or not to use enter instead of clicking.- Parameters:
b- True sets enter to on, False sets enter to off.
-
setEscToCancel
public static void setEscToCancel(boolean b)
At the login screen you can hit escape instead of clicking the cancel button- Parameters:
b-
-
isEscToCancel
public static boolean isEscToCancel()
- Returns:
- true if esc to cancel enabled, else false
-
getLoginEmail
@Deprecated public static java.lang.String getLoginEmail()
Deprecated.Gets the currently typed text in the email field of the login screen.- Returns:
- String value of what is currently typed in the email field of the login screen.
-
getLoginPassword
public static java.lang.String getLoginPassword()
Gets the currently typed text in the password field of the login screen. Note: Unknown what it returns if "hide password" is turned on.- Returns:
- String value of what is currently typed in the password field of the login screen.
-
getStage
public static LoginStage getStage()
-
getExistingUserButton
public static java.awt.Rectangle getExistingUserButton()
Gets the "Existing user" button rectangle- Returns:
-
login
public static RSLoginResponse login()
Logs in to the client with the currently set Account- Returns:
- RSLoginResponse, LOGGED_IN if logged in, null if in the process of logging in(typing), or the response
-
login
public static RSLoginResponse login(org.dreambot.core.Account account)
Logs in to the client with the given Account- Parameters:
account- Account to log in with- Returns:
- RSLoginResponse, LOGGED_IN if logged in, null if in the process of logging in(typing), or the response
-
setAccount
public static void setAccount(org.dreambot.core.Account account)
-
login
public static RSLoginResponse login(java.lang.String email, java.lang.String password)
Logs in to the client with the given email and password- Parameters:
email- Email to log in withpassword- Password to log in with- Returns:
- RSLoginResponse, LOGGED_IN if logged in, null if in the process of logging in(typing), or the response
-
getResponse
public static RSLoginResponse getResponse()
Gets the current login response of the login screen, based on the response text in the login screen.- Returns:
-
getIndex
public static int getIndex()
Gets the current login index of the game.- Returns:
-
getAccountStatus
public static int getAccountStatus()
Gets the account status, only used to determine locked vs banned in login screen.- Returns:
- 0 if banned, 1 if locked, and -1 if neither
-
isWorldScreenOpen
public static boolean isWorldScreenOpen()
Checks if the world select screen is open- Returns:
-
closeWorldScreen
public static boolean closeWorldScreen()
Closes the world select screen- Returns:
- True if screen is not open, or if successfully closed.
-
getCancelLoginButton
public static java.awt.Rectangle getCancelLoginButton()
-
getMembersBackButton
public static java.awt.Rectangle getMembersBackButton()
-
getContinueButton
public static java.awt.Rectangle getContinueButton()
-
getBackButtonOnLauncher
public static java.awt.Rectangle getBackButtonOnLauncher()
-
getAcceptTOSButton
public static java.awt.Rectangle getAcceptTOSButton()
-
getTryAgainButton
public static java.awt.Rectangle getTryAgainButton()
-
getBackButton
public static java.awt.Rectangle getBackButton()
-
getDisabledBackButton
public static java.awt.Rectangle getDisabledBackButton()
-
getCancelWorldButton
public static java.awt.Rectangle getCancelWorldButton()
-
getRememberUsernameButton
public static java.awt.Rectangle getRememberUsernameButton()
-
getDisconnectedBackButton
public static java.awt.Rectangle getDisconnectedBackButton()
-
getPlayNowButton
public static java.awt.Rectangle getPlayNowButton()
-
getPlayNowTryAgainButton
public static java.awt.Rectangle getPlayNowTryAgainButton()
-
getMustAcceptTosBackButton
public static java.awt.Rectangle getMustAcceptTosBackButton()
-
getDobBackButton
public static java.awt.Rectangle getDobBackButton()
-
isRememberUsername
public static boolean isRememberUsername()
-
setRememberUsername
public static void setRememberUsername(boolean rememberUsername)
-
isNoInputLogin
public static boolean isNoInputLogin()
-
setNoInputLogin
public static void setNoInputLogin(boolean useSetters)
-
enterUsername
public static void enterUsername(java.lang.String username)
-
enterPassword
public static void enterPassword(java.lang.String password)
-
shouldHopOnError
public static boolean shouldHopOnError()
-
getHopWorld
public static int getHopWorld()
-
setHopWorld
public static void setHopWorld(int hopWorld)
-
-