Jump to content
  • 0

MAX_AMOUNT


Peopleperson49

Question


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

What is the maximum I can set for MAX_AMOUNT without errors? I want to implement a coin system as a special type of currency, however, it doesn't make sense for players to only be able to carry around 30,000 of them. After some playing around with it, it seems like anything above 32767 gets weird. Thanks.

 

Peopleperson49

Edited by Peopleperson49
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

since amount is short by default, the max is 32767

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Is there a way to increase it to a much larger number or have the item fill additional inventory slots when it is greater than 30,000? A lot of servers use custom item/coins for various things and with the extended cash shop its easier than ever to use your own currency. Being such a small number is very limiting. Thanks.

 

Peopleperson49

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

32767 is greater than 30000. /heh

I think if you need more than that short limit, you need to change the packet stuffs I think, but also not sure, the client can show the item amount more than 32767 or not.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   33
  • Joined:  12/24/11
  • Last Seen:  

32767 is greater than 30000. /heh

I think if you need more than that short limit, you need to change the packet stuffs I think, but also not sure, the client can show the item amount more than 32767 or not.

 

Maybe. There is 4 Bytes in the packet for the item amount as far as I see, or does the server append anything of 2 Byte at the end of a packet? Then it would only be two bytes. I checked for ZC_ITEM_FALL_ENTRY, which is 19 Bytes and the amount (as the last entry) starts at offset 15.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   33
  • Joined:  12/24/11
  • Last Seen:  

Just an idea (sorry for doublepost):

Could you add another entry in the inventory after 30.000? Like the item appears like a weapon twice? Or will the client block that? Just playing around with ideas.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

That would be good if it would do it. Who knows.

 

Peopleperson49

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...