Kingdom hearts : Dark Chronicles - Forum
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.

Kingdom hearts : Dark Chronicles - Forum

Suivez le developpement du projet de près en ne ratant aucune news
 
AccueilRechercherDernières imagesS'enregistrerConnexion
Le deal à ne pas rater :
Display Star Wars Unlimited Ombres de la Galaxie : où l’acheter ?
Voir le deal

 

 Jour/nuit en 24minutes

Aller en bas 
2 participants
AuteurMessage
Gaara
Modérateur de l'ombre
Gaara


Nombre de messages : 26
Date d'inscription : 01/04/2007

Feuille de personnage
Karma:
Jour/nuit en 24minutes Left_bar_bleue9/100Jour/nuit en 24minutes Empty_bar_bleue  (9/100)
Light points:
Jour/nuit en 24minutes Left_bar_bleue9/100Jour/nuit en 24minutes Empty_bar_bleue  (9/100)
Dark points:
Jour/nuit en 24minutes Left_bar_bleue0/100Jour/nuit en 24minutes Empty_bar_bleue  (0/100)

Jour/nuit en 24minutes Empty
MessageSujet: Jour/nuit en 24minutes   Jour/nuit en 24minutes Icon_minitimeMer 18 Avr - 12:50

Auteur : Inconnu
Modifiéer par : PetitLamerz2

Fonction : Permet d'afficher le temps réel,mais en 24minutes et non en 24heures,exemple : la nuit mettra 24minutes à tomber.

Image(s):

Ressource(s) : aucune

Remarque : Testé et fonctionnel.

Installation : Ouvrez l'éditeur de script ( F11 ) et créez en un nouveau au dessus de 'Main' et collez le code ci-dessous :

Code:
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
@heure = 0
@ext_ton = true
self.visible = true
$exterieur = true
refresh
end
def refresh
if Input.trigger?(Input::L)
self.visible = ! self.visible
end
@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
text = sprintf("%02dh%02d ", @horloge.min, @horloge.sec)
self.contents.draw_text(0, 0, 200, 24,text + jour)
@map = load_data(sprintf("Data/Map%03d.rxdata", $game_map.map_id))
end
def update
refresh
if @min != @horloge.hour or @ext_ton != $exterieur
@ext_ton = $exterieur
@min = @horloge.hour
changement_ton
end
end
def changement_ton
if $exterieur
case @horloge.min
when 0
@tone = Tone.new(-100, -100, -100, 0)
$game_screen.start_tone_change(@tone,10)
when 1
@tone = Tone.new(-100, -100, -100, 0)
$game_screen.start_tone_change(@tone,10)
when 2
@tone = Tone.new(-100, -100, -100, 0)
$game_screen.start_tone_change(@tone,10)
when 3
@tone = Tone.new(-90, -90, -90, 0)
$game_screen.start_tone_change(@tone,10)
when 4
@tone = Tone.new(-80, -80, -80, 0)
$game_screen.start_tone_change(@tone,10)
when 5
@tone = Tone.new(-60, -60, -60, 0)
$game_screen.start_tone_change(@tone,10)
when 6
@tone = Tone.new(-30, -30, -30, 0)
$game_screen.start_tone_change(@tone,10)
when 7
@tone = Tone.new(0, 0, 0, 0)
$game_screen.start_tone_change(@tone,10)
when 8
@tone = Tone.new(0, 0, 0, 0)
$game_screen.start_tone_change(@tone,10)
when 9
@tone = Tone.new(0, 0, 0, 0)
$game_screen.start_tone_change(@tone,10)
when 10
@tone = Tone.new(0, 0, 0, 0)
$game_screen.start_tone_change(@tone,10)
when 11
@tone = Tone.new(10, 10, 10, 0)
$game_screen.start_tone_change(@tone,10)
when 12
@tone = Tone.new(10, 10, 10, 0)
$game_screen.start_tone_change(@tone,10)
when 13
@tone = Tone.new(10, 10, 10, 0)
$game_screen.start_tone_change(@tone,10)
when 14
@tone = Tone.new(10, 10, 10, 0)
$game_screen.start_tone_change(@tone,10)
when 15
@tone = Tone.new(10, 10, 10, 0)
$game_screen.start_tone_change(@tone,10)
when 16
@tone = Tone.new(50, 20, 10, 0)
$game_screen.start_tone_change(@tone,10)
when 17
@tone = Tone.new(50, 30, 10, 0)
$game_screen.start_tone_change(@tone,10)
when 18
@tone = Tone.new(50, 40, 10, 0)
$game_screen.start_tone_change(@tone,10)
when 19
@tone = Tone.new(-5, -5, -5, 0)
$game_screen.start_tone_change(@tone,10)
when 20
@tone = Tone.new(-20, -20, -20, 0)
$game_screen.start_tone_change(@tone,10)
when 21
@tone = Tone.new(-40, -40, -40, 0)
$game_screen.start_tone_change(@tone,10)
when 22
@tone = Tone.new(-60, -60, -60, 0)
$game_screen.start_tone_change(@tone,10)
when 23
@tone = Tone.new(-80, -80, -80, 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
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
Revenir en haut Aller en bas
Daxter
Porteur de la Keyblade
Daxter


Nombre de messages : 122
Date d'inscription : 28/03/2007

Feuille de personnage
Karma:
Jour/nuit en 24minutes Left_bar_bleue100/100Jour/nuit en 24minutes Empty_bar_bleue  (100/100)
Light points:
Jour/nuit en 24minutes Left_bar_bleue0/100Jour/nuit en 24minutes Empty_bar_bleue  (0/100)
Dark points:
Jour/nuit en 24minutes Left_bar_bleue0/100Jour/nuit en 24minutes Empty_bar_bleue  (0/100)

Jour/nuit en 24minutes Empty
MessageSujet: Re: Jour/nuit en 24minutes   Jour/nuit en 24minutes Icon_minitimeMer 18 Avr - 13:13

Merci, Gaara, je vais tester, mais je te donne déjà 2 Pl pour ce partage, merci encore.
Revenir en haut Aller en bas
https://khdarkchronicles.forumgaming.fr
 
Jour/nuit en 24minutes
Revenir en haut 
Page 1 sur 1

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Kingdom hearts : Dark Chronicles - Forum :: RPG Maker :: Scripts-
Sauter vers:  
Ne ratez plus aucun deal !
Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
IgnorerAutoriser