Hello there fellow modders!
I'm trying to make a spell for my mod "Essence Transfer" that - when cast on a container - looks for an enchanted item in it, and stores the name of the enchantment in a variable, but if the item in the container is not enchanted, it applies the stored value of the variable to it, thus making the previously ordinary object enchanted.
Example:
I have a unique sword. I like the enchantment on it, but I want it to look different.
I put the unique sword in the container, and cast the spell on the container.
The enchantment is extracted to the variable (and the unique object is probably destroyed for balancing purposes).
I then put the blank sword into the container and cast the spell again.
The script applies the enchantment to it, and voila; I have a different looking sword, with the same properties.
Thank you for your help! I'm not much of a scripter