MOG Timer Meter V1.4

14 de julho de 2015

MOG Timer Meter é um script desenvolvido pelo Moghunter compatível com o RPG Maker XP, que ativa adiciona um medidor de tempo quando o Timer (ou temporizador) estiver ligado.

MOG Timer Meter

Utilização e Instalação

Copie as imagens abaixo para a pasta Graphics/Pictures:

Time_text.php

Time_bar

Time_bar_back

Insira o código abaixo acima do “Main”:

#_______________________________________________________________________________
# MOG_Timer Meter V1.4            
#_______________________________________________________________________________
# By Moghunter 
# http://www.atelier-rgss.com
#_______________________________________________________________________________
module MOG
# Posição do medidor.  
TMR_X = 200   # X Pos
TMR_Y = 0     # Y Pos
# Posição do valor numérico.
TIME_NX = 290 # X Pos
TIME_NY = -5  # X Pos
# ID da switche que desativa a apresentação do valor numérico.
TM_DISABLE_SWITCHE = 10
end  
#_________________________________________________
$mogscript = {} if $mogscript == nil
$mogscript["time_meter"] = true
#################
# Spriteset_Map #
#################
class Spriteset_Map
alias mog31_update update
def update
mog31_update
if $game_switches[MOG::TM_DISABLE_SWITCHE] == true
@timer_sprite.visible = false 
else
@timer_sprite.visible = $game_system.timer_working   
end
@timer_sprite.x = MOG::TIME_NX
@timer_sprite.y = MOG::TIME_NY 
end
end
###############
# Game_System #
###############
class Game_System
attr_accessor :time_old
alias mog31_initialize initialize
def initialize
mog31_initialize
@time_old = 0
end
def time_old
return @time_old
end  
end
###############
# Interpreter #         
###############
class Interpreter
alias mog31_command_124  command_124
def command_124
mog31_command_124 
$game_system.time_old = @parameters[1] * Graphics.frame_rate if $game_system.timer_working  
end
end
###############
# Window_Base # 
############### 
class Window_Base < Window
def draw_timebar( x, y)
back = RPG::Cache.picture("Time_Bar_Back")    
cw = back.width  
ch = back.height 
src_rect = Rect.new(0, 0, cw, ch)    
self.contents.blt(x, y - ch , back, src_rect)
meter = RPG::Cache.picture("Time_Bar")    
if $game_system.timer != 0
cw = meter.width  * $game_system.timer / $game_system.time_old
else
cw = 0   
end  
ch = meter.height 
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x, y - ch, meter, src_rect)
text = RPG::Cache.picture("Time_Text")    
cw = text.width  
ch = text.height 
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x, y - ch, text, src_rect)
end
end
#########
# Wtime #
#########
class Wtime < Window_Base
def initialize
super(0, 0, 240, 60)
self.contents = Bitmap.new(width - 32, height - 32)
self.visible = $game_system.timer_working
self.opacity = 0
@rf = 0
refresh
end
def refresh
self.contents.clear
self.visible = $game_system.timer_working
@total_sec = Graphics.frame_count / Graphics.frame_rate
draw_timebar( 0, 25)
end
def update
super
@rf += 1
if @rf > 2
@rf = 0
refresh
end
end
end
#############
# Scene_Map #
#############
class Scene_Map
alias mog31_main main 
def main
@wtime = Wtime.new
@wtime.x = MOG::TMR_X 
@wtime.y = MOG::TMR_Y
mog31_main  
@wtime.dispose  
end
alias mog31_update update 
def update
@wtime.visible = $game_system.timer_working  
if $game_system.timer_working == true
@wtime.update
end
mog31_update
end
end

Alternativamente, você pode baixar a demo que já vem com as imagens e o script.

autor, site, canal ou publisher Moghunter tamanho 196KB licençaGrátis sistemas operacionais compativeisWindows 98/98SE/Me/2000/XP/Vista/7 download link DOWNLOAD

Observação: se você gostou deste post ou ele lhe foi útil de alguma forma, por favor considere apoiar financeiramente a Gaming Room. Fico feliz só de ajudar, mas a contribuição do visitante é muito importante para que este site continua existindo e para que eu possa continuar provendo este tipo de conteúdo e melhorar cada vez mais. Clique aqui e saiba como. Obrigado!

Deixe um comentário

Inscreva-se na nossa newsletter!