That's really complex, and i'm so bored to write code right now, that i don't even write any for my script!
Anyway, let's start by saying that you need to use a variable as a counter, in order to determine if it's the first time your script is used. Use the on *:START: event here.
Next, you need to prompt the user for input for the nicks, passwords and e-mail addresses. I recommend designing a dialog window. Dialog Studio
will help you a great deal (only) on designing your dialog. You must write its functions on your own. Try making a drop-down combo box with 5 entries for each input you need. A good idea is to store data in the variables only if data is given. This will help us out a bit later and make the code faster.
Finally, if i got it right, you want your script to register the nick once you connect to the server. Use on *:CONNECT: for that one. I'm an IRCnet'er, so i don't quite remember the NickServ commands, and as i said, i'm bored now. Upon connect, try to make an IDENTIFY, and if an error comes up, then it means you're not registered. Register, disconnect and reconnect. That should work fine, but might need some on *:SERVNOTICE: or sth like that.
Hint: When your script has finished reconnecting, use an echo like "Register procedure successfully terminated!" to make it more interactive
(The code for this should go in the previous on Connect, use a variable to determine if you'll follow the register process.)
And here's our end. Write some (hell of a) code and then start testing and debugging. That's the only way to make such a thing. And also: DON'T BE LAZY LIKE ME! Use 100% of your brain cells in programming. It does goooooood!!
Hope i helped,