Package com.mmoscene.h4j.communication

Examples of com.mmoscene.h4j.communication.Response


import com.mmoscene.h4j.H4J;
import com.mmoscene.h4j.communication.Response;

public class SendUserFuseRankMessageComposer {
    public static Response compose(int rank) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("SendUserFuseRankMessageComposer"));
        response.addInt(2); // 0 = normal, 1 = hc, 2 = vip
        response.addInt(rank);

        return response;
    }
View Full Code Here


import com.mmoscene.h4j.H4J;
import com.mmoscene.h4j.communication.Response;

public class LoadUserCurrencyMessageComposer {
    public static Response compose(int duckets) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("LoadUserCurrencyMessageComposer"));

        response.addInt(1);
        response.addInt(0);
        response.addInt(duckets);

        return response;
    }
View Full Code Here

import com.mmoscene.h4j.H4J;
import com.mmoscene.h4j.communication.Response;

public class LoadUserCurrencyComposer {
    public static Response compose(int duckets) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("LoadUserCurrencyComposer"));

        response.addInt(1);
        response.addInt(0);
        response.addInt(duckets);

        return response;
    }
View Full Code Here

import com.mmoscene.h4j.H4J;
import com.mmoscene.h4j.communication.Response;

public class LoadUserClubMessageComposer {
    public static Response compose(int days) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("LoadUserClubMessageComposer"));
        response.addString("club_habbo");
        response.addInt(days);
        response.addInt(3);
        response.addInt(0);
        response.addInt(1);
        response.addBool(true);
        response.addBool(true);
        response.addInt(0);
        response.addInt(0);
        response.addInt(28022);

        return response;
    }
View Full Code Here

import com.mmoscene.h4j.communication.Response;
import com.mmoscene.h4j.network.sessions.Session;

public class LoadUserInformationMessageComposer {
    public static Response compose(Session session) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("LoadUserInformationMessageComposer"));
        response.addInt(session.getHabbo().getId());
        response.addString(session.getHabbo().getUsername());
        response.addString(session.getHabbo().getLook());
        response.addString(session.getHabbo().getGender());
        response.addString(session.getHabbo().getMotto());
        response.addString(session.getHabbo().getUsername().toLowerCase());
        response.addBool(false);
        response.addInt(session.getHabbo().getRespect());
        response.addInt(session.getHabbo().getDailyRespect());
        response.addInt(session.getHabbo().getDailyRespect());
        response.addBool(true);
        response.addString(session.getHabbo().getLastActive());
        response.addBool((session.getHabbo().getNameChanges() > 0))//Can change name
        response.addBool(false); //Cannot purchase from catalog


        return response;
    }
View Full Code Here

import com.mmoscene.h4j.communication.Response;
import com.mmoscene.h4j.habbohotel.user.User;

public class UpdateFriendStateComposer {
    public static Response compose(boolean online, User user) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("UpdateFriendStateComposer"));
        response.addInt(0);
        response.addInt(1);
        response.addInt(0);
        response.addInt(user.getId());
        response.addString(user.getUsername());
        response.addInt(1);
        response.addBool(online);
        response.addBool(false);
        response.addString(user.getLook());
        response.addInt(0);
        response.addString(user.getMotto());
        response.addInt(0);
        response.addInt(0);
        response.addInt(0);

        return response;
    }
View Full Code Here

import com.mmoscene.h4j.H4J;
import com.mmoscene.h4j.communication.Response;

public class SendRoomShoutMessageComposer {
    public static Response compose(int user, String msg, int smile, int color) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("SendRoomShoutMessageComposer"));
        response.addInt(user);
        response.addString(msg);
        response.addInt(smile);
        response.addInt(color);
        response.addInt(0);
        response.addInt(-1);

        return response;
    }
View Full Code Here

import com.mmoscene.h4j.H4J;
import com.mmoscene.h4j.communication.Response;

public class LoadUserClubComposer {
    public static Response compose(int days) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("LoadUserClubComposer"));
        response.addString("club_habbo");
        response.addInt(days);
        response.addInt(3);
        response.addInt(0);
        response.addInt(1);
        response.addBool(true);
        response.addBool(true);
        response.addInt(0);
        response.addInt(0);
        response.addInt(28022);

        return response;
    }
View Full Code Here

import gnu.trove.map.hash.THashMap;
import org.magicwerk.brownies.collections.GapList;

public class SendMessengerQueryResultsMessageComposer {
    public static Response compose(THashMap<Integer, Friend> friends, GapList<Friend> results) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("SendMessengerQueryResultsMessageComposer"));
        response.addInt(friends.size());

        for(Friend friend : friends.values()) {
            response.addInt(friend.getId());
            response.addString(friend.getUsername());
            response.addString(friend.getMotto());
            response.addBool(H4J.getNetwork().getSessionManager().getOnlineStatusById(friend.getId()));
            response.addBool(false);
            response.addString("");
            response.addInt(0);
            response.addString(friend.getLook());
            response.addString("");
        }

        response.addInt(results.size());

        for(Friend friend : results) {
            response.addInt(friend.getId());
            response.addString(friend.getUsername());
            response.addString(friend.getMotto());
            response.addBool(H4J.getNetwork().getSessionManager().getOnlineStatusById(friend.getId()));
            response.addBool(false);
            response.addString("");
            response.addInt(0);
            response.addString(friend.getLook());
            response.addString("");
        }
        return response;
    }
View Full Code Here

import com.mmoscene.h4j.H4J;
import com.mmoscene.h4j.communication.Response;

public class SendRoomCreationCheckResultsMessageComposer {
    public static Response compose() {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("SendRoomCreationCheckResultsMessageComposer"));
        response.addInt(0);
        response.addInt(25);

        return response;
    }
View Full Code Here

TOP

Related Classes of com.mmoscene.h4j.communication.Response

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.