hydramonMar Jun 26, 2012 11:08 pm
Usuario Nv10
Que? quieren parte 4?? PUES AQUI LA TIENEN!, claro que esta sera de unos 3 scripts, ya que mi mama quiere ocupar el notebook ._.
Empezemos! :
Script mp3 musical ( no compatible con Hero Menu Master) :
Si pueden, me gustaria que lo editen para XP, porque siempre que se termina mi demo, me gustaria poner un reproductor .
Sistema de Radio:
Pegar encima de main y para llamar: $scene = Scene_Radio.new
Hero Menu Master:
Caracteristicas
- Opciones con iconos
- Bestiario
- MP3
- Creditos
- Info de comandos
- Charita anime
- Localizacion
- Crear una mini mision
Instrucciones
Basta con copiar y pegar el script encima de main y listo.
Bno... pss aqui termina, el GRAN aporte yo digo que es el Hero Menu Master xDDDDD ... nos vemos hasta otro tema
(Se despide su user mas pequeño) Cambio y Fuera
Empezemos! :
Script mp3 musical ( no compatible con Hero Menu Master) :
- Spoiler:
- #========================================================================#
# #*****************# MP3 Musical 1.0 Falcao script Permite #
# #*** By Falcao ***# tener un reproductor musical para #
# #*****************# escuchar diferentes musicas segun #
# RMXP los gustos #
# makerpalace.onlinegoo.com Date 12/22/2009 #
#========================================================================#
#------------------------------------------------------------------------
# * Instrucciones
#
# Solo copiar y pegar el script encima de main, no se requiere de
# alguna imagen en especial
#
# Para llamar el script basta con pulsar tecla 'ALT' pero puede ser llamado
# manualmente con el siguiente comando $scene = Scene_Song.new
#
# Para agregar una musica a la lista de reproduccion usar el siguiente
# comando
#
# Songs.add(X) En vez de X poner el ID de musica a agregar
# Ejemplo: Songs.add(1) agrega id 1
#
# Comandos opcionales usados desde el comando script del evento
#
# $game_system.fplaying = true Al cambiar a otro mapa el reproductor
# continua sonando, cambiar true o false
# no abusar de su uso en true
#
# Licensia: Puede ser usado en juego no comerciales, para usarlo en juegos
# comerciales favor de contactarme
#-------------------------------------------------------------------------
module Songs
# Listas de reproduccion, para agregar mas seguir la secuencia de IDs
Pistas = {
#ID Musica Nombre Autor Genero
1=> ["Airship", "Dragon song", "Enterbrain", "Pop"],
2=> ["Scene6", "Soul Balad", "Enterbrain", "Romantica"],
3=> ["Town1", "Villa Pinguino", "Enterbrain", "Baladada"],
4=> ["Battle1", "Monte Falcao", "Enterbrain", "Jazz"],
5=> ["Field3", "Valery Field", "Enterbrain", "Pop Rock"],
}
# Incluir los siguientes ID de musicas por defecto
Default_list = [1, 2]
# Color del reproductor visual, escoger entre uno de los siguientes
# 1 = Normal, 2 = Naranja, 3 = Amarillo oro
# 4 = Verde, 5 = Violeta 4 = Rojo
PlayerColor = 1
# Tecla para llamar el script
Call_script = Input::ALT
# Evitar llamar el script con la tecla especificada
Disable_Call = false
# Vacabulario general
Total = "Total"
None = "None"
Command = "A = Parar"
Apply = "Aplicar"
Title = "Titulo"
Author = "Autor"
Genre = "Genero"
Pistas.each do |id, value|
value.push(id)
end
def self.add(song_id)
unless $game_system.fsong.include?(song_id)
$game_system.fsong.push(song_id)
end
end
end
#--------------------------------------------------------------------------
# * Game_System, initialize aliased
#--------------------------------------------------------------------------
class Game_System
attr_accessor :fsong
attr_accessor :fplaying
alias falcaosond_ini initialize
def initialize
falcaosond_ini
@fsong = Songs::Default_list
@fplaying = false
end
end
#--------------------------------------------------------------------------
# * Lista de musicas
#--------------------------------------------------------------------------
class Song_indice < Window_Selectable
def initialize
super(42, 155, 164, 170)
@column_max = 1
refresh
self.index = 0
end
def song
return @data[self.index]
end
def refresh
return if $game_system.fsong.empty?
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in Songs::Pistas.values
if $game_system.fsong.include?(i[4])
@data.push(i)
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 26)
for i in 0...@item_max
draw_item(i)
end
end
end
def draw_item(index)
song_data = @data[index]
self.contents.font.color = normal_color
x, y = 4, index * 24
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
contents.draw_text(x, y, 212, 24, song_data[1])
end
end
#--------------------------------------------------------------------------
# * Informacion de cada cansion
#--------------------------------------------------------------------------
class Song_Info < Window_Base
def initialize
super(204, 155, 302, 170)
end
def refresh(song)
self.contents.clear
if $game_system.fsong.include?(song[4])
draw_song_info(song)
end
end
def draw_song_info(song)
Songs::Pistas.each do |id, value|
if id == song[4]
self.contents.draw_text(0, 0, self.width, 32,
"#{Songs::Title} #{value[1]}")
self.contents.draw_text(0, 30, self.width, 32,
"#{Songs::Author} #{value[2]}")
self.contents.draw_text(0, 60, self.width, 32,
"#{Songs::Genre} #{value[3]}")
end
end
end
end
#--------------------------------------------------------------------------
# * Reproductor visual
#--------------------------------------------------------------------------
class Sprite_Waves < Sprite_Base
include Songs
def initialize(viewport, cx, cy)
super(viewport)
self.bitmap = Bitmap.new(302,200)
self.x = cx + 235
self.y = cy + 270
self.angle = 180
@color = [nil, Color.new(180,225,245), Color.new(255, 120, 0, 255),
Color.new(220, 220, 70, 255), Color.new(128, 255, 128, 255),
Color.new(130, 0, 130, 255), Color.new(255, 0, 0, 255)]
@time_count = 0
draw_waves(20, 120, true)
update
end
def update
super
@time_count += 1
case @time_count
when 4
self.bitmap.clear
for song in Songs::Pistas.values
if song[0] == RPG::BGM.last.name
$falplaying = true
end
end
$falplaying ? draw_waves(20, 120) : draw_waves(20, 120, true)
when 8
@time_count = 0
end
end
def draw_waves(x, y, ini=false)
fx = 0
for i in 1...100
fx += 2
!ini ? self.bitmap.fill_rect(x+fx, y, 1, rand(40), @color[PlayerColor]) :
self.bitmap.fill_rect(x+fx, y, 1, 4, @color[PlayerColor])
end
end
end
#--------------------------------------------------------------------------
# * Multi ventanas, total, info, preg
#--------------------------------------------------------------------------
class Up_windows < Window_Base
include Songs
def initialize(x=0,y=0, ancho=164, alto=56)
super(x, y, ancho, alto)
end
def total
self.contents.clear
text = "#{Total}: #{$game_system.fsong.size}"
self.contents.draw_text(0, -2, self.width, 32, text)
end
def info
self.contents.clear
self.contents.font.size = 20
nada = false
for song in Songs::Pistas.values
if song[0] == RPG::BGM.last.name
self.contents.draw_text(0, -2, self.width, 32, "♪ #{song[1]}")
nada = false
break
else
nada = true
end
end
self.contents.draw_text(0, -2, self.width, 32, "♪ #{None}") if nada
self.contents.font.size = 16
self.contents.draw_text(-40, -2, self.width, 32, Command,2)
end
def preg
self.contents.clear
self.contents.draw_text(0, -2, self.width, 32, "#{Apply} ♪")
end
end
#--------------------------------------------------------------------------
# * Scene_Song
#--------------------------------------------------------------------------
class Scene_Song < Scene_Base
def start
super
create_menu_background
$game_temp.map_bgm = RPG::BGM.last
$game_temp.map_bgs = RPG::BGS.last
@viewport1 = Viewport.new(0, 0, 544, 416)
@viewport1.z = 101
@indice_song = Song_indice.new
@info_song = Song_Info.new
@total_window = Up_windows.new(42,100)
@total_window.total
@info_window = Up_windows.new(204,100, 302, 56)
@info_window.info
@waves = Sprite_Waves.new(@viewport1, @info_song.x, @info_song.y)
@marco = Up_windows.new(204,156,171, 171)
@marco.z = 102
@marco.visible = false
@pregunta = Up_windows.new(204,156,171)
@pregunta.z = 102
@pregunta.preg
@pregunta.visible = false
$falplaying = false
if !$game_system.fsong.empty?
@info_song.refresh(@indice_song.song)
end
$game_system.fsong.empty? ? @waves.visible = false : @waves.visible = true
s1 = "Si"
s2 = "No"
s3 = "Cancelar"
@command_window = Window_Command.new(172, [s1, s2, s3])
@command_window.x = 204
@command_window.y = 211
@command_window.z = 103
@command_window.height = 115
@command_window.visible = false
@command_window.active = false
end
def terminate
super
@indice_song.dispose
@info_song.dispose
@waves.dispose
@viewport1.dispose
@total_window.dispose
@info_window.dispose
@command_window.dispose
@pregunta.dispose
@marco.dispose
end
def update
super
@indice_song.update
@waves.update
@command_window.update
if !$game_system.fsong.empty?
@info_song.refresh(@indice_song.song)
end
update_Selection
update_commands
if Input.trigger?(Input::B)
Sound.play_cancel
if $falplaying and !@command_window.visible
@command_window.index = 0
@command_window.visible = true
@command_window.active = true
@indice_song.active = false
@pregunta.visible = true
@marco.visible = true
elsif @command_window.visible
cancelar
else
salir
end
end
end
def update_Selection
return if $game_system.fsong.empty? or @command_window.visible
if Input.trigger?(Input::C)
Sound.play_decision
$falplaying = true
RPG::BGM.new(@indice_song.song[0]).play
@info_window.info
end
if Input.trigger?(Input::X)
RPG::BGM.stop
$falplaying = false
end
end
def salir
if !$falplaying
$game_temp.map_bgm.play
$game_temp.map_bgs.play
end
$scene = Scene_Map.new
return
end
def update_commands
return if !@command_window.visible
if Input.trigger?(Input::C)
Sound.play_decision
case @command_window.index
when 0; salir
when 1; $falplaying = false; salir
when 2; cancelar
end
end
end
def cancelar
@command_window.visible = false
@command_window.active = false
@indice_song.active = true
@pregunta.visible = false
@marco.visible = false
end
end
#--------------------------------------------------------------------------
# * Fuente
#--------------------------------------------------------------------------
class Font
alias falcaoBest5_font initialize
def initialize
falcaoBest5_font
if $scene.is_a?(Scene_Song)
self.name = "Georgia"
self.size = 20
end
end
end
#--------------------------------------------------------------------------
# * Game_Map, autoplay aliased
#--------------------------------------------------------------------------
class Game_Map
alias falcao13_autoplay autoplay
def autoplay
return if $game_system.fplaying
falcao13_autoplay
end
end
#--------------------------------------------------------------------------
# * Scene_Map, update aliased
#--------------------------------------------------------------------------
class Scene_Map
alias falcao99_update update
def update
if Input.trigger?(Songs::Call_script) and !Songs::Disable_Call
$scene = Scene_Song.new
return
end
falcao99_update
end
end
Si pueden, me gustaria que lo editen para XP, porque siempre que se termina mi demo, me gustaria poner un reproductor .
Sistema de Radio:
- Spoiler:
- =begin
Sistema de Radio
Versión: 1.0
Autores original: X-RPG, RMXP.net, Dubealex, Ryughen, Torama, Vash y Deke
Adaptación al español por ZunnerX
Crea un sistema de radio con canales de sintonía y así sucesivamente ...
Cada estación tiene una canción. Para añadir las estaciones, sólo tiene que añadir a
continuación de "def search(hz)" lo siguiente:
elsif hz == (canal)
$chan_name = "Nombre del Canal"
Audio.bgm_stop
play("Nombre de la canción a tocar")
Siga los ejemplos que figuran a continuación.
Para llamar script, use $scene = Scene_Radio.new
=end
$map_interpreter = Game_Interpreter.new
class Radio
def play(channel) # No cambiar nada de Aquí (Recomendado)
if channel == "none"
$chan_name = "Nada"
else
Audio.bgm_play("Audio/BGM/" + channel, 100, 100)
end
end
# ===============================
# Configuración de las Estaciones de Radio
#================================
def search(hz) # Numero de la estación de Radio
if hz == 5
$chan_name = "Radio ZunnerX" # Nombre del canal
Audio.bgm_stop # Para la música actual
play("Theme1")# Nombre de la musica
elsif hz == 10
$chan_name = "Radio Maker Palace"
Audio.bgm_stop
play("Dungeon6")
#===============================================================================
#Configuraciones Avanzadas de Script
#===============================================================================
else
Audio.bgm_stop
#play("Radio")
end
end
end
class Window_RadioScreen < Window_Base
def initialize
super(0, 0, 300, 64)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
def refresh
self.contents.clear
rect1 = Rect.new(0, 0, 304, 64)
rect2 = Rect.new(0, 16, 304, 1)
rect3 = Rect.new($x, 8, 1, 16)
self.contents.fill_rect(rect1, Color.new(0, 0, 0))
self.contents.fill_rect(rect2, Color.new(255, 0, 0))
self.contents.fill_rect(rect3, Color.new(0, 0, 255))
self.contents.draw_text(0, 0, self.width - 40, 32, $x.to_s + " FM", 1)
end
end
class Window_RadioName < Window_Base
def initialize
super(300, 0, 246, 64)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
def refresh
self.contents.clear
if $chan_name != nil
self.contents.draw_text(0, 0, self.width - 40, 32, $chan_name, 1)
else
self.contents.draw_text(0, 0, self.width - 40, 32, "Canal De Radio", 1)
end
end
end
class Scene_Radio
def main
$x = 0
@sprite = Spriteset_Map.new
@radio_window = Window_RadioScreen.new
@name_window = Window_RadioName.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@radio_window.dispose
@name_window.dispose
@sprite.dispose
end
def update
$game_map.update
$map_interpreter.update
$game_system.update
if Input.repeat?(Input::RIGHT) # Mover la tecla Derecha
if $x == 287
$x = 0
else
$x += 1
end
$radio.search($x)
end
if Input.repeat?(Input::LEFT) # Mover la Tecla Izquierda
if $x < 1
$x = 287
else
$x -= 1
end
$radio.search($x)
end
if Input.trigger?(Input::B) # ESC Para sacar el menu de radio y dejar el seleccionado
RPG::SE.stop
$scene = Scene_Map.new
end
@radio_window.refresh
@radio_window.update
@name_window.refresh
@name_window.update
end
end
class Scene_Title
alias ra_title_command_new_game command_new_game
def command_new_game
ra_title_command_new_game
$radio = Radio.new
end
end
Pegar encima de main y para llamar: $scene = Scene_Radio.new
Hero Menu Master:
- Spoiler:
- #=======================================================================#
# #*****************# Falcao hero menu master VX, Falcao script #
# #*** By Falcao ***# Cambia el menu tradicional por un menu #
# #*****************# con mas opciones, iconos, bestiary, Mp3 #
# RMVX #
# makerpalace.onlinegoo.com Date: 2/6/2010 #
#=======================================================================#
#------------------------------------------------------------------------
# * Instrucciones
#
# Basta con copiar y pegar el script encima de Main, facil XD.
#
# Nota: Si usabas mis scripts de; Dinamic Bestiary o el de Mp3 Musical
# Recomiendo removerlos porque este script ya los incluye
#
# Licensia: Este script puede ser usado en juegos NO comerciales
# Para usarlo en juegos comerciales Favor de contactarme
#------------------------------------------------------------------------
#--------------------------------------------------------------------------
# * Confuguracion del menu
#--------------------------------------------------------------------------
module Falcao
# Index de iconos del menu van de orden, primero al ultimo
@@icon_index = [66, 119, 131, 137, 145, 112, 141, 176, 179, 134]
#---------------------------------------
# Mision Mini config, agregando 1 mini mision
#
# Usar el siguiente comando desde el comando script del evento
#
# quest_text(
#
# "1- linea1",
# "linea2",
#
# "2- linea1",
# "linea2"
#
# )
#--------------------------------------
end
#--------------------------------------------------------------------------
# * Informacion de los comandos configuracion
#--------------------------------------------------------------------------
module FalCommands
LeftCommands = {
1=> "Tecla X",
2=> "Tecla Z",
3=> "Tecla Shift",
4=> "",
}
# Accion
RightCommands = {
1=> "Accion",
2=> "Menu/salir",
3=> "Correr",
4=> "",
}
end
#--------------------------------------------------------------------------
# * Confuguracion del Bestiario
#--------------------------------------------------------------------------
module Falcao
# Descripcion Para cada enemigo / Enemy desciption
# A = Id del enemigo / Enemy ID
# B = Description
Description = {
1=> 'Habita cerca de los arrollos del bosque Falcar',
2=> 'Se mata facilmente con un ataque normal, es devil al elemento agua',
3=> 'Habita en el bosque shulton, devil al elemento fuego',
4=> 'Ponsoñosa araña que habita dentro de cuevas, si pica tomar antidoto',
5=> 'Rata escurridiza, suele dejar buena experiencia',
21=> 'Habita alrededor del castillo tridan, devil a luz',
}
# Tocar musica / play music (true o false)
PlayMusic = true
# Musica que sonara en el bestiario
BestiaryMusic = 'Battle1'
# Declaracion de arrays / Arrays declaration
$derrotados = []
$enemy_counter = []
EnemyLevel = []
# Vocabulario / Vocabulary
FalVocab = ['-No hay datos-', # No datos / No data
'Tesoro', # Tesoro 1 / Treasure 1
'Tesoro2', # tesoro 2 / Treasure 2
'None', # Sin tesoro / No treasure
'????', # Enemigo no derrotado / Enemy no defeated
'Bestiary', # Titulo / Title
'Derrotado', # Derrotado / defeated
'Clase', # Clase de enemigo / enemy class
'Power', # Energia maxima / Power
'Veces', # Veces derrotado / times defeated
'Progreso'] # Progreso / Progress
# Clases de enemigos / enemy classes
# Calculos basados en parametros / Values based on parameters(Def, atk, etc.)
EnemyLevel[1] = "Noob"
EnemyLevel[2] = "Amateaur"
EnemyLevel[3] = "King master"
EnemyLevel[4] = "Boss fighter"
EnemyLevel[5] = "Master boss"
#--------
# Cuando un enemigo es derrotado es automaticamente agregado al invetario pero
# puedes administrarlos manualmente con los siguientes comandos
# When you defeat an enemy automaticly is added, but you can add or remove
# enemies manualy with the following comands
# Falcao.add_enemy(X) Agrega enemigo X, en ves de X poner ID de enemigo
# Add enemy X, instead X put enemy ID
#
# Falcao.remove_enemy(X) remueve enemigo X, En ves de X poner ID de enemigo
# Remove Enemy X, Instead X put enemy ID
#
# Falcao.fill_bestiary Agrega todos los monstruos al bestiario
# Fill bestiary
#
end
#--------------------------------------------------------------------------
# * Confuguracion de los creditos
#--------------------------------------------------------------------------
module FalcaoIntro
# Audio al presentar la intro o creditos cambiar el nombre por
# la musica deceada deve estar en el folder BGM
AUDIO_INTRO = 'Scene6'
# Texto de los creditos
TEXTO = [
"Creditos:",
"",
"Falcao creador de todos los scripts en este menu",
"Maker Palace donse se forman los grandes Makeros",
"",
"Agradecimientos",
"",
"A los Palacers por aportar ideas",
"Al sagrado internet por permitirme",
"usar el sagrado google jeje",
"",
"Referencias",
"",
"Vicita el forito de Falcao en",
"makerpalace.onlinegoo.com",
"No olvides registrarte",
"",
"",
"Fin",
"",
]
# Espasio entre linea de texto
ESPACIO_LINEA = 28
# Velocidad de texto
SPEED = 0.7
end
#--------------------------------------------------------------------------
# * Confuguracion del Mp3 Musical
#--------------------------------------------------------------------------
module Songs
#------------------------------------------------------------------------
# Para agregar una musica a la lista de reproduccion usar el siguiente
# comando
#
# Songs.add(X) En vez de X poner el ID de musica a agregar
# Ejemplo: Songs.add(1) agrega id 1
#
# Comandos opcionales usados desde el comando script del evento
#
# $game_system.fplaying = true Al cambiar a otro mapa el reproductor
# continua sonando, cambiar true o false
# no abusar de su uso en true
#
# Licensia: Puede ser usado en juego no comerciales, para usarlo en juegos
# comerciales favor de contactarme
#-------------------------------------------------------------------------
# Listas de reproduccion, para agregar mas seguir la secuencia de IDs
Pistas = {
#ID Musica Nombre Autor Genero
1=> ["Airship", "Dragon song", "Enterbrain", "Pop"],
2=> ["Scene6", "Soul Balad", "Enterbrain", "Romantica"],
3=> ["Town1", "Villa Pinguino", "Enterbrain", "Baladada"],
4=> ["Battle1", "Monte Falcao", "Enterbrain", "Jazz"],
5=> ["Field3", "Valery Field", "Enterbrain", "Pop Rock"],
}
# Incluir los siguientes ID de musicas por defecto
Default_list = [1, 2]
# Color del reproductor visual, escoger entre uno de los siguientes
# 1 = Normal, 2 = Naranja, 3 = Amarillo oro
# 4 = Verde, 5 = Violeta 6 = Rojo
PlayerColor = 1
# Vacabulario general
Total = "Total"
None = "None"
Command = "A = Parar"
Apply = "Aplicar"
Title = "Titulo"
Author = "Autor"
Genre = "Genero"
end
#-----------------------------------------------------------------------------
class Game_System
attr_accessor :qtext
alias falcao_miniquest_ini initialize
def initialize
@qtext = ["", "", "", ""]
falcao_miniquest_ini
end
end
class Game_Interpreter
def quest_text(l1, l2, l3, l4)
$game_system.qtext[0] = l1
$game_system.qtext[1] = l2
$game_system.qtext[2] = l3
$game_system.qtext[3] = l4
end
end
class Miniquest < Window_Base
def initialize(x=0, y=0)
super(x, y, 160, 150)
refresh
end
def refresh
self.contents.clear
self.contents.font.size = 20
self.contents.draw_text(0, -5, self.width, 32, "Mision mini")
self.contents.font.size = 16
self.contents.draw_text(0, 25, self.width, 32, $game_system.qtext[0])
self.contents.draw_text(0, 45, self.width, 32, $game_system.qtext[1])
self.contents.draw_text(0, 72, self.width, 32, $game_system.qtext[2])
self.contents.draw_text(0, 92, self.width, 32, $game_system.qtext[3])
end
end
class Map_Location < Window_Base
def initialize(x=0, y=0)
super(x, y, 160, 80)
refresh
end
def refresh
self.contents.clear
self.contents.font.size = 18
self.contents.font.bold = true
self.contents.draw_text(0, -5, 150, 32, "Local")
data = load_data("Data/MapInfos.rvdata")
self.contents.draw_text(0, 25, self.width, 32, data[$game_map.map_id].name)
end
end
class Window_Anime < Window_Base
def initialize(x=0, y=0)
super(x, y, 160, 132)
refresh
end
def refresh
self.contents.clear
actor = $game_party.members[0]
self.contents.font.size = 16
self.contents.font.bold = true
self.contents.draw_text(0, 50, 90, 32, "Exp")
exp = actor.exp_s
nex = actor.next_exp_s
self.contents.draw_text(60, 50, 90, 32, "#{exp} / #{nex}")
draw_exp_bar(actor, 0, 85)
end
def draw_exp_bar(actor, x, y)
self.contents.fill_rect(x, y, 92, 10, Color.new(0,0,0))
self.contents.fill_rect(x+1, y+1, 90*actor.exp_s/actor.next_exp_s, 4,
Color.new(205,255,205))
self.contents.fill_rect(x+1, y+5, 90*actor.exp_s/actor.next_exp_s, 4,
Color.new(10,220,45))
end
end
class Window_MenuStatus < Window_Selectable
def initialize(x, y)
$game_party.members.size > 1 ? a = 416 : a = 132
super(x, y, 384, a)#132)
refresh
self.active = false
self.index = -1
end
end
class Window_Command < Window_Selectable
def draw_icon(icon_index, x, y, enabled = true)
bitmap = Cache.system("Iconset")
rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
self.contents.blt(x, y, bitmap, rect, enabled ? 255 : 128)
end
end
class Scene_Menu < Scene_Base
include Falcao
def draw_menu_icons
y = 0
for icon in @@icon_index
@command_window.draw_icon(icon, 2, y)
y += 24
end
end
def initialize(menu_index = 0)
@menu_index = menu_index
end
def start
super
create_menu_background
create_command_window
@gold_window = Window_Gold.new(0, 212)
@status_window = Window_MenuStatus.new(160, 0)
if $game_party.members.size > 1
@status_window.height = 132
end
@local = Map_Location.new(0, 132)
@miniquest = Miniquest.new(0, 268)
@viewport = Viewport.new(0, 0, 544, 416)
@viewport.z = 102
@anime_window = Window_Anime.new
@sprite_anime = Sprite_Anime.new(@viewport,@anime_window.x + 70,
@anime_window.y + 70, $game_player)
end
def terminate
super
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@status_window.dispose
@sprite_anime.dispose
@viewport.dispose
@anime_window.dispose
@local.dispose
@miniquest.dispose
end
def update
super
@sprite_anime.refresh
update_menu_background
@command_window.update
@gold_window.update
@status_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
if !@command_window.active and $game_party.members.size > 1
@command_window.visible = false
@status_window.height = 416
elsif $game_party.members.size > 1
@command_window.visible = true
@status_window.height = 132
end
end
def create_command_window
s1 = " " + Vocab::item
s2 = " " + Vocab::skill
s3 = " " + Vocab::equip
s4 = " " + Vocab::status
s5 = " " + Vocab::save
s6 = " " + Vocab::game_end
s7 = " " + "Comandos"
s8 = " " + "Bestiary"
s9 = " " + "Creditos"
s10 = " " + "Mp3 Musical"
@command_window = Window_Command.new(380, [s1, s2, s3, s4, s5, s6,
s7, s8, s9, s10])
@command_window.x = 160
@command_window.y = 132
@command_window.width = 384
@command_window.height = 286
draw_menu_icons
@command_window.index = @menu_index
if $game_party.members.size == 0 # If number of party members is 0
@command_window.draw_item(0, false) # Disable item
@command_window.draw_item(1, false) # Disable skill
@command_window.draw_item(2, false) # Disable equipment
@command_window.draw_item(3, false) # Disable status
end
if $game_system.save_disabled # If save is forbidden
@command_window.draw_item(4, false) # Disable save
end
end
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0 # Item
$scene = Scene_Item.new
when 1,2,3 # Skill, equipment, status
start_actor_selection
when 4 # Save
$scene = Scene_File.new(true, false, false)
when 5 # End Game
$scene = Scene_End.new
when 6
$scene = Scene_Commands.new
when 7
$scene = Scene_Monsters.new
when 8
$scene = Scene_IntroCredit.new
when 9
$scene = Scene_Song.new
end
end
end
def start_actor_selection
@command_window.active = false
@status_window.active = true
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
def end_actor_selection
@command_window.active = true
@status_window.active = false
@status_window.index = -1
end
def update_actor_selection
if Input.trigger?(Input::B)
Sound.play_cancel
end_actor_selection
elsif Input.trigger?(Input::C)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
case @command_window.index
when 1 # skill
$scene = Scene_Skill.new(@status_window.index)
when 2 # equipment
$scene = Scene_Equip.new(@status_window.index)
when 3 # status
$scene = Scene_Status.new(@status_window.index)
end
end
end
end
class Sprite_Anime < Sprite_Base
def initialize(viewport, x, y, character = nil)
super(viewport)
@character = character
self.x = x
self.y = y; @pattern = 0; @counter = 0
update
end
def update
super
update_bitmap
update_src_rect
self.opacity = @character.opacity
self.blend_type = @character.blend_type
end
def refresh
update_src_rect
end
def update_bitmap
self.bitmap = Cache.character(@character.character_name)
sign = @character.character_name[/^[\!\$]./]
if sign != nil and sign.include?('$')
@cw = bitmap.width / 3
@ch = bitmap.height / 4
else
@cw = bitmap.width / 12
@ch = bitmap.height / 8
end
self.ox = @cw / 2
self.oy = @ch
end
def update_src_rect
@counter += 1
case @counter
when 10; @pattern = 0
when 20; @pattern = 1
when 30; @pattern = 2
when 40; @pattern = 3
@counter = 0
end
pattern = @pattern < 3 ? @pattern : 1
index = @character.character_index
sx = (index % 4 * 3 + pattern) * @cw
sy = (index / 4 * 4 + (2 - 2) / 2) * @ch
self.src_rect.set(sx, sy, @cw, @ch)
end
end
#----------------------
# * Comandos info
class Command_Title < Window_Base
def initialize
super(0, 0, 544, 70)
refresh
end
def refresh
self.contents.clear
self.contents.font.size = 25
self.contents.draw_text(50, 0, 400, 32, "Comandos",1)
end
end
class Command_Contents < Window_Base
include FalCommands
def initialize
super(0, 68, 544, 282)
@comandosLeft = LeftCommands
@comandosRight = RightCommands
refresh
end
def refresh
self.contents.clear
r_y = -30
l_y = -30
@comandosLeft.sort.each do |keys, values|
r_y += 30
self.contents.draw_text (30,r_y, 250, 32, values)
end
@comandosRight.sort.each do |keys, values|
l_y += 30
self.contents.draw_text (150,l_y, 250, 32, values)
end
self.contents.draw_text (380, 0, 180, 32, "Protagonista")
self.contents.draw_text (380, 135, 180, 32, "Estado")
actor = $game_party.members[0]
draw_actor_graphic(actor, 390, 120)
draw_actor_name(actor, 420, 50)
draw_actor_level(actor, 420, 70)
draw_actor_state(actor, 450, 135)
draw_actor_hp(actor, 380, 170)
draw_actor_mp(actor, 380, 200)
end
end
class Window_Nmap < Window_Base
def initialize
super(0, 348, 544, 70)
refresh
end
def refresh
self.contents.clear
self.contents.draw_text(0, 0, 150, 32, "local:")
self.contents.font.size = 19
data = load_data("Data/MapInfos.rvdata")
self.contents.draw_text(85, 0, self.width, 32, data[$game_map.map_id].name)
end
end
class Scene_Commands < Scene_Base
def start
super
create_menu_background
@title_command = Command_Title.new
@commands = Command_Contents.new
@mapname = Window_Nmap.new
end
def terminate
@title_command.dispose
@commands.dispose
@mapname.dispose
end
def update
super
if Input.trigger?(Input::B)
Sound.play_cancel
return_scene
end
end
def return_scene
$scene = Scene_Menu.new(6)
end
end
#----------------------
# * Bestiario
module Falcao
def self.fill_bestiary
for enemy in $data_enemies
next if enemy == nil
unless $derrotados.include?(enemy.id)
$derrotados.push(enemy.id)
$enemy_counter.push(enemy.id)
end
end
end
def self.add_enemy(id)
unless $derrotados.include?(id)
$derrotados.push(id)
$enemy_counter.push(id)
end
end
def self.remove_enemy(id)
if $derrotados.include?(id)
$derrotados.delete(id)
$enemy_counter.push(id)
end
end
end
class Moster_Info < Window_Base
include Falcao
def initialize(x, y)
super(x, y, 385, 380)
self.opacity = 0
end
def refresh(enemy_id)
self.contents.clear
@enemigo = $data_enemies[enemy_id]
if $derrotados.include?(@enemigo.id)
contents.font.size = 20
draw_enemy_hp(0, 205)
draw_enemy_mp(0, 230)
enemy_parametros
draw_drop_item1
draw_drop_item2
else
contents.font.size = 30
contents.draw_text(100, 100, 500, 92, FalVocab[0])
end
end
def enemy_parametros
y1 = 0; y2 = 0; y3 = 0; y4 = 0
terms = $data_system.terms
param1={1=>@enemigo.maxhp,2=>@enemigo.maxmp,3=>@enemigo.spi,4=>@enemigo.exp}
name1 = {1=> terms.hp, 2=> terms.mp, 3=> terms.spi, 4=> "Exp"}
param2={1=>@enemigo.atk,2=>@enemigo.def,3=>@enemigo.agi,4=> @enemigo.gold}
name2 = {1=> terms.atk, 2=> terms.def, 3=> terms.agi, 4=> terms.gold}
param1.sort.each do |keys, values|
y1 += 25
contents.draw_text(100, y1 + 134, 92, 92, values)
end
param2.sort.each do |keys, values|
y2 += 25
contents.draw_text(300, y2 + 134, 92, 92, values)
end
name1.sort.each do |keys, values|
y3 += 25
contents.draw_text(0, y3 + 134, 102, 92, values)
end
name2.sort.each do |keys, values|
y4 += 25
contents.draw_text(200, y4 + 134, 102, 92, values)
end
end
def draw_drop_item1
item = @enemigo.drop_item1
contents.draw_text(35, 260, 92, 92, FalVocab[1])
if item.kind == 0
contents.draw_text(0, 284, 92, 92, FalVocab[3])
return
end
case item.kind
when 1; drop_item = $data_items[item.item_id]
when 2; drop_item = $data_weapons[item.item_id]
when 3; drop_item = $data_armors[item.armor_id]
end
draw_icon(drop_item.icon_index,94, 318)
contents.draw_text(0, 284, 92, 92, drop_item.name)
end
def draw_drop_item2
item = @enemigo.drop_item2
contents.draw_text(226, 260, 92, 92, FalVocab[2])
if item.kind == 0
contents.draw_text(200, 284, 92, 92, FalVocab[3])
return
end
case item.kind
when 1; drop_item = $data_items[item.item_id]
when 2; drop_item = $data_weapons[item.item_id]
when 3; drop_item = $data_armors[item.armor_id]
end
draw_icon(drop_item.icon_index,300, 318)
contents.draw_text(200, 284, 92, 92, drop_item.name)
end
def draw_enemy_hp(x, y)
self.contents.fill_rect(x, y, 102, 10, Color.new(0,0,0))
self.contents.fill_rect(x+1, y+1, 100*@enemigo.maxhp/@enemigo.maxhp, 4,
Color.new(205,255,205))
self.contents.fill_rect(x+1, y+5, 100*@enemigo.maxhp/@enemigo.maxhp, 4,
Color.new(10,220,45))
end
def draw_enemy_mp(x, y)
if @enemigo.maxmp != 0
self.contents.fill_rect(x, y, 102, 10, Color.new(0,0,0))
self.contents.fill_rect(x+1, y+1, 100*@enemigo.maxmp/@enemigo.maxmp, 4,
Color.new(180,225,245))
self.contents.fill_rect(x+1, y+5, 100*@enemigo.maxmp/@enemigo.maxmp, 4,
Color.new(20,160,225))
else
self.contents.fill_rect(x, y, 102, 10, Color.new(0,0,0))
end
end
end
class Moster_Description < Window_Base
include Falcao
def initialize(x, y, ancho = 544, alto = 56)
super(x, y, ancho, alto)
@tiempo = 0
@scroll = 0
end
def set_texto(texto)
self.contents.clear
self.contents.draw_text(0, -4, 92, 32, texto)
for i in 0...$derrotados.size
number = i + 1
end
texto2 = "#{FalVocab[10]} #{number * 100/$all_mosnters}%" rescue texto2 =
"#{FalVocab[10]} 0 %"
self.contents.draw_text(0, 24, self.width, 32, texto2)
end
def refresh(enemy_id)
self.contents.clear
@enemigo = $data_enemies[enemy_id]
if $derrotados.include?(@enemigo.id)
draw_descriptions
else
self.contents.draw_text(-130, -4, 600, 32 , FalVocab[0],1)
end
end
def draw_descriptions
if Description.has_key?(@enemigo.id)
Description.each do |id, value|
if id == @enemigo.id
cx = contents.text_size(value).width
scroll_text(value)
self.contents.draw_text(@scroll, -4, cx + 10, 32 , value)
end
end
else
text = [" ",
" ",
"Description no available ",
"Falcao script Bestiary V 1.5 "
]
scroll_text(text,false)
cx = contents.text_size(text).width
self.contents.draw_text(@scroll, -4, cx + 10, 32, text )
end
end
def scroll_text(texto, result_ok=true)
cx = contents.text_size(texto).width
if cx > 350
@tiempo += 1
if @tiempo > 60
@scroll -= 1 if @result == nil
if @scroll == -cx
@result = true
end
end
end
if @result
result_ok ? @scroll += 10 : @scroll = 0
if @scroll >= 0
@scroll = 0; @tiempo = 0
@result = nil
end
end
if Input.press?(Input::UP) or Input.press?(Input::DOWN)
@scroll = 0; @tiempo = 0; @result = nil
end
end
end
class Monster_indice < Window_Selectable
def initialize(y)
super(0, y, 160, 334)
@column_max = 1
refresh
self.index = 0
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 1...$data_enemies.size
@data.push($data_enemies[i])
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 26)
for i in 0...@item_max
draw_item(i)
$all_mosnters = i + 1
end
end
end
def draw_item(index)
enemy = @data[index]
self.contents.font.color = normal_color
x, y = 4, index * 24
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
opacity = self.contents.font.color == normal_color ? 255 : 128
if $derrotados.include?(index+1)
contents.draw_text(x, y, 212, 24, enemy.name)
else
contents.draw_text(x, y, 212, 24, Falcao::FalVocab[4])
end
end
end
class Adicional_Data < Window_Base
include Falcao
attr_accessor :number
attr_accessor :counter
def initialize
super(0, 0, 160, 334)
@number = 0.0
@counter = 0.0
@color = [Color.new(180,225,245), Color.new(20,160,225)]
end
def refresh(enemy_id)
self.contents.clear
@enemigo = $data_enemies[enemy_id]
if $derrotados.include?(@enemigo.id)
draw_enemy_counter
draw_enemy_power(0,186)
contents.font.color = Color.new(255, 140, 0)
contents.draw_text(30, 0, 212, 24, @enemigo.name)
else
contents.font.color = normal_color
self.contents.draw_text(2, 50, 600, 32 , FalVocab[0])
end
end
def draw_enemy_counter
i = 0
for c in $enemy_counter
if c == @enemigo.id
i += 1
number = i
end
end
contents.font.color = normal_color
contents.draw_text(0, 40, 212, 24, FalVocab[6])
contents.draw_text(80, 70, 212, 24, number.to_s)
contents.draw_text(0, 70, 212, 24, FalVocab[9])
end
def get_power(enemy)
add = 0
number1 = enemy.spi + enemy.agi
number2 = enemy.atk + enemy.def
case enemy.maxhp
when 1...400
add = 60
when 400...1000
add = 100
when 1000...10000
add = 140
when 10000...999999
add = 200
end
@number = number1 + number2 + add
@counter = @number
@number = 1
end
def draw_enemy_power(x,y)
case @counter
when 1...150
value = 150; add = 1; level = EnemyLevel[1]
@color = [Color.new(180,225,245), Color.new(20,160,225)]
when 150...350
value = 350; add = 3; level = EnemyLevel[2]
@color = [Color.new(255, 120, 0), Color.new(255, 80, 50)]
when 350...600
value = 600; add = 6; level = EnemyLevel[3]
@color = [Color.new(205,255,205), Color.new(10,220,45)]
when 600...1000
value = 1000; add = 10; level = EnemyLevel[4]
@color = [Color.new(255,255,100), Color.new(255,200,0) ]
when 1000...4196
value = 3996; add = 20; level = EnemyLevel[5]
@color = [Color.new(255,255,100), Color.new(255,200,0) ]
end
@number = @counter if @number >= @counter
@number += add if @number < @counter
contents.font.color = Color.new(255, 140, 0)
contents.draw_text(30, 120, 212, 24, FalVocab[7])
contents.font.color = normal_color
contents.draw_text(0, 150, 212, 24, level)
self.contents.fill_rect(x, y, 128, 14, Color.new(0,0,0))
self.contents.fill_rect(x+1, y+1, 126*@number/value, 6, @color[0])
self.contents.fill_rect(x+1, y+7, 126*@number/value, 6, @color[1])
contents.draw_text(0, 210, 212, 24, FalVocab[8])
contents.draw_text(80, 210, 212, 24, @number.to_s)
end
end
class Game_Enemy < Game_Battler
alias falcao_collapse2 perform_collapse
def perform_collapse
falcao_collapse2
unless $derrotados.include?(enemy.id)
$derrotados.push(enemy.id)
end
if $game_temp.in_battle and dead?
$enemy_counter.push(enemy.id)
end
end
end
class Font
alias falcaoBest8_font initialize
def initialize
falcaoBest8_font
if $scene.is_a?(Scene_Monsters)
self.name = "Georgia"
self.size = 20
end
end
end
class Scene_Monsters < Scene_Base
def start
super
@spriteset = Spriteset_Bestiary.new
@mostruos_index = Monster_indice.new(84)
@info_mosters = Moster_Info.new(160,56)
@help = Moster_Description.new(160,0, 386)
@title = Moster_Description.new(0,0, 160, 84)
@title.set_texto(Falcao::FalVocab[5])
@info_mosters.refresh(@mostruos_index.index + 1)
@help.refresh(@mostruos_index.index + 1)
@extra_data = Adicional_Data.new
@extra_data.y = 84
@extra_data.visible = false
@moster_graphic = Sprite.new
@moster_graphic.bitmap = Cache.battler("",0)
@moster_graphic.z = 99
@moster_graphic.y = 65
@time = 0
if Falcao::PlayMusic
$game_temp.map_bgm = RPG::BGM.last
$game_temp.map_bgs = RPG::BGS.last
RPG::BGM.new(Falcao::BestiaryMusic).play
end
create_enemy_graphics
end
def terminate
super
@mostruos_index.dispose
@info_mosters.dispose
@help.dispose
@spriteset.dispose
@title.dispose
@moster_graphic.dispose
end
def update
super
@spriteset.update
@mostruos_index.update
@help.refresh(@mostruos_index.index + 1)
animate_graphic
if Input.press?(Input::DOWN) or Input.press?(Input::UP)
@info_mosters.refresh(@mostruos_index.index + 1)
create_enemy_graphics
if @extra_data.visible
@extra_data.get_power($data_enemies[@mostruos_index.index + 1])
end
end
if Input.trigger?(Input::C) and @extra_data.visible == false
Sound.play_decision
@extra_data.get_power($data_enemies[@mostruos_index.index + 1])
@extra_data.refresh(@mostruos_index.index + 1)
@extra_data.visible = true
@mostruos_index.y = 600
end
if @extra_data.visible
if @extra_data.number < @extra_data.counter
@extra_data.refresh(@mostruos_index.index + 1)
end
end
if Input.trigger?(Input::B)
if @extra_data.visible
Sound.play_cancel
@extra_data.visible = false
@mostruos_index.y = 84
else
Sound.play_cancel
if Falcao::PlayMusic
$game_temp.map_bgm.play
$game_temp.map_bgs.play
end
$scene = Scene_Menu.new(7)
end
end
end
def create_enemy_graphics
enemy = $data_enemies[@mostruos_index.index + 1]
if $derrotados.include?(enemy.id)
@moster_graphic.bitmap = Cache.battler(enemy.battler_name,
enemy.battler_hue)
cw = @moster_graphic.width
@moster_graphic.x = 360 - cw / 2
@moster_graphic.visible = true
else
@moster_graphic.visible = false
end
end
def animate_graphic
if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
@moster_graphic.zoom_x = 1
@moster_graphic.zoom_y = 1
@time = 0
end
h = 240; @time += 1
if @time < 40
if @moster_graphic.height <= h
@moster_graphic.zoom_x += 0.002
@moster_graphic.zoom_y += 0.002
elsif @moster_graphic.height > h
@moster_graphic.zoom_x += 0.001
@moster_graphic.zoom_y += 0.001
end
elsif @time > 40
if @moster_graphic.height <= h
@moster_graphic.zoom_x -= 0.002
@moster_graphic.zoom_y -= 0.002
elsif @moster_graphic.height > h
@moster_graphic.zoom_x -= 0.001
@moster_graphic.zoom_y -= 0.001
end
if @time == 80
@moster_graphic.zoom_x = 1
@moster_graphic.zoom_y = 1
@time = 0
end
end
end
end
class Scene_File < Scene_Base
alias falcaosave_data2 write_save_data
def write_save_data(file)
falcaosave_data2(file)
Marshal.dump($derrotados, file)
Marshal.dump($enemy_counter, file)
end
end
class Scene_File < Scene_Base
alias falcaoload_data2 read_save_data
def read_save_data(file)
falcaoload_data2(file)
$derrotados = Marshal.load(file)
$enemy_counter = Marshal.load(file)
end
end
class Spriteset_Bestiary
def initialize
create_battleback
update
end
def create_battleback
@viewport1 = Viewport.new(0, 0, 544, 416)
source = $game_temp.background_bitmap
bitmap = Bitmap.new(640, 480)
bitmap.stretch_blt(bitmap.rect, source, source.rect)
bitmap.radial_blur(90, 12)
@battleback_sprite = Sprite.new(@viewport1)
@battleback_sprite.bitmap = bitmap
@battleback_sprite.ox = 320
@battleback_sprite.oy = 240
@battleback_sprite.x = 272
@battleback_sprite.y = 176
@battleback_sprite.wave_amp = 8
@battleback_sprite.wave_length = 240
@battleback_sprite.wave_speed = 120
end
def dispose
@battleback_sprite.bitmap.dispose
@battleback_sprite.dispose
@viewport1.dispose
end
def update
@battleback_sprite.update
@viewport1.update
end
end
#----------------------
# * Creditos
class Scene_IntroCredit
def main
strings = FalcaoIntro::TEXTO
$game_temp.map_bgm = RPG::BGM.last
$game_temp.map_bgs = RPG::BGS.last
RPG::BGM.stop
RPG::BGS.stop
RPG::BGM.new(FalcaoIntro::AUDIO_INTRO).play
spacing = FalcaoIntro::ESPACIO_LINEA
@speed = FalcaoIntro::SPEED
alignment = "center"
@win = Window_Base.new(-45, 480, 640, spacing * strings.size + 20)
@win.contents = Bitmap.new (@win.width-32, @win.height-32)
@win.contents.font.size = 22
height = @win.contents.font.size + 4
@win.opacity = 0
@win.z = 9998
for i in 0...strings.size
cw = @win.contents.text_size(strings[i]).width
y = spacing * i
x = 0
if alignment == "center"
x = @win.contents.width / 2 - cw / 2
elsif alignment == "right"
x = @win.contents.width - cw
end
@win.contents.draw_text(x, y, cw, height, strings[i])
end
@y = 480.0
@al_titulo = false
Graphics.transition
loop do
if @al_titulo
break
end
Graphics.update
Input.update
update
end
Graphics.freeze
@win.dispose
$game_temp.map_bgm.play
$game_temp.map_bgs.play
$scene = Scene_Menu.new(
end
def update
if Input.press?(Input::B)
@speed = 4
else
@speed = FalcaoIntro::SPEED
end
@y -= @speed
@win.y = @y
if @win.y + @win.height <= -32
@al_titulo = true
end
end
end
#----------------------
# * Mp3 Musical
module Songs
Pistas.each do |id, value|
value.push(id)
end
def self.add(song_id)
unless $game_system.fsong.include?(song_id)
$game_system.fsong.push(song_id)
end
end
end
class Game_System
attr_accessor :fsong
attr_accessor :fplaying
alias falcaosond_ini2 initialize
def initialize
falcaosond_ini2
@fsong = Songs::Default_list
@fplaying = false
end
end
class Song_indice < Window_Selectable
def initialize
super(42, 155, 164, 170)
@column_max = 1
refresh
self.index = 0
end
def song
return @data[self.index]
end
def refresh
return if $game_system.fsong.empty?
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in Songs::Pistas.values
if $game_system.fsong.include?(i[4])
@data.push(i)
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 26)
for i in 0...@item_max
draw_item(i)
end
end
end
def draw_item(index)
song_data = @data[index]
self.contents.font.color = normal_color
x, y = 4, index * 24
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
contents.draw_text(x, y, 212, 24, song_data[1])
end
end
class Song_Info < Window_Base
def initialize
super(204, 155, 302, 170)
end
def refresh(song)
self.contents.clear
if $game_system.fsong.include?(song[4])
draw_song_info(song)
end
end
def draw_song_info(song)
Songs::Pistas.each do |id, value|
if id == song[4]
self.contents.draw_text(0, 0, self.width, 32,
"#{Songs::Title} #{value[1]}")
self.contents.draw_text(0, 30, self.width, 32,
"#{Songs::Author} #{value[2]}")
self.contents.draw_text(0, 60, self.width, 32,
"#{Songs::Genre} #{value[3]}")
end
end
end
end
#--------------------------------------------------------------------------
# * Reproductor visual
#--------------------------------------------------------------------------
class Sprite_Waves < Sprite_Base
include Songs
def initialize(viewport, cx, cy)
super(viewport)
self.bitmap = Bitmap.new(302,200)
self.x = cx + 235
self.y = cy + 270
self.angle = 180
@color = [nil, Color.new(180,225,245), Color.new(255, 120, 0, 255),
Color.new(220, 220, 70, 255), Color.new(128, 255, 128, 255),
Color.new(130, 0, 130, 255), Color.new(255, 0, 0, 255)]
@time_count = 0
draw_waves(20, 120, true)
update
end
def update
super
@time_count += 1
case @time_count
when 4
self.bitmap.clear
for song in Songs::Pistas.values
if song[0] == RPG::BGM.last.name
$falplaying = true
end
end
$falplaying ? draw_waves(20, 120) : draw_waves(20, 120, true)
when 8
@time_count = 0
end
end
def draw_waves(x, y, ini=false)
fx = 0
for i in 1...100
fx += 2
!ini ? self.bitmap.fill_rect(x+fx, y, 1, rand(40), @color[PlayerColor]) :
self.bitmap.fill_rect(x+fx, y, 1, 4, @color[PlayerColor])
end
end
end
#--------------------------------------------------------------------------
# * Multi ventanas, total, info, preg
#--------------------------------------------------------------------------
class Up_windows < Window_Base
include Songs
def initialize(x=0,y=0, ancho=164, alto=56)
super(x, y, ancho, alto)
end
def total
self.contents.clear
text = "#{Total}: #{$game_system.fsong.size}"
self.contents.draw_text(0, -2, self.width, 32, text)
end
def info
self.contents.clear
self.contents.font.size = 20
nada = false
for song in Songs::Pistas.values
if song[0] == RPG::BGM.last.name
self.contents.draw_text(0, -2, self.width, 32, "♪ #{song[1]}")
nada = false
break
else
nada = true
end
end
self.contents.draw_text(0, -2, self.width, 32, "♪ #{None}") if nada
self.contents.font.size = 16
self.contents.draw_text(-40, -2, self.width, 32, Command,2)
end
def preg
self.contents.clear
self.contents.draw_text(0, -2, self.width, 32, "#{Apply} ♪")
end
end
#--------------------------------------------------------------------------
# * Scene_Song
#--------------------------------------------------------------------------
class Scene_Song < Scene_Base
def start
super
create_menu_background
$game_temp.map_bgm = RPG::BGM.last
$game_temp.map_bgs = RPG::BGS.last
@viewport1 = Viewport.new(0, 0, 544, 416)
@viewport1.z = 101
@indice_song = Song_indice.new
@info_song = Song_Info.new
@total_window = Up_windows.new(42,100)
@total_window.total
@info_window = Up_windows.new(204,100, 302, 56)
@info_window.info
@waves = Sprite_Waves.new(@viewport1, @info_song.x, @info_song.y)
@marco = Up_windows.new(204,156,171, 171)
@marco.z = 102
@marco.visible = false
@pregunta = Up_windows.new(204,156,171)
@pregunta.z = 102
@pregunta.preg
@pregunta.visible = false
$falplaying = false
if !$game_system.fsong.empty?
@info_song.refresh(@indice_song.song)
end
$game_system.fsong.empty? ? @waves.visible = false : @waves.visible = true
s1 = "Si"
s2 = "No"
s3 = "Cancelar"
@command_window = Window_Command.new(172, [s1, s2, s3])
@command_window.x = 204
@command_window.y = 211
@command_window.z = 103
@command_window.height = 115
@command_window.visible = false
@command_window.active = false
end
def terminate
super
@indice_song.dispose
@info_song.dispose
@waves.dispose
@viewport1.dispose
@total_window.dispose
@info_window.dispose
@command_window.dispose
@pregunta.dispose
@marco.dispose
end
def update
super
@indice_song.update
@waves.update
@command_window.update
if !$game_system.fsong.empty?
@info_song.refresh(@indice_song.song)
end
update_Selection
update_commands
if Input.trigger?(Input::B)
Sound.play_cancel
if $falplaying and !@command_window.visible
@command_window.index = 0
@command_window.visible = true
@command_window.active = true
@indice_song.active = false
@pregunta.visible = true
@marco.visible = true
elsif @command_window.visible
cancelar
else
salir
end
end
end
def update_Selection
return if $game_system.fsong.empty? or @command_window.visible
if Input.trigger?(Input::C)
Sound.play_decision
$falplaying = true
RPG::BGM.new(@indice_song.song[0]).play
@info_window.info
end
if Input.trigger?(Input::X)
RPG::BGM.stop
$falplaying = false
end
end
def salir
if !$falplaying
$game_temp.map_bgm.play
$game_temp.map_bgs.play
end
$scene = Scene_Menu.new(9)
return
end
def update_commands
return if !@command_window.visible
if Input.trigger?(Input::C)
Sound.play_decision
case @command_window.index
when 0; salir
when 1; $falplaying = false; salir
when 2; cancelar
end
end
end
def cancelar
@command_window.visible = false
@command_window.active = false
@indice_song.active = true
@pregunta.visible = false
@marco.visible = false
end
end
class Game_Map
alias falcao13_autoplay2 autoplay
def autoplay
return if $game_system.fplaying
falcao13_autoplay2
end
end
Caracteristicas
- Opciones con iconos
- Bestiario
- MP3
- Creditos
- Info de comandos
- Charita anime
- Localizacion
- Crear una mini mision
Instrucciones
Basta con copiar y pegar el script encima de main y listo.
Bno... pss aqui termina, el GRAN aporte yo digo que es el Hero Menu Master xDDDDD ... nos vemos hasta otro tema
(Se despide su user mas pequeño) Cambio y Fuera