XP 스크립트

메뉴를 바꾸는 스크립트

by. №1

 

[소개]

이 스크립트는 장비, 스킬등등을 안띄우고 싶을 때 사용하시면 됩니다.

제가 습작님이 올리신 ESG(Etude87's Script Generator ver.1.62)를 이용해 만들어봤습니다.

 

일단 아이템, 저장, 종료만 있는 메뉴 스크립트입니다.

 

--------------------------------------아래부터---------------------------------------

 

class Scene_Menu
  def main
    s0 = $data_system.words.item
    s1 = "세이브"
    s2 = "게임 종료"
    @command_window = Window_Command.new(160, [s0, s1, s2])
    @command_window.index = @menu_index
    if $game_party.actors.size == 0
      @command_window.disable_item(0)
    end
    if $game_system.save_disabled
      @command_window.disable_item(1)
    end
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 0
    @playtime_window.y = 224
    @steps_window = Window_Steps.new
    @steps_window.x = 0
    @steps_window.y = 320
    @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
    @steps_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  def update_command
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
    if Input.trigger?(Input::C)
      if $game_party.actors.size == 0 and (@command_window.index != 1 or @command_window.index != 2)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @command_window.index
      when 0
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Item.new
      when 1
        if $game_system.save_disabled
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Save.new
      when 2
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_End.new
      end
      return
    end
  end
end
class Scene_Item
  def update_item
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(0)
      return
    end
    if Input.trigger?(Input::C)
      @item = @item_window.item
      unless @item.is_a?(RPG::Item)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      unless $game_party.item_can_use?(@item.id)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      $game_system.se_play($data_system.decision_se)
      if @item.scope >= 3
        @item_window.active = false
        @target_window.x = (@item_window.index + 1) % 2 * 304
        @target_window.visible = true
        @target_window.active = true
        if @item.scope == 4 || @item.scope == 6
          @target_window.index = -1
        else
          @target_window.index = 0
        end
      else
        if @item.common_event_id > 0
          $game_temp.common_event_id = @item.common_event_id
          $game_system.se_play(@item.menu_se)
          if @item.consumable
            $game_party.lose_item(@item.id, 1)
            @item_window.draw_item(@item_window.index)
          end
          $scene = Scene_Map.new
          return
        end
      end
      return
    end
  end
end
class Scene_Save < Scene_File
  def on_decision(filename)
    $game_system.se_play($data_system.save_se)
    file = File.open(filename, "wb")
    write_save_data(file)
    file.close
    if $game_temp.save_calling
      $game_temp.save_calling = false
      $scene = Scene_Map.new
      return
    end
    $scene = Scene_Menu.new(1)
  end
  def on_cancel
    $game_system.se_play($data_system.cancel_se)
    if $game_temp.save_calling
      $game_temp.save_calling = false
      $scene = Scene_Map.new
      return
    end
    $scene = Scene_Menu.new(1)
  end
end
class Scene_End
  def update
    @command_window.update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(2)
      return
    end
    if Input.trigger?(Input::C)
      case @command_window.index
      when 0
        command_to_title
      when 1
        command_shutdown
      when 2
        command_cancel
      end
      return
    end
  end
  def command_cancel
    $game_system.se_play($data_system.decision_se)
    $scene = Scene_Menu.new(2)
  end
end

 

----------------------------------------------------------------------------------------

 

이번엔 아예 메뉴창 안띄우기

 

----------------------------------------------------------------------------------------

 

class Scene_Map
  def call_menu
  end
end

 

 

 

 

P.S.그리고 이것 말고도 다르게 하시려면 댓글로 달아주세요. 혹은 습작님이 올리신 ESG를 다운받으셔서 직접 만드셔도 되고요.

Comment '14'
  • profile
    습작 2012.08.04 19:07

    ESG는 미리 작성된 코드를 사용자의 선택에 따라서 재배치하여 출력하는 간단한 GUI 입니다. 원본 코드는 Enterbrain社에 저작권이 있으며, 저는 해당 코드를 수정한 사람이 되겠습니다. ESG를 사용하여 출력이후 해당 코드를 추가 수정하지 않으셨다면 게시자 본인 이름으로 배포를 삼가해 주시면 감사하겠습니다.^^;

  • ?
    №1 2012.08.05 14:00

    알겠습니다 ^^

  • profile
    푸솜양 2012.09.19 19:43
    잘 가져갑니다!
  • ?
    푸솜양님 축하합니다.^^ 2012.09.19 19:43
    포인트 팡팡!에 당첨되셨습니다.
    푸솜양님은 16포인트를 보너스로 받으셨습니다.
  • ?
    아쉐메레스 2012.12.11 20:24
    잘쓰겠습니다!
  • profile
    간담보이 2012.12.22 16:06
    다른건 다 있고 저장만 없는건 없나요?
    여관 같은 데서만 저장을 할수 있게 하려구요..
  • profile
    존재감제로 2013.03.16 12:33
    세이브 금지의 변경 쓰면 되지 않나요?
  • ?
    구름인간 2013.04.25 15:49
    간담보이님이 세이브금지의변경을 몰라서 질문하신것보다는...
    메뉴커맨드자체의 세이브를 없애고 싶으셔서 질문하신것같네요ㅇㅅㅇ
  • profile
    간담보이 2013.05.30 15:08
    네.. 세이브가 있는데 않되면..
    플레이하는 입장으로도 좀 짜증나니까요
  • ?
    프리다 2013.04.07 12:09
    잘 쓰겠습니다!
  • ?
    JellyBean 2013.09.26 18:42
    탈출맵에 유용하겠군요
    잘 사용하겟습니다.
  • profile
    아방스닉넴 2014.11.23 00:21
    감사합니다^^
  • ?
    dnjs1580 2016.05.18 19:08
    감사합니다!
  • ?
    치킨수련 2019.02.18 14:21
    잘쓰게습니다

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
641 메뉴 Ring menu edit (Non-SDK ver.) Alkaid 2010.09.08 1538
640 이동 및 탈것 점프 높이를 자유자제로 조절하는 스크립트!! 8 file 백호 2009.02.21 1539
639 이동 및 탈것 Maplinks - 맵연결을 쉽게 하기 1 백호 2009.02.22 1541
638 메시지 UCoder's Message System by Mr.Mo file Alkaid 2010.10.05 1542
637 넷플2.0(펌) 1 오동훈 2008.02.25 1543
636 스크립트 호출 명령어 통합버전 / Version 2.21 / 8 WMN 2008.04.06 1543
635 기타 디버그 윈도우 강화! 3 file 백호 2009.02.21 1550
634 기타 Trailing Characters ver.1 by SephirothSpawn 6 file 백호 2009.02.22 1551
633 기타 RM2kXP file 습작 2014.03.17 1551
632 전투 버틀러 색조 변경 5 file 백호 2009.02.21 1552
631 저장 Advanced Save System Edit (현재 맵을 보여주지 않음) file 백호 2009.02.22 1557
630 저장 Chaos Project Save Layout 1.4 by Fantasist, Blizzard file Alkaid 2010.10.08 1558
629 기타 데미지 출력 스크립트 예제 9 file 백호 2009.02.22 1559
628 기타 Advanced Gold Display by Dubealex (돈 액수를 세자리씩 끊어 표기) 2 Alkaid 2010.11.18 1559
627 그래픽 Composite Window Skins by PK8 (XP/VX/VXA) Alkaid 2012.08.26 1559
626 이동 및 탈것 텔레포트 마나소비량 수정하기 3 지존!! 2010.07.22 1563
625 메뉴 1-Scene CMS 1.16 by LegACy (SDK호환) 3 file 백호 2009.02.22 1564
624 메뉴 Star Ocean 3 형식으로 스테이터스 화면 변경 1 file 백호 2009.02.21 1571
623 메뉴 스테이터스 화면 from Harts Horn 2 백호 2009.02.22 1571
622 그래픽 Weather Script(버전 불명) by ccoa 1 file Alkaid 2010.09.08 1571
Board Pagination Prev 1 ... 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 ... 52 Next
/ 52