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 SendRoomRelativeHeightmapMessageComposer {
    public static Response compose(String map) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("SendRoomRelativeHeightmapMessageComposer"));
        response.addString(map);

        return response;
    }
View Full Code Here


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

public class SendRoomHeightmapMessageComposer {
    public static Response compose(String map) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("SendRoomHeightmapMessageComposer"));
        response.addString(map);

        return response;
    }
View Full Code Here

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

public class LoadUserCreditsMessageComposer {
    public static Response compose(int credits) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("LoadUserCreditsMessageComposer"));
        response.addString(credits + ".0");

        return response;
    }
View Full Code Here

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

public class SendRoomActorInformationMessageComposer {
    public static Response compose(int id, String username) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("SendRoomActorInformationMessageComposer"));
        response.addInt(1);
        response.addInt(id);
        response.addString(username);
        response.addInt(0);

        return response;
    }
View Full Code Here

import com.mmoscene.h4j.habbohotel.messenger.Friend;
import gnu.trove.map.hash.THashMap;

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

        response.init(H4J.getHeaders().getInt("InitializeMessengerMessageComposer"));
        response.addInt(1100);
        response.addInt(300);
        response.addInt(800);
        response.addInt(1100);
        response.addInt(0);
        response.addInt(friends.size());

        for(Friend friend : friends.values()) {
            response.addInt(friend.getId());
            response.addString(friend.getUsername());
            response.addInt(1); //?
            response.addBool(H4J.getNetwork().getSessionManager().getOnlineStatusById(friend.getId()));
            response.addBool(false); //if in room
            response.addString(friend.getLook());
            response.addInt(0); //?
            response.addString(friend.getMotto());
            response.addString(""); //last online
            response.addString(""); //?
            response.addBool(true);
            response.addBool(true);
            response.addBool(false);
            response.addShort(0);
        }
        return response;
    }
View Full Code Here

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

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

        //NOTE: This is all static, too lazy to do them properly (y)

        response.init(H4J.getHeaders().getInt("SendPermissionsMessageComposer"));
        response.addInt(7); //PASSED = 7 ELSE = 5
        response.addString("VOTE_IN_COMPETITIONS");
        response.addBool(true);
        response.addString("");
        response.addString("TRADE");
        response.addBool(true);
        response.addString("");
        response.addString("CITIZEN");
        response.addBool(true);
        response.addString("");

        //if (HasBadge) {
            response.addString("SAFE_CHAT");
            response.addBool(true);
            response.addString("");
            response.addString("FULL_CHAT");
            response.addBool(true);
            response.addString("");
        //}

        response.addString("CALL_ON_HELPERS");
        response.addBool(true);
        response.addString("");
        response.addString("USE_GUIDE_TOOL");
        response.addBool(false);
        response.addString("requirement.unfulfilled.helper_level_4");
        response.addString("JUDGE_CHAT_REVIEWS");
        response.addBool(false);
        response.addString("requirement.unfulfilled.helper_level_6");
       
        return response;
    }
View Full Code Here

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

public class SendRoomPapersMessageComposer {
    public static Response compose(String type, String value) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("SendRoomPapersMessageComposer"));
        response.addString(type);
        response.addString(value);

        return response;
    }
View Full Code Here

import com.mmoscene.h4j.communication.Response;
import com.mmoscene.h4j.habbohotel.pathfinding.Position;

public class SendRoomActorStatusMessageComposer {
    public static Response compose(int user, Position p, String status) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("SendRoomActorStatusMessageComposer"));
        response.addInt(1);
        response.addInt(user);
        response.addInt(p.getX());
        response.addInt(p.getY());
        response.addString(Double.toString(p.getZ()));
        response.addInt(p.getRotation());
        response.addInt(p.getRotation());
        response.addString(status);

        return response;
    }
View Full Code Here

import com.mmoscene.h4j.habbohotel.messenger.Friend;
import gnu.trove.map.hash.THashMap;

public class SendPendingFriendRequestsComposer {
    public static Response compose(THashMap<Integer, Friend> requests) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("SendPendingFriendRequestsComposer"));
        response.addInt(requests.size());
        response.addInt(requests.size());

        for(Friend request : requests.values()) {
            response.addInt(request.getId());
            response.addString(request.getUsername());
            response.addString(request.getLook());
        }

        return response;
    }
View Full Code Here

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

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

        response.init(H4J.getHeaders().getInt("UpdateFriendStateMessageComposer"));
        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

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.