Help with totem fix for v117.2

Results 1 to 10 of 10
  1. #1
    Apprentice Catz is offline
    MemberRank
    Jan 2014 Join Date
    20Posts

    sad Help with totem fix for v117.2

    Well I've been trying to fix totems for v117.2 and all went good (As in I could equip them and see the effect) But after "log-off" they dissapear.

    So I've tried to follow Fix for the totems Link

    But when I add these two codes below to the source, after pic enter I get an error and crash.

    Code:
    if ( pos <= -118 && pos >= -120 )
       totem.put((byte)(Byte.valueOf(pos) + 118) , item.getValue());

    Code:
    for (Map.Entry entry : totem.entrySet()) {
        mplew.write(((Byte) entry.getKey()).byteValue());
        mplew.writeInt(((Integer) entry.getValue()).intValue());
    }

    Error Code:

    Code:
    00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 01 00 00 8C 27 51 75 8C 27 51 75 8C 27 51 75 FF FF FF FF FD FF FF FF 00 00 00 00 0
    0 00 00 00 F0 04 00 00 43 61 74 7A 00 00 00 00 00 00 00 00 00 00 00 C9 4E 00 00
    C1 8C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 C9 84 00 FF 7F FF 7F FF 7F FF 7F 9F 86 01 00 9F 86 01 00 45 71 01 00 9F 86 0
    1 00 23 00 1F 00 BA 07 2D 3A 00 00 00 00 00 00 00 00 C0 1B AF 38 00 00 00 00 00
    00 00 00 7F 71 0C 78 D5 0C 00 00 18 06 00 00 1D 01 00 00 00 00 00 00 00 00 00 00
     F0 0F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 E0 FD 3B 37 4F 01 00 0
    0 00 00 0A 00 00 00 00 05 00 00 00 00 00 3B 37 4F 01 00 40 E0 FD 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
    0 D5 64 FB 95 37 01 00 00 14 01 04 00 68 6F 62 6F 01 04 00 68 6F 62 6F 00 D3 2D
    A4 7C 00 00 00 00 40 20 20 20 3C 00 40 E0 FD 3B 37 4F 01 01 00 01 9C 4A 0F 00 00
     00 80 05 BB 46 E6 17 02 FF FF FF FF 07 00 EC 03 E7 03 EB 03 EC 03 00 00 00 00 F
    F 7F 00 00 D2 00 CF 00 CB 00 C3 00 00 00 1D 00 32 00 00 00 00 00 00 01 00 00 00
    00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF
     FF FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF FF FF FF 05 00 0
    1 8A DE 0F 00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF 07 00 E7 03 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
    0 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF
    FF FF FF 06 00 01 77 34 10 00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
    0 00 00 00 00 00 00 01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD
     3B 37 4F 01 FF FF FF FF 07 00 01 A5 5B 10 00 00 00 80 05 BB 46 E6 17 02 FF FF F
    F FF 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF F
    F FF 00 40 E0 FD 3B 37 4F 01 FF FF FF FF 0B 00 01 44 01 16 00 00 00 80 05 BB 46
    E6 17 02 FF FF FF FF 00 00 38 00 28 00 00 00 00 00 13 00 00 00 FA 00 00 00 0C 00
     00 00 7D 00 00 00 00 00 13 00 00 00 00 00 28 01 00 01 00 00 00 00 FF FF FF FF 0
    0 00 00 00 00 00 14 0A 73 9C 35 75 3C 75 00 00 00 00 00 00 FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF FF FF FF 0C 00 01 A4 FF 10 00 00
     00 80 05 BB 46 E6 17 02 FF FF FF FF 00 01 2E 00 26 00 29 00 2A 00 C0 00 D2 00 0
    B 00 0E 00 00 00 00 00 C9 00 CF 00 00 00 15 00 19 00 00 00 20 00 00 01 00 00 00
    00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF
     FF FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF FF FF FF 0D 00 0
    1 9F FA 10 00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF 00 00 0A 00 0B 00 0B 00 0B
    00 8F 00 8C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 00
     00 01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
    0 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF
    FF FF FF 0F 00 01 57 FA 10 00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF 00 00 0A 00
     0A 00 0B 00 09 00 99 00 93 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
    0 00 00 00 28 00 00 01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD
     3B 37 4F 01 FF FF FF FF 10 00 01 A4 FF 10 00 00 00 80 05 BB 46 E6 17 02 FF FF F
    F FF 00 01 29 00 2B 00 2A 00 2C 00 CC 00 C9 00 0C 00 0B 00 00 00 00 00 C9 00 C9
    00 00 00 15 00 15 00 00 00 20 00 00 01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF F
    F FF 00 40 E0 FD 3B 37 4F 01 FF FF FF FF 37 00 01 20 E2 11 00 00 00 80 05 BB 46
    E6 17 02 FF FF FF FF 00 00 01 00 01 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 FF FF FF FF 0
    0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF FF FF FF 00 00 02 00 01 57 71 0F
     00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 0
    0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00 01 00
    00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF FF FF FF 0
    3 00 01 AA 98 0F 00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     20 00 00 01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
    0 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B 37 4F
    01 FF FF FF FF 05 00 01 09 DF 0F 00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
    0 00 00 00 00 00 20 00 00 01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 40
     E0 FD 3B 37 4F 01 FF FF FF FF 07 00 01 2A 5D 10 00 00 00 80 05 BB 46 E6 17 02 F
    F FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 20 00 00 01 00 00 00 00 FF FF FF FF 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF F
    F FF FF FF 00 40 E0 FD 3B 37 4F 01 FF FF FF FF 08 00 01 73 83 10 00 00 00 80 05
    BB 46 E6 17 02 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00 01 00 00 00 00 FF FF F
    F FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF FF FF FF 09 00 01 2D D2 10
     00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 0
    0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00 01 00
    00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF FF FF FF 0
    B 00 01 D0 F9 19 00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
    0 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B 37 4F
    01 FF FF FF FF 00 00 03 00 01 86 4E 0F 00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF
     07 00 D3 07 CA 07 D0 07 D1 07 00 00 00 00 C6 00 CA 00 D0 00 CE 00 CB 00 CA 00 0
    0 00 1D 00 2F 00 00 00 00 00 00 01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF
     00 40 E0 FD 3B 37 4F 01 FF FF FF FF 05 00 01 9C 4A 0F 00 00 00 80 05 BB 46 E6 1
    7 02 FF FF FF FF 07 00 E5 03 E9 03 EB 03 E6 03 00 00 00 00 00 00 00 00 D0 00 C6
    00 CD 00 CD 00 00 00 1E 00 35 00 00 00 00 00 00 01 00 00 00 00 FF FF FF FF 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF F
    F FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF FF FF FF 02 00 01 29 D2 10 00 00 00
    80 05 BB 46 E6 17 02 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00 01 00 00 00 00 F
    F FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF FF FF FF 1C 00 01 3C
     E7 0F 00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 0
    0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00
    01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF FF F
    F FF 20 00 01 E9 4E 0F 00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 20 00 00 01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 0
    0 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B
    37 4F 01 FF FF FF FF 06 00 01 EF 64 15 00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF
     08 00 1F 00 15 00 00 00 00 00 00 00 00 00 85 00 00 00 00 00 00 00 67 00 00 00 0
    0 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF
     00 40 E0 FD 3B 37 4F 01 FF FF FF FF 08 00 01 04 65 15 00 00 00 80 05 BB 46 E6 1
    7 02 FF FF FF FF 07 00 00 00 00 00 00 00 00 00 00 00 00 00 60 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 FF FF FF FF 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF F
    F FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF FF FF FF 0C 00 01 44 01 16 00 00 00
    80 05 BB 46 E6 17 02 FF FF FF FF 08 00 1F 00 12 00 00 00 00 00 00 00 00 00 7D 00
     00 00 00 00 00 00 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 F
    F FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF FF FF FF 01 00 01 94
     D2 10 00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF 00 02 4A 00 3E 00 4E 00 41 00 1
    3 00 14 00 29 00 20 00 A7 00 B4 00 00 00 01 00 00 00 03 00 13 00 00 00 00 01 00
    01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 14 0A 69 9C 32 75 4E 9C 00 00 00 00
     00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF FF F
    F FF 0A 00 01 F2 FB 10 00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF 04 00 09 00 08
    00 07 00 09 00 C7 00 D0 00 05 00 04 00 9E 00 8E 00 69 00 64 00 00 00 09 00 00 00
     00 00 00 00 00 01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 0
    0 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B
    37 4F 01 FF FF FF FF 0B 00 01 F0 FB 10 00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF
     01 00 04 00 03 00 05 00 03 00 31 00 34 00 02 00 03 00 2F 00 35 00 16 00 16 00 0
    0 00 05 00 00 00 00 00 00 00 00 01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF
     00 40 E0 FD 3B 37 4F 01 FF FF FF FF 0D 00 01 E1 FB 10 00 00 00 80 05 BB 46 E6 1
    7 02 FF FF FF FF 00 00 13 00 13 00 12 00 10 00 43 00 4B 00 0D 00 11 00 52 02 5A
    02 07 00 07 00 07 00 10 00 07 00 00 00 00 00 00 01 00 00 00 00 FF FF FF FF 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF F
    F FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF FF FF FF 0E 00 01 DB FB 10 00 00 00
    80 05 BB 46 E6 17 02 FF FF FF FF 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 F
    F FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF FF FF FF 17 00 01 CF
     FB 10 00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF 01 00 02 00 04 00 02 00 04 00 5
    2 00 4A 00 02 00 02 00 34 00 2E 00 0F 00 0F 00 00 00 00 00 00 00 00 00 00 00 00
    01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B 37 4F 01 FF FF F
    F FF 07 00 01 18 2D 10 00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 20 00 00 01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 0
    0 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 40 E0 FD 3B
    37 4F 01 FF FF FF FF 0F 00 01 34 8C 15 00 00 00 80 05 BB 46 E6 17 02 FF FF FF FF
     08 00 45 00 2B 00 00 00 00 00 00 00 00 00 B8 00 00 00 00 00 00 00 C8 00 00 00 0
    0 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF
     00 40 E0 FD 3B 37 4F 01 FF FF FF FF 11 00 01 39 4C 0F 00 00 00 80 05 BB 46 E6 1
    7 02 FF FF FF FF 07 00 01 00 01 00 01 00 01 00 00 00 00 00 00 00 00 00 0F 00 00
    00 00 00 00


    Any help would be appreciated<3~.


  2. #2
    Beep Boop Rampenbram is offline
    MemberRank
    Feb 2009 Join Date
    The NetherlandsLocation
    341Posts

    Re: Help with totem fix for v117.2

    first you need to wipe your totems from the database. Open : inventoryitems Now look for the totems by searching the item ID : 1202098, 1202090 and 1202091 ( Only totems with effect in GMS version ) if you found them, delete the lines. Now you are enable to login again.

  3. #3
    Member TLCrimson is offline
    MemberRank
    Aug 2012 Join Date
    89Posts

    Re: Help with totem fix for v117.2

    Quote Originally Posted by Rampenbram View Post
    first you need to wipe your totems from the database. Open : inventoryitems Now look for the totems by searching the item ID : 1202098, 1202090 and 1202091 ( Only totems with effect in GMS version ) if you found them, delete the lines. Now you are enable to login again.
    It doesn't work those 3 items aren't even in my database

  4. #4
    Apprentice Catz is offline
    MemberRank
    Jan 2014 Join Date
    20Posts

    Re: Help with totem fix for v117.2

    Yes I know, We tried it and it still seemed to crash.
    But thanks Lars Anyways<3~.

  5. #5
    Moderator Eric is offline
    ModeratorRank
    Jan 2010 Join Date
    DEV CityLocation
    3,188Posts

    Re: Help with totem fix for v117.2

    addCharLook
    Code:
    public static void addCharLook(final MaplePacketLittleEndianWriter mplew, final MapleCharacterLook chr, final boolean mega, MapleClient client) {
            mplew.write(chr.getGender());
            mplew.write(chr.getSkinColor());
            mplew.writeInt(chr.getFace());
            mplew.writeInt(chr.getJob());
            mplew.write(mega ? 0 : 1);
            mplew.writeInt(chr.getHair());
    
            final Map<Byte, Integer> myEquip = new LinkedHashMap<>();
            final Map<Byte, Integer> maskedEquip = new LinkedHashMap<>();
            final Map<Byte, Integer> equip = chr.getEquips();
            final Map<Byte, Integer> totem = new LinkedHashMap<>();
            for (final Entry<Byte, Integer> item : equip.entrySet()) {
                if (item.getKey() < -127) { //not visible
                    continue;
                }
                byte pos = (byte) (item.getKey() * -1);
                
                if (pos <= -118 && pos >= -120) {
                    pos = (byte) (pos + 118);
                    totem.put(pos, item.getValue());
                } else if (pos < 100 && myEquip.get(pos) == null) {
                    myEquip.put(pos, item.getValue());
                } else if (pos > 100 && pos != 111) {
                    pos = (byte) (pos - 100);
                    if (myEquip.get(pos) != null) {
                        maskedEquip.put(pos, myEquip.get(pos));
                    }
                    myEquip.put(pos, item.getValue());
                } else if (myEquip.get(pos) != null) {
                    maskedEquip.put(pos, item.getValue());
                }
            }
            for (final Entry<Byte, Integer> entry : myEquip.entrySet()) {
                mplew.write(entry.getKey());
                mplew.writeInt(entry.getValue());
            }
            mplew.write(0xFF); // end of visible itens
            for (final Entry<Byte, Integer> entry : totem.entrySet()) {
                mplew.write(entry.getKey());
                mplew.writeInt(entry.getValue());
            }
            mplew.write(0xFF); // end of totem
            // masked itens
            for (final Entry<Byte, Integer> entry : maskedEquip.entrySet()) {
                mplew.write(entry.getKey());
                mplew.writeInt(entry.getValue());
            }
            mplew.write(0xFF); // ending markers
    
            final Integer cWeapon = equip.get((byte) -111);
            mplew.writeInt(cWeapon != null ? cWeapon : 0);
            mplew.writeBool(chr.isElf(client.getPlayer()));
            mplew.writeZeroBytes(12); // pets
            if ((GameConstants.isDemon(chr.getJob()))) {
                mplew.writeInt(chr.getDemonMarking());
            }
        }
    addInventoryInfo
    Code:
    public static void addInventoryInfo(MaplePacketLittleEndianWriter mplew, MapleCharacter chr) {
            mplew.writeInt(chr.getMeso()); // mesos
            mplew.writeInt(0); // 4 ints per size
            mplew.write(chr.getInventory(MapleInventoryType.EQUIP).getSlotLimit()); // equip slots
            mplew.write(chr.getInventory(MapleInventoryType.USE).getSlotLimit()); // use slots
            mplew.write(chr.getInventory(MapleInventoryType.SETUP).getSlotLimit()); // set-up slots
            mplew.write(chr.getInventory(MapleInventoryType.ETC).getSlotLimit()); // etc slots
            mplew.write(chr.getInventory(MapleInventoryType.CASH).getSlotLimit()); // cash slots
    
            final MapleQuestStatus stat = chr.getQuestNoAdd(MapleQuest.getInstance(GameConstants.PENDANT_SLOT)); // 0x200000 : int + int actually
            if (stat != null && stat.getCustomData() != null && Long.parseLong(stat.getCustomData()) > System.currentTimeMillis()) {
                mplew.writeLong(getTime(Long.parseLong(stat.getCustomData())));
            } else {
                mplew.writeLong(getTime(-2));
            }
            MapleInventory iv = chr.getInventory(MapleInventoryType.EQUIPPED);
            List<Item> equipped = iv.newList();
            Collections.sort(equipped);
            for (Item item : equipped) {
                if (item.getPosition() < 0 && item.getPosition() > -100) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.writeShort(0); // start of equipped nx
            for (Item item : equipped) {
                if (item.getPosition() <= -100 && item.getPosition() > -1000) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.writeShort(0); // start of equip inventory
            iv = chr.getInventory(MapleInventoryType.EQUIP);
            for (Item item : iv.list()) {
                addItemPosition(mplew, item, false, false);
                addItemInfo(mplew, item, chr);
            }
            mplew.writeShort(0); //start of evan equips
            for (Item item : equipped) {
                if (item.getPosition() <= -1000 && item.getPosition() > -1100) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.writeShort(0); //start of mechanic equips, ty KDMS
            for (Item item : equipped) {
                if (item.getPosition() <= -1100 && item.getPosition() > -1200) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.writeShort(0); // start of android equips
            for (Item item : equipped) {
                if (item.getPosition() <= -1200) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            
            mplew.writeShort(0); // start of totem inventory
            for (Item item : equipped) {
                if ((item.getPosition() <= -5000 && item.getPosition() >= -5003)) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.writeShort(0); // start of use inventory
            iv = chr.getInventory(MapleInventoryType.USE);
            for (Item item : iv.list()) {
                addItemPosition(mplew, item, false, false);
                addItemInfo(mplew, item, chr);
            }
            mplew.write(0); // start of set-up inventory
            iv = chr.getInventory(MapleInventoryType.SETUP);
            for (Item item : iv.list()) {
                addItemPosition(mplew, item, false, false);
                addItemInfo(mplew, item, chr);
            }
            mplew.write(0); // start of etc inventory
            iv = chr.getInventory(MapleInventoryType.ETC);
            for (Item item : iv.list()) {
                if (item.getPosition() < 100) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.write(0); // start of cash inventory
            iv = chr.getInventory(MapleInventoryType.CASH);
            for (Item item : iv.list()) {
                addItemPosition(mplew, item, false, false);
                addItemInfo(mplew, item, chr);
            }
            mplew.write(0); // start of extended slots
            for (int i = 0; i < chr.getExtendedSlots().size(); i++) {
                mplew.writeInt(i);
                mplew.writeInt(chr.getExtendedSlot(i));
                for (Item item : chr.getInventory(MapleInventoryType.ETC).list()) {
                    if (item.getPosition() > (i * 100 + 100) && item.getPosition() < (i * 100 + 200)) {
                        addItemPosition(mplew, item, false, true);
                        addItemInfo(mplew, item, chr);
                    }
                }
                mplew.writeInt(-1);
            }
            mplew.writeInt(-1);
            mplew.writeInt(0); // 0x40000000 Foreach : Int + Long
            mplew.writeInt(0); // 0x400 Foreach : Long + Long
            mplew.write(0); // 0x20000000 if got, then below
        }
    Should fix your d/c, and totems should save/show up as this works perfectly for me.

  6. #6
    Apprentice Catz is offline
    MemberRank
    Jan 2014 Join Date
    20Posts

    Re: Help with totem fix for v117.2

    Quote Originally Posted by chunkarama View Post
    addCharLook
    Code:
    public static void addCharLook(final MaplePacketLittleEndianWriter mplew, final MapleCharacterLook chr, final boolean mega, MapleClient client) {
            mplew.write(chr.getGender());
            mplew.write(chr.getSkinColor());
            mplew.writeInt(chr.getFace());
            mplew.writeInt(chr.getJob());
            mplew.write(mega ? 0 : 1);
            mplew.writeInt(chr.getHair());
    
            final Map<Byte, Integer> myEquip = new LinkedHashMap<>();
            final Map<Byte, Integer> maskedEquip = new LinkedHashMap<>();
            final Map<Byte, Integer> equip = chr.getEquips();
            final Map<Byte, Integer> totem = new LinkedHashMap<>();
            for (final Entry<Byte, Integer> item : equip.entrySet()) {
                if (item.getKey() < -127) { //not visible
                    continue;
                }
                byte pos = (byte) (item.getKey() * -1);
                
                if (pos <= -118 && pos >= -120) {
                    pos = (byte) (pos + 118);
                    totem.put(pos, item.getValue());
                } else if (pos < 100 && myEquip.get(pos) == null) {
                    myEquip.put(pos, item.getValue());
                } else if (pos > 100 && pos != 111) {
                    pos = (byte) (pos - 100);
                    if (myEquip.get(pos) != null) {
                        maskedEquip.put(pos, myEquip.get(pos));
                    }
                    myEquip.put(pos, item.getValue());
                } else if (myEquip.get(pos) != null) {
                    maskedEquip.put(pos, item.getValue());
                }
            }
            for (final Entry<Byte, Integer> entry : myEquip.entrySet()) {
                mplew.write(entry.getKey());
                mplew.writeInt(entry.getValue());
            }
            mplew.write(0xFF); // end of visible itens
            for (final Entry<Byte, Integer> entry : totem.entrySet()) {
                mplew.write(entry.getKey());
                mplew.writeInt(entry.getValue());
            }
            mplew.write(0xFF); // end of totem
            // masked itens
            for (final Entry<Byte, Integer> entry : maskedEquip.entrySet()) {
                mplew.write(entry.getKey());
                mplew.writeInt(entry.getValue());
            }
            mplew.write(0xFF); // ending markers
    
            final Integer cWeapon = equip.get((byte) -111);
            mplew.writeInt(cWeapon != null ? cWeapon : 0);
            mplew.writeBool(chr.isElf(client.getPlayer()));
            mplew.writeZeroBytes(12); // pets
            if ((GameConstants.isDemon(chr.getJob()))) {
                mplew.writeInt(chr.getDemonMarking());
            }
        }
    addInventoryInfo
    Code:
    public static void addInventoryInfo(MaplePacketLittleEndianWriter mplew, MapleCharacter chr) {
            mplew.writeInt(chr.getMeso()); // mesos
            mplew.writeInt(0); // 4 ints per size
            mplew.write(chr.getInventory(MapleInventoryType.EQUIP).getSlotLimit()); // equip slots
            mplew.write(chr.getInventory(MapleInventoryType.USE).getSlotLimit()); // use slots
            mplew.write(chr.getInventory(MapleInventoryType.SETUP).getSlotLimit()); // set-up slots
            mplew.write(chr.getInventory(MapleInventoryType.ETC).getSlotLimit()); // etc slots
            mplew.write(chr.getInventory(MapleInventoryType.CASH).getSlotLimit()); // cash slots
    
            final MapleQuestStatus stat = chr.getQuestNoAdd(MapleQuest.getInstance(GameConstants.PENDANT_SLOT)); // 0x200000 : int + int actually
            if (stat != null && stat.getCustomData() != null && Long.parseLong(stat.getCustomData()) > System.currentTimeMillis()) {
                mplew.writeLong(getTime(Long.parseLong(stat.getCustomData())));
            } else {
                mplew.writeLong(getTime(-2));
            }
            MapleInventory iv = chr.getInventory(MapleInventoryType.EQUIPPED);
            List<Item> equipped = iv.newList();
            Collections.sort(equipped);
            for (Item item : equipped) {
                if (item.getPosition() < 0 && item.getPosition() > -100) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.writeShort(0); // start of equipped nx
            for (Item item : equipped) {
                if (item.getPosition() <= -100 && item.getPosition() > -1000) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.writeShort(0); // start of equip inventory
            iv = chr.getInventory(MapleInventoryType.EQUIP);
            for (Item item : iv.list()) {
                addItemPosition(mplew, item, false, false);
                addItemInfo(mplew, item, chr);
            }
            mplew.writeShort(0); //start of evan equips
            for (Item item : equipped) {
                if (item.getPosition() <= -1000 && item.getPosition() > -1100) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.writeShort(0); //start of mechanic equips, ty KDMS
            for (Item item : equipped) {
                if (item.getPosition() <= -1100 && item.getPosition() > -1200) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.writeShort(0); // start of android equips
            for (Item item : equipped) {
                if (item.getPosition() <= -1200) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            
            mplew.writeShort(0); // start of totem inventory
            for (Item item : equipped) {
                if ((item.getPosition() <= -5000 && item.getPosition() >= -5003)) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.writeShort(0); // start of use inventory
            iv = chr.getInventory(MapleInventoryType.USE);
            for (Item item : iv.list()) {
                addItemPosition(mplew, item, false, false);
                addItemInfo(mplew, item, chr);
            }
            mplew.write(0); // start of set-up inventory
            iv = chr.getInventory(MapleInventoryType.SETUP);
            for (Item item : iv.list()) {
                addItemPosition(mplew, item, false, false);
                addItemInfo(mplew, item, chr);
            }
            mplew.write(0); // start of etc inventory
            iv = chr.getInventory(MapleInventoryType.ETC);
            for (Item item : iv.list()) {
                if (item.getPosition() < 100) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.write(0); // start of cash inventory
            iv = chr.getInventory(MapleInventoryType.CASH);
            for (Item item : iv.list()) {
                addItemPosition(mplew, item, false, false);
                addItemInfo(mplew, item, chr);
            }
            mplew.write(0); // start of extended slots
            for (int i = 0; i < chr.getExtendedSlots().size(); i++) {
                mplew.writeInt(i);
                mplew.writeInt(chr.getExtendedSlot(i));
                for (Item item : chr.getInventory(MapleInventoryType.ETC).list()) {
                    if (item.getPosition() > (i * 100 + 100) && item.getPosition() < (i * 100 + 200)) {
                        addItemPosition(mplew, item, false, true);
                        addItemInfo(mplew, item, chr);
                    }
                }
                mplew.writeInt(-1);
            }
            mplew.writeInt(-1);
            mplew.writeInt(0); // 0x40000000 Foreach : Int + Long
            mplew.writeInt(0); // 0x400 Foreach : Long + Long
            mplew.write(0); // 0x20000000 if got, then below
        }
    Should fix your d/c, and totems should save/show up as this works perfectly for me.
    Thanks Man~.
    Seems like all I was missing, which I feel stupid for is:
    Code:
    mplew.writeShort(o); // start of totem inventory        for (Item item : equipped) {
                if ((item.getPosition() <= -5000 && item.getPosition() >= -5003)) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
    
            }



  7. #7
    Account Upgraded | Title Enabled! AristoCat is offline
    MemberRank
    Apr 2012 Join Date
    947Posts

    Re: Help with totem fix for v117.2

    Quote Originally Posted by chunkarama View Post
    addCharLook
    Code:
    public static void addCharLook(final MaplePacketLittleEndianWriter mplew, final MapleCharacterLook chr, final boolean mega, MapleClient client) {
            mplew.write(chr.getGender());
            mplew.write(chr.getSkinColor());
            mplew.writeInt(chr.getFace());
            mplew.writeInt(chr.getJob());
            mplew.write(mega ? 0 : 1);
            mplew.writeInt(chr.getHair());
    
            final Map<Byte, Integer> myEquip = new LinkedHashMap<>();
            final Map<Byte, Integer> maskedEquip = new LinkedHashMap<>();
            final Map<Byte, Integer> equip = chr.getEquips();
            final Map<Byte, Integer> totem = new LinkedHashMap<>();
            for (final Entry<Byte, Integer> item : equip.entrySet()) {
                if (item.getKey() < -127) { //not visible
                    continue;
                }
                byte pos = (byte) (item.getKey() * -1);
                
                if (pos <= -118 && pos >= -120) {
                    pos = (byte) (pos + 118);
                    totem.put(pos, item.getValue());
                } else if (pos < 100 && myEquip.get(pos) == null) {
                    myEquip.put(pos, item.getValue());
                } else if (pos > 100 && pos != 111) {
                    pos = (byte) (pos - 100);
                    if (myEquip.get(pos) != null) {
                        maskedEquip.put(pos, myEquip.get(pos));
                    }
                    myEquip.put(pos, item.getValue());
                } else if (myEquip.get(pos) != null) {
                    maskedEquip.put(pos, item.getValue());
                }
            }
            for (final Entry<Byte, Integer> entry : myEquip.entrySet()) {
                mplew.write(entry.getKey());
                mplew.writeInt(entry.getValue());
            }
            mplew.write(0xFF); // end of visible itens
            for (final Entry<Byte, Integer> entry : totem.entrySet()) {
                mplew.write(entry.getKey());
                mplew.writeInt(entry.getValue());
            }
            mplew.write(0xFF); // end of totem
            // masked itens
            for (final Entry<Byte, Integer> entry : maskedEquip.entrySet()) {
                mplew.write(entry.getKey());
                mplew.writeInt(entry.getValue());
            }
            mplew.write(0xFF); // ending markers
    
            final Integer cWeapon = equip.get((byte) -111);
            mplew.writeInt(cWeapon != null ? cWeapon : 0);
            mplew.writeBool(chr.isElf(client.getPlayer()));
            mplew.writeZeroBytes(12); // pets
            if ((GameConstants.isDemon(chr.getJob()))) {
                mplew.writeInt(chr.getDemonMarking());
            }
        }
    addInventoryInfo
    Code:
    public static void addInventoryInfo(MaplePacketLittleEndianWriter mplew, MapleCharacter chr) {
            mplew.writeInt(chr.getMeso()); // mesos
            mplew.writeInt(0); // 4 ints per size
            mplew.write(chr.getInventory(MapleInventoryType.EQUIP).getSlotLimit()); // equip slots
            mplew.write(chr.getInventory(MapleInventoryType.USE).getSlotLimit()); // use slots
            mplew.write(chr.getInventory(MapleInventoryType.SETUP).getSlotLimit()); // set-up slots
            mplew.write(chr.getInventory(MapleInventoryType.ETC).getSlotLimit()); // etc slots
            mplew.write(chr.getInventory(MapleInventoryType.CASH).getSlotLimit()); // cash slots
    
            final MapleQuestStatus stat = chr.getQuestNoAdd(MapleQuest.getInstance(GameConstants.PENDANT_SLOT)); // 0x200000 : int + int actually
            if (stat != null && stat.getCustomData() != null && Long.parseLong(stat.getCustomData()) > System.currentTimeMillis()) {
                mplew.writeLong(getTime(Long.parseLong(stat.getCustomData())));
            } else {
                mplew.writeLong(getTime(-2));
            }
            MapleInventory iv = chr.getInventory(MapleInventoryType.EQUIPPED);
            List<Item> equipped = iv.newList();
            Collections.sort(equipped);
            for (Item item : equipped) {
                if (item.getPosition() < 0 && item.getPosition() > -100) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.writeShort(0); // start of equipped nx
            for (Item item : equipped) {
                if (item.getPosition() <= -100 && item.getPosition() > -1000) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.writeShort(0); // start of equip inventory
            iv = chr.getInventory(MapleInventoryType.EQUIP);
            for (Item item : iv.list()) {
                addItemPosition(mplew, item, false, false);
                addItemInfo(mplew, item, chr);
            }
            mplew.writeShort(0); //start of evan equips
            for (Item item : equipped) {
                if (item.getPosition() <= -1000 && item.getPosition() > -1100) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.writeShort(0); //start of mechanic equips, ty KDMS
            for (Item item : equipped) {
                if (item.getPosition() <= -1100 && item.getPosition() > -1200) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.writeShort(0); // start of android equips
            for (Item item : equipped) {
                if (item.getPosition() <= -1200) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            
            mplew.writeShort(0); // start of totem inventory
            for (Item item : equipped) {
                if ((item.getPosition() <= -5000 && item.getPosition() >= -5003)) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.writeShort(0); // start of use inventory
            iv = chr.getInventory(MapleInventoryType.USE);
            for (Item item : iv.list()) {
                addItemPosition(mplew, item, false, false);
                addItemInfo(mplew, item, chr);
            }
            mplew.write(0); // start of set-up inventory
            iv = chr.getInventory(MapleInventoryType.SETUP);
            for (Item item : iv.list()) {
                addItemPosition(mplew, item, false, false);
                addItemInfo(mplew, item, chr);
            }
            mplew.write(0); // start of etc inventory
            iv = chr.getInventory(MapleInventoryType.ETC);
            for (Item item : iv.list()) {
                if (item.getPosition() < 100) {
                    addItemPosition(mplew, item, false, false);
                    addItemInfo(mplew, item, chr);
                }
            }
            mplew.write(0); // start of cash inventory
            iv = chr.getInventory(MapleInventoryType.CASH);
            for (Item item : iv.list()) {
                addItemPosition(mplew, item, false, false);
                addItemInfo(mplew, item, chr);
            }
            mplew.write(0); // start of extended slots
            for (int i = 0; i < chr.getExtendedSlots().size(); i++) {
                mplew.writeInt(i);
                mplew.writeInt(chr.getExtendedSlot(i));
                for (Item item : chr.getInventory(MapleInventoryType.ETC).list()) {
                    if (item.getPosition() > (i * 100 + 100) && item.getPosition() < (i * 100 + 200)) {
                        addItemPosition(mplew, item, false, true);
                        addItemInfo(mplew, item, chr);
                    }
                }
                mplew.writeInt(-1);
            }
            mplew.writeInt(-1);
            mplew.writeInt(0); // 0x40000000 Foreach : Int + Long
            mplew.writeInt(0); // 0x400 Foreach : Long + Long
            mplew.write(0); // 0x20000000 if got, then below
        }
    Should fix your d/c, and totems should save/show up as this works perfectly for me.
    the addCharLook part, the slots of totems in there should be 0 to 2 because 5000 doesn't fit in a byte, this is what nexon do.

    edit:
    nvm im retarded

  8. #8
    Moderator Eric is offline
    ModeratorRank
    Jan 2010 Join Date
    DEV CityLocation
    3,188Posts

    Re: Help with totem fix for v117.2

    Quote Originally Posted by AristoCat View Post
    the addCharLook part, the slots of totems in there should be 0 to 2 because 5000 doesn't fit in a byte, this is what nexon do.

    edit:
    nvm im retarded
    Yes, you're right. in addInventoryInfo actually, I use slot 5000 to 5003, yet totems are only 3 slots (not 4). So yes, 5003 should be 5002.

  9. #9
    Account Upgraded | Title Enabled! AristoCat is offline
    MemberRank
    Apr 2012 Join Date
    947Posts

    Re: Help with totem fix for v117.2

    Quote Originally Posted by chunkarama View Post
    Yes, you're right. in addInventoryInfo actually, I use slot 5000 to 5003, yet totems are only 3 slots (not 4). So yes, 5003 should be 5002.
    no i was talking about that part

    if (pos <= -118 && pos >= -120) {
    pos = (byte) (pos + 118);
    totem.put(pos, item.getValue());

  10. #10
    Moderator Eric is offline
    ModeratorRank
    Jan 2010 Join Date
    DEV CityLocation
    3,188Posts

    Re: Help with totem fix for v117.2

    Quote Originally Posted by AristoCat View Post
    no i was talking about that part

    if (pos <= -118 && pos >= -120) {
    pos = (byte) (pos + 118);
    totem.put(pos, item.getValue());
    oh, addCharLook.. read that wrong. derp moment, sorry lol



Advertisement