we've already shown you the basics of what you're wanting.

You should open the help file and read the help sections on some of the things we've already mentioned, eg: /help $hget

This forum is supposed to be for helping you write your own script, not having one of us write it for you, especially in bits and pieces.

If you want one written for you, make a list of all of the things that you want in it, then ask for the full thing.

Some of the people here will write full codes, plus there are sites like Hawkee where you can request full scripts/snippets to be written.