item_db equipment masking troubles

prism

New member
Messages
69
Points
0
I really don't understand why I can't get this to work. I want to make an armor that can be equipped by Sniper, Priest, Champion, Gunslinger, High Wizard and Professor. However, the masking refuses to work and it doesn't make sense.

0x4218900

This is what I have for the mask. It works perfectly except for High Wizard. Wizard mask is 200 right? If i add 200 to that value Snipers can no longer equip it. If i just do 0x800, Sniper can equip. If i do 900, it can still equip. If i do 1100 to add Wizard, it breaks. If I do 200 for just Wizard it's fine. As soon as I add 800 to any item and it goes past the 999 mark the item breaks. Why?

 
Last edited by a moderator:
You're using it a bit wrong, I think?

This is a bit different tecnique. You're adding this masks like they are in decimal, but that "0x" shows that they are in hexadecimal mode, so count goes like:

0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xA 0xB 0xC 0xD 0xE 0xF 0x10 0x11 ... and so on

So if you add up 0x800 and 0x200 you'll get 0xA00, and not 0x1000.

If i got everything right your mask should look like this:

Code:
  0x00000100+ 0x00000200+ 0x00000800+ 0x00008000+ 0x00010000+ 0x01000000Total: 0x01018B00
 
Last edited by a moderator:
I gave you some wrong information. I actually wanted Sniper, Priest, Champion, Ninja, High Wizard and Professor. I was able to figure it out though with your advice about the hex code. Thanks a lot. It was pretty frustrating not knowing why it wasn't working.

 
Last edited by a moderator:
Back
Top