RPGXP 스크립트
2013.10.12 21:33

메뉴에 퀘스트 있는거

조회 수 1962 추천 수 2 댓글 2
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제

1.PNG

#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------
#  메뉴 화면의 처리를 실시하는 클래스입니다.
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #     menu_index : 커멘드의 커서 초기 위치
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # ● 메인 처리
  #--------------------------------------------------------------------------
  def main
    # 커멘드 윈도우를 작성
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "내정보"
    s5 = "퀘스트"
    s6 = "저장하기"
    s7 = "게임종료"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index
    # 파티 인원수가 0 명의 경우
    if $game_party.actors.size == 0
      # 아이템, 스킬, 장비, 스테이터스를 무효화
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # 세이브 금지의 경우
    if $game_system.save_disabled
      # 세이브를 무효로 한다
      @command_window.disable_item(4)
    end
    # 플레이 시간 윈도우를 작성
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 0
    @playtime_window.y = 260
    # 골드 윈도우를 작성
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 416
    # 스테이터스 윈도우를 작성
    @status_window = Window_MenuStatus.new
    @status_window.x = 160
    @status_window.y = 0
    # 트란지션 실행
    Graphics.transition
    # 메인 루프
    loop do
      # 게임 화면을 갱신
      Graphics.update
      # 입력 정보를 갱신
      Input.update
      # 프레임 갱신
      update
      # 화면이 바뀌면 루프를 중단
      if $scene != self
        break
      end
    end
    # 트란지션 준비
    Graphics.freeze
    # 윈도우를 해방
    @command_window.dispose
    @playtime_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  def update
    # 윈도우를 갱신
    @command_window.update
    @playtime_window.update
    @gold_window.update
    @status_window.update
    # 커멘드 윈도우가 액티브의 경우: update_command 를 부른다
    if @command_window.active
      update_command
      return
    end
    # 스테이터스 윈도우가 액티브의 경우: update_status 를 부른다
    if @status_window.active
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (커멘드 윈도우가 액티브의 경우)
  #--------------------------------------------------------------------------
  def update_command
    # B 버튼이 밀렸을 경우
    if Input.trigger?(Input::B)
      # 캔슬 SE 를 연주
      $game_system.se_play($data_system.cancel_se)
      # 맵 화면으로 전환해
      $scene = Scene_Map.new
      return
    end
    # C 버튼이 밀렸을 경우
    if Input.trigger?(Input::C)
      # 파티 인원수가 0 명으로, 세이브, 게임 종료 이외의 커멘드의 경우
      if $game_party.actors.size == 0 and @command_window.index < 4
        # 버저 SE 를 연주
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 커멘드 윈도우의 커서 위치에서 분기
      case @command_window.index
      when 0  # 아이템
        # 결정  SE 를 연주
        $game_system.se_play($data_system.decision_se)
        # 아이템 화면으로 전환해
        $scene = Scene_Item.new
      when 1  # 스킬
        # 결정 SE 를 연주
        $game_system.se_play($data_system.decision_se)
        # 스테이터스 윈도우를 액티브하게 한다
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # 장비
        # 결정 SE 를 연주
        $game_system.se_play($data_system.decision_se)
        # 스테이터스 윈도우를 액티브하게 한다
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # 스테이터스
        # 결정 SE 를 연주
        $game_system.se_play($data_system.decision_se)
        # 스테이터스 윈도우를 액티브하게 한다
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  #퀘스트 일람
        # 결정 SE 를 연주
        $game_system.se_play($data_system.decision_se)
        # 퀘스트 화면으로 전환해
        $scene = Scene_Quest.new
      when 5  # 세이브
        # 세이브 금지의 경우
        if $game_system.save_disabled
          # 버저 SE 를 연주
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # 결정 SE 를 연주
        $game_system.se_play($data_system.decision_se)
        # 세이브 화면으로 전환해
        $scene = Scene_Save.new
      when 6  # 게임 종료
        # 결정 SE 를 연주
        $game_system.se_play($data_system.decision_se)
        # 게임 종료 화면으로 전환해
        $scene = Scene_End.new
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (스테이터스 윈도우가 액티브의 경우)
  #--------------------------------------------------------------------------
  def update_status
    # B 버튼이 밀렸을 경우
    if Input.trigger?(Input::B)
      # 캔슬 SE 를 연주
      $game_system.se_play($data_system.cancel_se)
      # 커멘드 윈도우를 액티브하게 한다
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    # C 버튼이 밀렸을 경우
    if Input.trigger?(Input::C)
      # 커멘드 윈도우의 커서 위치에서 분기
      case @command_window.index
      when 1  # 스킬
        # 이 액터의 행동 제한이 2 이상의 경우
        if $game_party.actors[@status_window.index].restriction >= 2
          # 버저 SE 를 연주
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # 결정 SE 를 연주
        $game_system.se_play($data_system.decision_se)
        # 스킬 화면으로 전환해
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # 장비
        # 결정 SE 를 연주
        $game_system.se_play($data_system.decision_se)
        # 장비 화면으로 전환해
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # 스테이터스
        # 결정 SE 를 연주
        $game_system.se_play($data_system.decision_se)
        # 스테이터스 화면으로 전환해
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end

?

  1. 반칸이동

    Date2010.07.18 CategoryRPGXP 스크립트 ByA.M.S Views2184 Votes0
    Read More
  2. 미니맵 스크립트

    Date2013.10.01 CategoryRPGXP 스크립트 By Views2178 Votes0
    Read More
  3. 창고 시스템

    Date2008.01.18 CategoryRPGXP 스크립트 By창조도시 Views2169 Votes3
    Read More
  4. 8방향이동

    Date2010.10.14 CategoryRPGXP 스크립트 ByA.M.S Views2153 Votes0
    Read More
  5. 아이템창을 아이템 분류별로 나누어 지게 개조.

    Date2007.12.02 CategoryRPGXP 스크립트 By창조도시 Views2149 Votes1
    Read More
  6. 스텟포인트투자

    Date2010.10.24 CategoryRPGXP 스크립트 ByA.M.S Views2142 Votes2
    Read More
  7. 직업명 표시

    Date2010.10.24 CategoryRPGXP 스크립트 ByA.M.S Views2103 Votes0
    Read More
  8. 맵 이름을 화면 상단에 띄우기.

    Date2008.10.12 CategoryRPGXP 스크립트 By창조도시 Views2084 Votes1
    Read More
  9. 대화창에 얼굴 띄우기& 대화창 명령어 모음.

    Date2008.12.31 CategoryRPGXP 스크립트 By창조도시 Views2084 Votes1
    Read More
  10. 모션 스크립트

    Date2013.12.06 CategoryRPGXP 스크립트 By 운 Views2060 Votes0
    Read More
  11. 상점에서 상세정보보여주기

    Date2010.10.24 CategoryRPGXP 스크립트 ByA.M.S Views2057 Votes0
    Read More
  12. 부드러운화면이동

    Date2010.10.24 CategoryRPGXP 스크립트 ByA.M.S Views2047 Votes0
    Read More
  13. 대각선 방향 이동추가로 8방향 이동 만들기.

    Date2008.08.14 CategoryRPGXP 스크립트 By창조도시 Views2045 Votes1
    Read More
  14. 파이널 판타지 7 스타일 메뉴

    Date2013.10.01 CategoryRPGXP 스크립트 By Views2029 Votes0
    Read More
  15. AraLab_MultiStartingPoint (다중 출발점 스크립트, 캐릭터 선택 스크립트) ver.0.2beta

    Date2014.01.21 CategoryRPGXP 스크립트 By 운 Views1977 Votes1
    Read More
  16. 아이템소지 한계돌파

    Date2010.10.24 CategoryRPGXP 스크립트 ByA.M.S Views1964 Votes0
    Read More
  17. 최초 시작화면에 제작자 정보를 띄워보자.

    Date2008.04.04 CategoryRPGXP 스크립트 By창조도시 Views1962 Votes5
    Read More
  18. 메뉴에 퀘스트 있는거

    Date2013.10.12 CategoryRPGXP 스크립트 By 운 Views1962 Votes2
    Read More
  19. 선택 메뉴를 가운데 정렬 해보자.

    Date2007.12.02 CategoryRPGXP 스크립트 By창조도시 Views1957 Votes2
    Read More
  20. 요청하신 게이지바 스크립트 입니다.

    Date2013.10.04 CategoryRPGXP 스크립트 By소년영남 Views1923 Votes1
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 Next
/ 8






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

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