Aventurier Lv.16
Age : 40 Inscrit le : 03/09/2009 Messages : 1503
| Sujet: Rendre ce script compatible avec le SBS + ATB ^^ Dim 20 Juin 2010 - 8:56 | |
| Voilà j'ai trouvé un script assez intéressant qui permet de copier la dernière action faite par un membre de l'équipe. Pour ceux qui ont déjà jouer ou qui connaissent final fantasy VII et la compétence Mîmer, ici c'est le même principe que cette matéria seulement il est incompatible avec le SBS et le SBS + ATB et moi j'aimerais bien qu'il le soit. Le script - Spoiler:
- Code:
-
#-------------------------------------------------------------------------- # * Start configuration #-------------------------------------------------------------------------- #-------------------------------------------------------------------------- # * module Mime #-------------------------------------------------------------------------- module Mime #Mime_skills = [skill_id] - skill that copy last action Mime_skills = [130] #Copy_only_actors #true: copy last action made by a party member (if any) #false: copy last action made (if any) Copy_only_actors = false end #-------------------------------------------------------------------------- # * module Vocab #-------------------------------------------------------------------------- # Cant copy message text # %s = actor name Vocab::CantCopy = "No previous action. %s failed to mimic." # Cant copy message text: no item in the inventory # %s = actor name; %s = item name Vocab::No_item = "%s can't mimic last action, no %s in the inventory." #-------------------------------------------------------------------------- # * End configuration #-------------------------------------------------------------------------- #============================================================================== # ** Scene_Battle #------------------------------------------------------------------------------ # This class performs battle screen processing. #============================================================================== class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # * Aliasing - Battle Start Processing #-------------------------------------------------------------------------- alias mime_process_battle_start process_battle_start #-------------------------------------------------------------------------- # * Battle Start Processing #-------------------------------------------------------------------------- def process_battle_start mime_process_battle_start @last_action = [] end #-------------------------------------------------------------------------- # * Execute Battle Action #-------------------------------------------------------------------------- def execute_action case @active_battler.action.kind when 0 # Basic case @active_battler.action.basic when 0 # Attack execute_action_attack if Mime::Copy_only_actors @last_action = [0,0] if @active_battler.is_a?(Game_Actor) else @last_action = [0,0] end when 1 # Guard execute_action_guard if Mime::Copy_only_actors @last_action = [0,1] if @active_battler.is_a?(Game_Actor) else @last_action = [0,1] end when 2 # Escape execute_action_escape if Mime::Copy_only_actors @last_action = [0,2] if @active_battler.is_a?(Game_Actor) else @last_action = [0,2] end when 3 # Wait execute_action_wait if Mime::Copy_only_actors @last_action = [0,3] if @active_battler.is_a?(Game_Actor) else @last_action = [0,3] end end when 1 # Skill if Mime::Mime_skills.include?(@active_battler.action.skill.id) repeat_last_action else execute_action_skill end when 2 # Item if $game_party.has_item?(@active_battler.action.item) execute_action_item else cant_copy_action_no_item end end end #-------------------------------------------------------------------------- # * Aliasing - Execute Battle Action: skill #-------------------------------------------------------------------------- alias mime_execute_action_skill execute_action_skill #-------------------------------------------------------------------------- # * Execute Battle Action: skill #-------------------------------------------------------------------------- def execute_action_skill mime_execute_action_skill if Mime::Copy_only_actors @last_action = [1,@active_battler.action.skill.id] if @active_battler.is_a?(Game_Actor) else @last_action = [1,@active_battler.action.skill.id] end end #-------------------------------------------------------------------------- # * Aliasing - Execute Battle Action: item #-------------------------------------------------------------------------- alias mime_execute_action_item execute_action_item #-------------------------------------------------------------------------- # * Execute Battle Action: Item #-------------------------------------------------------------------------- def execute_action_item mime_execute_action_item if Mime::Copy_only_actors @last_action = [2,@active_battler.action.item.id] if @active_battler.is_a?(Game_Actor) else @last_action = [2,@active_battler.action.item.id] end end #-------------------------------------------------------------------------- # * Repeat Battle Action #-------------------------------------------------------------------------- def repeat_last_action cant_copy_action if @last_action[0] == nil or @last_action[1] == nil @active_battler.action.kind = @last_action[0] @active_battler.action.basic = @last_action[1] if @last_action[0] == 0 @active_battler.action.set_skill(@last_action[1]) if @last_action[0] == 1 @active_battler.action.set_item(@last_action[1]) if @last_action[0] == 2 execute_action end #-------------------------------------------------------------------------- # * Can't Copy Action: no last action #-------------------------------------------------------------------------- def cant_copy_action text = sprintf(Vocab::CantCopy,@active_battler.name) @message_window.add_instant_text(text) wait(60) end #-------------------------------------------------------------------------- # * Can't Copy Action: no item #-------------------------------------------------------------------------- def cant_copy_action_no_item text = sprintf(Vocab::No_item,@active_battler.name,$data_items[@last_action[1]].name) @message_window.add_instant_text(text) wait(80) end end
Le voilà j'ai essayer de modifier de trois trucs, mais soit le jeu plante, soit la compétence ne joue pas son rôle. Merci d'avance à la personne qui voudra bien m'aider. =) |
|