[VX] Advanced Weather
By: Ccoa/Darkleo
Introduction
I was looking for a weather script for VX, but I don't find one.
So I took an old XP script from Ccoa and convert it for VX.
Please read the beginning of the script to know how to use it.
Screenshots
It's hard to take a screenshot showing leafs swirling on the screen, or showing the thunder. So...
Script
Credits and Thanks
You must credit Ccoa for the original version of this script (for XP)
You can credit Darkleo for this version (for VX)
Darkleo.
By: Ccoa/Darkleo
Introduction
I was looking for a weather script for VX, but I don't find one.
So I took an old XP script from Ccoa and convert it for VX.
Please read the beginning of the script to know how to use it.
Screenshots
It's hard to take a screenshot showing leafs swirling on the screen, or showing the thunder. So...
Script
Code:
#==============================================================================
# ** Spriteset_Weather
# VX version by Darkleo ; from XP version by ccoa
#------------------------------------------------------------------------------
# Weather Types :
# 1 Â - rain
# 2 Â - storm
# 3 Â - snow
# 4 Â - hail
# 5 Â - rain with thunder and lightning
# 6 Â - falling leaves (autumn)
# 7 Â - blowing leaves (autumn)
# 8 Â - swirling leaves (autumn)
# 9 Â - falling leaves (green)
# 10 - cherry blossom (sakura) petals
# 11 - rose petals
# 12 - feathers
# 13 - blood rain
# 14 - sparkles
#
# Weather Power and Duration :
# See the normal "Set Wheather Effect..." command
#
# Usage :
# Create a call script with the following:
# $game_map.screen.weather(type, power, duration)
#==============================================================================
Â
class Spriteset_Weather
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(viewport = nil)
  @type = 0
  @max = 0
  @ox = 0
  @oy = 0
  @count = 0      # new
  @current_pose = []  # new
  @info = []      # new
  @countarray = []   # new
 Â
  color1 = Color.new(255, 255, 255, 160)
  color2 = Color.new(255, 255, 255, 80)
  @rain_bitmap = Bitmap.new(7, 56)
  for i in 0..6
   @rain_bitmap.fill_rect(6-i, i*8, 1, 8, color1)
  end
  @storm_bitmap = Bitmap.new(34, 64)
  for i in 0..31
   @storm_bitmap.fill_rect(33-i, i*2, 1, 2, color2)
   @storm_bitmap.fill_rect(32-i, i*2, 1, 2, color1)
   @storm_bitmap.fill_rect(31-i, i*2, 1, 2, color2)
  end
  @snow_bitmap = Bitmap.new(6, 6)
  @snow_bitmap.fill_rect(0, 1, 6, 4, color2)
  @snow_bitmap.fill_rect(1, 0, 4, 6, color2)
  @snow_bitmap.fill_rect(1, 2, 4, 2, color1)
  @snow_bitmap.fill_rect(2, 1, 2, 4, color1)
 Â
  # new wheathers
  blueGrey = Color.new(215, 227, 227, 150)
  grey = Color.new(214, 217, 217, 150)
  lightGrey = Color.new(233, 233, 233, 250)
  lightBlue = Color.new(222, 239, 243, 250)
  @hail_bitmap = Bitmap.new(4, 4)
  @hail_bitmap.fill_rect(1, 0, 2, 1, blueGrey)
  @hail_bitmap.fill_rect(0, 1, 1, 2, blueGrey)
  @hail_bitmap.fill_rect(3, 1, 1, 2, grey)
  @hail_bitmap.fill_rect(1, 3, 2, 1, grey)
  @hail_bitmap.fill_rect(1, 1, 2, 2, lightGrey)
  @hail_bitmap.set_pixel(1, 1, lightBlue)
 Â
  color3 = Color.new(255, 167, 192, 255) # light pink
  color4 = Color.new(213, 106, 136, 255) # dark pink
  @petal_bitmap = Bitmap.new(4, 4)
  @petal_bitmap.fill_rect(0, 3, 1, 1, color3)
  @petal_bitmap.fill_rect(1, 2, 1, 1, color3)
  @petal_bitmap.fill_rect(2, 1, 1, 1, color3)
  @petal_bitmap.fill_rect(3, 0, 1, 1, color3)
  @petal_bitmap.fill_rect(1, 3, 1, 1, color4)
  @petal_bitmap.fill_rect(2, 2, 1, 1, color4)
  @petal_bitmap.fill_rect(3, 1, 1, 1, color4)
 Â
 Â
  brightOrange = Color.new(248, 88, 0, 255)
  orangeBrown = Color.new(144, 80, 56, 255)
  burntRed = Color.new(152, 0, 0, 255)
  paleOrange = Color.new(232, 160, 128, 255)
  darkBrown = Color.new(72, 40, 0, 255)
  @autumn_leaf_bitmaps = []
  @autumn_leaf_bitmaps.push(Bitmap.new(8, 8))
  # draw the first of the leaf1 bitmaps
  @autumn_leaf_bitmaps[0].set_pixel(5, 1, orangeBrown)
  @autumn_leaf_bitmaps[0].set_pixel(6, 1, brightOrange)
  @autumn_leaf_bitmaps[0].set_pixel(7, 1, paleOrange)
  @autumn_leaf_bitmaps[0].set_pixel(3, 2, orangeBrown)
  @autumn_leaf_bitmaps[0].fill_rect(4, 2, 2, 1, brightOrange)
  @autumn_leaf_bitmaps[0].set_pixel(6, 2, paleOrange)
  @autumn_leaf_bitmaps[0].set_pixel(2, 3, orangeBrown)
  @autumn_leaf_bitmaps[0].set_pixel(3, 3, brightOrange)
  @autumn_leaf_bitmaps[0].fill_rect(4, 3, 2, 1, paleOrange)
  @autumn_leaf_bitmaps[0].set_pixel(1, 4, orangeBrown)
  @autumn_leaf_bitmaps[0].set_pixel(2, 4, brightOrange)
  @autumn_leaf_bitmaps[0].set_pixel(3, 4, paleOrange)
  @autumn_leaf_bitmaps[0].set_pixel(1, 5, brightOrange)
  @autumn_leaf_bitmaps[0].set_pixel(2, 5, paleOrange)
  @autumn_leaf_bitmaps[0].set_pixel(0, 6, orangeBrown)
  @autumn_leaf_bitmaps[0].set_pixel(1, 6, paleOrange)
  @autumn_leaf_bitmaps[0].set_pixel(0, 7, paleOrange)
 Â
  # draw the 2nd of the leaf1 bitmaps
  @autumn_leaf_bitmaps.push(Bitmap.new(8, 8))
  @autumn_leaf_bitmaps[1].set_pixel(3, 0, brightOrange)
  @autumn_leaf_bitmaps[1].set_pixel(7, 0, brightOrange)
  @autumn_leaf_bitmaps[1].set_pixel(3, 1, orangeBrown)
  @autumn_leaf_bitmaps[1].set_pixel(4, 1, burntRed)
  @autumn_leaf_bitmaps[1].set_pixel(6, 1, brightOrange)
  @autumn_leaf_bitmaps[1].set_pixel(0, 2, paleOrange)
  @autumn_leaf_bitmaps[1].set_pixel(1, 2, brightOrange)
  @autumn_leaf_bitmaps[1].set_pixel(2, 2, orangeBrown)
  @autumn_leaf_bitmaps[1].set_pixel(3, 2, burntRed)
  @autumn_leaf_bitmaps[1].set_pixel(4, 2, orangeBrown)
  @autumn_leaf_bitmaps[1].set_pixel(5, 2, brightOrange)
  @autumn_leaf_bitmaps[1].fill_rect(1, 3, 3, 1, orangeBrown)
  @autumn_leaf_bitmaps[1].fill_rect(4, 3, 2, 1, brightOrange)
  @autumn_leaf_bitmaps[1].set_pixel(6, 3, orangeBrown)
  @autumn_leaf_bitmaps[1].set_pixel(2, 4, burntRed)
  @autumn_leaf_bitmaps[1].fill_rect(3, 4, 3, 1, brightOrange)
  @autumn_leaf_bitmaps[1].set_pixel(6, 4, burntRed)
  @autumn_leaf_bitmaps[1].set_pixel(7, 4, darkBrown)
  @autumn_leaf_bitmaps[1].set_pixel(1, 5, orangeBrown)
  @autumn_leaf_bitmaps[1].fill_rect(2, 5, 2, 1, brightOrange)
  @autumn_leaf_bitmaps[1].set_pixel(4, 5, orangeBrown)
  @autumn_leaf_bitmaps[1].set_pixel(5, 5, burntRed)
  @autumn_leaf_bitmaps[1].fill_rect(1, 6, 2, 1, brightOrange)
  @autumn_leaf_bitmaps[1].fill_rect(4, 6, 2, 1, burntRed)
  @autumn_leaf_bitmaps[1].set_pixel(0, 7, brightOrange)
  @autumn_leaf_bitmaps[1].set_pixel(5, 7, darkBrown)
 Â
  # draw the 3rd of the leaf1 bitmaps
  @autumn_leaf_bitmaps.push(Bitmap.new(8, 8))
  @autumn_leaf_bitmaps[2].set_pixel(7, 1, paleOrange)
  @autumn_leaf_bitmaps[2].set_pixel(6, 2, paleOrange)
  @autumn_leaf_bitmaps[2].set_pixel(7, 2, orangeBrown)
  @autumn_leaf_bitmaps[2].set_pixel(5, 3, paleOrange)
  @autumn_leaf_bitmaps[2].set_pixel(6, 3, brightOrange)
  @autumn_leaf_bitmaps[2].set_pixel(4, 4, paleOrange)
  @autumn_leaf_bitmaps[2].set_pixel(5, 4, brightOrange)
  @autumn_leaf_bitmaps[2].set_pixel(6, 4, orangeBrown)
  @autumn_leaf_bitmaps[2].fill_rect(2, 5, 2, 1, paleOrange)
  @autumn_leaf_bitmaps[2].set_pixel(4, 5, brightOrange)
  @autumn_leaf_bitmaps[2].set_pixel(5, 5, orangeBrown)
  @autumn_leaf_bitmaps[2].set_pixel(1, 6, paleOrange)
  @autumn_leaf_bitmaps[2].fill_rect(2, 6, 2, 1, brightOrange)
  @autumn_leaf_bitmaps[2].set_pixel(4, 6, orangeBrown)
  @autumn_leaf_bitmaps[2].set_pixel(0, 7, paleOrange)
  @autumn_leaf_bitmaps[2].set_pixel(1, 7, brightOrange)
  @autumn_leaf_bitmaps[2].set_pixel(2, 7, orangeBrown)
 Â
  # draw the 4th of the leaf1 bitmaps
  @autumn_leaf_bitmaps.push(Bitmap.new(8, 8))
  @autumn_leaf_bitmaps[3].set_pixel(3, 0, brightOrange)
  @autumn_leaf_bitmaps[3].set_pixel(7, 0, brightOrange)
  @autumn_leaf_bitmaps[3].set_pixel(3, 1, orangeBrown)
  @autumn_leaf_bitmaps[3].set_pixel(4, 1, burntRed)
  @autumn_leaf_bitmaps[3].set_pixel(6, 1, brightOrange)
  @autumn_leaf_bitmaps[3].set_pixel(0, 2, paleOrange)
  @autumn_leaf_bitmaps[3].set_pixel(1, 2, brightOrange)
  @autumn_leaf_bitmaps[3].set_pixel(2, 2, orangeBrown)
  @autumn_leaf_bitmaps[3].set_pixel(3, 2, burntRed)
  @autumn_leaf_bitmaps[3].set_pixel(4, 2, orangeBrown)
  @autumn_leaf_bitmaps[3].set_pixel(5, 2, brightOrange)
  @autumn_leaf_bitmaps[3].fill_rect(1, 3, 3, 1, orangeBrown)
  @autumn_leaf_bitmaps[3].fill_rect(4, 3, 2, 1, brightOrange)
  @autumn_leaf_bitmaps[3].set_pixel(6, 3, orangeBrown)
  @autumn_leaf_bitmaps[3].set_pixel(2, 4, burntRed)
  @autumn_leaf_bitmaps[3].fill_rect(3, 4, 3, 1, brightOrange)
  @autumn_leaf_bitmaps[3].set_pixel(6, 4, burntRed)
  @autumn_leaf_bitmaps[3].set_pixel(7, 4, darkBrown)
  @autumn_leaf_bitmaps[3].set_pixel(1, 5, orangeBrown)
  @autumn_leaf_bitmaps[3].fill_rect(2, 5, 2, 1, brightOrange)
  @autumn_leaf_bitmaps[3].set_pixel(4, 5, orangeBrown)
  @autumn_leaf_bitmaps[3].set_pixel(5, 5, burntRed)
  @autumn_leaf_bitmaps[3].fill_rect(1, 6, 2, 1, brightOrange)
  @autumn_leaf_bitmaps[3].fill_rect(4, 6, 2, 1, burntRed)
  @autumn_leaf_bitmaps[3].set_pixel(0, 7, brightOrange)
  @autumn_leaf_bitmaps[3].set_pixel(5, 7, darkBrown)
 Â
  @green_leaf_bitmaps = []
  darkGreen = Color.new(62, 76, 31, 255)
  midGreen = Color.new(76, 91, 43, 255)
  khaki = Color.new(105, 114, 66, 255)
  lightGreen = Color.new(128, 136, 88, 255)
  mint = Color.new(146, 154, 106, 255)
 Â
  # 1st leaf bitmap
  @green_leaf_bitmaps[0] = Bitmap.new(8, 8)
  @green_leaf_bitmaps[0].set_pixel(1, 0, darkGreen)
  @green_leaf_bitmaps[0].set_pixel(1, 1, midGreen)
  @green_leaf_bitmaps[0].set_pixel(2, 1, darkGreen)
  @green_leaf_bitmaps[0].set_pixel(2, 2, khaki)
  @green_leaf_bitmaps[0].set_pixel(3, 2, darkGreen)
  @green_leaf_bitmaps[0].set_pixel(4, 2, khaki)
  @green_leaf_bitmaps[0].fill_rect(2, 3, 3, 1, midGreen)
  @green_leaf_bitmaps[0].set_pixel(5, 3, khaki)
  @green_leaf_bitmaps[0].fill_rect(2, 4, 2, 1, midGreen)
  @green_leaf_bitmaps[0].set_pixel(4, 4, darkGreen)
  @green_leaf_bitmaps[0].set_pixel(5, 4, lightGreen)
  @green_leaf_bitmaps[0].set_pixel(6, 4, khaki)
  @green_leaf_bitmaps[0].set_pixel(3, 5, midGreen)
  @green_leaf_bitmaps[0].set_pixel(4, 5, darkGreen)
  @green_leaf_bitmaps[0].set_pixel(5, 5, khaki)
  @green_leaf_bitmaps[0].set_pixel(6, 5, lightGreen)
  @green_leaf_bitmaps[0].set_pixel(4, 6, midGreen)
  @green_leaf_bitmaps[0].set_pixel(5, 6, darkGreen)
  @green_leaf_bitmaps[0].set_pixel(6, 6, lightGreen)
  @green_leaf_bitmaps[0].set_pixel(6, 7, khaki)
 Â
  # 2nd leaf bitmap
  @green_leaf_bitmaps[1] = Bitmap.new(8, 8)
  @green_leaf_bitmaps[1].fill_rect(1, 1, 1, 2, midGreen)
  @green_leaf_bitmaps[1].fill_rect(2, 2, 2, 1, khaki)
  @green_leaf_bitmaps[1].set_pixel(4, 2, lightGreen)
  @green_leaf_bitmaps[1].fill_rect(2, 3, 2, 1, darkGreen)
  @green_leaf_bitmaps[1].fill_rect(4, 3, 2, 1, lightGreen)
  @green_leaf_bitmaps[1].set_pixel(2, 4, midGreen)
  @green_leaf_bitmaps[1].set_pixel(3, 4, darkGreen)
  @green_leaf_bitmaps[1].set_pixel(4, 4, khaki)
  @green_leaf_bitmaps[1].fill_rect(5, 4, 2, 1, lightGreen)
  @green_leaf_bitmaps[1].set_pixel(3, 5, midGreen)
  @green_leaf_bitmaps[1].set_pixel(4, 5, darkGreen)
  @green_leaf_bitmaps[1].set_pixel(5, 5, khaki)
  @green_leaf_bitmaps[1].set_pixel(6, 5, lightGreen)
  @green_leaf_bitmaps[1].set_pixel(5, 6, darkGreen)
  @green_leaf_bitmaps[1].fill_rect(6, 6, 2, 1, khaki)
 Â
  # 3rd leaf bitmap
  @green_leaf_bitmaps[2] = Bitmap.new(8, 8)
  @green_leaf_bitmaps[2].set_pixel(1, 1, darkGreen)
  @green_leaf_bitmaps[2].fill_rect(1, 2, 2, 1, midGreen)
  @green_leaf_bitmaps[2].set_pixel(2, 3, midGreen)
  @green_leaf_bitmaps[2].set_pixel(3, 3, darkGreen)
  @green_leaf_bitmaps[2].set_pixel(4, 3, midGreen)
  @green_leaf_bitmaps[2].fill_rect(2, 4, 2, 1, midGreen)
  @green_leaf_bitmaps[2].set_pixel(4, 4, darkGreen)
  @green_leaf_bitmaps[2].set_pixel(5, 4, lightGreen)
  @green_leaf_bitmaps[2].set_pixel(3, 5, midGreen)
  @green_leaf_bitmaps[2].set_pixel(4, 5, darkGreen)
  @green_leaf_bitmaps[2].fill_rect(5, 5, 2, 1, khaki)
  @green_leaf_bitmaps[2].fill_rect(4, 6, 2, 1, midGreen)
  @green_leaf_bitmaps[2].set_pixel(6, 6, lightGreen)
  @green_leaf_bitmaps[2].set_pixel(6, 7, khaki)
 Â
  # 4th leaf bitmap
  @green_leaf_bitmaps[3] = Bitmap.new(8, 8)
  @green_leaf_bitmaps[3].fill_rect(0, 3, 1, 2, darkGreen)
  @green_leaf_bitmaps[3].set_pixel(1, 4, midGreen)
  @green_leaf_bitmaps[3].set_pixel(2, 4, khaki)
  @green_leaf_bitmaps[3].set_pixel(3, 4, lightGreen)
  @green_leaf_bitmaps[3].set_pixel(4, 4, darkGreen)
  @green_leaf_bitmaps[3].set_pixel(7, 4, midGreen)
  @green_leaf_bitmaps[3].set_pixel(1, 5, darkGreen)
  @green_leaf_bitmaps[3].set_pixel(2, 5, midGreen)
  @green_leaf_bitmaps[3].set_pixel(3, 5, lightGreen)
  @green_leaf_bitmaps[3].set_pixel(4, 5, mint)
  @green_leaf_bitmaps[3].set_pixel(5, 5, lightGreen)
  @green_leaf_bitmaps[3].set_pixel(6, 5, khaki)
  @green_leaf_bitmaps[3].set_pixel(7, 5, midGreen)
  @green_leaf_bitmaps[3].fill_rect(2, 6, 2, 1, midGreen)
  @green_leaf_bitmaps[3].set_pixel(4, 6, lightGreen)
  @green_leaf_bitmaps[3].set_pixel(5, 6, khaki)
  @green_leaf_bitmaps[3].set_pixel(6, 6, midGreen)
 Â
  # 5th leaf bitmap
  @green_leaf_bitmaps[4] = Bitmap.new(8, 8)
  @green_leaf_bitmaps[4].set_pixel(6, 2, midGreen)
  @green_leaf_bitmaps[4].set_pixel(7, 2, darkGreen)
  @green_leaf_bitmaps[4].fill_rect(4, 3, 2, 1, midGreen)
  @green_leaf_bitmaps[4].set_pixel(6, 3, khaki)
  @green_leaf_bitmaps[4].set_pixel(2, 4, darkGreen)
  @green_leaf_bitmaps[4].fill_rect(3, 4, 2, 1, khaki)
  @green_leaf_bitmaps[4].set_pixel(5, 4, lightGreen)
  @green_leaf_bitmaps[4].set_pixel(6, 4, khaki)
  @green_leaf_bitmaps[4].set_pixel(1, 5, midGreen)
  @green_leaf_bitmaps[4].set_pixel(2, 5, khaki)
  @green_leaf_bitmaps[4].set_pixel(3, 5, lightGreen)
  @green_leaf_bitmaps[4].set_pixel(4, 5, mint)
  @green_leaf_bitmaps[4].set_pixel(5, 5, midGreen)
  @green_leaf_bitmaps[4].set_pixel(2, 6, darkGreen)
  @green_leaf_bitmaps[4].fill_rect(3, 6, 2, 1, midGreen)
 Â
  # 6th leaf bitmap
  @green_leaf_bitmaps[5] = Bitmap.new(8, 8)
  @green_leaf_bitmaps[5].fill_rect(6, 2, 2, 1, midGreen)
  @green_leaf_bitmaps[5].fill_rect(4, 3, 2, 1, midGreen)
  @green_leaf_bitmaps[5].set_pixel(6, 3, khaki)
  @green_leaf_bitmaps[5].set_pixel(3, 4, midGreen)
  @green_leaf_bitmaps[5].set_pixel(4, 4, khaki)
  @green_leaf_bitmaps[5].set_pixel(5, 4, lightGreen)
  @green_leaf_bitmaps[5].set_pixel(6, 4, mint)
  @green_leaf_bitmaps[5].set_pixel(1, 5, midGreen)
  @green_leaf_bitmaps[5].set_pixel(2, 5, khaki)
  @green_leaf_bitmaps[5].fill_rect(3, 5, 2, 1, mint)
  @green_leaf_bitmaps[5].set_pixel(5, 5, lightGreen)
  @green_leaf_bitmaps[5].set_pixel(2, 6, midGreen)
  @green_leaf_bitmaps[5].set_pixel(3, 6, khaki)
  @green_leaf_bitmaps[5].set_pixel(4, 6, lightGreen)
 Â
  # 7th leaf bitmap
  @green_leaf_bitmaps[6] = Bitmap.new(8, 8)
  @green_leaf_bitmaps[6].fill_rect(6, 1, 1, 2, midGreen)
  @green_leaf_bitmaps[6].fill_rect(4, 2, 2, 1, midGreen)
  @green_leaf_bitmaps[6].fill_rect(6, 2, 1, 2, darkGreen)
  @green_leaf_bitmaps[6].fill_rect(3, 3, 2, 1, midGreen)
  @green_leaf_bitmaps[6].set_pixel(5, 3, khaki)
  @green_leaf_bitmaps[6].set_pixel(2, 4, midGreen)
  @green_leaf_bitmaps[6].set_pixel(3, 4, khaki)
  @green_leaf_bitmaps[6].set_pixel(4, 4, lightGreen)
  @green_leaf_bitmaps[6].set_pixel(5, 4, midGreen)
  @green_leaf_bitmaps[6].set_pixel(1, 5, midGreen)
  @green_leaf_bitmaps[6].set_pixel(2, 5, khaki)
  @green_leaf_bitmaps[6].fill_rect(3, 5, 2, 1, midGreen)
  @green_leaf_bitmaps[6].set_pixel(1, 6, darkGreen)
  @green_leaf_bitmaps[6].set_pixel(2, 6, midGreen)
 Â
  # 8th leaf bitmap
  @green_leaf_bitmaps[7] = Bitmap.new(8, 8)
  @green_leaf_bitmaps[7].set_pixel(6, 1, midGreen)
  @green_leaf_bitmaps[7].fill_rect(4, 2, 3, 2, midGreen)
  @green_leaf_bitmaps[7].set_pixel(3, 3, darkGreen)
  @green_leaf_bitmaps[7].set_pixel(2, 4, darkGreen)
  @green_leaf_bitmaps[7].set_pixel(3, 4, midGreen)
  @green_leaf_bitmaps[7].fill_rect(4, 4, 2, 1, khaki)
  @green_leaf_bitmaps[7].set_pixel(1, 5, darkGreen)
  @green_leaf_bitmaps[7].set_pixel(2, 5, midGreen)
  @green_leaf_bitmaps[7].fill_rect(3, 5, 2, 1, lightGreen)
  @green_leaf_bitmaps[7].set_pixel(2, 6, midGreen)
  @green_leaf_bitmaps[7].set_pixel(3, 6, lightGreen)
 Â
  # 9th leaf bitmap
  @green_leaf_bitmaps[8] = Bitmap.new(8, 8)
  @green_leaf_bitmaps[8].fill_rect(6, 1, 1, 2, midGreen)
  @green_leaf_bitmaps[8].fill_rect(4, 2, 2, 1, midGreen)
  @green_leaf_bitmaps[8].fill_rect(6, 2, 1, 2, darkGreen)
  @green_leaf_bitmaps[8].fill_rect(3, 3, 2, 1, midGreen)
  @green_leaf_bitmaps[8].set_pixel(5, 3, khaki)
  @green_leaf_bitmaps[8].set_pixel(2, 4, midGreen)
  @green_leaf_bitmaps[8].set_pixel(3, 4, khaki)
  @green_leaf_bitmaps[8].set_pixel(4, 4, lightGreen)
  @green_leaf_bitmaps[8].set_pixel(5, 4, midGreen)
  @green_leaf_bitmaps[8].set_pixel(1, 5, midGreen)
  @green_leaf_bitmaps[8].set_pixel(2, 5, khaki)
  @green_leaf_bitmaps[8].fill_rect(3, 5, 2, 1, midGreen)
  @green_leaf_bitmaps[8].set_pixel(1, 6, darkGreen)
  @green_leaf_bitmaps[8].set_pixel(2, 6, midGreen)
 Â
  # 10th leaf bitmap
  @green_leaf_bitmaps[9] = Bitmap.new(8, 8)
  @green_leaf_bitmaps[9].fill_rect(6, 2, 2, 1, midGreen)
  @green_leaf_bitmaps[9].fill_rect(4, 3, 2, 1, midGreen)
  @green_leaf_bitmaps[9].set_pixel(6, 3, khaki)
  @green_leaf_bitmaps[9].set_pixel(3, 4, midGreen)
  @green_leaf_bitmaps[9].set_pixel(4, 4, khaki)
  @green_leaf_bitmaps[9].set_pixel(5, 4, lightGreen)
  @green_leaf_bitmaps[9].set_pixel(6, 4, mint)
  @green_leaf_bitmaps[9].set_pixel(1, 5, midGreen)
  @green_leaf_bitmaps[9].set_pixel(2, 5, khaki)
  @green_leaf_bitmaps[9].fill_rect(3, 5, 2, 1, mint)
  @green_leaf_bitmaps[9].set_pixel(5, 5, lightGreen)
  @green_leaf_bitmaps[9].set_pixel(2, 6, midGreen)
  @green_leaf_bitmaps[9].set_pixel(3, 6, khaki)
  @green_leaf_bitmaps[9].set_pixel(4, 6, lightGreen)
 Â
  # 11th leaf bitmap
  @green_leaf_bitmaps[10] = Bitmap.new(8, 8)
  @green_leaf_bitmaps[10].set_pixel(6, 2, midGreen)
  @green_leaf_bitmaps[10].set_pixel(7, 2, darkGreen)
  @green_leaf_bitmaps[10].fill_rect(4, 3, 2, 1, midGreen)
  @green_leaf_bitmaps[10].set_pixel(6, 3, khaki)
  @green_leaf_bitmaps[10].set_pixel(2, 4, darkGreen)
  @green_leaf_bitmaps[10].fill_rect(3, 4, 2, 1, khaki)
  @green_leaf_bitmaps[10].set_pixel(5, 4, lightGreen)
  @green_leaf_bitmaps[10].set_pixel(6, 4, khaki)
  @green_leaf_bitmaps[10].set_pixel(1, 5, midGreen)
  @green_leaf_bitmaps[10].set_pixel(2, 5, khaki)
  @green_leaf_bitmaps[10].set_pixel(3, 5, lightGreen)
  @green_leaf_bitmaps[10].set_pixel(4, 5, mint)
  @green_leaf_bitmaps[10].set_pixel(5, 5, midGreen)
  @green_leaf_bitmaps[10].set_pixel(2, 6, darkGreen)
  @green_leaf_bitmaps[10].fill_rect(3, 6, 2, 1, midGreen)
 Â
  # 12th leaf bitmap
  @green_leaf_bitmaps[11] = Bitmap.new(8, 8)
  @green_leaf_bitmaps[11].fill_rect(0, 3, 1, 2, darkGreen)
  @green_leaf_bitmaps[11].set_pixel(1, 4, midGreen)
  @green_leaf_bitmaps[11].set_pixel(2, 4, khaki)
  @green_leaf_bitmaps[11].set_pixel(3, 4, lightGreen)
  @green_leaf_bitmaps[11].set_pixel(4, 4, darkGreen)
  @green_leaf_bitmaps[11].set_pixel(7, 4, midGreen)
  @green_leaf_bitmaps[11].set_pixel(1, 5, darkGreen)
  @green_leaf_bitmaps[11].set_pixel(2, 5, midGreen)
  @green_leaf_bitmaps[11].set_pixel(3, 5, lightGreen)
  @green_leaf_bitmaps[11].set_pixel(4, 5, mint)
  @green_leaf_bitmaps[11].set_pixel(5, 5, lightGreen)
  @green_leaf_bitmaps[11].set_pixel(6, 5, khaki)
  @green_leaf_bitmaps[11].set_pixel(7, 5, midGreen)
  @green_leaf_bitmaps[11].fill_rect(2, 6, 2, 1, midGreen)
  @green_leaf_bitmaps[11].set_pixel(4, 6, lightGreen)
  @green_leaf_bitmaps[11].set_pixel(5, 6, khaki)
  @green_leaf_bitmaps[11].set_pixel(6, 6, midGreen)
 Â
  # 13th leaf bitmap
  @green_leaf_bitmaps[12] = Bitmap.new(8, 8)
  @green_leaf_bitmaps[12].set_pixel(1, 1, darkGreen)
  @green_leaf_bitmaps[12].fill_rect(1, 2, 2, 1, midGreen)
  @green_leaf_bitmaps[12].set_pixel(2, 3, midGreen)
  @green_leaf_bitmaps[12].set_pixel(3, 3, darkGreen)
  @green_leaf_bitmaps[12].set_pixel(4, 3, midGreen)
  @green_leaf_bitmaps[12].fill_rect(2, 4, 2, 1, midGreen)
  @green_leaf_bitmaps[12].set_pixel(4, 4, darkGreen)
  @green_leaf_bitmaps[12].set_pixel(5, 4, lightGreen)
  @green_leaf_bitmaps[12].set_pixel(3, 5, midGreen)
  @green_leaf_bitmaps[12].set_pixel(4, 5, darkGreen)
  @green_leaf_bitmaps[12].fill_rect(5, 5, 2, 1, khaki)
  @green_leaf_bitmaps[12].fill_rect(4, 6, 2, 1, midGreen)
  @green_leaf_bitmaps[12].set_pixel(6, 6, lightGreen)
  @green_leaf_bitmaps[12].set_pixel(6, 7, khaki)
 Â
  @rose_bitmaps = []
  brightRed = Color.new(255, 0, 0, 255)
  midRed = Color.new(179, 17, 17, 255)
  darkRed = Color.new(141, 9, 9, 255)
 Â
  # 1st rose petal bitmap
  @rose_bitmaps[0] = Bitmap.new(3, 3)
  @rose_bitmaps[0].fill_rect(1, 0, 2, 1, brightRed)
  @rose_bitmaps[0].fill_rect(0, 1, 1, 2, brightRed)
  @rose_bitmaps[0].fill_rect(1, 1, 2, 2, midRed)
  @rose_bitmaps[0].set_pixel(2, 2, darkRed)
 Â
  # 2nd rose petal bitmap
  @rose_bitmaps[1] = Bitmap.new(3, 3)
  @rose_bitmaps[1].set_pixel(0, 1, midRed)
  @rose_bitmaps[1].set_pixel(1, 1, brightRed)
  @rose_bitmaps[1].fill_rect(1, 2, 1, 2, midRed)
 Â
  @feather_bitmaps = []
  white = Color.new(255, 255, 255, 255)
 Â
  # 1st feather bitmap
  @feather_bitmaps[0] = Bitmap.new(3, 3)
  @feather_bitmaps[0].set_pixel(0, 2, white)
  @feather_bitmaps[0].set_pixel(1, 2, grey)
  @feather_bitmaps[0].set_pixel(2, 1, grey)
 Â
  # 2nd feather bitmap
  @feather_bitmaps[0] = Bitmap.new(3, 3)
  @feather_bitmaps[0].set_pixel(0, 0, white)
  @feather_bitmaps[0].set_pixel(0, 1, grey)
  @feather_bitmaps[0].set_pixel(1, 2, grey)
 Â
  # 3rd feather bitmap
  @feather_bitmaps[0] = Bitmap.new(3, 3)
  @feather_bitmaps[0].set_pixel(2, 0, white)
  @feather_bitmaps[0].set_pixel(1, 0, grey)
  @feather_bitmaps[0].set_pixel(0, 1, grey)
 Â
  # 4th feather bitmap
  @feather_bitmaps[0] = Bitmap.new(3, 3)
  @feather_bitmaps[0].set_pixel(2, 2, white)
  @feather_bitmaps[0].set_pixel(2, 1, grey)
  @feather_bitmaps[0].set_pixel(1, 0, grey)
 Â
  @blood_rain_bitmap = Bitmap.new(7, 56)
  for i in 0..6
   @blood_rain_bitmap.fill_rect(6-i, i*8, 1, 8, darkRed)
  end
 Â
  @sparkle_bitmaps = []
 Â
  lightBlue = Color.new(181, 244, 255, 255)
  midBlue = Color.new(126, 197, 235, 255)
  darkBlue = Color.new(77, 136, 225, 255)
 Â
  # 1st sparkle bitmap
  @sparkle_bitmaps[0] = Bitmap.new(7, 7)
  @sparkle_bitmaps[0].set_pixel(3, 3, darkBlue)
 Â
  # 2nd sparkle bitmap
  @sparkle_bitmaps[1] = Bitmap.new(7, 7)
  @sparkle_bitmaps[1].fill_rect(3, 2, 1, 3, darkBlue)
  @sparkle_bitmaps[1].fill_rect(2, 3, 3, 1, darkBlue)
  @sparkle_bitmaps[1].set_pixel(3, 3, midBlue)
 Â
  # 3rd sparkle bitmap
  @sparkle_bitmaps[2] = Bitmap.new(7, 7)
  @sparkle_bitmaps[2].set_pixel(1, 1, darkBlue)
  @sparkle_bitmaps[2].set_pixel(5, 1, darkBlue)
  @sparkle_bitmaps[2].set_pixel(2, 2, midBlue)
  @sparkle_bitmaps[2].set_pixel(4, 2, midBlue)
  @sparkle_bitmaps[2].set_pixel(3, 3, lightBlue)
  @sparkle_bitmaps[2].set_pixel(2, 4, midBlue)
  @sparkle_bitmaps[2].set_pixel(4, 4, midBlue)
  @sparkle_bitmaps[2].set_pixel(1, 5, darkBlue)
  @sparkle_bitmaps[2].set_pixel(5, 5, darkBlue)
 Â
  # 4th sparkle bitmap
  @sparkle_bitmaps[3] = Bitmap.new(7, 7)
  @sparkle_bitmaps[3].fill_rect(3, 1, 1, 5, darkBlue)
  @sparkle_bitmaps[3].fill_rect(1, 3, 5, 1, darkBlue)
  @sparkle_bitmaps[3].fill_rect(3, 2, 1, 3, midBlue)
  @sparkle_bitmaps[3].fill_rect(2, 3, 3, 1, midBlue)
  @sparkle_bitmaps[3].set_pixel(3, 3, lightBlue)
 Â
  # 5th sparkle bitmap
  @sparkle_bitmaps[4] = Bitmap.new(7, 7)
  @sparkle_bitmaps[4].fill_rect(2, 2, 3, 3, midBlue)
  @sparkle_bitmaps[4].fill_rect(3, 2, 1, 3, darkBlue)
  @sparkle_bitmaps[4].fill_rect(2, 3, 3, 1, darkBlue)
  @sparkle_bitmaps[4].set_pixel(3, 3, lightBlue)
  @sparkle_bitmaps[4].set_pixel(1, 1, darkBlue)
  @sparkle_bitmaps[4].set_pixel(5, 1, darkBlue)
  @sparkle_bitmaps[4].set_pixel(1, 5, darkBlue)
  @sparkle_bitmaps[4].set_pixel(5, 1, darkBlue)
 Â
  # 6th sparkle bitmap
  @sparkle_bitmaps[5] = Bitmap.new(7, 7)
  @sparkle_bitmaps[5].fill_rect(2, 1, 3, 5, darkBlue)
  @sparkle_bitmaps[5].fill_rect(1, 2, 5, 3, darkBlue)
  @sparkle_bitmaps[5].fill_rect(2, 2, 3, 3, midBlue)
  @sparkle_bitmaps[5].fill_rect(3, 1, 1, 5, midBlue)
  @sparkle_bitmaps[5].fill_rect(1, 3, 5, 1, midBlue)
  @sparkle_bitmaps[5].fill_rect(3, 2, 1, 3, lightBlue)
  @sparkle_bitmaps[5].fill_rect(2, 3, 3, 1, lightBlue)
  @sparkle_bitmaps[5].set_pixel(3, 3, white)
 Â
  # 7th sparkle bitmap
  @sparkle_bitmaps[6] = Bitmap.new(7, 7)
  @sparkle_bitmaps[6].fill_rect(2, 1, 3, 5, midBlue)
  @sparkle_bitmaps[6].fill_rect(1, 2, 5, 3, midBlue)
  @sparkle_bitmaps[6].fill_rect(3, 0, 1, 7, darkBlue)
  @sparkle_bitmaps[6].fill_rect(0, 3, 7, 1, darkBlue)
  @sparkle_bitmaps[6].fill_rect(2, 2, 3, 3, lightBlue)
  @sparkle_bitmaps[6].fill_rect(3, 2, 1, 3, midBlue)
  @sparkle_bitmaps[6].fill_rect(2, 3, 3, 1, midBlue)
  @sparkle_bitmaps[6].set_pixel(3, 3, white)
  # end new weathers
 Â
  @sprites = []
  for i in 1..40
   sprite = Sprite.new(viewport)
   sprite.visible = false
   sprite.opacity = 0
   @sprites.push(sprite)
   @current_pose.push(0)    # new
   @info.push(rand(50))    # new
   @countarray.push(rand(15)) # new
  end
 end
 #--------------------------------------------------------------------------
 # * Dispose
 #--------------------------------------------------------------------------
 alias old_dispose dispose
 def dispose
  old_dispose
  @hail_bitmap.dispose
  @petal_bitmap.dispose
  @blood_rain_bitmap.dispose
  for image in @autumn_leaf_bitmaps
   image.dispose
  end
  for image in @green_leaf_bitmaps
   image.dispose
  end
  for image in @rose_bitmaps
   image.dispose
  end
  for image in @feather_bitmaps
   image.dispose
  end
  for image in @sparkle_bitmaps
   image.dispose
  end
 end
 #--------------------------------------------------------------------------
 # * Set weather type
 #   type : new weather type
 #--------------------------------------------------------------------------
 def type=(type)
  return if @type == type
  @type = type
  @thunder = false
  case @type
  when 1
   bitmap = @rain_bitmap
  when 2
   bitmap = @storm_bitmap
  when 3
   bitmap = @snow_bitmap
  when 4 # hail
   bitmap = @hail_bitmap
  when 5 # rain w/ thunder and lightning
   bitmap = @rain_bitmap
   @thunder = true
  when 6 # falling autumn leaves
   bitmap = @autumn_leaf_bitmaps[0]
  when 7 # blowing autumn leaves
   bitmap = @autumn_leaf_bitmaps[0]
  when 8 # swirling autumn leaves
   bitmap = @autumn_leaf_bitmaps[0]
  when 9 # falling green leaves
   bitmap = @green_leaf_bitmaps[0]
  when 10 # sakura petals
   bitmap = @petal_bitmap
  when 11 # rose petals
   bitmap = @rose_bitmaps[0]
  when 12 # feathers
   bitmap = @feather_bitmaps[0]
  when 13 # blood rain
   bitmap = @blood_rain_bitmap
  when 14 # sparkles
   bitmap = @sparkle_bitmaps[0]
  else
   bitmap = nil
  end
  for i in [email=0...@sprites.size]0...@sprites.size[/email]
   sprite = @sprites[i]
   sprite.visible = (i <= @max)
   sprite.bitmap = bitmap
  end
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
  return if @type == 0
  for i in 1..@max
   sprite = @sprites[i]
   if sprite == nil
    break
   end
   case @type
   when 1, 5, 13
    sprite.x -= 2
    sprite.y += 16
    sprite.opacity -= 8
    if @thunder and (rand(8000 - @max) == 0)
     $game_map.screen.start_flash(Color.new(255, 255, 255, 255), 5)
     RPG::SE.new("Thunder9").play
    end
   when 2
    sprite.x -= 8
    sprite.y += 16
    sprite.opacity -= 12
   when 3
    sprite.x -= 2
    sprite.y += 8
    sprite.opacity -= 8
   when 4 # hail
    sprite.x -= 1
    sprite.y += 18
    sprite.opacity -= 15
   when 6 # falling autumn leaves
    @count = rand(20)
    if @count == 0
     sprite.bitmap = @autumn_leaf_bitmaps[@current_pose[i]]
     @current_pose[i] = (@current_pose[i] + 1) % @autumn_leaf_bitmaps.size
    end
    sprite.x -= 1
    sprite.y += 1
   when 7 # blowing autumn leaves
    @count = rand(20)
    if @count == 0
     sprite.bitmap = @autumn_leaf_bitmaps[@current_pose[i]]
     @current_pose[i] = (@current_pose[i] + 1) % @autumn_leaf_bitmaps.size
    end
    sprite.x -= 10
    sprite.y += (rand(4) - 2)
   when 8 # swirling autumn leaves
    @count = rand(20)
    if @count == 0
     sprite.bitmap = @autumn_leaf_bitmaps[@current_pose[i]]
     @current_pose[i] = (@current_pose[i] + 1) % @autumn_leaf_bitmaps.size
    end
    if @info[i] != 0
     if @info[i] >= 1 and @info[i] <= 10
      sprite.x -= 3
      sprite.y -= 1
     elsif @info[i] >= 11 and @info[i] <= 16
      sprite.x -= 1
      sprite.y -= 2
     elsif @info[i] >= 17 and @info[i] <= 20
      sprite.y -= 3
     elsif @info[i] >= 21 and @info[i] <= 30
      sprite.y -= 2
      sprite.x += 1
     elsif @info[i] >= 31 and @info[i] <= 36
      sprite.y -= 1
      sprite.x += 3
     elsif @info[i] >= 37 and @info[i] <= 40
      sprite.x += 5
     elsif @info[i] >= 41 and @info[i] <= 46
      sprite.y += 1
      sprite.x += 3
     elsif @info[i] >= 47 and @info[i] <= 58
      sprite.y += 2
      sprite.x += 1
     elsif @info[i] >= 59 and @info[i] <= 64
      sprite.y += 3
     elsif @info[i] >= 65 and @info[i] <= 70
      sprite.x -= 1
      sprite.y += 2
     elsif @info[i] >= 71 and @info[i] <= 81
      sprite.x -= 3
      sprite.y += 1
     elsif @info[i] >= 82 and @info[i] <= 87
      sprite.x -= 5
     end
     @info[i] = (@info[i] + 1) % 88
    else
     if rand(200) == 0
      @info[i] = 1
     end
     sprite.x -= 5
     sprite.y += 1
    end
   when 9 # falling green leaves
    if @countarray[i] == 0
     @current_pose[i] = (@current_pose[i] + 1) % @green_leaf_bitmaps.size
     sprite.bitmap = @green_leaf_bitmaps[@current_pose[i]]
     @countarray[i] = rand(15)
    end
    @countarray[i] = (@countarray[i] + 1) % 15
    sprite.y += 1
   when 10 # sakura petals
    if @info[i] < 25
     sprite.x -= 1
    else
     sprite.x += 1
    end
    @info[i] = (@info[i] + 1) % 50
    sprite.y += 1
   when 11 # rose petals
    @count = rand(20)
    if @count == 0
     sprite.bitmap = @rose_bitmaps[@current_pose[i]]
     @current_pose[i] = (@current_pose[i] + 1) % @rose_bitmaps.size
    end
    if @info[i] % 2 == 0
     if @info[i] < 10
      sprite.x -= 1
     else
      sprite.x += 1
     end
    end
    sprite.y += 1
   when 12 # feathers
    if @countarray[i] == 0
     @current_pose[i] = (@current_pose[i] + 1) % @feather_bitmaps.size
     sprite.bitmap = @feather_bitmaps[@current_pose[i]]
    end
    @countarray[i] = (@countarray[i] + 1) % 15
    if rand(100) == 0
     sprite.x -= 1
    end
    if rand(100) == 0
     sprite.y -= 1
    end
    if @info[i] < 50
     if rand(2) == 0
      sprite.x -= 1
     else
      sprite.y -= 1
     end
    else
     if rand(2) == 0
      sprite.x += 1
     else
      sprite.y += 1
     end
    end
    @info[i] = (@info[i] + 1) % 100
   when 14 # sparkles
    if @countarray[i] == 0
     @current_pose[i] = (@current_pose[i] + 1) % @sparkle_bitmaps.size
     sprite.bitmap = @sparkle_bitmaps[@current_pose[i]]
    end
    @countarray[i] = (@countarray[i] + 1) % 15
    sprite.y += 1
    sprite.opacity -= 1
   end
   x = sprite.x - @ox
   y = sprite.y - @oy
   if sprite.opacity < 64 or x < -50 or x > 750 or y < -300 or y > 500 #
    sprite.x = rand(800) - 100 + @ox
    sprite.y = rand(600) - 200 + @oy
    sprite.opacity = 255
   end
  end
 end
end
Credits and Thanks
You must credit Ccoa for the original version of this script (for XP)
You can credit Darkleo for this version (for VX)
Darkleo.