I was able to mix the scripts by just importing the didhit.c content to the animation.c file. This way you will be able to use the spawnToss function throught @cmd.

And I erased one of the two spawn01 functions because once imported, both will be a part of the same library.
I attached both files for you in case you want to see how it will look. No need to make changes in the text.c file.
This is the result, both item/attack texts working together.