It's not really complicated, but quite a lot of work
Basically it is like Romanez said.
This is the way i do it:
Export an animation of something similar to the one you want to add.
I use the mulpatcher to do this. You can choose to save the animation to a folder ("Save to Directory").
In the folder you will see a lot of bitmaps and some textfiles.
An ultima online animation consists of an image for every single frame of the animation plus an offset for both the x and the y value.
This offset determines where exactly the picture appears on the screen and are stored in the liste.txt.
The palette files... i think they change some colours, but you can just delete them. They are not needed for your new animation.
There are different types of animation with different numbers of frames. I would use a low-detailed (300 frames) animation for the shark.
You can see the type in mulpatcher. L : low, H : high, P : people and wearables.
The bitmaps names begin with the number of an animation cycle and end with the number of the frame in the cycle.
For example:
0_0.bmp
0_1.bmp
...
0_4.bmp
This is the cycle for "walking down" for a low detailed creature.
1_0.bmp
1_1.bmp
...
1_4.bmp
is the cycle for "walking down-left" etc.
Decide which frame of your new animation fits which frame of the original animation.
Then name your new frames accordingly.
The other thing is the positioning. If the sizes of an animation frame does not fit the size of the one it replaces, the positioning will be wrong.
One therefore has to reposition it. One way is to do it like Romanez said: place your pictures in the old animation's pictures. You can just use the old Offsets then.
Have you ever seen the awesome shields from Narja? (If not, look them up on uo-pixel.de!) They are also done this way. The original animation needs to be bigger than the new one of course.
But this is a lot of work. (I am not sure what can be done with the animedit programm Romanez mentioned.)
I am currently working on a program to simplify this. It allows you to go through all the frames and position them with your keyboard.
The basic functions are there, but it is still just a pile of code
Once you named and positioned all the frames, you can import them into you .mul files with the mulpatcher by simply using "Load from Directory". (Be sure to select an L-slot)
Finish!
With the "Save to File" option you can then export your animation into a handy .vd file.
There are some more details to make things more elegant, but this works just fine