Страница 131 из 147 ПерваяПервая ... 3181121129130131132133141 ... ПоследняяПоследняя
Показано с 1,301 по 1,310 из 1470

Тема: Помощь с скриптами (RGSS)

  1. #1301

    По умолчанию

    А зачем ты создаешь объект, через созданный ранее этот же объект класса?
    Попробуй $Game_Time заменить на другую константу($Time_Game, например).
    + скинул бы сам метод инициализации, у меня на созданном классе ошибок нет.
    Последний раз редактировалось strelokhalfer; 16.10.2015 в 09:50.

  2. #1302

    По умолчанию

    Цитата Сообщение от strelokhalfer Посмотреть сообщение
    А зачем ты создаешь объект, через созданный ранее этот же объект класса?
    Попробуй $Game_Time заменить на другую константу($Time_Game, например).
    + скинул бы сам метод инициализации, у меня на созданном классе ошибок нет.
    все, понял в чем косяк был) в другом скрипте alias был, который без параметров.
    Думаю не использовать Marshal и сохранять игровое время, создавая новый объект класса и инициализируя его данными из уже имеющегося времени.

  3. #1303
    Пользователь Аватар для Bogdan682
    Информация о пользователе
    Регистрация
    24.05.2015
    Адрес
    Россия, Тольятти
    Сообщений
    38
    Репутация: 2 Добавить или отнять репутацию

    По умолчанию

    Привет всем. Подскажите пожалуйста - можно ли переписать скрипт освещения Khas Awesome Light Effects под более высокое разрешение экрана?
    У меня игра в нестандартном разрешении Мейкера, в связи с чем данный скрипт работает лишь в маленькой части экрана.

  4. #1304
    Маститый Аватар для HopeBree
    Информация о пользователе
    Регистрация
    27.03.2013
    Сообщений
    1,204
    Записей в дневнике
    6
    Репутация: 38 Добавить или отнять репутацию

    По умолчанию

    ищи в скрипте числа 544 и 416
    это ширина и высота окна дефолтного окна мукера, исправь их на свои размеры

  5. #1305
    Маститый Аватар для HopeBree
    Информация о пользователе
    Регистрация
    27.03.2013
    Сообщений
    1,204
    Записей в дневнике
    6
    Репутация: 38 Добавить или отнять репутацию

    По умолчанию

    как-то можно выпилить стрелку из окна помощи?
    Спойлер :

    PHP код:
    #==============================================================================
    #   XaiL System - Journal
    #   Author: Nicke
    #   Created: 05/01/2013
    #   Edited: 30/01/2013
    #   Version: 1.0a
    #==============================================================================
    # Instructions
    # -----------------------------------------------------------------------------
    # To install this script, open up your script editor and copy/paste this script
    # to an open slot below ? Materials but above ? Main. Remember to save.
    #
    # A journal system which can be as an actual journal or setup as an 
    # quest system.
    #
    # There are 3 predefined journals (categories) which will act as the following:

    # Unfinished. Each entry added will automatically be added to this category.
    # Completed. When a journal is completed or done it should be moved to this.
    # Failed. Same as completed but the entry will be marked as failed instead.
    #
    # Use the following script to call the scene in an event:
    # SceneManager.call(Scene_Journal)
    # Scene_Journal is the name to add for any custom menu script.

    # To setup a journal entry do one of the following script call:
    # journal(symbol)
    #
    # Examples:
    # journal(:investigation)                 # Add investigation to the journal.
    # set_journal(:investigation, :completed) # Set investigation entry to completed.
    # set_journal(:investigation, :failed)    # Set investigation entry to failed.
    #
    # You can use the journal as you want and if you decide to use it as a quest
    # system you can enable certain rewards. Those rewards won't be added
    # automatically and it is only there to show the player what type of rewards
    # that would be given if a quest is completed.
    #
    # See more below how you can customize that and how you add more journal
    # entries.
    #
    # *** Only for RPG Maker VX Ace. ***
    #==============================================================================
    ($imported ||= {})["XAIL-JOURNAL-SYSTEM"] = true

    module XAIL
      module JOURNAL
      
    #--------------------------------------------------------------------------#
      # * Settings
      #--------------------------------------------------------------------------#
        # FONT = [name, size, color, bold, shadow ]
        
    FONT = [["GOTHIC"], 20Color.new(255,255,255), truefalse]
      
        
    # LIST:
        # LIST = { 
          # :journal_name => [icon_index, "entry 1", "entry 2"... etc,
          # item_id = The id you want as the item, set it to nil when using 
          # the :exp/:gold types. 
          # type = :exp, :gold, :items, :weapons, :armors or :fame.
          # The type fame should only be used if XS - Fame System is installed.
          # [[item_id (set to nil if gold or exp), item_amount, type]]
        # } 
        
    LIST = {
        :
    ruby_madness => 
          [
    358"1. Get the Ruby.\n2. Return the Ruby."
          [[
    15, :items],
          [
    21, :weapons],
          [
    11, :armors],
          [
    nil5000, :exp],
          [
    nil2500, :gold],
          [
    nil500,  :fame]
          ]],
            
        :
    fetching_of_doom => 
          [
    350"1. Gather 1000 rocks. \n2. Return the rocks to Mr Negaul in the town Brafoul.\n3. Profit!!!"],
        
        :
    investigation =>
          [
    3"I need to investigate the the murder in town.\nSome clues ought to be laying around. Hopefully!\n\n I probably need to use some stealth so the guards\n won't notice me. That should be a piece of cake.",
          [[
    nil25000, :exp],
          [
    nil25000, :gold],
          [
    nil50000, :fame]
          ]],
          
        } 
    # Don't remove this line!
        
        # Default reward icons for gold and experience.
        # Not in used unless there is a reward.
        # Fame is only used if XS - Fame System is installed.
        # REWARD_ICONS = [gold, exp, fame]
        
    REWARD_ICONS = [262121125]
        
        
    # The windowskin to use for the windows.
        # nil to disable.
        # SKIN = string
        
    SKIN nil
        
      end
    end
    # *** Don't edit below unless you know what you are doing. ***
    #==============================================================================#
    # ** Error Handler
    #==============================================================================#
      
    unless $imported["XAIL-XS-CORE"]
        
    # // Error handler when XS - Core is not installed.
        
    msg "The script %s requires the latest version of XS - Core in order to function properly."
        
    name "XS - Journal"
        
    msgbox(sprintf(msgname))
        exit
      
    end
    #==============================================================================#
    # ** Game_System
    #==============================================================================#
    class Game_System
      
      attr_accessor 
    :journal_unfinished, :journal_completed, :journal_failed
      
      alias xail_journal_sys_gm_sys_initialize initialize
      def initialize
    (*args, &block)
        
    # // Method to initialize game system.
        
    xail_journal_sys_gm_sys_initialize(*args, &block)
        @
    journal_unfinished = {}
        @
    journal_completed = {}
        @
    journal_failed = {}
      
    end
      
      def get_journal
    (journal)
        
    # // Method to get journal.
        
    case journal
        when 
    :Незаконченны  ; return $game_system.journal_unfinished
        when 
    :Завершены     ; return $game_system.journal_completed   
        when 
    :Провалены     ; return $game_system.journal_failed     
        end
      end
      
    end
    #==============================================================================#
    # ** Game_Interpreter
    #==============================================================================#
    class Game_Interpreter
      
      def journal
    (keytype = :add)  
        
    # // Method to add/remove a menu item to the list.
        
    journal $game_system.get_journal(:Незаконченны)
        case 
    type
           
    # // Add menu id.
          
    when :add
          unless journal
    .include?(XAIL::JOURNAL::LIST[key])
            
    journal[key] = XAIL::JOURNAL::LIST[key]           
          
    end unless XAIL::JOURNAL::LIST[key].nil?
          
    # // Remove menu id.
          
    when :del 
          unless XAIL
    ::JOURNAL::LIST[key].nil?
            
    journal.delete(key)
          
    end
        end
      end
      
      def set_journal
    (keytype)
        
    # // Method to set journal to unfinished, completed etc.
        
    journals = [:Незаконченны, :Завершены, :Провалены]
        
    journals.each {|i|
          
    next if $game_system.get_journal(i)[key].nil?
          
    $game_system.get_journal(type)[key] = $game_system.get_journal(i)[key]
          
    $game_system.get_journal(i).delete(keyunless i == type
        
    }
      
    end
      
    end
    #==============================================================================
    # ** Window_JournalCommand
    #==============================================================================
    class Window_JournalCommand Window_Command
      
      attr_accessor 
    :journal
      
      def initialize
    (xy)
        
    # // Method to initialize.
        
    @journal = :Незаконченны
        super
    (xy)
      
    end
      
      def window_width
        
    # // Method to return the width.
        
    return 177
      end
      
      def window_height
        
    # // Method to return the height.
        
    return 48
      end
      
      def visible_line_number
        
    return 1
      end
      
      def draw_item
    (index)
        
    # // Method to draw the command item.
        
    rect item_rect_for_text(index)
        
    # // Line.
        
    draw_line_ex(rect.20rect.8Color.new(255,255,255,128), Color.new(0,0,0,64))
        
    # // Item.
        
    draw_font_text(command_name(index), rect.22rect.ycontents_widthalignmentXAIL::JOURNAL::FONT[0], 18XAIL::JOURNAL::FONT[2])
        
    # // Setup icons.
        
    icons = []
        
    $game_system.get_journal(@journal).each_value {|iicons << i[0unless icons.include?(i[0]) }
        
    # // Cancel icon.
        
    icons << 184 unless icons.include?(184)
        
    # // Draw icon(s).
        
    icon icons[index].nil? ? nil icons[index]
        
    draw_icon(iconrect.4rect.yunless icon.nil?
      
    end
      
      def make_command_list
        
    # // Method to add the commands.
        
    $game_system.get_journal(@journal).each {|iadd_command(i[0].to_s.slice_char("_").cap_wordsi[0]) }
      
    end

    end
    #==============================================================================#
    # ** Window_JournalHelp
    #==============================================================================#
    class Window_JournalHelp Window_Help
      
      def refresh
        
    # // Refresh help contents.
        
    contents.clear
        draw_journal_help
      end
      
      def draw_journal_help
        
    # // Method to draw the help text.
        # // Current journal.
        
    draw_font_text(@text00contents_width1XAIL::JOURNAL::FONT[0], 18XAIL::JOURNAL::FONT[2])
      
    end
      
    end
    #==============================================================================#
    # ** Window_JournalDetails
    #==============================================================================#
    class Window_JournalDetails Window_Base

      attr_accessor 
    :journal
      attr_accessor 
    :key
      
      def initialize
    (xywidthheight)
        
    # // Method to initialize.
        
    super(xywidthheight)
        @
    journal = :Незаконченны
        
    @key = :none
      end
      
      def refresh
        
    # // Method to refresh window.
        
    contents.clear
        
    return if $game_system.get_journal(@journal)[@key].nil?
        
    draw_details
      end
      
      def draw_details
        
    # // Method to draw details.
        
    18
        
    # // Icon.
        
    icon_id $game_system.get_journal(@journal)[@key][0]
        
    draw_icon(icon_id00)
        
    # // Name.
        
    name = @key.to_s.slice_char("_").cap_words
        draw_font_text
    (name00contents_width1XAIL::JOURNAL::FONT[0], 30XAIL::JOURNAL::FONT[2])
        
    # // Line.
        
    draw_line_ex(018Color.new(255,255,255,128), Color.new(0,0,0,64))
        
    # // Journal text.
        
    journal $game_system.get_journal(@journal)[@key][1]
        
    draw_font_text_ex(journal440XAIL::JOURNAL::FONT[0], 18XAIL::JOURNAL::FONT[2])
        
    # // Reward Title.
        
    unless $game_system.get_journal(@journal)[@key][2].nil
        
    reward_title "Награда"
        
    draw_font_text(reward_title0contents_height 5contents_width1XAIL::JOURNAL::FONT[0], 30XAIL::JOURNAL::FONT[2])
        
    # // Line.
        
    draw_line_ex(0contents_height 4Color.new(255,255,255,128), Color.new(0,0,0,64))
        
    # // Rewards.
          
    items_x 0
          $game_system
    .get_journal(@journal)[@key][2].each {|i|
            
    # // Reward icon.
            
    reward $game_party.check_item?(i[0], i[2])
            
    amount i[0].nil? ? "#{i[1]}"  "#{i[1]}x"
            
    case i[2]
            
    when :gold
              h 
    14
              draw_icon
    (XAIL::JOURNAL::REWARD_ICONS[0], contents_width 24contents_height 2)
              
    draw_font_text(amount Vocab::currency_unit, -26, (contents_height 2) + 4contents_width2XAIL::JOURNAL::FONT[0], 16XAIL::JOURNAL::FONT[2])
            
    when :exp
              h 
    14
              draw_icon
    (XAIL::JOURNAL::REWARD_ICONS[1], 0contents_height 2)
              
    draw_font_text(amount "XP"26, (contents_height 2) + 4contents_width0XAIL::JOURNAL::FONT[0], 16XAIL::JOURNAL::FONT[2])
            
    when :fame
              h 
    14
              draw_icon
    (XAIL::JOURNAL::REWARD_ICONS[2], (contents_width 2) - (amount.length 22), contents_height 2)
              
    draw_font_text(amount "Fame"26, (contents_height 2) + 4contents_width1XAIL::JOURNAL::FONT[0], 16XAIL::JOURNAL::FONT[2])
            else 
              
    reward_icon reward.icon_index
              draw_icon
    (reward_iconitems_xcontents_height 3)
              
    # // Reward item amount.
              
    draw_font_text(amountitems_x 6, (contents_height 3) + 10contents_width0XAIL::JOURNAL::FONT[0], 16XAIL::JOURNAL::FONT[2])
              
    items_x += line_height
            end
          
    }
        
    end
      end
      
    end
    #==============================================================================#
    # ** Scene_Journal
    #==============================================================================#
    class Scene_Journal Scene_Base
      
      def start
        
    # // Method to start the scene.
        
    super
        
    # // Define journals.
        
    @journals = [:Незаконченны, :Завершены, :Провалены]
        @
    journal_pos 0
        
    # // Create windows.
        
    create_background
        create_journal_command
        create_journal_help
        create_journal_details
        
    # // Set default journal/details.
        
    set_journal(0)
        
    set_details(@journal_command_window.current_symbol)
      
    end
      
      def create_background
        
    # // Method to create a background.
        
    @background_sprite Sprite.new
        
    source SceneManager.background_bitmap
          bitmap 
    Bitmap.new(Graphics.widthGraphics.height)
          
    bitmap.stretch_blt(bitmap.rectsourcesource.rect)
          
    bitmap.radial_blur(1010)
        @
    background_sprite.opacity 150
        
    @background_sprite.bitmap bitmap
      end
      
      def create_journal_command
        
    # // Method to create journal command window.
        
    @journal_command_window Window_JournalCommand.new(423125)
        @
    journal_command_window.windowskin Cache.system(XAIL::JOURNAL::SKINunless XAIL::JOURNAL::SKIN.nil
        @
    journal_command_window.set_handler(:pagerightmethod(:next_journal))
        @
    journal_command_window.set_handler(:pageleft,  method(:prev_journal))
        @
    journal_command_window.set_handler(:cancel,    method(:return_scene))
        @
    journal_command_window.help_window = @journal_help_window
      end
      
      def create_journal_help
        
    # // Method to create journal help window.
        
    @journal_help_window Window_JournalHelp.new(1)
        @
    journal_help_window.423
        
    @journal_help_window.367
        
    @journal_help_window.width 177
        
    @journal_help_window.windowskin Cache.system(XAIL::JOURNAL::SKINunless XAIL::JOURNAL::SKIN.nil?
      
    end
      
      def create_journal_details
        
    # // Method to create journal details window.
        
    423
        y 
    171
        width 
    177
        height 
    198
        
    @journal_details_window Window_JournalDetails.new(xywidthheight)
      
    end
      
      alias xail_journal_sys_upd update
      def update
    (*args, &block)
        
    # // Method for updating the scene.
        
    old_symbol = @journal_command_window.current_symbol
        xail_journal_sys_upd
    (*args, &block)
        
    set_details(@journal_command_window.current_symbol) if old_symbol != @journal_command_window.current_symbol
      end
      
      def next_journal
        
    # // Method to determine next journal.
        
    unless @journal_pos == @journals.size 1
          
    @journal_pos += 1
        
    else
          @
    journal_pos 0
        end
        
    @journal_command_window.activate
        set_journal
    (@journal_pos)
      
    end
      
      def prev_journal
        
    # // Method to determine previous journal.
        
    unless @journal_pos == 0
          
    @journal_pos -= 1
        
    else
          @
    journal_pos = @journals.size 1
        end
        
    @journal_command_window.activate
        set_journal
    (@journal_pos)
      
    end
      
      def set_journal
    (pos)
        
    # // Method to set journal based on position.
        
    = @journals[pos].to_s.capitalize
        
    @journal_help_window.set_text(j)
        @
    journal_command_window.journal = @journals[pos]
        @
    journal_command_window.refresh
        
    @journal_command_window.select(0)
      
    end
      
      def set_details
    (key)
        
    # // Method to set details based on key.
        
    @journal_details_window.journal = @journals[@journal_pos]
        @
    journal_details_window.key key
        
    @journal_details_window.refresh
      end

    end 
    # END OF FILE

    #=*==========================================================================*=#
    # ** END OF FILE
    #=*==========================================================================*=# 
    чутка отредактировал его под себя

  6. #1306
    Хранитель Аватар для Paranoid
    Информация о пользователе
    Регистрация
    22.12.2014
    Сообщений
    2,776
    Записей в дневнике
    34
    Репутация: 28 Добавить или отнять репутацию

    По умолчанию

    Убери боковую стрелку из виндоус-скина.
    Лицензионный VX Ace. Спасибо Петр.
    2 года мукеризма в пустую.

  7. #1307
    Маститый Аватар для HopeBree
    Информация о пользователе
    Регистрация
    27.03.2013
    Сообщений
    1,204
    Записей в дневнике
    6
    Репутация: 38 Добавить или отнять репутацию

    По умолчанию

    было бы все так просто
    хотя, в скрипте можно указать скин окна другой, тогда если только так, но забивать проект лишней графикой, которой там и так не мало из-за паралакса, плохая идея
    Последний раз редактировалось HopeBree; 22.10.2015 в 17:35.

  8. #1308
    Маститый Аватар для Bullet S.D.
    Информация о пользователе
    Регистрация
    27.01.2009
    Адрес
    Москва
    Сообщений
    1,360
    Записей в дневнике
    9
    Репутация: 74 Добавить или отнять репутацию

    По умолчанию

    Попробую сюда запостить свой трабл, вдруг случится чудо )
    Это скрипт боевой системы от Ccoa (очень редкий и очень большой), мейкер ХР.
    Я выкладываю только одну из частей, всё выложить сюда не реал.
    Вопрос такой. Есть анимация чара, когда он использует ITEM, но по необъяснимой причине анимация работает только если ITEM используется на другом персонаже а не на том который этот ITEM выбирает.
    Надо что бы анимация включалась ВСЕГДА.

    PHP код:
    class Scene_Battle  #--------------------------------------------------------------------------
      # * Main Processing
      #--------------------------------------------------------------------------
      
    def main
        
    # Initialize each kind of temporary battle data
        
    $game_temp.in_battle true
        $game_temp
    .battle_turn 0
        $game_temp
    .battle_event_flags.clear
        $game_temp
    .battle_abort false
        $game_temp
    .battle_main_phase false
        $game_temp
    .battleback_name $game_map.battleback_name
        $game_temp
    .forcing_battler nil
        
    # Initialize battle event interpreter
        
    $game_system.battle_interpreter.setup(nil0)
        
    # Prepare troop
        
    @troop_id $game_temp.battle_troop_id
        $game_troop
    .setup(@troop_id)    
        
    # Make other windows
        
    @party_command_window Window_PartyCommand.new
        @
    help_window Window_Help.new
        @
    help_window.back_opacity 160
        
    @help_window.visible false
        
    @help_window2 Win_Help.new
        @
    help_window2.visible false
        
    @help_window2.contents_opacity 0
        
    @help_time 0
        
    @status_window Window_BattleStatus.new
        @
    message_window Window_Message.new
        
    # Make actor command windows
        
    @actor_command_windows = []
        
    setup_actor_command_windows    
        
    # Make sprite set
        
    @spriteset Spriteset_Battle.new    
        
    # Make active cursor
        
    @cursor_bitmap Sprite.new
        @
    cursor_bitmap.bitmap RPG::Cache.windowskin($game_system.windowskin_name)
        @
    cursor_bitmap.src_rect.set(128963232)
        @
    cursor_bitmap.visible false
        
    @blink_count 0
        
        
    # Initialize wait count
        
    @wait_count 0
        
    # Execute transition
        
    if $data_system.battle_transition == ""
          
    Graphics.transition(20)
        else
          
    Graphics.transition(100"Graphics/Transitions/" +
            
    $data_system.battle_transition)
        
    end
        
    # Start pre-battle phase
        
    start_phase1
        
    # Main loop
        
    loop do
          
    # Update game screen
          
    Graphics.update
          
    # Update input information
          
    Input.update
          
    # Frame update
          
    update
          
    # Abort loop if screen is changed
          
    if $scene != self
            
    break
          
    end
        end
        
    # Refresh map


        
    $game_map.refresh
        
    # Prepare for transition
        
    Graphics.freeze
        
    # Dispose of windows
        
    for window in @actor_command_windows
          window
    .dispose
        end
        
    @party_command_window.dispose
        
    @help_window.dispose
        
    @help_window2.dispose


        
    @status_window.dispose
        
    @message_window.dispose
        
    if @skill_window != nil      
           
    @skill_window.dispose
         end
        
    if @skill_window2 != nil      
           
    @skill_window2.dispose
         end     
        
    if @item_window != nil
          
    @item_window.dispose
        end
        
    if @result_window != nil
          
    @result_window.dispose
        end
        
    # Dispose of sprite set
        
    @spriteset.dispose
        
        
    @cursor_bitmap.dispose


        
    # If switching to title screen
        
    if $scene.is_a?(Scene_Title)
          
    # Fade out screen
          
    Graphics.transition
          Graphics
    .freeze
        end
        
    # If switching from battle test to any screen other than game over screen
        
    if $BTEST and not $scene.is_a?(Scene_Gameover)
          
    $scene nil
        end
      end
      
      
    #--------------------------------------------------------------------------
      # * Frame Update
      #--------------------------------------------------------------------------
      
    def update
        
    # If battle event is running
        
    if $game_system.battle_interpreter.running?
          
    # Update interpreter
          
    $game_system.battle_interpreter.update
          
    # If a battler which is forcing actions doesn't exist
          
    if $game_temp.forcing_battler == nil
            
    # If battle event has finished running
            
    unless $game_system.battle_interpreter.running?
              
    # Rerun battle event set up if battle continues
              
    unless judge
                setup_battle_event
              end
            end
            
    # If not after battle phase
            
    if @phase != 5
              
    # Refresh status window
              
    @status_window.refresh
            end
          end
        end
        
    # Update system (timer) and screen
        
    $game_system.update
        $game_screen
    .update
        
    # If timer has reached 0
        
    if $game_system.timer_working and $game_system.timer == 0
          
    # Abort battle
          
    $game_temp.battle_abort true
        end
           
    @help_window2.contents_opacity += 3
        
    if @help_window2.<= 0
           
    @help_window2.+= 8
         end        
         
    if @skill_window2 != nil
         
    @skill_window2.update
            
    if @skill_window2.520
               
    @skill_window2.-= 15 
               
    @skill_window2.contents_opacity += 5
            elsif 
    @skill_window2.<= 520
               
    @skill_window2.520
               
    @skill_window2.contents_opacity 255
            end    
          end      
         
    if @skill_window3 != nil
            
    if @skill_window3.440
               
    @skill_window3.-= 15 
               
    @skill_window3.contents_opacity += 5
               
    @skill_window3.opacity += 5
            elsif 
    @skill_window3.<= 440
              
    @skill_window3.440
              
    @skill_window3.contents_opacity 255
              
    @skill_window3.opacity 255
            end         
         end  
         
    if @skill_window != nil
            
    if @skill_window.347
               
    @skill_window.-= 15 
               
    @skill_window.contents_opacity += 5  
               
    @skill_window.opacity += 5
            elsif 
    @skill_window.<= 347
               
    @skill_window.347
               
    @skill_window.opacity 255
               
    @skill_window.contents_opacity 255
           end         
         end  
        
    if @item_window != nil
          
    if @item_window.347
             
    @item_window.-= 15
             
    @item_window.contents_opacity += 5
             
    @item_window.opacity += 5
           elsif 
    @item_window.<= 347
             
    @item_window.347
             
    @item_window.opacity 255
             
    @item_window.contents_opacity 255
           end
        end 
        
    if @help_window.0
           
    @help_window.+= 15
        elsif 
    @help_window.>= 0
           
    @help_window.0
        end          
      
    if Input.press?(Input.dir4) and @skill_window2 != nil
         
    @skill_window2.refresh     
      end  
        
    @help_time -= 1
        
    if @help_time <= 0
           
    @help_time 0
         end      
        
    # Update windows
        
    @help_window.update
        
    @help_window2.update
        
    @party_command_window.update
        
    for i in 0..$game_party.actors.size 1
          member 
    $game_party.actors[i]
          if 
    member.battle_commands != @actor_command_windows[i].commands
            setup_actor_command_windows
          end
          
    if member != nil
            
    @actor_command_windows[i].update
            
    if @actor_command_windows[i].0
               
    @actor_command_windows[i].+= 15
               
    @actor_command_windows[i].contents_opacity += 12
             elsif 
    @actor_command_windows[i].>= 0
                   
    @actor_command_windows[i].0
                   
    @actor_command_windows[i].contents_opacity 255         
             end     
        end
        end
        
        
    if @cursor_bitmap.visible
          
    @blink_count = (@blink_count 1) % 8
          
    if @blink_count 4
            
    @cursor_bitmap.src_rect.set(128963232)
          else
            @
    cursor_bitmap.src_rect.set(160963232)
          
    end
        end
        
        
    @status_window.update
        
    @message_window.update
        
    # Update sprite set
        
    @spriteset.update
        
    # If transition is processing
        
    if $game_temp.transition_processing
          
    # Clear transition processing flag
          
    $game_temp.transition_processing false
          
    # Execute transition
          
    if $game_temp.transition_name == ""
            
    Graphics.transition(20)
          else
            
    Graphics.transition(40"Graphics/Transitions/" +
              
    $game_temp.transition_name)
          
    end
        end
        
    # If message window is showing
        
    if $game_temp.message_window_showing
          
    return
        
    end
        
    # If effect is showing
        
    if @spriteset.effect?
          return
        
    end
        
    # If game over
        
    if $game_temp.gameover
          
    # Switch to game over screen
          
    $scene Scene_Gameover.new
          return
        
    end
        
    # If returning to title screen
        
    if $game_temp.to_title
          
    # Switch to title screen
          
    $scene Scene_Title.new
          return
        
    end
        
    # If battle is aborted
        
    if $game_temp.battle_abort
          
    # Return to BGM used before battle started
          
    $game_system.bgm_play($game_temp.map_bgm)
          
    # Battle ends
          
    battle_end(1)
          return
        
    end
        
    # If waiting
        
    if @wait_count 0
          
    # Decrease wait count
          
    @wait_count -= 1
          
    return
        
    end
        
    # If battler forcing an action doesn't exist,
        # and battle event is running
        
    if $game_temp.forcing_battler == nil and
           
    $game_system.battle_interpreter.running?
          return
        
    end
        
        
    # Branch according to phase
        
    case @phase
        when 1  
    # pre-battle phase
          
    update_phase1
        when 2  
    # party command phase
          
    update_phase2
        when 3  
    # actor command phase
          
    update_phase3
        when 4  
    # main phase
          
    update_phase4
        when 5  
    # after battle phase
          
    update_phase5
        end
      end
      
      
    #--------------------------------------------------------------------------
      # * Start Party Command Phase
      #--------------------------------------------------------------------------
      
    def start_phase2
        
        
    # reset poses
        
    for actor in $game_party.actors
          reset_pose
    (actor)
        
    end
        
        
    # Shift to phase 2
        
    @phase 2
        
    # Set actor to non-selecting
        
    @actor_index = -1
        
    @active_battler nil
        
    # Enable party command window
        
    @party_command_window.active true
        
    @party_command_window.visible true
        
    # Disable actor command window
        
    for i in 0..3
          
    if $game_party.actors[i] != nil
            
    @actor_command_windows[i].active false
            
    @actor_command_windows[i].visible false
          end
        end
        
    @cursor_bitmap.visible false
        
    # Clear main phase flag
        
    $game_temp.battle_main_phase false
        
    # Clear all party member actions
        
    $game_party.clear_actions
        
    # If impossible to input command
        
    unless $game_party.inputable?
          
    # Start main phase
          
    start_phase4
        end
      end
      
      
    #--------------------------------------------------------------------------
      # * Actor Command Window Setup
      #--------------------------------------------------------------------------
      
    def phase3_setup_command_window
        
    # Disable party command window
        
    @party_command_window.active false
        
    @party_command_window.visible false
        
    # Enable actor command window
        
    for i in 0..$game_party.actors.size 1
          
    if $game_party.actors[i] != nil
            
    @actor_command_windows[i].active false
            
    @actor_command_windows[i].visible false
            
    @actor_command_windows[i].= -200
            
    @actor_command_windows[i].contents_opacity 0
            
    @actor_command_windows[i].index 0
          end
        end
        
    @actor_command_windows[@actor_index].active true
        
    @actor_command_windows[@actor_index].visible true
        
    @cursor_bitmap.= @active_battler.actual_x - @active_battler.width 3
        
    @cursor_bitmap.= @active_battler.actual_y - @active_battler.height 1.5
        
    @cursor_bitmap.visible true
      end
      
      
    #--------------------------------------------------------------------------
      # * Frame Update (actor command phase)
      #--------------------------------------------------------------------------
      
    def update_phase3
        
    # If enemy arrow is enabled
        
    if @enemy_arrow != nil
          update_phase3_enemy_select
          
    return
        
    # If actor arrow is enabled
        
    elsif @actor_arrow != nil
          update_phase3_actor_select
          
    return
        
    # If skill window is enabled
        
    elsif @skill_window != nil
          update_phase3_skill_select
          
    return
        
    # If item window is enabled
        
    elsif @item_window != nil
          update_phase3_item_select
          
    return
        
    end
        
    # If actor command window is enabled
        
    for i in 0..$game_party.actors.size 1
          
    if @actor_command_windows[i].active
              update_phase3_basic_command
            
    return
          
    end
        end
      end
      
      
    #--------------------------------------------------------------------------
      # * Frame Update (actor command phase : basic command)
      #--------------------------------------------------------------------------
      
    def update_phase3_basic_command
      
    #--------------------------------------------------------------------------
      #Permite fugir da batalha apertando o botão Z(Tecla D)
      #--------------------------------------------------------------------------
        
    if @help_time <= 0
           
    @help_window.visible false
        end       
        
    if Input.trigger?(CCOA_CBS::FUGABOTAO) and $game_temp.battle_can_escape == true
        $game_temp
    .battle_abort true
        $game_system
    .se_play($data_system.escape_se)
        
    elsif Input.trigger?(CCOA_CBS::FUGABOTAO) and $game_temp.battle_can_escape == false
        
    @help_window.visible true
        
    @help_window.set_text(CCOA_CBS::FUGATEXTO,1)
        @
    help_window.= -200
        $game_system
    .se_play($data_system.cancel_se)
        @
    help_time 40
        end
      
    #-------------------------------------------------------------------------- 
        # If C button was pressed
        
    if Input.trigger?(Input::C)
          
    # Branch by actor command window cursor position
          
    case @active_battler.battle_commands[@actor_command_windows[@actor_index].index]
          
    when "Attack"  # attack
            # Play decision SE
            
    $game_system.se_play($data_system.decision_se)
            
    # Set action
            
    @active_battler.current_action.kind 0
            
    @active_battler.current_action.basic 0
            
    # Start enemy selection
            
    start_enemy_select
            
    return
          
    when "Skill"  # skill
            # Play decision SE
            
    $game_system.se_play($data_system.decision_se)
            
    # Set action
            
    @active_battler.current_action.kind 1
            
    # Start skill selection
            
    start_skill_select
            
    return
          
    when "Defend"  # guard
            # Play decision SE
            
    $game_system.se_play($data_system.decision_se)
            
    # Set action
            
    @active_battler.current_action.kind 0
            
    @active_battler.current_action.basic 1
            
    # Go to command input for next actor
            
    phase3_next_actor
          when 
    "Item"  # item
            # Play decision SE
            
    $game_system.se_play($data_system.decision_se)
            
    # Set action
            
    @active_battler.current_action.kind 2
            
    # Start item selection
            
    start_item_select
            
    return
          
    when $SKILL_KINDS[0]
            
    $game_system.se_play($data_system.decision_se)
            @
    active_battler.current_action.kind 1
            
    @active_battler.skill_kind $SKILL_KINDS[0]
            
    start_skill_select($SKILL_OFFSET)
            return
          
    when $SKILL_KINDS[1]
            
    $game_system.se_play($data_system.decision_se)
            @
    active_battler.current_action.kind 1
            
    @active_battler.skill_kind $SKILL_KINDS[1]
            
    start_skill_select($SKILL_OFFSET)        
            return
          
    when $SKILL_KINDS[2]
            
    $game_system.se_play($data_system.decision_se)
            @
    active_battler.current_action.kind 1
            
    @active_battler.skill_kind $SKILL_KINDS[2]
            
    start_skill_select($SKILL_OFFSET)        
            return
          
    when $SKILL_KINDS[3]
            
    $game_system.se_play($data_system.decision_se)
            @
    active_battler.current_action.kind 1
            
    @active_battler.skill_kind $SKILL_KINDS[3]
            
    start_skill_select($SKILL_OFFSET)
            return
          
    when $SKILL_KINDS[4]
            
    $game_system.se_play($data_system.decision_se)
            @
    active_battler.current_action.kind 1
            
    @active_battler.skill_kind $SKILL_KINDS[4]
            
    start_skill_select($SKILL_OFFSET)
            return
          
    # copy and paste to add more skill kinds
          
    end
          
    return
        
    end
      end
      
      
    #--------------------------------------------------------------------------
      # * Start Enemy Selection
      #--------------------------------------------------------------------------
      
    def start_enemy_select
        
    # Make enemy arrow
        
    @enemy_arrow Arrow_Enemy.new(@spriteset.viewport2)
        
    # Associate help window
        
    @enemy_arrow.help_window = @help_window
        
    @help_window.= -200


        
    # Disable actor command window
        
    for i in 0..$game_party.actors.size 1
          
    if $game_party.actors[i] != nil
            
    @actor_command_windows[i].active false
            
    @actor_command_windows[i].visible false
          end
        end
        
    @cursor_bitmap.visible false
      end
      
      
    #--------------------------------------------------------------------------
      # * End Enemy Selection
      #--------------------------------------------------------------------------
      
    def end_enemy_select
        
    @enemy_arrow.dispose
        
    @enemy_arrow nil
        y 
    = @active_battler.battle_commands
        x 
    y[@actor_command_windows[@actor_index].index]
        if 
    == "Attack"
          
    @actor_command_windows[@actor_index].active true
          
    @actor_command_windows[@actor_index].visible true
          
    @actor_command_windows[@actor_index].= - 200
          
    @actor_command_windows[@actor_index].contents_opacity 0       
          
    @cursor_bitmap.= @active_battler.actual_x - @active_battler.width 3
          
    @cursor_bitmap.= @active_battler.actual_y - @active_battler.height 1.5
          
    @cursor_bitmap.visible true      
          
    @help_window.visible false
          
    @help_window2.visible false
          
    @help_window.= -200
        end
      end
      
      
    #--------------------------------------------------------------------------
      # * Start Actor Selection
      #--------------------------------------------------------------------------
      
    def start_actor_select
        
    # Make actor arrow
        
    @actor_arrow Arrow_Actor.new(@spriteset.viewport2)
        @
    actor_arrow.index = @actor_index
        
    # Associate help window
        
    @actor_arrow.help_window = @help_window
        
    @help_window.= -200
        
    # Disable actor command window
        
    for i in 0..$game_party.actors.size 1
          
    if $game_party.actors[i] != nil
            
    @actor_command_windows[i].active false
            
    @actor_command_windows[i].visible false
          end
        end
        
    @cursor_bitmap.visible false
      end


      
    #--------------------------------------------------------------------------
      # * Start Skill Selection
      #--------------------------------------------------------------------------
      
    def start_skill_select(skill_kind = -1)
        
    # Make skill window
        
    @skill_window Win_Skill.new(@active_battlerskill_kind)
        @
    skill_window2 Win_Skill2.new(@active_battlerskill_kind)
        @
    skill_window3 Win_Skill3.new(@active_battler)
        @
    skill_window.550
        
    @skill_window2.730
        
    @skill_window3.650
        
    @skill_window.opacity 
        
    @skill_window2.opacity 
        
    @skill_window3.opacity 0
        
    @skill_window.contents_opacity 0
        
    @skill_window2.contents_opacity 0
        
    @skill_window3.contents_opacity 0
        
    @skill_window2.refresh
        
    # Associate help window
        
    @skill_window.help_window = @help_window
        
    @help_window.= -200    
        
    for i in 0..$game_party.actors.size 1
          
    if $game_party.actors[i] != nil
            
    @actor_command_windows[i].active false
            
    @actor_command_windows[i].visible false
          end
        end
        
    @cursor_bitmap.visible false
      end
      
    #--------------------------------------------------------------------------
      # * End Skill Selection
      #--------------------------------------------------------------------------
      
    def end_skill_select
        
    # Dispose of skill window
        
    @skill_window.dispose
        
    @skill_window nil
        
    @skill_window2.dispose
        
    @skill_window2 nil
        
    @skill_window3.dispose
        
    @skill_window3 nil


        
    # Hide help window
        
    @help_window.visible false
        
    # Enable actor command window
        
    @actor_command_windows[@actor_index].active true
        
    @actor_command_windows[@actor_index].visible true
        
    @actor_command_windows[@actor_index].= - 200
        
    @actor_command_windows[@actor_index].contents_opacity 0
        
    @cursor_bitmap.= @active_battler.actual_x - @active_battler.width 3
        
    @cursor_bitmap.= @active_battler.actual_y - @active_battler.height 1.5
        
    @cursor_bitmap.visible true        
      end
      
      
    #--------------------------------------------------------------------------
      # * Start Item Selection
      #--------------------------------------------------------------------------
      
    def start_item_select
        
    # Make item window
        
    @item_window Win_Item.new
        @
    item_window.550
        
    @item_window.contents_opacity 0
        
    @item_window.opacity 0
        
    # Associate help window
        
    @item_window.help_window = @help_window
        
    @help_window.= -200
        
    # Disable actor command window
        
    for i in 0..$game_party.actors.size 1
          
    if $game_party.actors[i] != nil
            
    @actor_command_windows[i].active false
            
    @actor_command_windows[i].visible false
          end
        end
        
        
    @cursor_bitmap.visible false
      end
      
      
    #--------------------------------------------------------------------------
      # * End Item Selection
      #--------------------------------------------------------------------------
      
    def end_item_select
        
    # Dispose of item window
        
    @item_window.dispose
        
    @item_window nil
        
    # Hide help window
        
    @help_window.visible false
        
    @help_window2.visible false
        
    # Enable actor command window
        
    @actor_command_windows[@actor_index].active true
        
    @actor_command_windows[@actor_index].visible true
        
    @actor_command_windows[@actor_index].= - 200
        
    @actor_command_windows[@actor_index].contents_opacity 0    
        
    @cursor_bitmap.= @active_battler.actual_x - @active_battler.width 3
        
    @cursor_bitmap.= @active_battler.actual_y - @active_battler.height 1.5
        
    @cursor_bitmap.visible true
      end
      
      
    #--------------------------------------------------------------------------
      # * Start Main Phase
      #--------------------------------------------------------------------------
      
    def start_phase4
        
    # Shift to phase 4
        
    @phase 4
        
    # Turn count
        
    $game_temp.battle_turn += 1
        
    # Search all battle event pages
        
    for index in 0...$data_troops[@troop_id].pages.size
          
    # Get event page
          
    page $data_troops[@troop_id].pages[index]
          
    # If this page span is [turn]
          
    if page.span == 1
            
    # Clear action completed flags
            
    $game_temp.battle_event_flags[index] = false
          end
        end
        
    # Set actor as unselectable
        
    @actor_index = -1
        
    @active_battler nil
        
    # Enable party command window
        
    @party_command_window.active false
        
    @party_command_window.visible false
        
    # Disable actor command window
        
    for i in 0..$game_party.actors.size 1
          
    if $game_party.actors[i] != nil
            
    @actor_command_windows[i].active false
            
    @actor_command_windows[i].visible false
          end
        end
        
        
    @cursor_bitmap.visible false
        
        
    # Set main phase flag
        
    $game_temp.battle_main_phase true
        
        
        
        
    # Make enemy action
        
    for enemy in $game_troop.enemies
          reset_pose
    (enemy)
          
    enemy.make_action
        end
        
    # Make action orders
        
    make_action_orders
        
    # Shift to step 1
        
    @phase4_step 1
      end
      
      
    #--------------------------------------------------------------------------
      # * Frame Update (main phase)
      #--------------------------------------------------------------------------
      
    def update_phase4
        
    case @phase4_step
        when 1
          update_phase4_step1
        when 2
          update_phase4_step2
        when 3
          update_phase4_step3
        when 4
          update_phase4_step4
        when 5
          update_phase4_step5
        when 6
          update_phase4_step6
        when 7
          update_phase4_step7
        when 8
          update_phase4_step8
        end
      end
      
      
    #--------------------------------------------------------------------------
      # * Frame Update (main phase step 1 : action preparation)
      #--------------------------------------------------------------------------
      
    def update_phase4_step1
        
    # Hide help window
        
    @help_window.visible false
        
    @help_window2.visible false
        
    # Determine win/loss
        
    if judge
          
    # If won, or if lost : end method
          
    return
        
    end
        
        
    # If an action forcing battler doesn't exist
        
    if $game_temp.forcing_battler == nil
          
    # Set up battle event
          
    setup_battle_event
          
    # If battle event is running
          
    if $game_system.battle_interpreter.running?
            return
          
    end
        end
        
    # If an action forcing battler exists
        
    if $game_temp.forcing_battler != nil
          
    # Add to head, or move
          
    @action_battlers.delete($game_temp.forcing_battler)
          @
    action_battlers.unshift($game_temp.forcing_battler)
        
    end
        
    # If no actionless battlers exist (all have performed an action)
        
    if @action_battlers.size == 0
          
    # Start party command phase
          
    start_phase2
          
    return
        
    end
        
    # Initialize animation ID and common event ID
        
    @animation1_id 0
        
    @animation2_id 0
        
    @common_event_id 0
        
    # Shift from head of actionless battlers
        
    @active_battler = @action_battlers.shift
        
    # If already removed from battle
        
    if @active_battler.index == nil
          
    return
        
    end
        
    # Slip damage
        
    if @active_battler.hp and @active_battler.slip_damage?
          @
    active_battler.slip_damage_effect
          
    @active_battler.damage_pop true
          
    @active_battler.set_pose($HITfalse)
        
    end
        
    # Natural removal of states
        
    @active_battler.remove_states_auto
        reset_pose
    (@active_battler)
        
    # Refresh status window
        
    @status_window.refresh
        
    # Shift to step 2
        
    @phase4_step 2
      end
      
      
    #--------------------------------------------------------------------------
      # * Frame Update (main phase step 2 : start action)
      #--------------------------------------------------------------------------
      
    def update_phase4_step2
        
    # If not a forcing action
        
    unless @active_battler.current_action.forcing
          
    # If restriction is [normal attack enemy] or [normal attack ally]
          
    if @active_battler.restriction == or @active_battler.restriction == 3
            
    # Set attack as an action
            
    @active_battler.current_action.kind 0
            
    @active_battler.current_action.basic 0
          end
          
    # If restriction is [cannot perform action]
          
    if @active_battler.restriction == 4
            
    # Clear battler being forced into action
            
    $game_temp.forcing_battler nil
            
    # Shift to step 1
            
    @phase4_step 1
            
    return
          
    end
        end
        
    # Clear target battlers
        
    @target_battlers = []
        
    # Branch according to each action
        
    case @active_battler.current_action.kind
        when 0  
    # basic
          
    if @active_battler.current_action.basic == 0
            
    if @active_battler.is_a?(Game_Actor)
              
    weapon $data_weapons[@active_battler.weapon_id]
              
    # if we have a ranged weapon, just move forward a bit
              
    if (weapon != nil and weapon.element_set.include?($RANGED_ELEMENT)) or !@active_battler.moves
                make_basic_action_result
              
    else
                @
    active_battler.set_pose($MOVE_TO)
                
    # move to
                
    @phase4_step 7
                
    return
              
    end
            
    else
              if @
    active_battler.moves
                
    @active_battler.set_pose($MOVE_TO)
                
    # move to
                
    @phase4_step 7
                
    return
              else
                
    make_basic_action_result
              end
            end
          
    else
            
    make_basic_action_result
          end
        when 1  
    # skill
          
    skill $data_skills[@active_battler.current_action.skill_id]
          if 
    skill.element_set.include?($RANGED_ELEMENT) or !@active_battler.moves
            make_skill_action_result
          
    else
            @
    active_battler.set_pose($MOVE_TO)
            @
    phase4_step 7
            
    return
          
    end
        when 2  
    # item
          
    make_item_action_result
        end
        
    # Shift to step 3
        
    if @phase4_step == 2
          
    @phase4_step 3
        end
      end
      
      
    #--------------------------------------------------------------------------
      # * Frame Update (main phase step 3 : animation for action performer)
      #--------------------------------------------------------------------------
      
    def update_phase4_step3
        
    # Animation for action performer (if ID is 0, then white flash)
        
    if @animation1_id == 0
          
    @active_battler.white_flash true
          
    if @active_battler.animated
            
    @wait_count = [@active_battler.attack_frames 10 108].max
          
    else
            @
    wait_count 8
          end
        
    else
          @
    active_battler.animation_id = @animation1_id
          
    @active_battler.animation_hit true
        end
        
        
    if @active_battler.current_action.kind == and @active_battler.current_action.basic == 0
          
    @active_battler.set_pose($ATTACKfalse)
        
    end
            
        
    # Shift to step 4
        
    @phase4_step 4
      end
      
      
    #--------------------------------------------------------------------------
      # * Frame Update (main phase step 4 : animation for target)
      #--------------------------------------------------------------------------
      
    def update_phase4_step4
        
    # Animation for target
        
    for target in @target_battlers
          target
    .animation_id = @animation2_id
          target
    .animation_hit = (target.damage != "Miss")
          if 
    target.damage.is_a?(String)
            if 
    target.damage == "Miss"
              
    target.set_pose($MISSfalse)
            
    end
          elsif target
    .damage 0
            target
    .set_pose($HITfalse)
          
    end
        end
        
        
    # Animation has at least 8 frames, regardless of its length
        
    @wait_count 8
        
    # Shift to step 5
        
    @phase4_step 5
      end
      
      
    #--------------------------------------------------------------------------
      # * Frame Update (main phase step 6 : refresh)
      #--------------------------------------------------------------------------
      
    def update_phase4_step6
        
    # Clear battler being forced into action
        
    $game_temp.forcing_battler nil
        
    # If common event ID is valid
        
    if @common_event_id 0
          
    # Set up event
          
    common_event $data_common_events[@common_event_id]
          
    $game_system.battle_interpreter.setup(common_event.list, 0)
        
    end
        
    # if the battler moved to attack
        
    if (@active_battler.current_action.kind == and @active_battler.current_action.basic == 0) or @active_battler.current_action.kind == 1
          
    # move the battler back to its base
          
    @phase4_step 8
          
    @active_battler.set_pose($MOVE_FROM)
        else
          
    # Shift to step 1
          
    @phase4_step 1
        end
      end
      
      
    #--------------------------------------------------------------------------
      # * Frame Update (main phase step 7 : move to)
      #--------------------------------------------------------------------------
      
    def update_phase4_step7
        
    if @active_battler.is_a?(Game_Actor)
            
    target $game_troop.smooth_target_enemy(@active_battler.current_action.target_index)
            @
    active_battler.target_y target.actual_y
            
    @active_battler.target_x target.actual_x target.width 2
        
    else
          
    target $game_party.smooth_target_actor(@active_battler.current_action.target_index)
          @
    active_battler.target_x target.actual_x target.width 2
          
    @active_battler.target_y target.actual_y
        end
        
    if @active_battler.actual_x == @active_battler.target_x and @active_battler.actual_y == @active_battler.target_y
          
    @active_battler.set_pose($READY)
          if @
    active_battler.current_action.basic == 0
            make_basic_action_result
          
    else
            
    make_skill_action_result
          end
          
    @phase4_step 3
        end
      end
      
      
    #--------------------------------------------------------------------------
      # * Frame Update (main phase step 8 : move from)
      #--------------------------------------------------------------------------
      
    def update_phase4_step8
        
    @active_battler.target_x = @active_battler.base_x
        
    @active_battler.target_y = @active_battler.base_y
        
        
    if @active_battler.actual_x == @active_battler.target_x and @active_battler.actual_y == @active_battler.target_y
          
    # reset pose
          
    reset_pose(@active_battler)
          @
    phase4_step 1
        end
      end


      
    #--------------------------------------------------------------------------
      # * Start After Battle Phase
      #--------------------------------------------------------------------------
      
    alias old_start_phase5 start_phase5
      def start_phase5
        
    for actor in $game_party.actors
          actor
    .set_pose($VICTORY)
        
    end
        old_start_phase5
      end
      
      
    #--------------------------------------------------------------------------
      # * Make Basic Action Results
      #--------------------------------------------------------------------------
      
    def make_basic_action_result
        
    # If attack
        
    if @active_battler.current_action.basic == 0
          
    # Set anaimation ID
          
    @animation1_id = @active_battler.animation1_id
          
    @animation2_id = @active_battler.animation2_id
          
    # If action battler is enemy
          
    if @active_battler.is_a?(Game_Enemy)
            if @
    active_battler.restriction == 3
              target 
    $game_troop.random_target_enemy
            elsif 
    @active_battler.restriction == 2
              target 
    $game_party.random_target_actor
            
    else
              
    index = @active_battler.current_action.target_index
              target 
    $game_party.smooth_target_actor(index)
            
    end
          end
          
    # If action battler is actor
          
    if @active_battler.is_a?(Game_Actor)
            if @
    active_battler.restriction == 3
              target 
    $game_party.random_target_actor
            elsif 
    @active_battler.restriction == 2
              target 
    $game_troop.random_target_enemy
            
    else
              
    index = @active_battler.current_action.target_index
              target 
    $game_troop.smooth_target_enemy(index)
            
    end
          end
          
    # Set array of targeted battlers
          
    @target_battlers = [target]
          
    # Apply normal attack results
          
    for target in @target_battlers
            target
    .attack_effect(@active_battler)
            
    reset_pose(target)
          
    end
          
    return
        
    end
        
    # If guard
        
    if @active_battler.current_action.basic == 1
          
    # Display "Guard" in help window
          
    @help_window2.contents_opacity 0
          
    @help_window2.= -150
          $name_help 
    CCOA_CBS::NAME_GUARD
          
    @help_window2.set_text($data_system.words.guard1)
          @
    active_battler.set_pose($GUARD)
          return
        
    end
        
    # If escape
        
    if @active_battler.is_a?(Game_Enemy) and
           @
    active_battler.current_action.basic == 2
          
    # Display "Escape" in help window
          
    @help_window2.contents_opacity 0
          
    @help_window2.= -150
          $name_help 
    CCOA_CBS::NAME_ESCAPE
          
    @help_window2.set_text("Escape"1)
          
    # Escape
          
    @active_battler.escape
          
    return
        
    end
        
    # If doing nothing
        
    if @active_battler.current_action.basic == 3
          
    # Clear battler being forced into action
          
    $game_temp.forcing_battler nil
          
    # Shift to step 1
          
    @phase4_step 1
          
    return
        
    end
      end
      
      
    #--------------------------------------------------------------------------
      # * Make Skill Action Results
      #--------------------------------------------------------------------------
      
    def make_skill_action_result
        
    if @active_battler.is_a?(Game_Actor)
          if 
    $USING_INDIV_SKILL_ANIM
            
    @active_battler.set_pose(@active_battler.skill_hash[$data_skills[@active_battler.current_action.skill_id].name], false)
          else 
    # get animation by skill type
            
    @active_battler.set_pose(@active_battler.skill_type_hash[@active_battler.skill_kind], false)
          
    end
        
    else
          @
    active_battler.set_pose($SKILLfalse)
        
    end
        
    # Get skill
        
    @skill $data_skills[@active_battler.current_action.skill_id]
        
    # If not a forcing action
        
    unless @active_battler.current_action.forcing
          
    # If unable to use due to SP running out
          
    unless @active_battler.skill_can_use?(@skill.id)
            
    # Clear battler being forced into action
            
    $game_temp.forcing_battler nil
            
    # Shift to step 1
            
    @phase4_step 1
            
    return
          
    end
        end
        
    # Use up SP
        
    @active_battler.sp -= @skill.sp_cost
        
    # Refresh status window
        
    @status_window.refresh
        
    # Show skill name on help window
        
    @help_window2.contents_opacity 0
        
    @help_window2.= -200
        $name_help 
    CCOA_CBS::NAME_SKILL
        
    @help_window2.set_text(@skill.name1)
        
    # Set animation ID
        
    @animation1_id = @skill.animation1_id
        
    @animation2_id = @skill.animation2_id
        
    # Set command event ID
        
    @common_event_id = @skill.common_event_id
        
    # Set target battlers
        
    set_target_battlers(@skill.scope)
        
    # Apply skill effect
        
    for target in @target_battlers
          target
    .skill_effect(@active_battler, @skill)
          
    unless target == @active_battler
            reset_pose
    (target)
          
    end
        end
      end
      
      
    #--------------------------------------------------------------------------
      # * Make Item Action Results
      #--------------------------------------------------------------------------
      
    def make_item_action_result
        
    @active_battler.set_pose($ITEMfalse)
        
    # Get item
        
    @item $data_items[@active_battler.current_action.item_id]
        
    # If unable to use due to items running out
        
    unless $game_party.item_can_use?(@item.id)
          
    # Shift to step 1
          
    @phase4_step 1
          
    return
        
    end
        
    # If consumable
        
    if @item.consumable
          
    # Decrease used item by 1
          
    $game_party.lose_item(@item.id1)
        
    end
        
    # Display item name on help window
        
    @help_window2.contents_opacity 0
        
    @help_window2.= -200    
        $name_help 
    CCOA_CBS::NAME_ITEM
        
    @help_window2.set_text(@item.name1)
        
    # Set animation ID
        
    @animation1_id = @item.animation1_id
        
    @animation2_id = @item.animation2_id
        
    # Set common event ID
        
    @common_event_id = @item.common_event_id
        
    # Decide on target
        
    index = @active_battler.current_action.target_index
        target 
    $game_party.smooth_target_actor(index)
        
    # Set targeted battlers
        
    set_target_battlers(@item.scope)
        
    # Apply item effect
        
    for target in @target_battlers
          target
    .item_effect(@item)
          
    reset_pose(target)
        
    end
      end
      
      def setup_actor_command_windows
        
    if @actor_command_windows != []
          for 
    i in 0..@actor_command_windows.size 1
            
    @actor_command_windows[i].dispose
          end
        end
        
    @actor_command_windows = []
        for 
    i in 0..$game_party.actors.size 1
          member 
    $game_party.actors[i]
          if 
    member != nil
          
    @actor_command_windows[i] = Window_BattleCommand.new(member160)
          if 
    $game_switches[5] == true
          
    @actor_command_windows[i].0
          
    @actor_command_windows[i].680 - @status_window.height - @actor_command_windows[i].height
          
    @actor_command_windows[i].back_opacity 160     
          
    else  
          @
    actor_command_windows[i].0
          
    @actor_command_windows[i].480 - @status_window.height - @actor_command_windows[i].height
          
    @actor_command_windows[i].back_opacity 160
          end
          
    @actor_command_windows[i].active false
          
    @actor_command_windows[i].visible false
          end
        end
      end
      
      
    # reset the current pose
      
    def reset_pose(actor)
        if 
    actor == nil
          
    return
        
    end
        
        
    # highest priority is dead
        
    if actor.is_a?(Game_Actor) and actor.dead?
          
    actor.set_pose($DEAD)
          return
        
    end
        
        
    #guarding
        
    if actor.guarding?
          
    actor.set_pose($GUARD)
          return
        
    end
        
        
    # next is low hp
        
    if actor.is_a?(Game_Actor)
          if 
    actor.low_hp?
            
    actor.set_pose($LOW_HP)
            return
          
    end
          
    # satus effects
          
    rating 0
          pose 
    = -1
          j 
    0
          
    for i in $STATES_ANIMATED
            
    if actor.states.include?(i)
              if 
    $data_states[i].rating >= rating
                pose 
    j
                rating 
    $data_states[i].rating
              end
            end
            j 
    += 1
          end
          
    if pose != -1
            actor
    .set_pose($VICTORY pose 1)
            return
          
    end
        end
        actor
    .set_pose($READY)
      
    end
    end 
    Скорее всего начинать поиск стоит со строчки @active_battler.set_pose($ITEM, false)
    Сразу скажу, что изменение false на true приводит просто к лупу анимации не более, и это не нужно совсем...
    Спойлер Проекты Dark Rise INC.:

  9. #1309

    По умолчанию

    Кто объяснит, что здесь происходит:

    Код:
    function Window_Base() {
        this.initialize.apply(this, arguments);
    }
    
    Window_Base.prototype = Object.create(Window.prototype);
    Window_Base.prototype.constructor = Window_Base;
    UPD. Кажется это для наследования)
    Последний раз редактировалось DK; 25.10.2015 в 14:31.

  10. #1310
    Создатель Аватар для Рольф
    Информация о пользователе
    Регистрация
    14.04.2008
    Адрес
    Южно- Сахалинск/Пенза
    Сообщений
    10,081
    Записей в дневнике
    2
    Репутация: 108 Добавить или отнять репутацию

    По умолчанию

    Надо я планирую разделить скрипты и плагины. Хотя бы в пределах раздела. Пока можете сюда, пока я думаю.

Страница 131 из 147 ПерваяПервая ... 3181121129130131132133141 ... ПоследняяПоследняя

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 2 (пользователей: 0 , гостей: 2)

Метки этой темы

Социальные закладки

Социальные закладки

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •  
Помощь с скриптами (RGSS)