Atachment
첨부 '1'
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄


#==============================================================================
# □ 커스터마이즈 포인트
#==============================================================================
class Window_BRingMenu < Window_Base
  STARTUP_FRAMES =  20 # 초기 애니메이션의 프레임수
  MOVING_FRAMES  =   5 # 링을 돌렸을 때의 프레임수
  RING_R         =  56 # 링의 반경
  SE_STARTUP  = "056-Right02" # 메뉴를 열었을 때에 울리는SE
  ICON_ATTACK   = RPG::Cache.icon("001-Weapon01")   # 「 아이템 」메뉴의 아이콘
  ICON_SKILL  = RPG::Cache.icon("044-Skill01")  # 「스킬 」메뉴의 아이콘
  ICON_GUARD  = RPG::Cache.icon("009-Shield01") # 「  장비  」메뉴의 아이콘
  ICON_ITEM = RPG::Cache.icon("034-Item03")  # 「스테이터스」메뉴의 아이콘
  ICON_DISABLE= RPG::Cache.icon("")             # 사용 금지 항목을 뒤따르는 아이콘
end
###############################################################################
# 링 메뉴 도입 스크립트 Ver. 1.2
#                 writen by 가즈키
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# ▽도입
#   0. 먼저 XRXL 2. 비트 맵/아이콘 묘사 를 넣어 두어 주세요.
#   1. 이 스크립트를Main섹션 위에 만든 새로운 섹션에 카피하는
#   2. Window_RingMenu의 상부에 있는 7개의 것 RPG::Cache.icon("") 의 "" 의 안에
#       오른쪽의 설명에 써 있는 커멘드용의 아이콘명을 쓴다.
#       (맨 밑의 사용 금지는 선택할 수 없는 메뉴에 거듭하는 아이콘입니다.
#        이런 건이 좋을지도→ φ )
#   3. 아이콘 설정의 바로 아래에 있는 SE_STARTUP = "" 것 "" 의 안에 메뉴를
#       열었을 때에 울리고 싶은 것SE의 이름을 쓴다.
# ▽스크립트 접하는 사람에게
#   우선 움직이는 것을 목표로 만든 것이므로(뜻 낮은 w ), 좌표의 조정등이 불완전합니다.
#   보다 정확하게 엑터의 화면 좌표를 취득하는 처리를 추가하거나 엑터 일람의 위치를
#   바꾸거나 문자 표시등 등을 조정하면 좋은 느낌으로 완성될 생각이 듭니다.
###############################################################################

#==============================================================================
# ■ Window_RingMenu
#==============================================================================
class Window_BRingMenu < Window_Base
  #--------------------------------------------------------------------------
  # ○ 클래스 정수
  #--------------------------------------------------------------------------
  MODE_START = 1 # 스타트 업 애니메이션
  MODE_WAIT  = 2 # 대기
  MODE_MOVER = 3 # 시계회전 회전 애니메이션
  MODE_MOVEL = 4 # 반 시계회전 회전 애니메이션
  #--------------------------------------------------------------------------
  # ○ 악 세사
  #--------------------------------------------------------------------------
  attr_accessor :index
  attr_reader :commands
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  def initialize( center_x, center_y )
    super(-16, -16, 640+32, 480+32)
    self.contents = Bitmap.new(width-32, height-32)
    self.opacity = 0
    self.back_opacity = 0
    s1 = $data_system.words.attack
    s2 = $data_system.words.skill
    s3 = $data_system.words.guard
    s4 = $data_system.words.item
    @commands = [s1, s2, s3, s4]
    @item_max = 4
    @index = 0
    @items = [ ICON_ATTACK, ICON_SKILL, ICON_GUARD, ICON_ITEM ]
    @disabled = [ false, false, false, false ]
    @cx = center_x
    @cy = center_y
    setup_move_start
    refresh
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  def update
    super
    refresh
  end
  #--------------------------------------------------------------------------
  # ● 화면재 묘화
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    # 배경 묘화 없음
    # 아이콘을 묘화
    case @mode
    when MODE_START
      refresh_start
    when MODE_WAIT
      refresh_wait
    when MODE_MOVER
      refresh_move(1)
    when MODE_MOVEL
      refresh_move(0)
    end
  end
  #--------------------------------------------------------------------------
  # ○ 화면재 묘화(초기화시)
  #--------------------------------------------------------------------------
  def refresh_start
    d1 = 2.0 * Math::PI / @item_max
    d2 = 1.0 * Math::PI / STARTUP_FRAMES
    r = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMES
    for i in 0...@item_max
      j = i - @index
      d = d1 * j + d2 * @steps
      x = @cx + ( r * Math.sin( d ) ).to_i
      y = @cy - ( r * Math.cos( d ) ).to_i
      draw_item(x, y, i)
    end
    @steps -= 1
    if @steps < 1
      @mode = MODE_WAIT
    end
  end
  #--------------------------------------------------------------------------
  # ○ 화면재 묘화(대기시)
  #--------------------------------------------------------------------------
  def refresh_wait
    d = 2.0 * Math::PI / @item_max
    for i in 0...@item_max
      j = i - @index
      x = @cx + ( RING_R * Math.sin( d * j ) ).to_i
      y = @cy - ( RING_R * Math.cos( d * j ) ).to_i
      draw_item(x, y, i)
    end
  end
  #--------------------------------------------------------------------------
  # ○ 화면재 묘화(회전시)
  #  mode : 0=반 시계회전 1=시계회전
  #--------------------------------------------------------------------------
  def refresh_move( mode )
    d1 = 2.0 * Math::PI / @item_max
    d2 = d1 / MOVING_FRAMES
    d2 *= -1 if mode != 0
    for i in 0...@item_max
      j = i - @index
      d = d1 * j + d2 * @steps
      x = @cx + ( RING_R * Math.sin( d ) ).to_i
      y = @cy - ( RING_R * Math.cos( d ) ).to_i
      draw_item(x, y, i)
    end
    @steps -= 1
    if @steps < 1
      @mode = MODE_WAIT
    end
  end
  #--------------------------------------------------------------------------
  # ● 항목의 묘화
  #     x :
  #     y :
  #     i : 항목 번호
  #--------------------------------------------------------------------------
  def draw_item(x, y, i)
    rect = Rect.new(0, 0, @items[i].width, @items[i].height)
    x -= rect.width/2
    y -= rect.height/2
    if @index == i
      self.contents.blt( x, y, @items[i], rect )
      if @disabled[@index]
        self.contents.blt( x, y, ICON_DISABLE, rect )
      end
    else
      self.contents.blt( x, y, @items[i], rect, 128 )
      if @disabled[@index]
        self.contents.blt( x, y, ICON_DISABLE, rect, 128 )
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 항목을 무효로 하는
  #     index : 항목 번호
  #--------------------------------------------------------------------------
  def disable_item(index)
    @disabled[index] = true
  end
  #--------------------------------------------------------------------------
  # ○ 초기화 애니메이션의 준비
  #--------------------------------------------------------------------------
  def setup_move_start
    @mode = MODE_START
    @steps = STARTUP_FRAMES
    if  SE_STARTUP != nil and SE_STARTUP != ""
      Audio.se_play("Audio/SE/" + SE_STARTUP, 80, 100)
    end
  end
  #--------------------------------------------------------------------------
  # ○ 회전 애니메이션의 준비
  #--------------------------------------------------------------------------
  def setup_move_move(mode)
    if mode == MODE_MOVER
      @index -= 1
      @index = @items.size - 1 if @index < 0
    elsif mode == MODE_MOVEL
      @index += 1
      @index = 0 if @index >= @items.size
    else
      return
    end
    @mode = mode
    @steps = MOVING_FRAMES
  end
  #--------------------------------------------------------------------------
  # ○ 애니메이션중인지 어떤지
  #--------------------------------------------------------------------------
  def animation?
    return @mode != MODE_WAIT
  end
end



#==============================================================================
# ◇ 외부 라이브러리
#==============================================================================
class Bitmap
# ▼▲▼ XRXL 1. 라인·도형 묘사 ▼▲▼
  #--------------------------------------------------------------------------
  # ● 라인 묘화 by 앵아 재흙
  #--------------------------------------------------------------------------
  def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
    # 묘사 거리의 계산. 큰에 직각시의 길이.
    distance = (start_x - end_x).abs + (start_y - end_y).abs
    # 묘사 개시
    if end_color == start_color
      for i in 1..distance
        x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
        y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
        if width == 1
          self.set_pixel(x, y, start_color)
        else
          self.fill_rect(x, y, width, width, start_color)
        end
      end
    else
      for i in 1..distance
        x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
        y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
        r = start_color.red   * (distance-i)/distance + end_color.red   * i/distance
        g = start_color.green * (distance-i)/distance + end_color.green * i/distance
        b = start_color.blue  * (distance-i)/distance + end_color.blue  * i/distance
        a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
        if width == 1
          self.set_pixel(x, y, Color.new(r, g, b, a))
        else
          self.fill_rect(x, y, width, width, Color.new(r, g, b, a))
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 다각형의 묘화(전부 칠해 없음) by 가즈키
  #    peaks    : 정점 좌표의 배열 [[x1,y1],[x2,y2],[x3,y3], ... ]
  #    color    : 선의 색
  #    width    : 선의 폭
  #--------------------------------------------------------------------------
  def draw_polygon(peaks, color, width = 1)
    # 변(=정점)의 개수분 만큼 옆을 그리는
    for i in 0 ... (peaks.size - 1)
      # 정점끼리를 선으로 묶는
      draw_line( peaks[i][0], peaks[i][1], peaks[i+1][0], peaks[i+1][1], color, width )
    end
    # 마지막 정점과 최초의 정점을 묶는
    draw_line( peaks[peaks.size - 1][0], peaks[peaks.size - 1][1], peaks[0][0], peaks[0][1], color, width )
  end
# ▼▲▼ XRXL 2. 비트 맵/아이콘 묘사 ▼▲▼
  #--------------------------------------------------------------------------
  # ● 안&범위의 묘화 by 앵아 재흙
  #     character_name : 묘사에 이용하는 캐릭터 그래픽
  #     character_hue  : 묘사의 색조
  #     x       : 묘화처 X 좌표
  #     y       : 묘화처 Y 좌표
  #--------------------------------------------------------------------------
  def draw_facesquare(character_name, character_hue, x, y, size = 24)
    bitmap = RPG::Cache.character(character_name, character_hue)
    src_rect = Rect.new((bitmap.width/4 - size)/2, 0, size, size)
    self.blt(x, y, bitmap, src_rect)
    self.draw_polygon([[x,y],[x+size,y],[x+size,y+size],[x,y+size]], Color.new(255,255,255,128))
  end
end


#==============================================================================
# ■ Scene_Battle (분할 정의 5 - 1을 수정한 것)
#------------------------------------------------------------------------------
#  배틀 화면의 처리를 실시하는 클래스입니다.
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # ● 메인 처리
  #--------------------------------------------------------------------------
  def main
    # 전투용의 각종 일시 데이터를 초기화
    $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
    # 배틀 이벤트용 interpreter를 초기화
    $game_system.battle_interpreter.setup(nil, 0)
    # 무리를 준비
    @troop_id = $game_temp.battle_troop_id
    $game_troop.setup(@troop_id)
    
    
    # 엑터 커멘드 윈도우를 작성
    px = 80
    py = 240
    @actor_command_window = Window_BRingMenu.new(px,py)    
    @actor_command_window.active = false
    @actor_command_window.visible = false
    
    
    # 그 외의 윈도우를 작성
    @party_command_window = Window_PartyCommand.new
    @help_window = Window_Help.new
    @help_window.back_opacity = 160
    @help_window.visible = false
    @status_window = Window_BattleStatus.new
    @message_window = Window_Message.new
    # 스프라이트 세트를 작성
    @spriteset = Spriteset_Battle.new
    # 웨이트 카운트를 초기화
    @wait_count = 0
    # 트란지션 실행
    Graphics.transition(20, "Graphics/Transitions/" +
      $data_system.battle_transition)
    # 프레바트르페즈 개시
    start_phase1
    # 메인 루프
    loop do
      # 게임 화면을 갱신
      Graphics.update
      # 입력 정보를 갱신
      Input.update
      # 프레임 갱신
      update
      # 화면이 바뀌면(자) 루프를 중단
      if $scene != self
        break
      end
    end
    # 맵을 리프레쉬
    $game_map.refresh
    # 트란지션 준비
    Graphics.freeze
    # 윈도우를 해방
    if @actor_command_window.active
      update_command
      return
    @party_command_window.dispose
    @help_window.dispose
    @status_window.dispose
    @message_window.dispose
    if @result_window != nil
      @result_window.dispose
    end
    # 스프라이트 세트를 해방
    @spriteset.dispose
    # 타이틀 화면으로 전환하고 안의 경우
    if $scene.is_a? (Scene_Title)
      # 화면을 용암
      Graphics.transition
      Graphics.freeze
    end
    # 전투 테스트로부터 게임 오버 화면 이외에 변환중의 경우
    if $BTEST and not $scene.is_a? (Scene_Gameover)
      $scene = nil
    end
  end
  #--------------------------------------------------------------------------
  # ● 승패 판정
  #--------------------------------------------------------------------------
  def judge
    # 전멸 판정이 진, 또는 파티 인원수가 0 명의 경우
    if $game_party.all_dead?  or $game_party.actors.size == 0
      # 패배 가능의 경우
      if $game_temp.battle_can_lose
        # 배틀 개시전의 BGM 에 되돌린다
        $game_system.bgm_play($game_temp.map_bgm)
        # 배틀 종료
        battle_end(2)
        # true 를 돌려준다
        return true
      end
      # 게임 오버 화면으로 전환하고
      $scene = Scene_Gameover.new
      # true 를 돌려준다
      return true
    end
    # 에너미가 1 체에서도 존재하면 false 를 돌려준다
    for enemy in $game_troop.enemies
      if enemy.exist?
        return false
      end
    end
    # 애프터 배틀 국면 개시 (승리)
    start_phase5
    # true 를 돌려준다
    return true
  end
  #--------------------------------------------------------------------------
  # ● 배틀 종료
  #     result : 결과 (0:승리 1:패배 2:도주)
  #--------------------------------------------------------------------------
  def battle_end(result)
    # 전투중 플래그를 클리어
    $game_temp.in_battle = false
    # 파티 전원의 액션을 클리어
    $game_party.clear_actions
    # 배틀용 스테이트를 해제
    for actor in $game_party.actors
      actor.remove_states_battle
    end
    # 에너미를 클리어
    $game_troop.enemies.clear
    # 배틀 콜백을 부른다
    if $game_temp.battle_proc != nil
      $game_temp.battle_proc.call(result)
      $game_temp.battle_proc = nil
    end
    # 맵 화면으로 전환하고
    $scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # ● 배틀 이벤트의 셋업
  #--------------------------------------------------------------------------
  def setup_battle_event
    # 배틀 이벤트 실행중의 경우
    if $game_system.battle_interpreter.running?
      return
    end
    # 배틀 이벤트의 전페이지를 검색
    for index in 0...$data_troops[@troop_id]. pages.size
      # 이벤트 페이지를 취득
      page = $data_troops[@troop_id]. pages[index]
      # 이벤트 조건을 c 로 참조 가능하게
      c = page.condition
      # 아무것도 조건이 지정되어 있지 않은 경우는 다음의 페이지로
      unless c.turn_valid or c.enemy_valid or
             c.actor_valid or c.switch_valid
        next
      end
      # 실행 끝난 경우는 다음의 페이지로
      if $game_temp.battle_event_flags[index]
        next
      end
      # 턴 조건 확인
      if c.turn_valid
        n = $game_temp.battle_turn
        a = c.turn_a
        b = c.turn_b
        if (b == 0 and n != a) or
           (b > 0 and (n < 1 or n < a or n % b != a % b))
          next
        end
      end
      # 에너미 조건 확인
      if c.enemy_valid
        enemy = $game_troop.enemies[c.enemy_index]
        if enemy.hp * 100.0 / enemy.maxhp > c.enemy_hp
          next
        end
      end
      # 엑터 조건 확인
      if c.actor_valid
        actor = $game_actors[c.actor_id]
        if actor.hp * 100.0 / actor.maxhp > c.actor_hp
          next
        end
      end
      # 스윗치 조건 확인
      if c.switch_valid
        if $game_switches[c.switch_id] == false
          next
        end
      end
      # 이벤트를 셋업
      $game_system.battle_interpreter.setup(page.list, 0)
      # 이 페이지의 스팬이 [배틀] 이나 [턴] 의 경우
      if page.span <= 1
        # 실행이 끝난 플래그를 세트
        $game_temp.battle_event_flags[index] = true
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  def update
    # 배틀 이벤트 실행중의 경우
    if $game_system.battle_interpreter.running?
      # interpreter를 갱신
      $game_system.battle_interpreter.update
      # 액션을 강제당하고 있는 버틀러가 존재하지 않는 경우
      if $game_temp.forcing_battler == nil
        # 배틀 이벤트의 실행이 끝났을 경우
        unless $game_system.battle_interpreter.running?
          # 배틀 이벤트의 셋업을 재실행
          setup_battle_event
        end
        # 스테이터스 윈도우를 리프레쉬
        @status_window.refresh
      end
    end
    # 시스템 (타이머), 화면을 갱신
    $game_system.update
    $game_screen.update
    # 타이머가 0 이 되었을 경우
    if $game_system.timer_working and $game_system.timer == 0
      # 배틀 중단
      $game_temp.battle_abort = true
    end
    # 윈도우를 갱신
    @help_window.update
    @party_command_window.update
    @actor_command_window.update
    @status_window.update
    @message_window.update
    # 스프라이트 세트를 갱신
    @spriteset.update
    # 메세지 윈도우 표시중의 경우
    if $game_temp.message_window_showing
      return
    end
    # 게임 오버의 경우
    if $game_temp.gameover
      # 게임 오버 화면으로 전환하고
      $scene = Scene_Gameover.new
      return
    end
    # 타이틀 화면에 되돌리는 경우
    if $game_temp.to_title
      # 타이틀 화면으로 전환하고
      $scene = Scene_Title.new
      return
    end
    # 배틀 중단의 경우
    if $game_temp.battle_abort
      # 배틀 개시전의 BGM 에 되돌린다
      $game_system.bgm_play($game_temp.map_bgm)
      # 배틀 종료
      battle_end(1)
      return
    end
    # 웨이트중의 경우
    if @wait_count > 0
      # 웨이트 카운트를 줄인다
      @wait_count -= 1
      return
    end
    # 효과 표시중의 경우
    if @spriteset.effect?
      return
    end
    # 액션을 강제당하고 있는 버틀러가 존재하지 않고,
    # 한편 배틀 이벤트가 실행중의 경우
    if $game_temp.forcing_battler == nil and
       $game_system.battle_interpreter.running?
      return
    end
    # 국면에 의해 분기
    case @phase
    when 1  # pre-battle phase
      update_phase1
    when 2  # 파티 커멘드 국면
      update_phase2
    when 3  # 엑터 커멘드 국면
      update_phase3
    when 4  # 메인 국면
      update_phase4
    when 5  # 애프터 배틀 국면
      update_phase5
    end
    end
  end
end # class를 종료

#==============================================================================
# ■ Scene_Battle (분할 정의 6 - 3을 수정 )
#------------------------------------------------------------------------------
#  배틀 화면의 처리를 실시하는 클래스입니다.
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # ● 엑터 커멘드 국면 개시
  #--------------------------------------------------------------------------
  def start_phase3
    # 국면 3 에 이행
    @phase = 3
    # 엑터를 비선택 상태로 설정
    @actor_index = -1
    @active_battler = nil
    # 다음의 엑터의 커멘드 입력에
    phase3_next_actor
  end
  #--------------------------------------------------------------------------
  # ● 다음의 엑터의 커멘드 입력에
  #--------------------------------------------------------------------------
  def phase3_next_actor
    # 루프
    begin
      # 엑터의 명 멸망 효과 OFF
      if @active_battler != nil
        @active_battler.blink = false
      end
      # 마지막 엑터의 경우
      if @actor_index == $game_party.actors.size-1
        # 메인 국면 개시
        start_phase4
        return
      end
      # 엑터의 인덱스를 진행시킨다
      @actor_index += 1
      @active_battler = $game_party.actors[@actor_index]
      @active_battler.blink = true
    # 엑터가 커멘드 입력을 받아들이지 않는 상태라면 한번 더
    end until @active_battler.inputable?
    # 엑터 커멘드 윈도우를 셋업
    phase3_setup_command_window
  end
  #--------------------------------------------------------------------------
  # ● 전의 엑터의 커멘드 입력에
  #--------------------------------------------------------------------------
  def phase3_prior_actor
    # 루프
    begin
      # 엑터의 명 멸망 효과 OFF
      if @active_battler != nil
        @active_battler.blink = false
      end
      # 최초의 엑터의 경우
      if @actor_index == 0
        # 파티 커멘드 국면 개시
        start_phase2
        @help_window.visible = false
        return
      end
      # 엑터의 인덱스를 되돌린다
      @actor_index -= 1
      @active_battler = $game_party.actors[@actor_index]
      @active_battler.blink = true
    # 엑터가 커멘드 입력을 받아들이지 않는 상태라면 한번 더
    end until @active_battler.inputable?
    # 엑터 커멘드 윈도우를 셋업
    phase3_setup_command_window
  end
  #--------------------------------------------------------------------------
  # ● 엑터 커멘드 윈도우의 셋업
  #--------------------------------------------------------------------------
  def phase3_setup_command_window
    # 파티 커멘드 윈도우를 무효화
    @party_command_window.active = false
    @party_command_window.visible = false
    # 엑터 커멘드 윈도우를 유효화
    @actor_command_window.active = true
    @actor_command_window.visible = true
    # 엑터 커멘드 윈도우의 위치를 설정
    @actor_command_window.x = @actor_index * 160
    # 인덱스를 0 으로 설정
    @actor_command_window.index = 0    
    @help_window.visible = true
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (엑터 커멘드 국면)
  #--------------------------------------------------------------------------
  def update_phase3
    # 에네미아로가 유효의 경우
    if @enemy_arrow != nil
      update_phase3_enemy_select
      # 아크타아로가 유효의 경우
    elsif @actor_arrow != nil
      update_phase3_actor_select
    # 스킬 윈도우가 유효의 경우
    elsif @skill_window != nil
      update_phase3_skill_select
      # 아이템 윈도우가 유효의 경우
    elsif @item_window != nil
      update_phase3_item_select
      # 엑터 커멘드 윈도우가 유효의 경우
    elsif @actor_command_window.active
      update_phase3_basic_command
      end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (엑터 커멘드 국면 : 기본 커멘드)
  #--------------------------------------------------------------------------
  def update_phase3_basic_command
    @help_window.set_text(@actor_command_window.commands[@actor_command_window.index],1)
    # B 버튼이 밀렸을 경우
    if Input.trigger? (Input::B)
      # 캔슬 SE 를 연주
      $game_system.se_play($data_system.cancel_se)
      # 전의 엑터의 커멘드 입력에
      phase3_prior_actor
      return
    end
    # C 버튼이 밀렸을 경우
    if Input.trigger? (Input::C)
      # 엑터 커멘드 윈도우의 커서 위치에서 분기
      case @actor_command_window.index
      when 0  # 공격
        # 결정 SE 를 연주
        $game_system.se_play($data_system.decision_se)
        # 액션을 설정
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 0
        # 에너미의 선택을 개시
        start_enemy_select
      when 1  # 스킬
        # 결정 SE 를 연주
        $game_system.se_play($data_system.decision_se)
        # 액션을 설정
        @active_battler.current_action.kind = 1
        # 스킬의 선택을 개시
        start_skill_select
      when 2  # 방어
        # 결정 SE 를 연주
        $game_system.se_play($data_system.decision_se)
        # 액션을 설정
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 1
        # 다음의 엑터의 커멘드 입력에
        phase3_next_actor
      when 3  # 아이템
        # 결정 SE 를 연주
        $game_system.se_play($data_system.decision_se)
        # 액션을 설정
        @active_battler.current_action.kind = 2
        # 아이템의 선택을 개시
        start_item_select
      end
      return
    end
       # 애니메이션중이라면 커서의 처리를 실시하지 않는
    return if @actor_command_window.animation?
    # ↑or← 버튼이 밀렸을 경우
    if Input.press?(Input::DOWN) or  Input.press?(Input::RIGHT)
      $game_system.se_play($data_system.cursor_se)
      @actor_command_window.setup_move_move(Window_BRingMenu::MODE_MOVEL)
      @help_window.set_text(@actor_command_window.commands[@actor_command_window.index],1)
      return
    end
    # ↓or→ 버튼이 밀렸을 경우
    if Input.press?(Input::UP) or  Input.press?(Input::LEFT)
      $game_system.se_play($data_system.cursor_se)
      @actor_command_window.setup_move_move(Window_BRingMenu::MODE_MOVER)
      @help_window.set_text(@actor_command_window.commands[@actor_command_window.index],1)
      return    
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (엑터 커멘드 국면 : 스킬 선택)
  #--------------------------------------------------------------------------
  def update_phase3_skill_select
    # 스킬 윈도우를 가시 상태로 한다
    @skill_window.visible = true
    # 스킬 윈도우를 갱신
    @skill_window.update
    # B 버튼이 밀렸을 경우
    if Input.trigger? (Input::B)
      # 캔슬 SE 를 연주
      $game_system.se_play($data_system.cancel_se)
      # 스킬의 선택을 종료
      end_skill_select
      return
    end
    # C 버튼이 밀렸을 경우
    if Input.trigger? (Input::C)
      # 스킬 윈도우로 현재 선택되고 있는 데이터를 취득
      @skill = @skill_window.skill
      # 사용할 수 없는 경우
      if @skill == nil or not @active_battler.skill_can_use? (@skill.id)
        # 버저 SE 를 연주
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 결정 SE 를 연주
      $game_system.se_play($data_system.decision_se)
      # 액션을 설정
      @active_battler.current_action.skill_id = @skill.id
      # 스킬 윈도우를 불가시 상태로 한다
      @skill_window.visible = false
      # 효과 범위가 적단체의 경우
      if @skill.scope == 1
        # 에너미의 선택을 개시
        start_enemy_select
      # 효과 범위가 아군 단체의 경우
      elsif @skill.scope == 3 or @skill.scope == 5
        # 엑터의 선택을 개시
        start_actor_select
      # 효과 범위가 단체가 아닌 경우
      else
        # 스킬의 선택을 종료
        end_skill_select
        # 다음의 엑터의 커멘드 입력에
        phase3_next_actor
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (엑터 커멘드 국면 : 아이템 선택)
  #--------------------------------------------------------------------------
  def update_phase3_item_select
    # 아이템 윈도우를 가시 상태로 한다
    @item_window.visible = true
    # 아이템 윈도우를 갱신
    @item_window.update
    # B 버튼이 밀렸을 경우
    if Input.trigger? (Input::B)
      # 캔슬 SE 를 연주
      $game_system.se_play($data_system.cancel_se)
      # 아이템의 선택을 종료
      end_item_select
      return
    end
    # C 버튼이 밀렸을 경우
    if Input.trigger? (Input::C)
      # 아이템 윈도우로 현재 선택되고 있는 데이터를 취득
      @item = @item_window.item
      # 사용할 수 없는 경우
      unless $game_party.item_can_use? (@item.id)
        # 버저 SE 를 연주
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 결정 SE 를 연주
      $game_system.se_play($data_system.decision_se)
      # 액션을 설정
      @active_battler.current_action.item_id = @item.id
      # 아이템 윈도우를 불가시 상태로 한다
      @item_window.visible = false
      # 효과 범위가 적단체의 경우
      if @item.scope == 1
        # 에너미의 선택을 개시
        start_enemy_select
      # 효과 범위가 아군 단체의 경우
      elsif @item.scope == 3 or @item.scope == 5
        # 엑터의 선택을 개시
        start_actor_select
      # 효과 범위가 단체가 아닌 경우
      else
        # 아이템의 선택을 종료
        end_item_select
        # 다음의 엑터의 커멘드 입력에
        phase3_next_actor
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (엑터 커멘드 국면 : 에너미 선택)
  #--------------------------------------------------------------------------
  def update_phase3_enemy_select
    # 에네미아로를 갱신
    @enemy_arrow.update
    # B 버튼이 밀렸을 경우
    if Input.trigger? (Input::B)
      # 캔슬 SE 를 연주
      $game_system.se_play($data_system.cancel_se)
      # 에너미의 선택을 종료
      end_enemy_select
      return
    end
    # C 버튼이 밀렸을 경우
    if Input.trigger? (Input::C)
      # 결정 SE 를 연주
      $game_system.se_play($data_system.decision_se)
      # 액션을 설정
      @active_battler.current_action.target_index = @enemy_arrow.index
      # 에너미의 선택을 종료
      end_enemy_select
      # 스킬 윈도우 표시중의 경우
      if @skill_window != nil
        # 스킬의 선택을 종료
        end_skill_select
      end
      # 아이템 윈도우 표시중의 경우
      if @item_window != nil
        # 아이템의 선택을 종료
        end_item_select
      end
      # 다음의 엑터의 커멘드 입력에
      phase3_next_actor
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (엑터 커멘드 국면 : 엑터 선택)
  #--------------------------------------------------------------------------
  def update_phase3_actor_select
    # 아크타아로를 갱신
    @actor_arrow.update
    # B 버튼이 밀렸을 경우
    if Input.trigger? (Input::B)
      # 캔슬 SE 를 연주
      $game_system.se_play($data_system.cancel_se)
      # 엑터의 선택을 종료
      end_actor_select
      return
    end
    # C 버튼이 밀렸을 경우
    if Input.trigger? (Input::C)
      # 결정 SE 를 연주
      $game_system.se_play($data_system.decision_se)
      # 액션을 설정
      @active_battler.current_action.target_index = @actor_arrow.index
      # 엑터의 선택을 종료
      end_actor_select
      # 스킬 윈도우 표시중의 경우
      if @skill_window != nil
        # 스킬의 선택을 종료
        end_skill_select
      end
      # 아이템 윈도우 표시중의 경우
      if @item_window != nil
        # 아이템의 선택을 종료
        end_item_select
      end
      # 다음의 엑터의 커멘드 입력에
      phase3_next_actor
    end
  end
  #--------------------------------------------------------------------------
  # ● 에너미 선택 개시
  #--------------------------------------------------------------------------
  def start_enemy_select
    # 에네미아로를 작성
    @enemy_arrow = Arrow_Enemy.new(@spriteset.viewport1)
    # 헬프 윈도우를 관련짓고
    @enemy_arrow.help_window = @help_window
    # 엑터 커멘드 윈도우를 무효화
    @actor_command_window.active = false
    @actor_command_window.visible = false
  end
  #--------------------------------------------------------------------------
  # ● 에너미 선택 종료
  #--------------------------------------------------------------------------
  def end_enemy_select
    # 에네미아로를 해방
    @enemy_arrow.dispose
    @enemy_arrow = nil
    # 커멘드가 [싸우는] 의 경우
    if @actor_command_window.index == 0
      # 엑터 커멘드 윈도우를 유효화
      @actor_command_window.active = true
      @actor_command_window.visible = true
      # 헬프 윈도우를 숨긴다
      @help_window.visible = false
    end
  end
  #--------------------------------------------------------------------------
  # ● 엑터 선택 개시
  #--------------------------------------------------------------------------
  def start_actor_select
    # 아크타아로를 작성
    @actor_arrow = Arrow_Actor.new(@spriteset.viewport2)
    @actor_arrow.index = @actor_index
    # 헬프 윈도우를 관련짓고
    @actor_arrow.help_window = @help_window
    # 엑터 커멘드 윈도우를 무효화
    @actor_command_window.active = false
    @actor_command_window.visible = false
  end
  #--------------------------------------------------------------------------
  # ● 엑터 선택 종료
  #--------------------------------------------------------------------------
  def end_actor_select
    # 아크타아로를 해방
    @actor_arrow.dispose
    @actor_arrow = nil
  end
  #--------------------------------------------------------------------------
  # ● 스킬 선택 개시
  #--------------------------------------------------------------------------
  def start_skill_select
    # 스킬 윈도우를 작성
    @skill_window = Window_Skill.new(@active_battler)
    # 헬프 윈도우를 관련짓고
    @skill_window.help_window = @help_window
    # 엑터 커멘드 윈도우를 무효화
    @actor_command_window.active = false
    @actor_command_window.visible = false
  end
  #--------------------------------------------------------------------------
  # ● 스킬 선택 종료
  #--------------------------------------------------------------------------
  def end_skill_select
    # 스킬 윈도우를 해방
    @skill_window.dispose
    @skill_window = nil
    # 헬프 윈도우를 숨긴다
    @help_window.visible = false
    # 엑터 커멘드 윈도우를 유효화
    @actor_command_window.active = true
    @actor_command_window.visible = true
  end
  #--------------------------------------------------------------------------
  # ● 아이템 선택 개시
  #--------------------------------------------------------------------------
  def start_item_select
    # 아이템 윈도우를 작성
    @item_window = Window_Item.new
    # 헬프 윈도우를 관련짓고
    @item_window.help_window = @help_window
    # 엑터 커멘드 윈도우를 무효화
    @actor_command_window.active = false
    @actor_command_window.visible = false
  end
  #--------------------------------------------------------------------------
  # ● 아이템 선택 종료
  #--------------------------------------------------------------------------
  def end_item_select
    # 아이템 윈도우를 해방
    @item_window.dispose
    @item_window = nil
    # 헬프 윈도우를 숨긴다
    @help_window.visible = false
    # 엑터 커멘드 윈도우를 유효화
    @actor_command_window.active = true
    @actor_command_window.visible = true
  end
end






너무 긴것같아서 죄송합니다.
혼자서 안되는 실력으로 계속 고쳐보다가 오류만 계속나고 끝내는 질문란에;[;;;]컥.

전투 링메뉴입니다.
출처는 게임공작소였던걸로 기억하는데요.

이 스크립트를 껴넣으면 전투 링메뉴가 되긴됩니다.
그런데 문제는 전투가 끝난 후입니다.

전투 케릭터와 윈도우가 그대로 남아있는 겁니다.[...............]
뭔가 약간만 수정하거나 적당한 위치에 껴넣으면 이런일이 발생안할텐데........쿨럭.

스크립트잘다루시는분이시면 좀 도와주세요;ㅇㅅㅇ//




?

List of Articles
번호 제목 글쓴이 날짜 조회 수
3127 이거 왜이러나요.. 원조엔세데 2006.02.20 203
3126 srpg95 능력치 문제 나루나비 2006.02.20 468
3125 런타임패키지에 관해서.. 로안 2006.02.20 336
3124 런타임패키지에 관해서.. 아두 2006.02.20 340
3123 이거 해결해주실분 없나요? Ress 2006.02.20 160
3122 흠.. 맵배치에 관해서.. 아두 2006.02.20 399
3121 성만들기에 대해서;; 하이^^ 2006.02.20 157
3120 질문좀... Maind 2006.02.20 126
» 전투 링메뉴 스크립트에 관련된 몇가지 질문;ㅇㅁㅇ file 크로스바게트 2006.02.20 452
3118 화면에 비가 내리는 효과는 원조엔세데 2006.02.20 350
3117 퀘스트에대해 2가지 질문드림 fanics 2006.02.20 259
3116 하아.. 하나더요! 원조엔세데 2006.02.20 206
3115 이거 왜이러나요.. 『덩키동크』 2006.02.20 147
3114 프로젝트 작성 실패 ㄱ-?! 아렌군칸다양 2006.02.19 244
3113 광장만들기가 너무 힘드네요 ㅠㅠ; Novelist 2006.02.19 132
3112 광장만들기가 너무 힘드네요 ㅠㅠ; 원조엔세데 2006.02.19 140
3111 대화창이 화면 위쪽에 떠버리네요; Novelist 2006.02.19 228
3110 화면 고정시키는 방법 The Reaper 2006.02.18 481
3109 저 질문 좀.. Maind 2006.02.18 147
3108 광장을 만들려구 하는데;; 원조엔세데 2006.02.18 128
Board Pagination Prev 1 ... 281 282 283 284 285 286 287 288 289 290 ... 442 Next
/ 442


[개인정보취급방침] | [이용약관] | [제휴문의] | [후원창구] | [인디사이드연혁]

Copyright © 1999 - 2016 INdiSide.com/(주)씨엘쓰리디 All Rights Reserved.
인디사이드 운영자 : 천무(이지선) | kernys(김원배) | 사신지(김병국)