NPC command, getItemQuantity
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.
Re: [Release] NPC command, getItemQuantity
Nice release. :D
Looking forward for the 'fake' HT hp bar... :X
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..
Re: [Release] NPC command, getItemQuantity
Quote:
Originally Posted by
0aix2
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..
ROFLMAO! What did you do to get banned from the Comp.???:eek:
Re: [Release] NPC command, getItemQuantity
Whats the difference between cm.haveitem([id], [amount]);
Re: [Release] NPC command, getItemQuantity
Re: [Release] NPC command, getItemQuantity
Quote:
Originally Posted by
powerboi105
Whats the difference between cm.haveitem([id], [amount]);
cm.haveitem compares the item and the quantity.
my command gets the item's quantity.
Re: [Release] NPC command, getItemQuantity
Im pretty sure '#c[itemid]#' works in same way o.o
Re: [Release] NPC command, getItemQuantity
Quote:
Originally Posted by
tamekii
Im pretty sure '#c[itemid]#' works in same way o.o
thats wat i thought >_>