HELP| on mapleclient error..

Results 1 to 2 of 2
  1. #1
    Valued Member bambams is offline
    MemberRank
    Sep 2010 Join Date
    118Posts

    HELP| on mapleclient error..

    i'm just update the server from xeon v97 tp v111 and

    1 i have this on mapleclient:

    public void sendCharList(int server) {
    this.session.write(MaplePacketCreator.getCharList(this, server));
    }




    and on maplepacketcreator:

    public static MaplePacket getCharList(final boolean secondpw, final List<MapleCharacter> chars, int charslots) {

    MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
    .
    .
    .

    so in mapleclient its give error... and say to create new method... how i fix that?!


    2 i have 2 errors on addCharStats in maplepacketcreator

    :


    with:

    mplew.writeAsciiString(chr.getName(), 13);


    and:


    mplew.writeInt(Integer.parseInt(new SimpleDateFormat("yyyyMMddHH").format(Calendar.getInstance().getTime())));


    on the first one its want to make new method on maplepacketlittleendian.................

    the second one its give alot of things...


  2. #2
    Dream: Pro Coder :) standeman is offline
    MemberRank
    Mar 2010 Join Date
    The NetherlandsLocation
    418Posts

    Re: HELP| on mapleclient error..

    1) Use this and it will works. (The 6 at the end of the code are the character slots).
    PHP Code:
    public void sendCharList(int server) {
            
    this.session.write(MaplePacketCreator.getCharList(thisserver6));
        } 
    And replace your GetCharList in Maplepacketcreator with this:
    PHP Code:
    public static MaplePacket getCharList(MapleClient cint serverIdint charslots) {
            
    MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
            
    mplew.writeShort(SendOpcode.CHARLIST.getValue());

            
    mplew.write(0);
             List<
    MapleCharacterchars c.loadCharacters(serverId);
            
    mplew.write((bytechars.size());
            for (final 
    MapleCharacter chr chars) {
                
    addCharEntry(mplewchrfalsefalse);
            }
            
    mplew.write(1);
            
    mplew.write(0); //v109.2 (my guess: some black cipher related stuff since its all that was added in .2)
            
    mplew.writeInt(charslots);
            
    mplew.writeInt(0);

            
    System.out.println(mplew.toString());
            return 
    mplew.getPacket();
        } 
    2) Replace
    PHP Code:
    mplew.writeAsciiString(chr.getName(), 13); 
    With :
    PHP Code:
      mplew.writeAsciiString(StringUtil.getRightPaddedStr(chr.getName(), '\0'13)); 
    And for SimpleDateFormat and Calender add this to your imports:
    PHP Code:
    import java.text.SimpleDateFormat
    Or just simply click on the error ALT + ENTER --> Add Imports.

    Next time use [PHP.][./PHP] or CODE Tags. Thank you :)



Advertisement