For changing the item of %obj in inventory slot %slot with hammerItem,
%obj.tool[%slot] = hammerItem.getID();
commandToClient(%obj.client, 'msgItemPickup', "", %slot, hamerItem.getID(), 1);
For changing the image held in %obj's right hand with hammerImage,
%obj.mountImage(hammerImage, 0);