Watch out for the bug in which if you try to restore the costume having another item of the same kind in the inventory, it will fail to restore the costume. What this does is delete the item in the inventory and replace it for a new one, and it may cause to lose cards and refine on that item.
A simple solution is to use the condition countitem(item_id)>1 to stop the script if the player has more than one of these items.