The most important thing, by far, when programming is skill with logic. That is, the ability to break a complex problem into smaller pieces, and the ability to link the pieces together using branches and loops, to create the desired result. No matter what script you're writing, that process is required.
As for math --- knowing basic algebra is probably nearly essential, since that focuses on math expressions and more importantly creating expressions from word problems (which is what we do when programming, on some level). That doesn't mean the programmer needs to have mastered everything in algebra, but needs to know the basic concepts of simple math expressions and so forth.
As for the more complex math like sines, cosines, etc, the programmer may need to know how to use them, functionally, but doesn't need to understand them. I know what sines and cosines are, but even when I use them, I only care that "multiplying the sine of an angle by the length of a line creates the height of the line on the Y axis, and the cosine does the same for the X axis."
The best way to learn scripting is to start with basic Ruby and learn by simple example, then modifying those simple examples and finally creating your own custom, simple classes that run OUTSIDE the RGSS3 scripting engine. Why? That keeps the amount of things you need to keep track of to a minimum. Once you're comfortable with making simple Ruby scripts, that's when it's good to jump into RGSS3, because you'll be comfortable with simple objects and the likes.