by Dargor
Version 1.3
Introduction
This little piece of code will display a scroll bar on the right side of any selectable window with more than 1 row.
Screenshots

That's all!
Script
Code:
#==============================================================================
# ** Scroll Bar
#------------------------------------------------------------------------------
# © Dargor, 2008
#Â 27/06/08
#Â Version 1.3
#------------------------------------------------------------------------------
#Â VERSION HISTORY:
#Â - 1.0 (26/05/08), Initial release
#Â - 1.1 (24/06/08), Prevent the Stack error
#Â - 1.2 (27/06/08), Added an option for Z-axis correction
#Â - 1.3 (27/06/08), Added an option to improve compatibility with RPGXP
#------------------------------------------------------------------------------
#Â INSTRUCTIONS:
#Â - Paste this above main
#Â - Edit the constants in Scroll_Bar module
#==============================================================================
#==============================================================================
# ** Scroll Bar Customization Module
#==============================================================================
module Scroll_Bar
 # Scroll Bar back color
 Back_Color = Color.new(0,0,0)
 # Scroll Bar color
 Bar_Color = Color.new(28,64,255)
 # Use Z-axis correction
 # (creates a new viewport for windows above a Scroll Bar)
 Z_Correction = true
 # Minimum viewport Z-axis
 Minimum_Z = 100
 # Used in RPG Maker XP
 XP = false
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#Â This is a superclass of all windows in the game.
#==============================================================================
class Window_Base < Window
 #--------------------------------------------------------------------------
 # * Alias Listing
 #--------------------------------------------------------------------------
 alias dargor_vx_scrollbar_window_base_initialize initialize
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(*args)
  dargor_vx_scrollbar_window_base_initialize(*args)
  if Scroll_Bar::Z_Correction && !Scroll_Bar::XP
   self.viewport = Viewport.new(0,0,Graphics.width,Graphics.height)
   self.viewport.z = Scroll_Bar::Minimum_Z
  end
 end
end
#==============================================================================
# ** Window_Selectable
#------------------------------------------------------------------------------
#Â This window contains cursor movement and scroll functions.
#==============================================================================
class Window_Selectable < Window_Base
 #--------------------------------------------------------------------------
 # * Alias Listing
 #--------------------------------------------------------------------------
 if @scroll_bar_stack.nil?
  alias dargor_vx_scrollbar_window_selectable_update update
  alias dargor_vx_scrollbar_window_selectable_dispose dispose
  @scroll_bar_stack = true
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
  # The usual
  dargor_vx_scrollbar_window_selectable_update
  # return if row_max = 0
  return if row_max <= 1
  # Create bar rect
  draw_scroll_bar
 end
 #--------------------------------------------------------------------------
 # * Draw Scroll Bar
 #--------------------------------------------------------------------------
 def draw_scroll_bar
  # Setup colors
  back_color = Scroll_Bar::Back_Color
  bar_color = Scroll_Bar::Bar_Color
  # Setup Rect
  bar_width = 4
  bar_height = (self.height - 32) / row_max
  bar_y = ((self.index / @column_max) * bar_height)
  loss = (self.height - 32) - ((@item_max * bar_height) / @column_max)
  loss = loss.to_f / @item_max.to_f
  bar_y += self.index * loss
  bar_x = self.x + self.contents.width - bar_width + 8
  # Create Bar Window
  if @bar_window != nil
   @bar_window.dispose
   @bar_window = nil
   @bar_window = Window_Base.new(bar_x,self.y,48,self.height)
  else
   @bar_window = Window_Base.new(bar_x,self.y,48,self.height)
   @bar_window.contents_opacity = 0
  end
  # Set Bar Window Attributes
  @bar_window.contents_opacity += 32
  @bar_window.opacity = 0
  unless Scroll_Bar::XP
   @bar_window.openness = self.openness
   @bar_window.viewport = self.viewport
  end
  @bar_window.visible = self.visible
  @bar_window.x = bar_x + 7
  @bar_window.y = self.y
  @bar_window.z = self.z
  @bar_window.height = self.height
  @bar_window.contents = Bitmap.new(@bar_window.width - 32, @bar_window.height - 32)
  @bar_window.contents_opacity = self.opacity if Scroll_Bar::XP
  # Create bar rectangles
  back_rect = Rect.new(0,0,bar_width,self.height - 32)
  bar_rect = Rect.new(0,bar_y,bar_width,bar_height)
  # Draw Bars
  @bar_window.contents.fill_rect(back_rect, back_color)
  @bar_window.contents.fill_rect(bar_rect, bar_color)
  for i in 0...bar_width
   x = i
   i_rect = Rect.new(x,0,1,i)
   @bar_window.contents.fill_rect(i_rect, Color.new(0,0,0,0))
   y = back_rect.height - i
   i_rect = Rect.new(x,y,1,i)
   @bar_window.contents.fill_rect(i_rect, Color.new(0,0,0,0))
  end
 end
 #--------------------------------------------------------------------------
 # * Dispose
 #--------------------------------------------------------------------------
 def dispose
  dargor_vx_scrollbar_window_selectable_dispose
  @bar_window.dispose if @bar_window != nil
 end
end
Notes
The script does NOT requires my Custom Commands script!!! XD
-Dargor