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. 타이틀 로고 띄우기 + 로고 SE 가능(예제있음)

    Date2013.12.13 CategoryRPGXP 스크립트 By데노제 Views2391 Votes3
    Read More
  2. 메세지에 얼굴, 이름등 다양한 기능 넣기 UMS 스크립트

    Date2013.12.10 CategoryRPGXP 스크립트 By데노제 Views1616 Votes0
    Read More
  3. 모션 스크립트

    Date2013.12.06 CategoryRPGXP 스크립트 By 운 Views2053 Votes0
    Read More
  4. 아이템 조합 스크립트

    Date2013.12.06 CategoryRPGXP 스크립트 By 운 Views2712 Votes0
    Read More
  5. 이름조합스크립트

    Date2013.10.27 CategoryRPGXP 스크립트 ByScissor Views2764 Votes0
    Read More
  6. 문과 상자를 쉽게 만들수 있는 스크립트

    Date2013.10.21 CategoryRPGXP 스크립트 By Views2242 Votes0
    Read More
  7. 메뉴에 퀘스트 있는거

    Date2013.10.12 CategoryRPGXP 스크립트 By 운 Views1957 Votes2
    Read More
  8. 퀘스트 스크립트

    Date2013.10.12 CategoryRPGXP 스크립트 By 운 Views3100 Votes2
    Read More
  9. 로고를 띄우는 스크립트

    Date2013.10.07 CategoryRPGXP 스크립트 ByXEONSOFT블로그 Views1678 Votes0
    Read More
  10. 맵이름 표시 스크립트

    Date2013.10.05 CategoryRPGXP 스크립트 By 운 Views2244 Votes0
    Read More
  11. 요청하신 게이지바 스크립트 입니다.

    Date2013.10.04 CategoryRPGXP 스크립트 By소년영남 Views1921 Votes1
    Read More
  12. 파이널 판타지 7 스타일 메뉴

    Date2013.10.01 CategoryRPGXP 스크립트 By Views2024 Votes0
    Read More
  13. 미니맵 스크립트

    Date2013.10.01 CategoryRPGXP 스크립트 By Views2177 Votes0
    Read More
  14. 부활 스크립트

    Date2013.10.01 CategoryRPGXP 스크립트 By Views2765 Votes0
    Read More
  15. 발소리 스크립트

    Date2013.10.01 CategoryRPGXP 스크립트 By Views1730 Votes0
    Read More
  16. 메뉴 스크립트 Zer0 CMS

    Date2013.10.01 CategoryRPGXP 스크립트 By Views1384 Votes0
    Read More
  17. 상점에서 아이템 능력치를 표시해주는 스크립트

    Date2013.10.01 CategoryRPGXP 스크립트 By Views1656 Votes0
    Read More
  18. 대기 회복 스크립트

    Date2013.10.01 CategoryRPGXP 스크립트 By Views1076 Votes0
    Read More
  19. 복권 스크립트

    Date2013.10.01 CategoryRPGXP 스크립트 By Views1146 Votes0
    Read More
  20. 아이템 갯수 제한

    Date2013.10.01 CategoryRPGXP 스크립트 By Views1061 Votes0
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 ... 15 Next
/ 15






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

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