Fresh prince Posted September 22, 2014 Group: Members Topic Count: 69 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 10/14/12 Last Seen: June 12, 2021 Share Posted September 22, 2014 Hello rathena, Can someone make a npc that checks if a player has 100 and over items in his/her inventory before proceeding? Like: If items are over 100; Mes " you cannot continue because your items in your inventory is over 100 different items"; Else; proceed. Something like this. Why? To prevent items from falling when getitem, if the players inv has 100+ different items. Thanks!! Quote Link to comment Share on other sites More sharing options...
1 Emistry Posted September 22, 2014 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted September 22, 2014 getinventorylist; if ( @inventorylist_count >= 100 ) { mes "You have 100 different items in ur inventory."; close; } 2 Quote Link to comment Share on other sites More sharing options...
Kenjic Posted September 22, 2014 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 22 Reputation: 2 Joined: 01/16/13 Last Seen: October 22, 2015 Share Posted September 22, 2014 (edited) Something like this man.. based of your question. You have to give more detail...mes "[item Checker]";if(countritem(502) > 100) goto L_Checker;L_Checker:mes "[item Checker]";mes "you cannot continue because your items in your inventory is over 100 apples";close;if you want more then one item do thisif ((countritem(502) > 100) || (countritem(502) > 100) goto L_Checker; Edited September 22, 2014 by Kenjic Quote Link to comment Share on other sites More sharing options...
Fresh prince Posted September 22, 2014 Group: Members Topic Count: 69 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 10/14/12 Last Seen: June 12, 2021 Author Share Posted September 22, 2014 Thank you for your response bro. My question is this, if i have 100+ dofferent items in my inventory, and for example i opened an obb or ovb, it will drop to the ground. Im looking for a script or an item script where it checks of a player has more than 100 different items in his inventory. Anothe example is when you decard a compunded weapon, if you have more than 100+ items on your inventory, your cards from the decard will fall off the ground. I need like: Npc goes like checking a players inventory first if he has more than 100+ items on inventory if yes, close; If not, proceed. Something like that. Thanks you!! Btw, 100+ different items means the maximum allowable different items a player can carry. My client was setup like that Quote Link to comment Share on other sites More sharing options...
Kenjic Posted September 22, 2014 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 22 Reputation: 2 Joined: 01/16/13 Last Seen: October 22, 2015 Share Posted September 22, 2014 Ok I see.. it will have something to do with these command.. but I need to experiment..getinventorylist;This command sets a bunch of arrays with a complete list of whatever theinvoking character has in their inventory, including all the data needed torecreate these items perfectly if they are destroyed. Here's what you get:@inventorylist_id[] - array of item ids.@inventorylist_amount[] - their corresponding item amounts.@inventorylist_equip[] - whether the item is equipped or not.@inventorylist_refine[] - for how much it is refined.@inventorylist_identify[] - whether it is identified.@inventorylist_attribute[] - whether it is broken.@inventorylist_card1[] - These four arrays contain card data for the items.@inventorylist_card2[] These data slots are also used to store names@inventorylist_card3[] inscribed on the items, so you can explicitly check@inventorylist_card4[] if the character owns an item made by a specificcraftsman.@inventorylist_expire[] - expire time (Unix time stamp). 0 means never expires.@inventorylist_bound[] - whether it is bound to the character@inventorylist_count - the number of items in these lists.This could be handy to save/restore a character's inventory, since no othercommand returns such a complete set of data, and could also be the only way tocorrectly handle an NPC trader for carded and named items who could resell them- since NPC objects cannot own items, so they have to store item data invariables and recreate the items.Notice that the variables this command generates are all temporary, attached tothe character, and integer.Be sure to use @inventorylist_count to go through these arrays, and not'getarraysize', because the arrays are not automatically cleared between runsof 'getinventorylist'. 1 Quote Link to comment Share on other sites More sharing options...
Capuche Posted September 22, 2014 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted September 22, 2014 Use checkweight to make sure the total weight of the items does not exceed the character's carrying capacity and to check if he has a free 'inventory slot' (i.e. the quote) it checks of a player has more than 100 different items in his inventory 1 Quote Link to comment Share on other sites More sharing options...
Fresh prince Posted September 22, 2014 Group: Members Topic Count: 69 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 10/14/12 Last Seen: June 12, 2021 Author Share Posted September 22, 2014 Thank you masters, will never thrive without you guys ! Quote Link to comment Share on other sites More sharing options...
Question
Fresh prince
Hello rathena,
Can someone make a npc that checks if a player has 100 and over items in his/her inventory before proceeding?
Like:
If items are over 100;
Mes " you cannot continue because your items in your inventory is over 100 different items";
Else; proceed.
Something like this. Why? To prevent items from falling when getitem, if the players inv has 100+ different items.
Thanks!!
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.