Aaah, sounds familiar. Here is what I did: First I printed out all scripts I could get to work. I studied them, took them with me whereever I'd had the time to stare and made notes with pencil or pen on them. Next I copied pasted some of their procedures and made it work into my own scripts. Then I printed out every include I could find and studied, ordered and combined them into SRL
During my early days of scripting I discovered some basic rules.
Rule 1. Wait. When something goes wrong in your script it is probably because you haven't waited long enough. There is plenty of time in rs. It is a boring repetetetive games you see? And sloooow. So wait. Wait for things to happen. Wait for visual clues, changes in the inventory, sudden nearby changes in color, changes in the chattext, minimap, uptext, stats. Every visual clue is covered in SRL and all have their functions and procedure. Tip: While waiting, perform findnormalrandoms 4 times a second. Dont wanna miss a random.
Rule 2. Break out if every loop! Seriously: Break out if every loop!!!!! Trust me: I have been there

If even you make just one tiny little simple quick and dirty endless little loop inside your complex script, you'll be sure to find your player the next day dead in lumby poking the client's upperleft corner with the right mouse.
Rule 3. Keep It Simple Silly. I have always made my script with the KISS principle. Simple and readable. You can make your code complex, but that doesnt mean it is effective in rs. Simple code can be beautiful too!
But seriously...if you have a printer...
WT.