You should go through the tutorial for 2d and 3d gaming before coding items.
As for the logic behind showing the weapon. You must have the image of the item, change the location to how you want the item to work. For a sword it is easy. By easy I mean a sword has a slashing motion, refer to final fantasy 2. As for a whip, or a boomerang, this ...