Here's how to dupe an item without any hacking:
1. Use Town portal.
2. Set any item in front of the portal.
3. Click with the mouse on the item and step through the portal.
4. When you reach the town the item will be in your inventory.
5. Go back through the portal and the item will be where you left it.