1. I'd like to be able to select a dialogue option with an NPC and, as a result, have them use a specific animation (playing an instrument) and have a sound file play (music) simultaneously. The sound file and animation would loop until the player speaks to the NPC again.
I know the former is probably done in a few naughty mods, but I'd really prefer to not install those just to see how they work. It would have something to do with setting the animation to an AI package, like alchemy and reading, yes? Then scripting it to toggle on after the dialogue is selected, but then off again if NPC.istalking. Something like that; even with my minimal scripting knowledge, I might be able to make it work. But how do I get the sound file to play?
2. I'd like to be able to command an NPC to lockpick something, preferably via dialogue.
As for the second, Talkie Toaster does something similar in his wonderful Companion Share and Recruit mod. However, there is so much framework in place for it, what with the command keys and orders system; even were I to ask him for permission to use his scripts, I don't know if I could dissect it well enough to use on an individual, stand-alone companion. An illusion of lockpicking with the NPC casting a dummy spell would work, but I wouldn't know how to make them target the nearest locked object. Maybe with OBSE?