Thread: 525 update appearnce is wrong. anyone can tell me what is wrong about it?

Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1 525 update appearnce is wrong. anyone can tell me what is wrong about it? 
    Registered Member
    Serenity's Avatar
    Join Date
    Oct 2008
    Age
    35
    Posts
    2,327
    Thanks given
    43
    Thanks received
    44
    Rep Power
    389
    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;
        }

    Reply With Quote  
     

  2. #2  
    Member 525 update appearnce is wrong. anyone can tell me what is wrong about it? Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    Did you copy the one in my server exactly?

    Attached imageAttached image
    Reply With Quote  
     

  3. #3  
    Registered Member
    Serenity's Avatar
    Join Date
    Oct 2008
    Age
    35
    Posts
    2,327
    Thanks given
    43
    Thanks received
    44
    Rep Power
    389
    yeah i converted it 100% sure.

    but i keep getting an t2 error

    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
    ,
    would mean mapdata failure, but without rendering it logs in perfectly.

    Reply With Quote  
     

  4. #4  
    Member 525 update appearnce is wrong. anyone can tell me what is wrong about it? Market Banned


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    35
    Posts
    12,574
    Thanks given
    199
    Thanks received
    7,106
    Rep Power
    5000
    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 :\.

    Attached imageAttached image
    Reply With Quote  
     

  5. #5  
    Community Veteran



    Join Date
    Jan 2008
    Posts
    3,444
    Thanks given
    46
    Thanks received
    973
    Rep Power
    4748
    cud be ur teleport bits as if them wrong but rendering is k u will gtet the t2 error

    Reply With Quote  
     

  6. #6  
    Registered Member
    Serenity's Avatar
    Join Date
    Oct 2008
    Age
    35
    Posts
    2,327
    Thanks given
    43
    Thanks received
    44
    Rep Power
    389
    ill will check the teleport bits but i thought i changed them to.

    Reply With Quote  
     

  7. #7  
    Registered Member
    Serenity's Avatar
    Join Date
    Oct 2008
    Age
    35
    Posts
    2,327
    Thanks given
    43
    Thanks received
    44
    Rep Power
    389
    i changed the teleport bits so those aint wrong. anymore ideas?

    the new error :

    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,
    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:2 psize:0 | T2 - 187,230,141 - 0,3200,3200 -

    Reply With Quote  
     

  8. #8  
    Registered Member
    Serenity's Avatar
    Join Date
    Oct 2008
    Age
    35
    Posts
    2,327
    Thanks given
    43
    Thanks received
    44
    Rep Power
    389
    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);
    }

    Reply With Quote  
     

  9. #9  
    Registered Member
    Serenity's Avatar
    Join Date
    Oct 2008
    Age
    35
    Posts
    2,327
    Thanks given
    43
    Thanks received
    44
    Rep Power
    389
    bump.

    Reply With Quote  
     

  10. #10  
    :doge:

    Join Date
    Jan 2009
    Posts
    3,758
    Thanks given
    221
    Thanks received
    817
    Rep Power
    2116
    Quote Originally Posted by Serenity View Post
    yeah i converted it 100% sure.

    but i keep getting an t2 error



    would mean mapdata failure, but without rendering it logs in perfectly.
    T2 is a packet error, T3 is XTEA.
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •