Items X 100 for storage boxes

Results 1 to 2 of 2
  1. #1
    Noob Prot is offline
    True MemberRank
    Jan 2007 Join Date
    Gurgaon, IndiaLocation
    515Posts

    Items X 100 for storage boxes


    RaGEZONE Recommends

    RaGEZONE Recommends

    Recently someone asked me the logic behind storage box SQL Codes. I simply told him to use the search option. He ended up to a thread with a Tutorial.
    Quote Originally Posted by iNs@nE View Post
    Hey, Just wanted to add some stuff..!!

    One can easily guess the codes for a box of a particular items..!!
    Lemme explain how..!!

    Let us consider a Box of UJ's..!!
    The Code is 17;1644544;659990;0
    The Code for UJ is 6144
    The Code for A Storage Box is 17

    So if we didnt know the code for the box, we could form it like this.
    17 (code of storage box);164 (constant)45(61{from UJ Code}-16{constant value})44(last 2); Item ID; Item Slot
    So basically the code ends up to be 17;16445144;Item ID;Item Slot

    This works for all. Why do we have to substract 16 - thats a long story and not necessary here..

    For eg now, you need to make a box of Peridots, now how do we get it..?
    The code for Peridot is 8417.
    SO the box will be 17;164 (constant) 68 (84-16) 17;Item ID; Slot
    So the code for the box of peridots is 17;1646817;Item ID; Slot

    Same way Soul of Silbadu is 9685, so box code is 17;1648085;Item ID; Slot

    Hope this helps..

    And as for the Item ID slot - you could use ... 131845 - universal box code.. :D
    Unfortunately, generating a box of HP candy (Item code is 9) using this logic isn't possible I guess.

    Here is a simple tutorial for this one.

    Let's consider the code of 100 UJ

    The Code is 17;1644544;659990;0
    The Code for UJ is 6144
    The Code for A Storage Box is 17

    And the constant Zoneserver uses to calculate the Count of items in a storage box is 16384
    Simple logic to generate a box will be

    17; (16384 x ItemCount) + ItemCode ;659990;0

    To reverse the process (to get the details of the codes)

    Simply,

    Take 1644544 (from the example code of 100 UJ box)
    Now, we will divide 1644544 by the constant 16384 and will get the remainder out of it. The remainder will the Item code of the item and the Quotient will be the count of the Item in the storage box.

    In PHP you can simply use this to get the details :
    PHP Code:
    $itemnumber fmod($2ndcode16384);$bb = $2ndcode $itemnumber;$count $bb 16384
    Read Rules before posting.

    A3 Section Rules
    War Inc Section Rules
    Ran Online Section Rules

    Please Don't PM me offers. I will never work for money. If you want help, ask using the forums.

    Regards,
    Prot


  2. #2
    Programmer cyberinferno is offline
    True MemberRank
    Jun 2009 Join Date
    BangaloreLocation
    468Posts

    Re: Items X 100 for storage boxes

    What if I use item code of some weapon or armor? Will the storage box get bugged?

    Bit out of topic question : Do you know how to make some items be stored in storage box which currently as are not possible to drop into storage box?
    Have a look at my simple Discord bot https://github.com/cyberinferno/discord-chum




Advertisement