- Joined
- Nov 21, 2011
- Messages
- 67
- Reaction score
- 12
Hello ragezoners!
I was writting my HabboHotel emulator from sctach in java and i was bored, all the time writing appendString, appenX, appendY...
So i develop a snippet of code what do it for you, you only do...
Here is the code:
You need to add this on your ServerMessage and edit the send of the name of the var in your servermessage.
THX for read the post x)!
I was writting my HabboHotel emulator from sctach in java and i was bored, all the time writing appendString, appenX, appendY...
So i develop a snippet of code what do it for you, you only do...
Code:
ServerMessage.append("Hello World!");
ServerMessage.append(121);
ServerMessage.append(true);
Here is the code:
PHP:
public void append(Object X){
try {
if (X instanceof Integer)
send.writeInt((Integer) X);
else if (X instanceof Short)
send.writeShort((Short)X);
else if (X instanceof String)
send.writeUTF((String)X);
else
send.writeBoolean((Boolean) X);
} catch(Exception e){
System.err.println(e.getMessage());
}
}
You need to add this on your ServerMessage and edit the send of the name of the var in your servermessage.
THX for read the post x)!