#============================================================================== # ** Script Tiempo de Juego Con Día y Noche # Window_PlayTime Add-on # modificado por shadowball # 08.02.2008 # # En el menú te muestra la hora del juego #============================================================================== class Window_PlayTime < Window_Base def initialize super(0, 0, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear @total_sec = Graphics.frame_count / Graphics.frame_rate dia = @total_sec / 60 / 24 % 7 hora = @total_sec / 60 % 24 minuto = @total_sec % 60 text = sprintf("%02d:%02d", hora, minuto) self.contents.font.color = system_color shb_dia = 'Domingo' if dia == 0 shb_dia = 'Lunes' if dia == 1 shb_dia = 'Martes' if dia == 2 shb_dia = 'Miércoles' if dia == 3 shb_dia = 'Jueves' if dia == 4 shb_dia = 'Viernes' if dia == 5 shb_dia = 'Sábado' if dia == 6 shb_día_de_la_semana = shb_dia self.contents.draw_text(0, 0, 120, 32, shb_día_de_la_semana, 0) self.contents.font.color = normal_color self.contents.draw_text(8, 32, 120, 32, text, 2) end def update super if Graphics.frame_count / Graphics.frame_rate != @total_sec refresh end end end #============================================================================== # ** Script Tiempo de Juego Con Día y Noche # Scene_Map Add-on # modificado por shadowball # 08.02.2008 # # Cambia el tono de luz según la hora del juego de forma automática #============================================================================== class Scene_Map alias shb_map_up update def update @total_sec = Graphics.frame_count / Graphics.frame_rate @shb_hora = @total_sec / 60 % 24 if @shb_hora < 5 || @shb_hora > 18 # entre las 19 y 5 horas $game_screen.start_tone_change(Tone.new(-120, -120, -120, 0), 1) elsif @shb_hora > 4 && @shb_hora < 7 # entre las 5 y 7 horas $game_screen.start_tone_change(Tone.new(-40, -40, 0, 0), 1) elsif @shb_hora > 6 && @shb_hora < 16 # entre las 7 y 16 horas $game_screen.start_tone_change(Tone.new(0, 0, 0, 0), 1) elsif @shb_hora > 15 && @shb_hora < 19 # entre las 16 y 19 horas $game_screen.start_tone_change(Tone.new(30, 10, 0, 0), 1) end shb_map_up end end