Age : 33 Inscrit le : 27/06/2008 Messages : 10881
| Sujet: Modification d'un script de fin de combat Ven 17 Avr 2009 - 9:24 | |
| Hellow ! J'aurai besoin de l'aide d'un scripteur ... Serait-il possible de modifier ce script : - Spoiler:
- Code:
-
#============================================================================== # ** Scene_Fin_Combat #------------------------------------------------------------------------------ # David74 mise à jour 27/11/2008 #==============================================================================
class Scene_Fin_Combat < Scene_Base #-------------------------------------------------------------------------- # * Object Initialization # actor_index : actor index #-------------------------------------------------------------------------- def initialize(exp, ap, gold, drop_items) @exp = exp @ap = ap @gold = gold @drop_items = drop_items end #-------------------------------------------------------------------------- # * Start processing #-------------------------------------------------------------------------- def start super @cadre_gain_exp = Window_Cadre_entete.new(0, 0, 544)## @nom_menu1 = Window_Menu_Name.new("EXP : " + @exp.to_s + " AP : " + @ap.to_s, 4, -12, 540)## @fin_combat = Window_Fin_Combat.new @window_exp = Window_Fin_Combat_exp.new @cadre_gils = Window_Cadre_entete.new(0, 258, 544)## @window_gain_gold = Window_Menu_Name.new("Gain : " + @gold.to_s + " " + Vocab::gold, 4, 246, 540, 56, 0)## @window_gold = Window_Menu_Name.new(Vocab::gold + " : " + $game_party.gold.to_s, 4, 246, 540, 56, 2)## @window_gain_obj = Window_Fin_Combat_objets.new(@drop_items) end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super @cadre_gain_exp.dispose @nom_menu1.dispose @fin_combat.dispose @window_exp.dispose @cadre_gils.dispose @window_gain_gold.dispose @window_gold.dispose @window_gain_obj.dispose end def update if Input.trigger?(Input::C) # gain exp if @exp > 0 while @exp > 0 Input.update if not Input.trigger?(Input::C) i = 1 @exp -= 1 else i = @exp @exp = 0 end for actor in $game_party.existing_members actor.gain_exp(i, false) @window_exp.refresh @nom_menu1.refresh("EXP : " + @exp.to_s + " AP : " + @ap.to_s) Sound.play_decision Graphics.wait(1) end end end # Calcul des AP gagnés for actor in $game_party.existing_members for i in 0..MAT::MAX_SLOT if $slot[actor.id][i] != nil if $slot[actor.id][i] > 0 $ap[$slot[actor.id][i]] += (@ap * $augmentation_ap[$slot[actor.id][i]]) end end if $slot2[actor.id][i] != nil if $slot2[actor.id][i] > 0 $ap[$slot2[actor.id][i]] += (@ap * $augmentation_ap[$slot2[actor.id][i]]) end end end end Niveau_Materia.new # mise à jour du niveau des materias en fonction des AP gagnés @ap = 0 Sound.play_materia @nom_menu1.refresh("EXP : " + @exp.to_s + " AP : " + @ap.to_s) # # gain Gold if @gold > 0 while @gold > 0 Input.update if not Input.trigger?(Input::C) i = 1 @gold -= 1 else i = @gold @gold = 0 end $game_party.gain_gold(i) @window_gain_gold.refresh("Gain : " + @gold.to_s + " " + Vocab::gold) @window_gold.refresh(Vocab::gold + " : " + $game_party.gold.to_s) Sound.play_decision Graphics.wait(1) end end # gain objets for item in @drop_items $game_party.gain_item(item, 1) end #Graphics.wait(60) loop do Input.update break if Input.trigger?(Input::C) end RPG::ME.fade(2000) $scene = Scene_Map.new Graphics.fadeout(70) RPG::ME.stop unless $BTEST $game_temp.map_bgm.play $game_temp.map_bgs.play end $game_temp.in_battle = false end #Input.trigger?(Input::C) end # def update end # class
#============================================================================== # ** Scene_Battle #------------------------------------------------------------------------------ # This class performs battle screen processing. #==============================================================================
class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # * Victory Processing #-------------------------------------------------------------------------- def process_victory #@info_viewport.visible = false #@message_window.visible = true RPG::BGM.fade(2000) $game_system.battle_end_me.play wait(110) RPG::BGM.stop display_exp_and_gold #display_drop_items => suppression car utilisation ecran fin de combat #display_level_up #battle_end(0) end #-------------------------------------------------------------------------- # * Display Gained Experience and Gold and AP ! #-------------------------------------------------------------------------- def display_exp_and_gold exp = $game_troop.exp_total ap = $game_variables[MAT::ID_AP] gold = $game_troop.gold_total drop_items = $game_troop.make_drop_items $game_party.clear_actions $game_party.remove_states_battle $game_troop.clear if $game_temp.battle_proc != nil $game_temp.battle_proc.call(0) $game_temp.battle_proc = nil end # scene de fin de combat $scene = Scene_Fin_Combat.new(exp, ap, gold, drop_items) end end
#============================================================================== # ** Window_Fin_Combat #------------------------------------------------------------------------------ # #==============================================================================
class Window_Fin_Combat< Window_Base #-------------------------------------------------------------------------- # * Object Initialization # x : window X coordinate # y : window Y coordinate #-------------------------------------------------------------------------- def initialize super(0, 38, 544, 220) refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.size = 17 x = 0 y = 0 for actor in $game_party.members if y == 98 * 2 x = 270 y = 0 end draw_actor_face(actor, x, y) draw_actor_name(actor, x + 98, y) y += 98 end end end
#============================================================================== # ** Window_Fin_Combat_exp #------------------------------------------------------------------------------ # #==============================================================================
class Window_Fin_Combat_exp< Window_Base #-------------------------------------------------------------------------- # * Object Initialization # x : window X coordinate # y : window Y coordinate #-------------------------------------------------------------------------- def initialize super(0, 38, 544, 220) self.opacity = 0 refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.size = 17 x = 0 y = 0 for actor in $game_party.members if y == 98 * 2 x = 270 y = 0 end draw_actor_level(actor, x + 180, y) draw_exp_info2(actor, x + 98, y) y += 98 end end #-------------------------------------------------------------------------- # * Draw Experience Information + gauge # x : Draw spot X coordinate # y : Draw spot Y coordinate #-------------------------------------------------------------------------- def draw_exp_info2(actor, x, y) s1 = actor.exp_s s2 = actor.next_rest_exp_s s_next = sprintf(Vocab::ExpNext, Vocab::level) self.contents.font.color = system_color self.contents.draw_text(x, y + WLH, 140, WLH, "EXP :") self.contents.draw_text(x, y + ((WLH * 3) - (WLH / 2)), 140, WLH, "NV suiv.") self.contents.font.color = normal_color self.contents.draw_text(x, y + WLH, 140, WLH, s1, 2) self.draw_actor_exp_gauge(actor, x, y + WLH * 2, width = 120) self.contents.draw_text(x, y + ((WLH * 3) - (WLH / 2)), 140, WLH, s2, 2) end end #============================================================================== # ** Window_Fin_Combat_objets #------------------------------------------------------------------------------ # #==============================================================================
class Window_Fin_Combat_objets< Window_Base #-------------------------------------------------------------------------- # * Object Initialization # x : window X coordinate # y : window Y coordinate #-------------------------------------------------------------------------- def initialize(drop_items) @drop_items = drop_items super(0, 296, 544, 120) refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear if @drop_items.size > 0 x = 4 y = 0 self.contents.font.color = system_color self.contents.draw_text(x, y, 140, WLH, "Vous trouvez : ") self.contents.font.color = normal_color x = 18 y = 28 for item in @drop_items $game_party.gain_item(item, 1) draw_item_name(item, x, y, enabled = true) y += 28 if y == 84 x += 170 y = 0 end end else self.contents.draw_text(4, 0, 540, WLH, "Vous ne trouvez pas d'objets ! ") end end end
Pour qu'il fonctionne même sans tous les scripts de matéria, de limite, etc ? Car j'aime bien ce rapport de combat mais il ne peut fonctionner qu'avec les scripts de limite et de matéria ( bref la floppée de script de la démo globale ) et j'aimerai qu'il puisse fonctionner avec les scripts par défaut. Je sais pas si j'ai été assez clair ^^" Merci d'avance à qui pourra me le faire. |
|