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
88 메뉴 메이플스토리처럼 메뉴를^^ 57 file 딸기님 2010.07.13 7138
87 메뉴 온라인메뉴처럼!! 메이플 메뉴처럼!! 변신~스크립트 33 WMN 2008.03.17 6815
86 메뉴 새로운 메뉴 15 file 또라에몽 2010.07.17 5301
85 메뉴 제가추천하는 메뉴스크립트 11 file 백호 2009.02.22 5298
84 메뉴 1인 캐릭터 메뉴 스크립트 27 file - 하늘 - 2009.08.06 4788
83 메뉴 메뉴에 그림넣기 4 file 백호 2009.02.22 4411
82 메뉴 기본메뉴 뜯어고친것. (스샷추가) 6 file 백호 2009.02.22 4313
» 메뉴 메뉴를 바꾸는 스크립트 14 №1 2012.08.04 4206
80 메뉴 3D Menu Script 7 현문 2010.10.06 4077
79 메뉴 [메뉴] 간단한 형식의 CoaMenu2Scroll 버젼 20 file 코아 코스튬 2010.10.24 3526
78 메뉴 링 메뉴 16 Neowitch* 2008.04.18 3478
77 메뉴 자작 메뉴 스크립트들(L's Simple CMS and menu scenes) (SDK 호환?) 10 Alkaid 2010.09.02 3455
76 메뉴 스탯올리기 시스템 (액알가능) 27 file 백호 2009.02.22 3403
75 메뉴 [자작]명성치 사용 스크립트 16 Rainsy 2009.03.22 3390
74 메뉴 메뉴화면에 '해야 할 일' 알려주는 창 넣기 11 하진 2012.04.23 3255
73 메뉴 파이널 판타지 7 스타일 메뉴 7 아방스 2009.01.12 3237
72 메뉴 메뉴등에서 움직이는 엑터 9 file 백호 2009.02.22 3161
71 메뉴 메뉴에 얼굴 그래픽 표시 4 file 백호 2009.02.21 3112
70 메뉴 제가 쓰고있는 메뉴 13 file 백호 2009.02.21 3028
69 메뉴 링 메뉴 소지금,플레이시간 추가 버젼 17 Neowitch* 2008.04.20 3022
Board Pagination Prev 1 2 3 4 5 Next
/ 5