Moi g un script qui marche il suffit de créer un petit répertoire au dessus de main a appeler day_mode et de copier/coller le script :
class Jour_heure < Window_Base
def initialize
super(440, 420, 200, 60)
self.contents = Bitmap.new(width - 32, height - 32)
#self.contents.font.name = $fontface
#self.contents.font.size = $fontsize
self.opacity = 150
self.visible = false
$exterieur = true
refresh
end
def refresh
@horloge = Time.new
@seconde = @horloge.sec * Graphics.frame_rate
self.contents.clear
case @horloge.strftime("%A")
when "Monday"
jour = "Lundi"
when "Tuesday"
jour = "Mardi"
when "Wednesday"
jour = "Mercredi"
when "Thursday"
jour = "Jeudi"
when "Friday"
jour = "Vendredi"
when "Saturday"
jour = "Samedi"
when "Sunday"
jour = "Dimanche"
end
self.contents.draw_text(0, 0, 200, 24,@horloge.hour.to_s + ":" + @horloge.min.to_s + ":" + @horloge.sec.to_s + " " +jour)
@map = load_data(sprintf("Data/Map%03d.rxdata", $game_map.map_id))
if $exterieur
case @horloge.hour
when 0
@tone = Tone.new(-153, -153, -85, 0)
$game_screen.start_tone_change(@tone,10)
when 1
@tone = Tone.new(-140, -140, -63, 0)
$game_screen.start_tone_change(@tone,10)
when 2
@tone = Tone.new(-128, -128, -42, 0)
$game_screen.start_tone_change(@tone,10)
when 3
@tone = Tone.new(-116, -116, -21, 0)
$game_screen.start_tone_change(@tone,10)
when 4
@tone = Tone.new(-102, -102, 0, 0)
$game_screen.start_tone_change(@tone,10)
when 5
@tone = Tone.new(-85, -85, 9, 0)
$game_screen.start_tone_change(@tone,10)
when 6
@tone = Tone.new(-68, -68, 17, 0)
$game_screen.start_tone_change(@tone,10)
when 7
@tone = Tone.new(-25, -57, 17, 0)
$game_screen.start_tone_change(@tone,10)
when 8
@tone = Tone.new(17, -50, 17, 0)
$game_screen.start_tone_change(@tone,10)
when 9
@tone = Tone.new(17, -34, 17, 0)
$game_screen.start_tone_change(@tone,10)
when 10
@tone = Tone.new(17, -17, 17, 0)
$game_screen.start_tone_change(@tone,10)
when 11
@tone = Tone.new(9, -9, 9, 0)
$game_screen.start_tone_change(@tone,10)
when 12
@tone = Tone.new(0, 0, 0, 0)
$game_screen.start_tone_change(@tone,10)
when 13
@tone = Tone.new(17, -9, -9, 0)
$game_screen.start_tone_change(@tone,10)
when 14
@tone = Tone.new(34, -17, -17, 0)
$game_screen.start_tone_change(@tone,10)
when 15
@tone = Tone.new(34, -17, -26, 0)
$game_screen.start_tone_change(@tone,10)
when 16
@tone = Tone.new(34, -17, -34, 0)
$game_screen.start_tone_change(@tone,10)
when 17
@tone = Tone.new(-17, -43, -34, 0)
$game_screen.start_tone_change(@tone,10)
when 18
@tone = Tone.new(-68, -68, -34, 0)
$game_screen.start_tone_change(@tone,10)
when 19
@tone = Tone.new(-85, -85, -17, 0)
$game_screen.start_tone_change(@tone,10)
when 20
@tone = Tone.new(-102, -102, 0, 0)
$game_screen.start_tone_change(@tone,10)
when 21
@tone = Tone.new(-116, -116, -21, 0)
$game_screen.start_tone_change(@tone,10)
when 22
@tone = Tone.new(-128, -128, -42, 0)
$game_screen.start_tone_change(@tone,10)
when 23
@tone = Tone.new(-140, -140, -63, 0)
$game_screen.start_tone_change(@tone,10)
end
else
@tone = Tone.new(0, 0, 0, 0)
$game_screen.start_tone_change(@tone,10)
end
end
def update
refresh
end
end
class Scene_Save
alias old_write_save_data write_save_data
def write_save_data(file)
old_write_save_data(file)
Marshal.dump($exterieur, file)
end
end
class Scene_Load
alias old_read_save_data read_save_data
def read_save_data(file)
old_read_save_data(file)
$exterieur = Marshal.load(file)
end
end
class Scene_Map
alias old_main main
def main
@jh = Jour_heure.new
old_main
@jh.dispose
end
alias old_update update
def update
@jh.update
old_update
end
end
et la vous avez le mode jour/nuit
dites moi s'il ya un prob (je crois que ce mode est en temps réel)
|