Learning how to Fix/Add Buffs/Skills (Buffstats)

Page 1 of 2 12 LastLast
Results 1 to 15 of 27
  1. #1
    Member JessVanity is offline
    MemberRank
    Jan 2014 Join Date
    61Posts

    Learning how to Fix/Add Buffs/Skills (Buffstats)

    Hi, so I was wondering how I could learn to fix certain skills, add skills (when updating versions) and understand buffstats. Do I need to get the packets for the buff I'm trying to add/fix. I've been looking at the class MapleStatEffect, and lots of sources / repacks have it handled differently. I want to learn how to read buffstats and how to fix / add skills no matter how long it takes to learn. I am new to java, I haven't been taught it, i'm more of a blind coder, where I look at stuff given to me and see how it works, and try to understand it by reading it and looking at what the purpose of it is and how it is called. I'm more of a trial and error person and I have patience and commitment when it comes to doing what I want. I've tried looking for guides on this but I don't think I've found any that can help with this situation.

    Thanks for your time ;)


  2. #2
    Omega sunnyboy is offline
    MemberRank
    Mar 2010 Join Date
    6,109Posts

    Re: Learning how to Fix/Add Buffs/Skills (Buffstats)

    Read the few comments in this thread and it sort of shows you how to get buffstats and if u need further help, ask away

    http://forum.ragezone.com/f427/gms-u...00/index3.html

  3. #3
    Member JessVanity is offline
    MemberRank
    Jan 2014 Join Date
    61Posts

    Re: Learning how to Fix/Add Buffs/Skills (Buffstats)

    Thanks for the reply, okay so I've read most of the posts in that thread and from I've read (understood) is that you get the packets from the skill you want, for example this is from Mallissy post:
    PHP Code:
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 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 03 00 00 00 00 00 53 04 AD E0 00 00 00 00 00 B5 49 00 00 00 00 00 00 00 00 00 00 00 
    then further on the thread Slayhh posted:
    PHP Code:
     is the buffstat12 ints (should be converted to 6 longs by now because values get too high?) 
    (
    0x20000008) or ,if im right or probably notbecause it should be the whole bufflength.. 
    So from this I don't understand what he means "12 Ints should be converted to 6 longs" and how he gets (0x2000000, 8) from the packet that Mallissy posted.

    Later on you posted, that "not longs that's 0x2000, 8".
    But then you got a different buff stat for Overwhelming Power"
    PHP Code:
     0x8000000007
    0x100

    Later on Even posts:
    PHP Code:
     00 00 00 00 
    00 00 00 00 
    00 00 00 00 
    00 00 00 00 
    00 20 00 00 
    >> 0x2000 //8

    00 00 00 00 //7
    00 00 00 00 //6
    00 00 00 00 //5
    00 00 00 00 //4
    00 00 00 00 //3
    00 00 00 00 //2
    00 00 00 00 //1 
    I understand where he got the 8 from but where do you get 0x2000 from?

    Sorry If doesn't make sense, but I dont quite understand this fully.

  4. #4
    How cool is that? sonnyeb is offline
    MemberRank
    Oct 2012 Join Date
    /f425/Location
    393Posts

    Re: Learning how to Fix/Add Buffs/Skills (Buffstats)

    Quote Originally Posted by JessVanity View Post

    Later on Even posts:
    PHP Code:
     00 00 00 00 
    00 00 00 00 
    00 00 00 00 
    00 00 00 00 
    00 20 00 00 
    >> 0x2000 //8

    00 00 00 00 //7
    00 00 00 00 //6
    00 00 00 00 //5
    00 00 00 00 //4
    00 00 00 00 //3
    00 00 00 00 //2
    00 00 00 00 //1 
    I understand where he got the 8 from but where do you get 0x2000 from?

    Sorry If doesn't make sense, but I dont quite understand this fully.[/COLOR]
    MS packets are little endian, so you read in reverse.

    00 20 00 00 = 00002000, that's how you get 0x2000.

  5. #5
    Member JessVanity is offline
    MemberRank
    Jan 2014 Join Date
    61Posts

    Re: Learning how to Fix/Add Buffs/Skills (Buffstats)

    Ahh I see, I've been reading SuperLol and he said:
    PHP Code:
     -Byte1 byte
    -Short2 bytes
    -Int4 bytes
    -Long8 bytes
    -The packets on Maplestory are in little endian formatwhich means the once converted to hexthey are reversedThis means that if something was 0x12345678once converted to little endianit would be 78 56 34 12. Using the same principlea group of 4 bytes that are 00 30 20 10 will be 0x10203000.
    -
    Packets are sent between the server and client to transfer data and informationThe GUI is a projection of itin a way
    -
    Actions that are handled by packets on Maplestory are defined by a short (2 bytesin the beginning of the packetSome actions may share the same shortWe will call this short an opcodeBoth packets sent and received by the server have opcodesNaming these opcodes will help a lot
    -
    This will be done in hexadecimal so it is base 16. It is useful to have calculators for hex to dec and dec to hex at the readyIt is also useful to know some basics such as 0xA 100xB 11, and possible some multiples of 16. It is useful to also know how to multiply and add in your headSince I can do that, for all bytes I can calculate the values pretty fast by doing it in my head.
    -
    Handlers are for receive packetsMaplePacketCreator is for send packetsBy receiving packetsI mean that the server receives the packets and not the clientSimilarly by sending packetsI mean the server sends the packets
    But how come Even didn't use the full packet:
    PHP Code:
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 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 03 00 00 00 00 00 53 04 AD E0 00 00 00 00 00 B5 49 00 00 00 00 00 00 00 00 00 00 00 
    He just used:
    PHP Code:
      00 00 00 00 
    00 00 00 00 
    00 00 00 00 
    00 00 00 00 
    00 20 00 00 
    >> 0x2000 //8

    00 00 00 00 //7
    00 00 00 00 //6
    00 00 00 00 //5
    00 00 00 00 //4
    00 00 00 00 //3
    00 00 00 00 //2
    00 00 00 00 //1 
    Edit: I think Im starting to understand since buff stats are in int and an int has 4 bytes (00 00 00 00), thats why he ordered it that way. But why does he stop at 12 ints? Is it because the next byte is 03?
    Last edited by JessVanity; 07-01-14 at 08:34 AM.

  6. #6
    How cool is that? sonnyeb is offline
    MemberRank
    Oct 2012 Join Date
    /f425/Location
    393Posts

    Re: Learning how to Fix/Add Buffs/Skills (Buffstats)

    Quote Originally Posted by JessVanity View Post
    Ahh I see, I've been reading SuperLol and he said:
    PHP Code:
     -Byte1 byte
    -Short2 bytes
    -Int4 bytes
    -Long8 bytes
    -The packets on Maplestory are in little endian formatwhich means the once converted to hexthey are reversedThis means that if something was 0x12345678once converted to little endianit would be 78 56 34 12. Using the same principlea group of 4 bytes that are 00 30 20 10 will be 0x10203000.
    -
    Packets are sent between the server and client to transfer data and informationThe GUI is a projection of itin a way
    -
    Actions that are handled by packets on Maplestory are defined by a short (2 bytesin the beginning of the packetSome actions may share the same shortWe will call this short an opcodeBoth packets sent and received by the server have opcodesNaming these opcodes will help a lot
    -
    This will be done in hexadecimal so it is base 16. It is useful to have calculators for hex to dec and dec to hex at the readyIt is also useful to know some basics such as 0xA 100xB 11, and possible some multiples of 16. It is useful to also know how to multiply and add in your headSince I can do that, for all bytes I can calculate the values pretty fast by doing it in my head.
    -
    Handlers are for receive packetsMaplePacketCreator is for send packetsBy receiving packetsI mean that the server receives the packets and not the clientSimilarly by sending packetsI mean the server sends the packets
    But how come Even didn't use the full packet:
    PHP Code:
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 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 03 00 00 00 00 00 53 04 AD E0 00 00 00 00 00 B5 49 00 00 00 00 00 00 00 00 00 00 00 
    He just used:
    PHP Code:
      00 00 00 00 
    00 00 00 00 
    00 00 00 00 
    00 00 00 00 
    00 20 00 00 
    >> 0x2000 //8

    00 00 00 00 //7
    00 00 00 00 //6
    00 00 00 00 //5
    00 00 00 00 //4
    00 00 00 00 //3
    00 00 00 00 //2
    00 00 00 00 //1 
    Edit: I think Im starting to understand since buff stats are in int and an int has 4 bytes (00 00 00 00), thats why he ordered it that way. But why does he stop at 12 ints? Is it because the next byte is 03?
    The 12 ints is just a mask to indicate what stats are in the buff that you used, the actual data (eg duration) are in the part after the 12 ints.
    The length of the buffmask is 12, hence he stopped at 12 ints.
    This length may vary depending on version, eg. if nexon adds more buffs and effects the length of the buffmask would increase.

  7. #7
    Member JessVanity is offline
    MemberRank
    Jan 2014 Join Date
    61Posts

    Re: Learning how to Fix/Add Buffs/Skills (Buffstats)

    Okay, so how am I suppose to determine the length of the buffmask? Is it different of every buff / skill?

    You said that the actual data is after the 12 ints. So does it go to 13 + ints or reset back to 1 from there?
    PHP Code:
    00 00 00 00 //12
    00 00 00 00 // 11
    00 00 00 00 // 10
    00 00 00 00 // 9
    00 20 00 00 // 8 --> 00002000 (0x2000, 8)
    00 00 00 00 // 7
    00 00 00 00 // 6
    00 00 00 00 // 5
    00 00 00 00 // 4
    00 00 00 00 // 3
    00 00 00 00 // 2
    00 00 00 00 // 1 
    This is after the 12 ints:
    PHP Code:
    03 00 00 00
      00 00 53 04 
    AD E0 00 00 
    00 00 00 B5 
    49 00 00 00 
    00 00 00 00 
    00 00 00 00 
    // ? 

  8. #8
    How cool is that? sonnyeb is offline
    MemberRank
    Oct 2012 Join Date
    /f425/Location
    393Posts

    Re: Learning how to Fix/Add Buffs/Skills (Buffstats)

    Quote Originally Posted by JessVanity View Post
    Okay, so how am I suppose to determine the length of the buffmask? Is it different of every buff / skill?

    You said that the actual data is after the 12 ints. So does it go to 13 + ints or reset back to 1 from there?
    PHP Code:
    00 00 00 00 //12
    00 00 00 00 // 11
    00 00 00 00 // 10
    00 00 00 00 // 9
    00 20 00 00 // 8 --> 00002000 (0x2000, 8)
    00 00 00 00 // 7
    00 00 00 00 // 6
    00 00 00 00 // 5
    00 00 00 00 // 4
    00 00 00 00 // 3
    00 00 00 00 // 2
    00 00 00 00 // 1 
    This is after the 12 ints:
    PHP Code:
    03 00 00 00
      00 00 53 04 
    AD E0 00 00 
    00 00 00 B5 
    49 00 00 00 
    00 00 00 00 
    00 00 00 00 
    // ? 
    For a single version length of buffmask is the same for all buffs. eg for v144, length = 12. The length of buffmask can be found in gameconstants.
    For v144, first 12 ints of give_buff and cancel_buff is buffmask, the rest of the packet contain other information about the buff.
    Take a look at give_buff and cancel_buff inside source for the structure of the packet.

  9. #9
    Member JessVanity is offline
    MemberRank
    Jan 2014 Join Date
    61Posts

    Re: Learning how to Fix/Add Buffs/Skills (Buffstats)

    Hmm Okay I think I got how to get buffstats, but what would I do with the information about the buff and where would I store it? Getting the correct buffstat alone won't fix a broken skill? Don't you need to apply the buff In maplestateffect? Also I dont quite understand the packet structure of GIVE_BUFF and CANCEL_BUFF, in CWvsContext. Oh also the first 2 (?) bytes are the header right, so 29 00 -- > 00x29 for GIVE_BUFF? That wouldn't count as the buffmask correct? Thanks.

  10. #10
    Omega sunnyboy is offline
    MemberRank
    Mar 2010 Join Date
    6,109Posts

    Re: Learning how to Fix/Add Buffs/Skills (Buffstats)

    Quote Originally Posted by JessVanity View Post
    Hmm Okay I think I got how to get buffstats, but what would I do with the information about the buff and where would I store it? Getting the correct buffstat alone won't fix a broken skill? Don't you need to apply the buff In maplestateffect? Also I dont quite understand the packet structure of GIVE_BUFF and CANCEL_BUFF, in CWvsContext. Oh also the first 2 (?) bytes are the header right, so 29 00 -- > 00x29 for GIVE_BUFF? That wouldn't count as the buffmask correct? Thanks.
    This is just how ik it, doesn't mean i'm 100% right, but works fine for me.


    The first 2 bytes in your case 29 00 is indeed the header for the packet 0x29 GIVE_BUFF and a +1 would be CANCEL_BUFF 0x2A

    An easy example Maple Warrior.

    You know what Maple Warrior does right? All stat% up.

    In MapleStatEffect is where most sources handle this inside MapleStatEffect loadFromData

    Take for example now the Maple warrior skill for Zero

    Code:
    case 100001268:
    break;
    You registered the buff, but due to nothing else done it won't do anything effect wise.

    You sniffed Maple_warrior and realized it has a mask of 0x8, 2 that 0x8, 2 will be the effect for Maple warrior, it's what gives it it's effect. It is the all stats % up just like how for the zero skill Divine Force, it's aura is created by this mask 0x1000, 11.

    Now that you have

    Code:
    case 100001268:
    break;
    you should want to make it work, but of course you have many Maple warrior skills already registered there so you'd really only have to add a new case, but pretend it's new! :(

    Code:
    case 100001268:
    ret.statups.put(MapleBuffStat.MAPLE_WARRIOR, ret.info.get(MapleStatInfo.x));
    break;
    P.S the ending with the property is different between sources / how it's done
    Putting that mask MAPLE_WARRIOR for the buff 100001268 with a property of x. Now wtf where is the property at!? THE WZ :D

    it's under common/ in the wz it's x. - I tend to guess at this part for that, but since like.. some are indiebooster and I know that buff has a mask which is about a booster, it fits with that. The wind archer skill Storm Elemental gives damage percent + and inside it's wz under common/ you see a property indieDamR so that goes with that. Just my $0.02

  11. #11
    Member JessVanity is offline
    MemberRank
    Jan 2014 Join Date
    61Posts

    Re: Learning how to Fix/Add Buffs/Skills (Buffstats)

    Yeah that makes sense ;) Okay, but can there be 2 buffstats for 1 skill?

    what about this part, after the mask?
    PHP Code:
    03 00 00 00
      00 00 53 04 
    AD E0 00 00 
    00 00 00 B5 
    49 00 00 00 
    00 00 00 00 
    00 00 00 00 
    // ? 
    Hmm this seems easy to do, it cant be that easy? If it is why arn't so many skills not working? Also what are you using to edit/look into the Wz files? Thanks!

  12. #12
    Omega sunnyboy is offline
    MemberRank
    Mar 2010 Join Date
    6,109Posts

    Re: Learning how to Fix/Add Buffs/Skills (Buffstats)

    Quote Originally Posted by JessVanity View Post
    Yeah that makes sense ;) Okay, but can there be 2 buffstats for 1 skill?

    what about this part, after the mask?
    PHP Code:
    03 00 00 00
      00 00 53 04 
    AD E0 00 00 
    00 00 00 B5 
    49 00 00 00 
    00 00 00 00 
    00 00 00 00 
    // ? 
    Hmm this seems easy to do, it cant be that easy? If it is why arn't so many skills not working? Also what are you using to edit/look into the Wz files? Thanks!
    Wzexplorer/Harepacker to view inside wz

    That's part of givebuff, you'd have to update it for other buffs that dc you

    There can be many masks, kaiser transform has like 6 or w/e, but since there are 12 ints, they could be

    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF

    that would be the max amount of buffstats possible since 12 mask menu , but i dont wanna write out all possibilities cuz a lot of stuff lol

  13. #13
    Member JessVanity is offline
    MemberRank
    Jan 2014 Join Date
    61Posts

    Re: Learning how to Fix/Add Buffs/Skills (Buffstats)

    Hmm so what would the buffstat for that be:
    PHP Code:
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF 
    0xFFFFFFFF, ? (1 or 12?)

    Also for the part of givebuff I would need to edit it under the giveBuff packet? Thanks again.

  14. #14
    Omega sunnyboy is offline
    MemberRank
    Mar 2010 Join Date
    6,109Posts

    Re: Learning how to Fix/Add Buffs/Skills (Buffstats)

    Quote Originally Posted by JessVanity View Post
    Hmm so what would the buffstat for that be:
    PHP Code:
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF
    FF FF FF FF 
    0xFFFFFFFF, ? (1 or 12?)

    Also for the part of givebuff I would need to edit it under the giveBuff packet? Thanks again.

    Eh, that's a little more complex to talk about like.. lets take it as

    00 00 00 00 //12
    00 00 00 00
    00 00 00 00
    00 00 00 00
    00 0F 00 00 // 8
    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 //1

    Would be
    0x800, 8
    0x400, 8
    0x200, 8
    0x100, 8

    After the 48 bytes in every packet, you have other stuff that is inside giveBuff. The givebuff writes the 48 bytes (if you set your max buffstats to 12 anyway it will be 48) then the rest is just a bunch of statements for the other stuff

  15. #15
    Member JessVanity is offline
    MemberRank
    Jan 2014 Join Date
    61Posts

    Re: Learning how to Fix/Add Buffs/Skills (Buffstats)

    I dont understand this part
    PHP Code:
    00 00 00 00 //12
    00 00 00 00 
    00 00 00 00 
    00 00 00 00 
    00 0F 00 00 
    // 8
    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 
    //1

    Would be 
    0x800
    8
    0x400
    8
    0x200
    8
    0x100

    Why wouldn't it be 0xF00, 8? Where are you getting 0x800 , 400, 200, 100 from?
    Last edited by JessVanity; 08-01-14 at 03:51 AM.



Page 1 of 2 12 LastLast

Advertisement