%image
Probably means it's looking for an item's image.
wrenchImage
hammerImage
Here's some example code with some revised code:
(the old one was styled for an event)
function Player::addItem(%this,%image)
{
for(%i = 0; %i < %this.getDatablock().maxTools; %i++)
{
%tool = %this.tool[%i];
if(%tool == 0)
{
%this.tool[%i] = %image;
%this.weaponCount++;
messageClient(%this.client,'MsgItemPickup','',%i,%image);
break;
}
}
}
findclientbyname(heed).player.addItem(wrenchImage);