Soroshiya Modérateur
Nombre de messages : 124 Age : 32 Date d'inscription : 16/11/2007
Feuille personnelle PAs (Points d'Aide): (0/130) Permis à Points: (40/40)
| Sujet: Virgule pour le nombre d'argent Sam 17 Nov - 5:46 | |
| Nom du script : Virgule pour le nombre d'argentAuteur : InconnuFonction : Un Script , qui permet de mettre des virgules a votre somme d'argent , pour une meilleur visibilité (Exemple avant le script = 1948562 gold ; Exemple aprés avoir mis ce script = 1,948,562 gold ) Image(s) : Mettre au moins une image si possible de ce que donne le scriptRessource(s) : AucuneRemarque : FonctionnelInstallation : Allez dans l'éditeur de script ( F11 ) et suivez les instructions ci-dessous .Remplacer le script "windows_gold" par ceci: - Code:
-
#==================================================== # ■ Window_Gold #------------------------------------------------------------------------------ # ゴールドを表示するウィンドウです。 #============================================================================== class Window_Gold < Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super(0, 0, 160, 64) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh #Virgule pour or self.contents.clear case $game_party.gold when 0..9999 gold = $game_party.gold when 10000..99999 gold = $game_party.gold.to_s array = gold.split(//) gold = array[0].to_s+array[1].to_s+","+array[2].to_s+array[3].to_s+array[4].to_s when 100000..999999 gold = $game_party.gold.to_s array = gold.split(//) gold = array[0].to_s+array[1].to_s+array[2].to_s+","+array[3].to_s+array[4].to_s+array[5].to_s when 1000000..9999999 gold = $game_party.gold.to_s array = gold.split(//) gold = array[0].to_s+","+array[1].to_s+array[2].to_s+array[3].to_s+","+array[4].to_s+array[5].to_s+array[6].to_s end self.contents.font.color = text_color(6) gold_word = $data_system.words.gold.to_s + ":" cx = contents.text_size(gold_word).width cx2=contents.text_size(gold.to_s).width self.contents.draw_text(4, 0, 120-cx-2, 32, gold_word) self.contents.font.color = text_color(0) self.contents.draw_text(124-cx2+2, 0, cx2, 32, gold.to_s, 2) end end
| |
|