This script does two things for a specific NPC, Rabinna. First, if she has followed the player (AiPackage 3) then prep her death to handle all of the possible contingencies with her related quest. Second, if the player escorts her all the way to a character named Im Kilaya then she will leave the player and follow that NPC.
There is a different version of this script that was released with Morrowind. My contribution here was to rewrite the script accounting for all the possible times during the quest that Rabinna could die during her side quest. These changes fixed multiple bugs and oversights with the player journal while also accounting for the moon sugar item correctly.
There are also additional changes due to my changes with her planned combat in the original quest line.