Did you copy the one in my server exactly?
|
Code:public void appendPlayerAppearance(Player p, Stream str) { if (p == null || str == null) { return; } //str.writeByte(53); Dunno what this is? Stream playerProps = new Stream(1, 100); playerProps.writeByte(p.gender); // Gender Writing if((p.gender & 0x2) == 2) { playerProps.writeByte((byte) 0); playerProps.writeByte((byte) 0); } playerProps.writeByte(p.pkIcon); // This is icons playerProps.writeByte(p.prayerIcon); if (p.npcType < 0) { for (int i = 0; i < 4; i++) { if (p.equipment[i] != -1) { playerProps.writeWord(32768 + Engine.items.equipment[p.equipment[i]].getEquipId()); } else { playerProps.writeByte((byte) 0); } } if (p.equipment[4] != -1) { playerProps.writeWord(32768 + Engine.items.equipment[p.equipment[4]].getEquipId()); } else { playerProps.writeWord(0x100 + p.look[2]); } if (p.equipment[5] != -1) { playerProps.writeWord(32768 + Engine.items.equipment[p.equipment[5]].getEquipId()); } else { playerProps.writeByte((byte) 0); } if (p.equipment[4] != -1) { if (Engine.items.equipment[p.equipment[4]].getCovverage(0)) { playerProps.writeWord(0x100 + p.look[3]); } else { playerProps.writeByte((byte) 0); } } else { playerProps.writeWord(0x100 + p.look[3]); } if (p.equipment[7] != -1) { playerProps.writeWord(32768 + Engine.items.equipment[p.equipment[5]].getEquipId()); } else { playerProps.writeWord(0x100 + p.look[5]); } if (p.equipment[0] != -1) { if (Engine.items.equipment[p.equipment[0]].getCovverage(1) && Engine.items.equipment[p.equipment[0]].getCovverage(2)) { //!fullmask !fullhad playerProps.writeWord(0x100 + p.look[0]); } else { playerProps.writeByte((byte) 0); } } else { playerProps.writeByte(0x100 + p.look[0]); } if (p.equipment[3] != -1) { playerProps.writeWord(32768 + Engine.items.getEquipId(p.equipment[3])); } else { playerProps.writeByte(0x100 + p.look[4]); } if (p.equipment[10] != -1) { playerProps.writeWord(32768 + Engine.items.getEquipId(p.equipment[10])); } else { playerProps.writeWord(0x100 + p.look[6]); } if (p.equipment[0] != -1) { if (!Engine.items.equipment[p.equipment[0]].getCovverage(2)) { //fullmask playerProps.writeWord(0x100 + p.look[1]); } else { playerProps.writeByte((byte) 0); } } else { playerProps.writeWord(0x100 + p.look[1]); } } else { playerProps.writeWord(-1); playerProps.writeWord(p.npcType); } for (int j = 0; j < 5; j++) { playerProps.writeByte(p.color[j]);//This is fine 5 Colours = Correct } playerProps.writeWord(p.standEmote); playerProps.writeWord(otherEmotes[0]); playerProps.writeWord(p.walkEmote); playerProps.writeWord(otherEmotes[1]); playerProps.writeWord(otherEmotes[2]); playerProps.writeWord(otherEmotes[3]); playerProps.writeWord(p.runEmote); playerProps.writeQWord(Misc.stringToLong(p.username)); playerProps.writeByte(3);//Combat Level playerProps.writeWord(0);//Incase of Skill Levels? playerProps.writeByte(0); str.writeByte(playerProps.outOffset); str.writeBytesA(playerProps.outBuffer, playerProps.outOffset, 0); playerProps = null; }
yeah i converted it 100% sure.
but i keep getting an t2 error
would mean mapdata failure, but without rendering it logs in perfectly.Error: Class49:136 Class30_Sub4:2014 Class126:341 Class3:52 client:1405 Applet_S
ub1:700 Applet_Sub1:813 java.lang.Thread.run | java.lang.RuntimeException: gpp1
pos:13 psize:43 | T2 - 187,206,206 - 43,3200,3200 - -128,31,-2,38,-128,127,127,1
27,127,-128,-127,-128,-128,-128,-128,-128,-125,-88,-125,-73,-125,-77,-125,-76,-1
25,-75,-125,-74,-125,-72,-128,-128,-83,30,113,-125,104,-58,-125,-128,-128,-128,8
,
That wouldn't mean a mapdata error, a mapdata error would be a T3 (cache decompression) error. "java.lang.RuntimeException: gpp1" is sent when there's an error in the player update packet.
I can't really see anything wrong there TBQH with you though :\.
cud be ur teleport bits as if them wrong but rendering is k u will gtet the t2 error
i changed the teleport bits so those aint wrong. anymore ideas?
the new error :
a bit further : now i get this :Error: Class49:136 Class30_Sub4:2014 Class126:341 Class3:52 client:1405 Applet_S
ub1:700 Applet_Sub1:813 java.lang.Thread.run | java.lang.RuntimeException: gpp1
pos:13 psize:43 | T2 - 187,230,141 - 43,3200,3200 - -128,31,-3,38,-128,127,127,1
27,127,-128,-127,-128,-128,-128,-128,-128,-125,-88,-125,-73,-125,-77,-125,-76,-1
25,-75,-125,-74,-125,-72,-128,-124,75,29,66,-13,121,48,-125,-128,-128,-128,8,
Error: Class49:136 Class30_Sub4:2014 Class126:341 Class3:52 client:1405 Applet_S
ub1:700 Applet_Sub1:813 java.lang.Thread.run | java.lang.RuntimeException: gpp1
pos:2 psize:0 | T2 - 187,230,141 - 0,3200,3200 -
the methods i adjusted.
public void updatePlayerMovement(Player p, Stream str) {
if (p == null || str == null) {
return;
}
if (p.walkDir == -1) {
if (p.updateReq) {
str.writeBits(1, 1);
str.writeBits(2, 0);
} else {
str.writeBits(1, 0);
}
} else if (p.runDir == -1) {
str.writeBits(1, 1);
str.writeBits(2, 1);
str.writeBits(3, p.walkDir);
str.writeBits(1, p.updateReq ? 1: 0);
} else {
str.writeBits(1, 1);
str.writeBits(2, 2);
str.writeBits(3, p.walkDir);
str.writeBits(3, p.runDir);
str.writeBits(1, p.updateReq ? 1: 0);
}
}public static void updateMovement(Player p) {
if (validate)
return;
p.stream.createFrameVarSizeWord(187);
p.stream.initBitAccess();
p.stream.writeBits(1, 1);
if (p.runDir == -1) {
p.stream.writeBits(2, 1);
p.stream.writeBits(3, p.walkDir);
p.stream.writeBits(1, p.updateReq ? 1 : 0);
} else {
p.stream.writeBits(2, 2);
p.stream.writeBits(3, p.runDir);
p.stream.writeBits(3, p.walkDir);
p.stream.writeBits(1, p.updateReq ? 1 : 0);
}
}public static void noMovement(Player p) {
if (validate)
return;
p.stream.createFrameVarSizeWord(187);
p.stream.initBitAccess();
p.stream.writeBits(1, p.updateReq ? 1 : 0);
if (p.updateReq) {
p.stream.writeBits(2, 0);
}/**/
}public static void teleport(Player p) {
if (validate)
return;
p.stream.createFrameVarSizeWord(187);
p.stream.initBitAccess();
p.stream.writeBits(1, 1);
p.stream.writeBits(2, 3);
p.stream.writeBits(7, p.currentX);
p.stream.writeBits(1, p.updateReq ? 1 : 0);
p.stream.writeBits(7, p.currentY);
p.stream.writeBits(2, p.heightLevel);
p.stream.writeBits(1, 1);
}
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |