Most of what I learned about scripting, in terms of program flow and optimization, comes from my programming experience. I took a class in programming in C++ which drastically changed the way that I script (for the better, I like to think). That and my hobby of GBA programming, which has especially helped for ASM, but that's a different story. Basically, what I'm saying is that I have a lot of previous knowledge with programming that I can apply to scripting, which are both very similar. For me to teach you would be too difficult because there aren't really any general techniques that I can show you. Instead, you have to view each situation, each script as an individual. Though one bit of advise I could offer you is to use variables. I didn't use them at all when I started scripting and very rarely at all until I took my programming class when I realized how valuable they are. I can't really teach you about their use and how important they are but you should definitely pay close attention to the variable section of whatever scripting tutorial you read. In my opinion, it's what separates the novice scripters from the good ones.