Does killing something dispel the polymorph spell cast on it?
I believe Tavis is composing a blog post about the history of polymorph, but I'll scoop him: it is, and always has been, a hot mess.
Gygax and Arneson wrote:
Polymorph Self: A spell allowing the user to take the shape of anything he desires, but he will not thereby acquire the combat abilities of the thing he has polymorphed himself to resemble. That is, while the user may turn himself into a dragon of some type, he will not gain the ability to fight and breathe, but he will be able to fly. Duration: 6 turns + the level of the Magic-User employing it.
Polymorph Others: Unlike the spell to Polymorph Self, this spell lasts until it is dispelled. The spell gives all characteristics of the form of the creature, so a creature polymorphed into a dragon acquires all of the dragon's ability — not necessarily mentality, however. Likewise, a troll polymorphed into a snail would have innate resistance to being stepped on and crushed by a normal man. Range: 6".
It sounds like the Sloth was a victim of Polymorph Other, and therefore shall be forever a Sloth, even if killed, until a Dispel Magic is cast upon him.
If the caster is killed is the spell dispelled?
It's a good question. That doesn't seem to be the case for stuff like Wizard Lock, Curse, or Continual Light, however, which also last until dispelled.
Can some other interested parties chime in on this?
Here is a very direct solution, though it is expensive:
Zolobachai's Stupendous Sieve
Level: Magic-User 3 (maybe 2?)
Range: 0
Duration: 1 turn
This spell temporarily enchants a cooking sieve to sort out valuables from dross. Shake the sieve vigorously, and each pass through the sieve extracts one item or limb. Subsequent items or limbs require another casting of the spell.
Thus, all we need to do is find a sieve big enough to hold a sloth, or a Purple Worm casting, and bingo! We don't have to negotiate with or slay anybody, no getting screwed on badly-worded wishes, no crazy quests. So long as Zekon is at least 9th level, I think we'd have enough time to research it and raise Maldoor before he goes "stale."
Warning: this spell has not yet been researched. To do so will require 1000 x 2^(level) gold pieces, and takes one week at a 20% chance of successful research. Increasing the amount of cash increases the odds of success, such that 5000 x 2^(level) gold = 100% successful research.
My thought would be to burn 27,000 gold (14,000 if it's a 2nd level spell) to have a 70% chance of success (Tavis tells me that's a relatively trivial sum to you guys), and if that fails we handle matters the usual way. I'll think about how to do that later tonight.