Shepher Admin
Número de Mensagens : 87 Idade : 28
| Assunto: [RGSS2]Opção de "Batalha Automática" Qui Jun 03, 2010 2:17 pm | |
| Opção de "Batalha Automática" sandgolem IntroduçãoEste script adiciona a opção "auto" junto à atacar e fugir, o que facilita naquelas horas que você está "caçando" ou só sem vontade de jogar mesmo. Características
- Opção "auto" customizável.
- Incompatível com menu de batalha customizado(ex: oval), mas teste antes de desistir, as vezes com o seu funciona. :D
Como instalar e usarCopie o seguinte código e cole abaixo de "Scripts Adicionais". Se usar algum sistema de batalha cole abaixo deste. - Spoiler:
- Código:
-
#========================================================================== # * GameBaker Auto Battle #========================================================================== # by sandgolem # Version 1 [VX] # January 25th, 2008 # Traduzido por : WesdraLink #==========================================================================
module GameBaker AutoBattleNames = ['Auto','Lutar','Repetir','Defender'] AutoBattleSwitch = 0 end #============================================================================
class Window_PartyCommand alias gamebaker_autobattle_pcinit initialize def initialize gamebaker_autobattle_pcinit create_contents @commands = [GameBaker::AutoBattleNames[0], Vocab::fight, Vocab::escape] @item_max = 3 draw_item(0, !$game_switches[GameBaker::AutoBattleSwitch]) draw_item(1, true) draw_item(2, $game_troop.can_escape) self.index = 1 end end
class Window_GBAuto < Window_Command def initialize s1 = GameBaker::AutoBattleNames[1] s2 = GameBaker::AutoBattleNames[2] s3 = GameBaker::AutoBattleNames[3] super(128, [s1, s2, s3], 1, 4) draw_item(0, true) draw_item(1, $game_troop.turn_count > 0) draw_item(2, true) self.visible = false self.active = false end end
class Game_Actor < Game_Battler attr_accessor :gb_autoaction, :gb_autosecondary, :gb_autotarget end
class Scene_Battle alias gamebaker_autobattle_createinfo create_info_viewport def create_info_viewport gamebaker_autobattle_createinfo @gamebaker_autowindow = Window_GBAuto.new @gamebaker_autowindow.viewport = @info_viewport end alias gamebaker_autobattle_disposeinfo dispose_info_viewport def dispose_info_viewport gamebaker_autobattle_disposeinfo @gamebaker_autowindow.dispose end alias gamebaker_autobattle_updateinfo update_info_viewport def update_info_viewport gamebaker_autobattle_updateinfo @gamebaker_autowindow.update end alias gamebaker_autobattle_updatepartyc update_party_command_selection def update_party_command_selection if Input.trigger?(Input::C) if @party_command_window.index != 0 @party_command_window.index -= 1 gamebaker_autobattle_updatepartyc @party_command_window.index += 1 elsif !$game_switches[GameBaker::AutoBattleSwitch] Sound.play_decision @target_enemy_window = true @gamebaker_autowindow.draw_item(1, $game_troop.turn_count > 0) @gamebaker_autowindow.x = @party_command_window.x @party_command_window.active = false @gamebaker_autowindow.active = true @party_command_window.visible = false @gamebaker_autowindow.visible = true else Sound.play_buzzer end return end gamebaker_autobattle_updatepartyc end alias gamebaker_autobattle_updateenemy update_target_enemy_selection def update_target_enemy_selection if @gamebaker_autowindow.active gamebaker_update_autowindow else gamebaker_autobattle_updateenemy end end def gamebaker_update_autowindow if Input.trigger?(Input::B) Sound.play_cancel @target_enemy_window = nil @party_command_window.active = true @gamebaker_autowindow.active = false @party_command_window.visible = true @gamebaker_autowindow.visible = false end if Input.trigger?(Input::C) case @gamebaker_autowindow.index when 0 gamebaker_autoallbasic(0) when 1 if $game_troop.turn_count != 0 gamebaker_autolastaction else Sound.play_buzzer end when 2 gamebaker_autoallbasic(1) end end end alias gamebaker_autobattle_startmain start_main def start_main for i in $game_party.members i.gb_autoaction = i.action.kind i.gb_autotarget = i.action.target_index i.gb_autosecondary = i.action.basic if i.action.kind == 0 i.gb_autosecondary = i.action.skill_id if i.action.kind == 1 i.gb_autosecondary = i.action.item_id if i.action.kind == 2 end gamebaker_autobattle_startmain end
alias gamebaker_autobattle_startparty start_party_command_selection def start_party_command_selection gamebaker_autobattle_startparty @party_command_window.index = 1 if $game_temp.in_battle end def gamebaker_autobattleend @target_enemy_window = nil @party_command_window.visible = true @gamebaker_autowindow.active = false @gamebaker_autowindow.visible = false start_main end def gamebaker_autoallbasic(type) Sound.play_decision for i in $game_party.members i.action.kind = 0 i.action.basic = type end gamebaker_autobattleend end def gamebaker_autolastaction Sound.play_decision for i in $game_party.members if i.gb_autoaction != nil i.action.kind = i.gb_autoaction i.action.basic = i.gb_autosecondary if i.gb_autoaction == 0 i.action.skill_id = i.gb_autosecondary if i.gb_autoaction == 1 i.action.item_id = i.gb_autosecondary if i.gb_autoaction == 2 i.action.target_index = i.gb_autotarget else i.action.kind = 0 i.action.basic = 0 end end gamebaker_autobattleend end end
Para customizar o script é só seguir as instruções pelo script. Créditos e AgradecimentosCriado por: Sandgolem Traduzido por: WesdrasLink
| |
|