Smooker Jongleur Itinérant
Nombre de messages : 64 Age : 30 Projet(s) en cours : Citade De Deus Niveau Rpg Maker : Aussi fort que Don ... héhé xD Jeux Préférés : Le lancer de flechettes sur Don xD Date d'inscription : 18/07/2008
| Sujet: [Map] Montrer les sorts appris Mer 23 Juil 2008, 21:48 | |
| Bonjour et bonsoir a toutes et a tous :D Voila, ce script n'est utilisable qu'avec le script du Tactical RPG . Ce script permet d'afficher une fenetre a chaque fois qu'un des heros apprend une nouvelle competence , ou il y a marquer le nom de la competance et le niveau de la technique - Code:
-
#============================================================================== # Zenith Tactical Battle System # Crée par Kei-kun # Avec la participation de Zenith (http://zenith.ifdef.jp/) # Traduction anglaise par Mac # Traduction française par Samarium # Level Up/Battle Spoils Scene #==============================================================================
class Scene_Map # Sets 136-Light02 under Level Up Variable LEVEL_UP_SE = "136-Light02" #-------------------------------------------------------------------------- # ● Le résultat/abîme la fenêtre #-------------------------------------------------------------------------- def result_window if @level_up == nil or @gold == nil or @treasures == nil return false end # Trésor définissant la fenêtre # si aucun, taille de fenêtre ne sera 140 par la largeur juste pour montrer l'or. # si certains, taille de fenêtre seront 240 par largeur ainsi l'objet peut s'adapter dedans aussi. if @treasures.size == 0 width = 140 else width = 240 end window = Window_Base.new(0, 64, width, 64 + @treasures.size * 32) window.contents = Bitmap.new(window.width - 32, window.height - 32) window.back_opacity = 160 window.opacity = 0 # Affichage d'or cx = window.contents.text_size($data_system.words.gold).width window.contents.font.color = window.normal_color window.contents.draw_text(4, 0, window.width-44-cx, 32, @gold.to_s, 2) window.contents.font.color = window.system_color window.contents.draw_text(window.width-32-cx, 0, cx, 32, $data_system.words.gold, 2) # Affichage d'objet y = 32 for item in @treasures window.draw_item_name(item, 4, y) y += 32 end if @level_up.keys.size > 0 # Se rapporte à la variable de LEVEL_UP_SE pour jouer 136-Light02 lors de la mise à niveau + if LEVEL_UP_SE != nil and LEVEL_UP_SE != "" Audio.se_play("Audio/SE/" + LEVEL_UP_SE, 80, 100) end # Fenêtre d'affichage de niveau + sur le niveau + height = [352, 64+@level_up.keys.size*32].min window2 = Window_Base.new(window.width+48, 64, 320, height) window2.contents = Bitmap.new(window2.width - 32,480) window2.back_opacity = 160 window2.opacity = 0 window2.contents.font.color = window.system_color window2.contents.draw_text(0, 0, window2.width-32, 32, "-NIVEAU +", 1) y = 32
for actor in @level_up.keys learn_skill_liste = {} for j in $data_classes[actor.class_id].learnings if j.level >= @level_up[actor][0] + 1 and j.level <= @level_up[actor][1] learn_skill_liste[learn_skill_liste.size + 1] = j.skill_id end end window2.draw_actor_name(actor, 4, y) window2.contents.font.color = window2.system_color window2.contents.draw_text(168, y, 24, 32, "Lv") window2.contents.draw_text(228, y, 24, 32, "→") window2.contents.font.color = window2.normal_color lv1 = @level_up[actor][0].to_s window2.contents.draw_text(192, y, 32, 32, lv1, 2) lv2 = @level_up[actor][1].to_s window2.contents.draw_text(254, y, 32, 32, lv2) cont = 0 for k in 1 .. learn_skill_liste.size cont += 1 skill_id = learn_skill_liste[k] skill_name = $data_skills[skill_id].name window2.contents.font.size = 18 window2.contents.font.color = window2.system_color window2.contents.draw_text(24, y + cont * 20 + 4, 160,20,skill_name.to_s + " a ete appris !") window2.contents.font.color = window2.normal_color window2.contents.font.size = $fontsize end y += learn_skill_liste.size * 20 + 32 if y > window2.height - 32 window2.height += y - window2.height + 32 end end end
# Graphiques de boucle et mise à jour entrée loop do # Met à jour n'importe quel changement des graphiques pour éviter des erreurs Graphics.update # Les mises à jour change dans l'entrée pour éviter des erreurs Input.update if window.opacity < 255 window.opacity += 25 window.x += 1 if window2 != nil window2.opacity += 25 window2.x += 1 end next end if Input.press?(Input::DOWN) and window2 != nil max = [window2.contents.height - (window2.height - 32), 0].max window2.oy = [window2.oy + 6, max].min elsif Input.press?(Input::UP) and window2 != nil max = [window2.contents.height - (window2.height - 32), 0].max window2.oy = [window2.oy - 6, 0].max end break if Input.trigger?(Input::C) end # Se débarasser des fenêtres après que l'entrée de C soit serrée par exemple entrent, la barre d'espace etc. window.dispose window = nil if window2 != nil window2.dispose window2 = nil end @level_up = nil @gold = nil @treasures = nil return true end end J'espere que cela vous sera utile :D | |
|