Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

NPC command, getItemQuantity

Junior Spellweaver
Joined
Jul 14, 2008
Messages
130
Reaction score
2
This command is used to find the quantity of an item that a player has.
if the player does not have the item, it will return '0'

go into net.sf.odinms.scripting.AbstractPlayerInteraction.java

and insert
Code:
        public int getItemQuantity(int itemid) {
            MapleInventoryType type = MapleItemInformationProvider.getInstance().getInventoryType(itemid);
            MapleInventory iv = c.getPlayer().getInventory(type);
            int quantity = iv.countById(itemid);
            return quantity;
        }

under the FUNCTION
Code:
public boolean haveItem(int itemid, int quantity, boolean checkEquipped, boolean greaterOrEquals)


ok XD pay attention cuz im going to release a "fake" HT hp bar.
 
Junior Spellweaver
Joined
Apr 21, 2007
Messages
158
Reaction score
1
Re: [Release] NPC command, getItemQuantity

Nice release. :D
Looking forward for the 'fake' HT hp bar... :X
 
Junior Spellweaver
Joined
Jul 14, 2008
Messages
130
Reaction score
2
Re: [Release] NPC command, getItemQuantity

im sneaking on the comp... and i got banned from it.. ooh wont be for another 2 - 3 hours until i can sneak on again..
 
LeviathanStory
Joined
Apr 21, 2007
Messages
251
Reaction score
0
Re: [Release] NPC command, getItemQuantity

Whats the difference between cm.haveitem([id], [amount]);
 
Junior Spellweaver
Joined
Jul 14, 2008
Messages
130
Reaction score
2
Re: [Release] NPC command, getItemQuantity

Whats the difference between cm.haveitem([id], [amount]);

cm.haveitem compares the item and the quantity.
my command gets the item's quantity.
 
Newbie Spellweaver
Joined
Apr 2, 2008
Messages
93
Reaction score
0
Re: [Release] NPC command, getItemQuantity

Im pretty sure '#c[itemid]#' works in same way o.o
 
Back
Top