Author Id: 16805 Author Name: akane159 Post Content: te refieres a este? (es el q uso para el reloj) [SPOILER="script"]#------------------------------------------------------------------------------- #---------------------Super - Dynamic Time Clock v 1.1-------------------------- #By: Super Shooter #Date: 05/12/11 #last Update: 06/12/11 #Muestra una hud con la hora del sistema. #------------------------------------------------------------------------------- # Editar para personalizar, instruciones en los comentarios. #------------------------------------------------------------------------------- module SuperTime ClockFont = {:face => 'Times New Roman', #fuete con la que se mostrara la hora :size => 18, #tamaño de la letra :bold => true, #bold (o negrita) true = si, false = no :italic => false #italica (o cursiva) true = si, false = no } ClockPosition = {:x => 10, :y => 10} #Posicion del reloj respecto a x, y DivHour = ":" #Signo que divide hora-minuto-segundo DivDate = "/" #signo que divide la fecha Switch = 37 #interruptor que activa el reloj #Textos que se mostraran como nombre del dia, advertencia no borrar ni #modificar 'Monday', 'Tuesday' ... solo las palabras despues de => Days = {'Monday' => 'Lun', #Corresponde al lunes 'Tuesday' => 'Mar', #Corresponde al martes 'Wednesday'=> 'Mie', #Corresponde al miercoles 'Thursday' => 'Jue', #Corresponde al jueves 'Friday'=>'Vie', #Corresponde al viernes 'Saturday' => 'Sab', #Corresponde al sabado 'Sunday'=>'Dom'} #Corresponde al domingo Hour24_7 = false #Modo horario de 24 horas (true = si / false = no) PreHour = {:h24 => '24 H', #Texto al final de la hora en modo Hour24_7 = true :am => 'Am', #Texto al final de la hora antes de las 12 de la mañana #con hour24_7 = false :pm => 'Pm'} #Texto al final de la hora andes de las 12 de la noche #con hour24_7 = false end #------------------------------------------------------------------------------- class SpriteClock < Sprite include SuperTime def initialize super self.bitmap = Bitmap.new(155, 76) self.x = ClockPosition[:x] self.y = ClockPosition[:y] self.z = 9999 self.bitmap.font.name = ClockFont[:face] self.bitmap.font.size = ClockFont[:size] self.bitmap.font.bold = ClockFont[:bold] self.bitmap.font.italic = ClockFont[:italic] update end def update self.bitmap.clear back = RPG::Cache.windowskin('back_clock.png')rescue nil rect = Rect.new(0, 0, 145, 66) self.bitmap.blt(x, y, back, rect) rescue nil day = Days[$game_variables[WeekDay]] self.bitmap.draw_text(x + 3, y + 5, 140, 32, "#{day}, #{$game_variables[Day]}#{DivDate}#{$game_variables[Month]}#{DivHour}#{$game_variables[Year]}", 1) h = $game_variables[Hour] hour = 12 if hour == 0 m = $game_variables[Min] m = "0#{$game_variables[Min]}" if $game_variables[Min] < 10 s = $game_variables[Sec] s = "0#{$game_variables[Sec]}" if $game_variables[Sec] < 10 if Hour24_7 text = "#{h}#{DivHour}#{m}#{DivHour}#{s} #{PreHour[:h24]}" elsif h > 11 h -=12 if h >= 13 h = "0#{h}" if h < 10 text = "#{h}#{DivHour}#{m}#{DivHour}#{s} #{PreHour[:pm]}" else h = 12 if h == 0 h = "0#{h}" if h < 10 text = "#{h}#{DivHour}#{m}#{DivHour}#{s} #{PreHour[:am]}" end self.bitmap.draw_text(x + 3, y + 33, 140, 32, text, 1) end end class Scene_Map alias clock_main main alias clock_update update def main @clock = SpriteClock.new @clock.z = 9999 @clock.visible = false clock_main @clock.bitmap.dispose @clock.dispose end def update clock_update if $game_switches[SuperTime::Switch] @clock.update @clock.visible = true else @clock.visible = false end end end[/SPOILER]