coded 'pick up loot' function