License:-
Indigo is under a "Don't be a dick" license (Don't be a Dick Public License�|�Phil Sturgeon) meaning any breaking the instances found in this license meaning you are a dick and we have proof of you being a dick.
Introduction:-
Project Indigo supports the Habbo client revision 63A flash. It uses MySQL for storage and relies on Netty as framework.
Taken from Netty - the Java NIO Client Server Socket Framework - JBoss Community
Code:
"Netty is a NIO client server framework which enables quick and easy development of network applications such as protocol servers and clients. It greatly simplifies and streamlines network programming such as TCP and UDP socket server."
Features:-
Server features:-
Code:
Client;
- Handshake
SSO;
- Logging user in succesfully if SSO is correct
- Sends user object which shows your figure, motto and sex.
Navigator;
- View your own rooms
- When logged in, your own rooms are cached, so room display isn't hardcoded.
- Room count
- View public rooms
Private rooms
- Create own rooms
- Edit room thumbnail
- Walk in room
- Place furni in room
- Pickup furni in room
- Apply decorations
- Chatting
- Commands
Catalogue
- Load catalogue index.
- Get catalogue pages
Console
- View friends
- View offline friends
- Dynamic offline or online when connecting or disconnecting.
- Search for people (if friend, not friend, online or not)
- Request friends
- Accept friends.
Public rooms
- Chat in public rooms
- See other users
- Load public rooms
- Set starting position
- Leaving from a public room
Credits:-
- Matty ; for helping me getting a grasp with Netty
- Jak ; the thread logo
- Wikipedia ; JDBC article for MySQL
- Maarten ; support
- Tren ; support
- Merijn ; support
Pictures:-






Code:
package indigo.communication.messages.roomuser;
import indigo.communication.MessageEvent;
import indigo.communication.messages.ClientMessage;
import indigo.communication.messages.ServerMessage;
import indigo.game.furni.RoomFloorData;
import indigo.network.clients.Session;
public class getChangeItemPos implements MessageEvent
{
@Override
public void parse(Session Session, ClientMessage Request)
{
if (Session.getPrivateRoom() == null)
return;
// Get Id received.
int Id = Request.PopWiredInt32();
if (Id > 0)
{
// Get the floor data item
RoomFloorData Item = Session.getPrivateRoom().getFloorById(Id);
// Get the received X coordinate
int X = Request.PopWiredInt32();
// Get the received y coordinate
int Y = Request.PopWiredInt32();
// Get the received rotation coordinate
int Rotation = Request.PopWiredInt32();
// Update with MySQL if the server crashes, obviously.
Session.getStorage().ExecuteQuery("UPDATE flat_items SET posx = '" + X + "', posy = '" + Y + "', posz = '" + Rotation + "' WHERE id = '" + Id + "'");
// Update cache
Item.X = X;
Item.Y = Y;
Item.Rot = Rotation;
// Send update
ServerMessage Response = new ServerMessage(95); // "A_"
{
Response.AppendInt32(Id);
Response.AppendInt32(Item.SpriteId);
Response.AppendInt32(X);
Response.AppendInt32(Y);
Response.AppendInt32(Rotation);
Response.AppendStringWithBreak("0.0");
Response.AppendBoolean(false);
Response.AppendStringWithBreak("1");
Response.AppendInt32(-1);
Response.AppendBoolean(true);
Session.sendRoom(Response);
}
}
}
}