Jump to content
  • 0

Check max item slot in inventory


Pillows

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   2
  • Joined:  08/12/12
  • Last Seen:  

Here's the problem. Card remover, even having a over-weight check, drops equipped items (the one they want to remove cards) when the player has too many item slots occupied in their inventory, as long as they are not over-weight. Is it possible to check if the player has reach the maximum number of items slots in their inventory before proceeding?

I don't know if equipment with cards causes a problem, but I would guess that as long as the it checks for the limit to be 4 slots under the maximum, there should be no way to abuse the system.

Edited by Pillows
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

add this to your script before the npc remove card from the item

getinventorylist;
if( @inventorylist_count > 95 ){
	mes "Your inventory slot is getting full, please remove some item";
	close;
}
  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   2
  • Joined:  08/12/12
  • Last Seen:  

 

add this to your script before the npc remove card from the item

getinventorylist;
if( @inventorylist_count > 95 ){
	mes "Your inventory slot is getting full, please remove some item";
	close;
}

Thanks a lot! I couldn't find this anywhere.

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...