Jump to content

where are codes in the api docs?


westnile

Recommended Posts

As an example, classes that implement LoginResponseCodeListener implement onResponseCode(int code);.  Where is the documentation for what the codes mean? I tried looking through the api docs but I couldn't find it. Same thing for client.getLoginUIState()

 

Thanks

Edited by westnile
links pasted wrong i guess...
Link to comment
Share on other sites

A lot of infrequently used functions aren't really as well defined in the api documentation as they could be, you'll probably just have to test it out yourself or see if someone has found it before.  Another option that I like doing is using google and in your case I would search "osbot onResponseCode" and there will likely be some links to forum topics here that have some information about it.

  • Like 1
Link to comment
Share on other sites

In case you desperately need those codes. These are the ones that I currently have; 

public enum LoginResponseCode {

    UNEXPECTED_SERVER_RESPONSE(1),
    INVALID_ACCOUNT_CREDENTIALS(3),
    ACCOUNT_DISABLED(4),
    ACCOUNT_ALREADY_LOGGED_IN(5),
    RUNESCAPE_HAS_BEEN_UPDATED(6),
    WORLD_IS_FULL(7),
    LOGIN_SERVER_OFFLINE(8),
    LOGIN_LIMIT_EXCEEDED(9),
    BAD_SESSION_ID(10),
    SUSPECTED_STOLEN_PASSWORD(11),
    NEED_MEMBERS_FOR_THIS_WORLD(12),
    COULD_NOT_COMPLETE_LOGIN_TRY_DIFFERENT_WORLD(13),
    SERVER_IS_BEING_UPDATED(14),
    BAD_SERVER_RESPONSE(15),
    TOO_MANY_INCORRECT_LOGIN_ATTEMPTS(16),
    STANDING_IN_MEMBERS_ONLY_AREA(17),
    ACCOUNT_LOCKED(18),
    CLOSED_BETA_WORLD(19),
    INVALID_LOGINSERVER_REQUEST(20),
    PROFLE_TRANSFER(21),
    MALFORMED_LOGIN_PACKET(22),
    NO_REPLY_FROM_LOGINSERVER(23),
    ERROR_LOADING_PROFILE(24),
    UNEXPECTED_LOGINSERVER_RESPONSE(25),
    BLOCKED_COMPUTER(26),
    SERVICE_UNAVAILABLE(27),
    BILLING_ISSUES(32),
    AUTHENTICATOR(56);

    private final int responseCode;

    LoginResponseCode(final int responseCode) {
        this.responseCode = responseCode;
    }

    public static LoginResponseCode getLoginResponse(final int responseCode) {
        return Arrays.stream(values()).filter(loginResponseCode -> loginResponseCode.getResponseCode() == responseCode).findFirst().orElse(null);
    }

    private int getResponseCode() {
        return responseCode;
    }
}

 

  • Like 3
Link to comment
Share on other sites

<Deleted this post as Eagle posted em already>
 

8 minutes ago, Eagle Scripts said:

In case you desperately need those codes. These are the ones that I currently have; 


public enum LoginResponseCode {

    UNEXPECTED_SERVER_RESPONSE(1),
    INVALID_ACCOUNT_CREDENTIALS(3),
    ACCOUNT_DISABLED(4),
    ACCOUNT_ALREADY_LOGGED_IN(5),
    RUNESCAPE_HAS_BEEN_UPDATED(6),
    WORLD_IS_FULL(7),
    LOGIN_SERVER_OFFLINE(8),
    LOGIN_LIMIT_EXCEEDED(9),
    BAD_SESSION_ID(10),
    SUSPECTED_STOLEN_PASSWORD(11),
    NEED_MEMBERS_FOR_THIS_WORLD(12),
    COULD_NOT_COMPLETE_LOGIN_TRY_DIFFERENT_WORLD(13),
    SERVER_IS_BEING_UPDATED(14),
    BAD_SERVER_RESPONSE(15),
    TOO_MANY_INCORRECT_LOGIN_ATTEMPTS(16),
    STANDING_IN_MEMBERS_ONLY_AREA(17),
    ACCOUNT_LOCKED(18),
    CLOSED_BETA_WORLD(19),
    INVALID_LOGINSERVER_REQUEST(20),
    PROFLE_TRANSFER(21),
    MALFORMED_LOGIN_PACKET(22),
    NO_REPLY_FROM_LOGINSERVER(23),
    ERROR_LOADING_PROFILE(24),
    UNEXPECTED_LOGINSERVER_RESPONSE(25),
    BLOCKED_COMPUTER(26),
    SERVICE_UNAVAILABLE(27),
    BILLING_ISSUES(32),
    AUTHENTICATOR(56);

    private final int responseCode;

    LoginResponseCode(final int responseCode) {
        this.responseCode = responseCode;
    }

    public static LoginResponseCode getLoginResponse(final int responseCode) {
        return Arrays.stream(values()).filter(loginResponseCode -> loginResponseCode.getResponseCode() == responseCode).findFirst().orElse(null);
    }

    private int getResponseCode() {
        return responseCode;
    }
}

 


Missing response code 2, which I believe is successful login

Edited by Explv
  • Like 1
  • Boge 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...