RPGXP 스크립트
2013.10.12 21:33

메뉴에 퀘스트 있는거

조회 수 1957 추천 수 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. 문과 상자를 쉽게 만들수 있는 스크립트

    Date2013.10.21 CategoryRPGXP 스크립트 By Views2242 Votes0
    Read More
  2. 몬스터 도감

    Date2013.09.24 CategoryRPGXP 스크립트 By청담 Views1422 Votes0
    Read More
  3. 모션 스크립트

    Date2013.12.06 CategoryRPGXP 스크립트 By 운 Views2055 Votes0
    Read More
  4. 모바일 패드 플러그인입니다! MBS - Mobile DirPad & Action Button

    Date2015.11.07 CategoryRPGMV 플러그인 Bywillmv Views2007 Votes3
    Read More
  5. 모든 글자에 외곽선을 넣어주는 스크립트

    Date2013.09.26 CategoryRPGXP 스크립트 By Views808 Votes1
    Read More
  6. 모든 글자에 외곽선 넣는 스크립트

    Date2013.09.20 CategoryRPGXP 스크립트 By청담 Views1185 Votes0
    Read More
  7. 메세지에 얼굴, 이름등 다양한 기능 넣기 UMS 스크립트

    Date2013.12.10 CategoryRPGXP 스크립트 By데노제 Views1616 Votes0
    Read More
  8. 메뉴에서 실제시간 보는 스크립트

    Date2013.09.24 CategoryRPGXP 스크립트 By청담 Views607 Votes0
    Read More
  9. 메뉴에 퀘스트 있는거

    Date2013.10.12 CategoryRPGXP 스크립트 By 운 Views1957 Votes2
    Read More
  10. 메뉴에 얼굴 그래픽 표시

    Date2013.09.24 CategoryRPGXP 스크립트 By청담 Views831 Votes0
    Read More
  11. 메뉴 스크립트 Zer0 CMS

    Date2013.10.01 CategoryRPGXP 스크립트 By Views1384 Votes0
    Read More
  12. 맵타일 크기 변경 플러그인!

    Date2015.10.26 CategoryRPGMV 플러그인 By파란별빛 Views1403 Votes0
    Read More
  13. 맵이름 표시 스크립트

    Date2013.10.05 CategoryRPGXP 스크립트 By 운 Views2244 Votes0
    Read More
  14. 맵상에서 캐릭터 스프라이트 이미지를 offset해주는 플러그인

    Date2016.07.19 CategoryRPGMV 플러그인 Bylklslel Views1074 Votes0
    Read More
  15. 맵 이름을 화면 상단에 띄우기.

    Date2008.10.12 CategoryRPGXP 스크립트 By창조도시 Views2083 Votes1
    Read More
  16. 맵 이름을 화면 상단에 띄우기.

    Date2008.10.12 CategoryRPGXP 스크립트 By창조도시 Views2735 Votes1
    Read More
  17. 맵 이름 표시 스크립트

    Date2013.09.20 CategoryRPGXP 스크립트 By청담 Views1440 Votes0
    Read More
  18. 맵 이동시 로딩 그림 표시 스크립트

    Date2013.09.24 CategoryRPGXP 스크립트 By청담 Views716 Votes0
    Read More
  19. 말풍선 메세지 스크립트

    Date2014.02.24 CategoryRPGXP 스크립트 By천둥번들 Views1853 Votes0
    Read More
  20. 로고를 띄우는 스크립트

    Date2013.10.07 CategoryRPGXP 스크립트 ByXEONSOFT블로그 Views1678 Votes0
    Read More
Board Pagination Prev 1 ... 3 4 5 6 7 8 9 10 11 12 ... 15 Next
/ 15






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

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