Package com.mmoscene.h4j.communication

Examples of com.mmoscene.h4j.communication.Response


import com.mmoscene.h4j.habbohotel.rooms.Room;
import org.magicwerk.brownies.collections.GapList;

public class SendNavigatorResultsMessageComposer {
    public static Response compose(GapList<Room> rooms) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("SendNavigatorResultsMessageComposer"));
        response.addInt(5);
        response.addString("");
        response.addInt(rooms.size());

        for(Room r : rooms) {
            response.addInt(r.getId());
            response.addString(r.getName());
            response.addBool(true); //?
            response.addInt(r.getOwner());
            response.addString(H4J.getDAO().getUserDAO().getUsernameById(r.getOwner()));
            response.addInt(r.getState());
            response.addInt(r.getParty().size()); //current users
            response.addInt(50);
            response.addString(r.getDescription());
            response.addInt(0);
            response.addInt(0);
            response.addInt(0);
            response.addInt(0);
            response.addInt(0);
            response.addInt(0);
            response.addInt(0);
            response.addString("");

            response.addInt(0); //tag count

            response.addInt(0);
            response.addInt(0);
            response.addInt(0);
            response.addBool(true);
            response.addBool(true);
            response.addInt(0);
            response.addInt(0);
        }

        response.addInt(0);
        response.addInt(0);
        response.addBool(false);

        return response;
    }
View Full Code Here


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

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

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

        response.addInt(user.getId());
        response.addString(user.getUsername());
        response.addString(user.getLook());
        response.addString(user.getMotto());
        response.addString(user.getLastActive());
        response.addInt(0);
        response.addInt(user.getMessenger().getFriends().size());
        response.addBool(friends);
        response.addBool(false);
        response.addBool(H4J.getNetwork().getSessionManager().getOnlineStatusById(user.getId()));         // ?
        response.addInt(0); //guild count
        response.addInt(0);
        response.addBool(true); // enable profile

        return response;
    }
View Full Code Here

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

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

        response.init(H4J.getHeaders().getInt("LoadUserInformationComposer"));
        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.H4J;
import com.mmoscene.h4j.communication.Response;

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

        response.init(H4J.getHeaders().getInt("SendInstantMessageComposer"));
        response.addInt(user);
        response.addString(msg);
        response.addInt(0);

        return response;
    }
View Full Code Here

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

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

        response.init(new Integer(H4J.getHeaders().get("SendSecretKeyMessageComposer")));
        response.addString("24231219992253632572058933470468103090824667747608911151318774416044820318109");
        return response;
    }
View Full Code Here

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

public class SendRoomModelMessageComposer {
    public static Response compose(String name, int room) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("SendRoomModelMessageComposer"));
        response.addString(name);
        response.addInt(room);

        return response;
    }
View Full Code Here

import com.mmoscene.h4j.communication.Response;

public class SendBannerMessageComposer {

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

        response.init(new Integer(H4J.getHeaders().get("SendBannerMessageComposer")));
        response.addString("12f449917de4f94a8c48dbadd92b6276");
        response.addBool(false);

        return response;
    }
View Full Code Here

import com.mmoscene.h4j.communication.Response;
import com.mmoscene.h4j.habbohotel.rooms.Room;

public class SendRoomInformationMessageComposer {
    public static Response compose(Room r) {
        Response response = new Response();

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

        response.addBool(true);
        response.addInt(r.getId());
        response.addString(r.getName());
        response.addBool(true);
        response.addInt(r.getOwner());
        response.addString(H4J.getDAO().getUserDAO().getUsernameById(r.getOwner()));
        response.addInt(0);
        response.addInt(r.getParty().size());
        response.addInt(50);
        response.addString(r.getDescription());
        response.addInt(0);
        response.addInt(0);
        response.addInt(10); // score
        response.addInt(0);
        response.addInt(0); // category
        response.addInt(0); //group id = 0
        response.addInt(0); //group id = 0
        response.addString("");
        response.addInt(0); // tag count
        response.addInt(0);
        response.addInt(0);
        response.addInt(0);
        response.addBool(true);
        response.addBool(true);
        response.addInt(0);
        response.addInt(0);
        response.addBool(false);
        response.addBool(false);
        response.addBool(false);
        response.addInt(0);
        response.addInt(0);
        response.addInt(0);

        response.addInt(1);
        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 SendHotelViewPieceMessageComposer {
    public static Response compose(String key, String value) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("SendHotelViewPieceMessageComposer"));
        response.addString(key);
        response.addString(value);

        return response;
    }
View Full Code Here

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

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

        response.init(new Integer(H4J.getHeaders().get("SendSecretKeyComposer")));
        response.addString("24231219992253632572058933470468103090824667747608911151318774416044820318109");
        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.