if( countitem( itemID ) ){
set .@Value,X;
}
replace the itemID and X
*countitem(<item id>)
*countitem("<item name>")
This function will return the number of items for the specified item ID that the
invoking character has in the inventory.
mes "[item Checker]";
mes "Hmmm, it seems you have "+countitem(502)+" apples";
close;
Like 'getitem', this function will also accept an 'english name' from the
database as an argument.
If you want to state the number at the end of a sentence, you can do it by
adding up strings:
mes "[item Checker]";
mes "Hmmm, the total number of apples you are holding is "+countitem("APPLE");
close;