Author Id: 24720 Author Name: xabierpower2012 Post Content: Bueno, pues esto es un tutorial para que puedan insertar, y saber como hacer y poner bien unos climas del tiempo que son más de lo que ya os trae el maker de por sí. Empezaremos con introducir el script de los climas. Esto que os voy a poner en código tenéis que pegarlo encima de Main, en el editor de scripts. Le dais click derecho a Main, y le dais a insertar y os aparecerá un nuevo espacio en blanco para poner un script. Al script le podéis llamar como os de la gana. Esto pegáis: [SPOILER="Script de Climas"] #=========================== # ccoa's weather script # Creditos a CCoa... # Explicado por xabier2012 # Información de como utilizarlo en: http://wahackforo.com/t-21727/tutorial-script-rpg-maker-xp-essentials-clima-avanzado#post199093 #Si no se tienen conocimientos de rgss no modificar. $WEATHER_UPDATE = false # las $WEATHER_IMAGES, si han cambiado $WEATHER_IMAGES = [] #Entre corchetes se puede poner el nombre de una imagen que quieres que aparezca $WEATHER_X = 0 # el numero de pixeles que la iamgen se tiene que mover horizontalemente(Nº positivo = Derecho, Nº Negativo = Izquiero) $WEATHER_Y = 0 # el numero de pixeles que la iamgen se tiene que mover verticalmente (Nº positivo = Abajo, Nº Negativo = Arriba) $WEATHER_FADE = 0 # Tiempo que tarda en aparecer la imagen (0 = no aparece, 255 = intantaneamente) $WEATHER_ANIMATED = false #Eleciones: Si(true) o No(false). module RPG class Weather def initialize(viewport = nil) @type = 0 @max = 0 @ox = 0 @oy = 0 @count = 0 @current_pose = [] @info = [] @countarray = [] make_bitmaps # **** ccoa **** for i in 1..500 sprite = Sprite.new(viewport) sprite.z = 1000 sprite.visible = false sprite.opacity = 0 @sprites.push(sprite) @current_pose.push(0) @info.push(rand(50)) @countarray.push(rand(15)) end end def dispose for sprite in @sprites sprite.dispose end @rain_bitmap.dispose @storm_bitmap.dispose @snow_bitmap.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 for image in @user_bitmaps image.dispose end $WEATHER_UPDATE = true end def type=(type) return if @type == type @type = type case @type when 1 # LLuvia bitmap = @rain_bitmap when 2 # Tormenta bitmap = @storm_bitmap when 3 # Nieve bitmap = @snow_bitmap when 4 # Granizo bitmap = @hail_bitmap when 5 # Lluvia mas trueno y relampago bitmap = @rain_bitmap @thunder = true when 6 # las hojas del otoño (cayentes) bitmap = @autumn_leaf_bitmaps[0] when 7 # las hojas del otoño (soplando) bitmap = @autumn_leaf_bitmaps[0] when 8 # las hojas del otoño (revueltas) bitmap = @autumn_leaf_bitmaps[0] when 9 # las hojas verdes (cayéndose) bitmap = @green_leaf_bitmaps[0] when 10 # Petalos tipo Sakura bitmap = @petal_bitmap when 11 # Petalos Rojos bitmap = @rose_bitmaps[0] when 12 # feathers bitmap = @feather_bitmaps[0] when 13 # La lluvia de sangre bitmap = @blood_rain_bitmap when 14 # Chispas bitmap = @sparkle_bitmaps[0] when 15 # Definido por el Usuario bitmap = @user_bitmaps[rand(@user_bitmaps.size)] else bitmap = nil end if @type != 5 @thunder = false end # **** ccoa **** for i in 1..500 sprite = @sprites if sprite != nil sprite.visible = (i <= @max) sprite.bitmap = bitmap end end end def ox=(ox) return if @ox == ox; @ox = ox for sprite in @sprites sprite.ox = @ox end end def oy=(oy) return if @oy == oy; @oy = oy for sprite in @sprites sprite.oy = @oy end end def max=(max) return if @max == max; # **** ccoa **** @max = [[max, 0].max, 500].min for i in 1..500 sprite = @sprites if sprite != nil sprite.visible = (i <= @max) end end end def update return if @type == 0 for i in 1..@max sprite = @sprites if sprite == nil break end if @type == 1 or @type == 5 or @type == 13 # rain sprite.x -= 2 sprite.y += 16 sprite.opacity -= 8 if @thunder and (rand(8000 - @max) == 0) $game_screen.start_flash(Color.new(255, 255, 255, 255), 5) Audio.se_play("Audio/SE/061-Thunderclap01") # Sonido que se usara como trueno y relampago end end if @type == 2 # Tormenra sprite.x -= 8 sprite.y += 16 sprite.opacity -= 12 end if @type == 3 # Nieve sprite.x -= 2 sprite.y += 8 sprite.opacity -= 8 end if @type == 4 # Granizo sprite.x -= 1 sprite.y += 18 sprite.opacity -= 15 end if @type == 6 # Hojas de otoño cayendo @count = rand(20) if @count == 0 sprite.bitmap = @autumn_leaf_bitmaps[@current_pose] @current_pose = (@current_pose + 1) % @autumn_leaf_bitmaps.size end sprite.x -= 1 sprite.y += 1 end if @type == 7 # hojas del otoño soplando @count = rand(20) if @count == 0 sprite.bitmap = @autumn_leaf_bitmaps[@current_pose] @current_pose = (@current_pose + 1) % @autumn_leaf_bitmaps.size end sprite.x -= 10 sprite.y += (rand(4) - 2) end if @type == 8 # hojas del otoños revueltas @count = rand(20) if @count == 0 sprite.bitmap = @autumn_leaf_bitmaps[@current_pose] @current_pose = (@current_pose + 1) % @autumn_leaf_bitmaps.size end if @info != 0 if @info >= 1 and @info <= 10 sprite.x -= 3 sprite.y -= 1 elsif @info >= 11 and @info <= 16 sprite.x -= 1 sprite.y -= 2 elsif @info >= 17 and @info <= 20 sprite.y -= 3 elsif @info >= 21 and @info <= 30 sprite.y -= 2 sprite.x += 1 elsif @info >= 31 and @info <= 36 sprite.y -= 1 sprite.x += 3 elsif @info >= 37 and @info <= 40 sprite.x += 5 elsif @info >= 41 and @info <= 46 sprite.y += 1 sprite.x += 3 elsif @info >= 47 and @info <= 58 sprite.y += 2 sprite.x += 1 elsif @info >= 59 and @info <= 64 sprite.y += 3 elsif @info >= 65 and @info <= 70 sprite.x -= 1 sprite.y += 2 elsif @info >= 71 and @info <= 81 sprite.x -= 3 sprite.y += 1 elsif @info >= 82 and @info <= 87 sprite.x -= 5 end @info = (@info + 1) % 88 else if rand(200) == 0 @info = 1 end sprite.x -= 5 sprite.y += 1 end end if @type == 9 # Hojas verdes if @countarray == 0 @current_pose = (@current_pose + 1) % @green_leaf_bitmaps.size sprite.bitmap = @green_leaf_bitmaps[@current_pose] @countarray = rand(15) end @countarray = (@countarray + 1) % 15 sprite.y += 1 end if @type == 10 # petalos tipo sakura, esos rosas. if @info < 25 sprite.x -= 1 else sprite.x += 1 end @info = (@info + 1) % 50 sprite.y += 1 end if @type == 11 # Petalos Rosa (rojo) @count = rand(20) if @count == 0 sprite.bitmap = @rose_bitmaps[@current_pose] @current_pose = (@current_pose + 1) % @rose_bitmaps.size end if @info % 2 == 0 if @info < 10 sprite.x -= 1 else sprite.x += 1 end end sprite.y += 1 end if @type == 12 # Plumas if @countarray == 0 @current_pose = (@current_pose + 1) % @feather_bitmaps.size sprite.bitmap = @feather_bitmaps[@current_pose] end @countarray = (@countarray + 1) % 15 if rand(100) == 0 sprite.x -= 1 end if rand(100) == 0 sprite.y -= 1 end if @info < 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 = (@info + 1) % 100 end if @type == 14 # Chispas if @countarray == 0 @current_pose = (@current_pose + 1) % @sparkle_bitmaps.size sprite.bitmap = @sparkle_bitmaps[@current_pose] end @countarray = (@countarray + 1) % 15 sprite.y += 1 sprite.opacity -= 1 end if @type == 15 # Definido por el usuario if $WEATHER_UPDATE update_user_defined $WEATHER_UPDATE = false end if $WEATHER_ANIMATED and @countarray == 0 @current_pose = (@current_pose + 1) % @user_bitmaps.size sprite.bitmap = @user_bitmaps[@current_pose] end @countarray = (@countarray + 1) % 15 sprite.x += $WEATHER_X sprite.y += $WEATHER_Y sprite.opacity -= $WEATHER_FADE 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) - 50 + @ox sprite.y = rand(800) - 200 + @oy sprite.opacity = 255 end end end def make_bitmaps color1 = Color.new(255, 255, 255, 255) color2 = Color.new(255, 255, 255, 128) @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) @sprites = [] 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) # Color Rosa Claro color4 = Color.new(213, 106, 136, 255) # Color Rosa Oscuro # Estos des colores de usan para los colores de losmpetalos de rosas tipo sakura y rojas. @petal_bitmap = Bitmap.new(4, 4) #Esto crea un nuevo bitmap que es de 4 x 4 pixeles @petal_bitmap.fill_rect(0, 3, 1, 1, color3) # esto hace un 1x1 "rectángulo" del pixel a los 0, 3 pixel de la imagen (la esquina izquierda superior es 0, 0) @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)) # Aqui se dibuja el primero de de los bitmaps de la hoja 1 @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) # Se dibuja el segundo bitmap de la hoja 1 @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) # Se dibuja el tercero bitmap de la hoja 1 @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) # Se dibuja el cuarto bitmap de la hoja 1 @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) # 1ª parte del bimap de otro hoja @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) # 2ª parte del bimap de otro hoja @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) # 3ª parte del bimap de otro hoja @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) # 4ª parte del bimap de otro hoja @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) # 5ª parte del bimap de otro hoja @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) # 6ª parte del bimap de otro hoja @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) # 7ª parte del bimap de otro hoja @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) # 8ª parte del bimap de otro hoja @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) # 9ª parte del bimap de otro hoja @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) # 10ª parte del bimap de otro hoja @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) # 11ª parte del bimap de otro hoja @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) # 12ª parte del bimap de otro hoja @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) # 14ª parte del bimap de otro hoja @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) # El 1º de los bipmap de los petalos de Rosa @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) # El 2º de los bipmap de los petalos de Rosa @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) # El 3º de los bipmap de los petalos de Rosa @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) # El 4º de los bipmap de los petalos de Rosa @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) # El 5º de los bipmap de los petalos de Rosa @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) # El 6º de los bipmap de los petalos de Rosa @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) # Ahora continuamos con el bitmap de las chispas, este es el primero @sparkle_bitmaps[0] = Bitmap.new(7, 7) @sparkle_bitmaps[0].set_pixel(3, 3, darkBlue) # 2º bitmap de Chispas @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) # 3º bitmap de Chispas @sparkle_bitmaps[2] = Bitmap.new(7, 7) @sparkle_bitmaps[2].set_pixel(3, 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) # 4º bitmap de Chispas @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) # 5º bitmap de Chispas @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) # 6º bitmap de Chispas @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) # 7º bitmap de Chispas @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) @user_bitmaps = [] update_user_defined end def update_user_defined for image in @user_bitmaps image.dispose end #Bitmap de Definido por el Usurio for name in $WEATHER_IMAGES @user_bitmaps.push(RPG::Cache.picture(name)) end for sprite in @sprites sprite.bitmap = @user_bitmaps[rand(@user_bitmaps.size)] end end attr_reader :type attr_reader :max attr_reader :ox attr_reader :oy end end [/SPOILER] NOTA IMPORTANTE QUE SE TIENE QUE LEER: En la línea del script 165, encontraréis esto: Audio.se_play("Audio/SE/061-Thunderclap01") Bueno, pues eso como indica en el script, el 061-Thunderclap01 es como se llama el sonido que tiene que estar en vuestra carpeta SE. Vosotros, como es lógico, no tendréis ningún sonido que se llame así. Entonces sustituis "061-Thunderclap01" por el nombre del sonido SE que queráis que se escuche simulando sonido de rayos y truenos. Por si alguien quiere el original. Ponedlo en la carpeta de sonido en SE: Sonido del rayo----[url=http://www.mediafire.com/?7x29xdiuyvy6yjo]061-Thunderclap01.rar[/url] ¿COMO SE UTILIZA? Es sencillo, los climas disponibles son estos: 1 - Lluvia de agua normal 2 - Tormenta de agua 3 - Nevada 4 - Granizo 5 - Tormenta de agua con truenos y relampagos 6 - Hojas otoñales cayendo 7 - Hojas otoñales volando por el mapa 8 - Hojas de otoño revueltas por ahí 9 - Hojas verdes cayendo 10 - la lozanía de la cereza. (El asakura, los pétalos esos rosas de Japón) 11 - los pétalos de la rosa 12 - Plumas 13 - Lluvia de SANGRE 14 - Chispas 15 - Reservada para el usuario (Hay que saber un mínimo de scripts) Para activar un clima, en el comando llamar script, tienes que poner esto: $game_screen.weather(Tipo1-14, Poder 0-40, Color) * En "Tipo1-14" Hay que poner un número del 1 al 14 que será el clima determinado. Los números con sus respectivos climas ya los he puesto arriba. * En "Poder 0-40" Hay que poner un número del 0 al 40, que representa la intensidad del clima. De modo que 0 en muuuuy lento, y 40 sería muy rápido, en el modo de como de rápido como caen las cosas de dicho cliima. *En "Color" no tengo ni idea ni para que sirve. Así que lo mejor es poner simepre 0, para que todo vaya normal. Aun que si queréis experimentar haber que pasa allá vosotros. Un ejemplo, sería: $game_screen.weather(11, 5, 0) En este, activo los pétalos de rosa con poca intensidad. ¿Como hago para que pare el clima? Muy sencillo. En los comandos que ya trae el rpg maker xp, uno sirve para parar el clima (En opciones de clima-poner ninguno) y se os parará. ¡Mirad, llueve sangre! [IMG]http://i40.tinypic.com/2gy930n.png[/IMG] ~Un saludo y hasta otro tutorial de algo, xD