The basic set up of any script is usually like so... (rough and plain example)
#===============================================================================
# ~* Apples Vs Oranges *~
#===============================================================================
# Written by  : You
# Version   : 0.0?
# Last Update : 4/20/69
# Created   : 4/20/69
#===============================================================================
# These constants need to be set to variable ID's in the database.
Apples = 1
Oranges = 2
#===============================================================================
# ** Apples_Vs_Oranges
#===============================================================================
class Apples_Vs_Oranges
 #--------------------
 # * Initialize Method
 #--------------------
 def initialize
  # Initialize Method here, the values the variables will start out at
  # when the script is first called.
  @apples = apples
  # If you notice, these variables look the same, one is an Instance variable,
  # the other is a class variable.
  @oranges = apples
  # Now, you're going to execute the 'main' method
  main
 end
 #----------------
 # * Update Method
 #----------------
 def main
  if @apples > @oranges
   print("You have more apples than oranges.")
  elsif @apples < @oranges
   print("You have more oranges than apples.")
  elsif @apples == @oranges
   print("You have the same ammount of apples and oranges.")
  end
 end
 #----------------
 # * Apples Method
 #----------------
 def apples
  if $game_variables[Apples] != @apples
   return $game_variables[Oranges]
  end
 end
 #-----------------
 # * Oranges Method
 #-----------------
 def oranges
  if $game_variables[Oranges] != @oranges
   return $game_variables[Oranges]
  end
 end
end
Very generic example, copy and paste it into your editor to get a better view of it and read the comments. If you have any questions, like "Well what exactly is '$game_variables[Oranges]' do?" then let me know.
The variables are probably the most confusing part to a new scripter, which one is used for what...
First off, a '@variable' is an instance variable, it doesn't really store any data unless the script is called. I set an instance variable to be the same value as a class or method variable, so it can do the math and the class variable isn't changed unless it needs to be.
Secondly a 'variable' is a class or method variable, these are more permanently referenced to in the script, and are determined by a method. Not sure how to explain it, just look at the example and let me know if I've already lost you.
Thirdly, a 'Constant' or 'CONSTANT' (ie Apples and Oranges) is a variable that you usually use for public settings, these always start with an Uppercase letter and cannot be changed mid-script. This is very useful for people who make public scripts, as they can be defined up top of the script without being inside a 'class', and it makes great for public settings. (ie USER_BGM is a constant telling the user to specify which BGM they want the script to play.)
A '$variable' is known as a global variable (which serious scripters know not to use very often), but is useful for multi-class scripts, as these variables can be read and written from any and all scripts... if you notice, I don't use any global variables in this script because they're not needed.
I'm not sure what else you might want to know, but try to read the help file if you need to understand basic terminology and functions, then come back here if you're unclear on a certain aspect of Ruby/RGSS(2?)
If you've got a good understanding of that thus far, then maybe tonight I'll try to teach you how to make a simple Window and Scene script from scratch (although I've never made one for VX before.) But before I go that far in helping you, I want to make sure you're understanding the basic gist of RGSS/2 scripting. Good luck with it wharfe! :thumb: