The theory of HTB is quite profound,it had cost me a few days to understand,so is there a handy and representative HTB scripting that I can use it and research it at the same time.Thanks.
I suggest you to look here,
http://mum.mikrotik.com/presentations/US09/megis_qos.pdf
You will find good PCQ example and Mangle+queue tree example, additionally you can look at queue examples in wiki.