If it's just a simple weapon-script based item system.
PHP Code:
function addItem(itemname, quantity) {
player.addweapon(itemname);
clientr.item.(@itemname) += quantity;
}
Otherwise you're going the MUDLib route, and Ziro has one posted in the code gallery.