Jump to content

where are codes in the api docs?


Recommended Posts

Posted

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
Posted

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
Posted (edited)

<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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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