Scripting is something not really easy when it the first time... and a lot harder when we talk about a bot... Check out DALnet's #HelpDesk Documents part of their site where you can find verry usefull information.