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
921 메뉴 SG_Artifact Colors by sandgolem (SDK 호환) 1 백호 2009.02.22 1003
920 그래픽 Drago - Custom Resolution II 1 Alkaid 2014.09.10 1004
919 기타 프레임 적용 스크립트 1 file 백호 2009.02.21 1007
918 스킬 Equipment Skills 2.0 by SephirothSpawn file 백호 2009.02.22 1007
917 전투 랜덤 전투음악 by Fomar0153@rmxp.org 1 백호 2009.02.22 1008
916 기타 분류 별로 윈도우 스킨 다르게 사용하기 file 백호 2009.02.21 1015
915 기타 강제 종료시키기 1 file 백호 2009.02.22 1015
914 전투 방어시에 속성 저항,스테이트무시 스크립트 1 백호 2009.02.22 1017
913 기타 제련시스템 수정본입니다. 3 file 백호 2009.02.21 1020
912 기타 능력치 무한대 스크립트 (따로 넣을필요없음) 2 백호 2009.02.21 1027
911 전투 SG_Auto battle by sandgolem (SDK호환) 백호 2009.02.22 1031
910 아이템 아이템을 사용하여 기술 습득하기 (기술문서 아이템) 2 file 백호 2009.02.21 1033
909 기타 Random Character Generator by SephirothSpawn (SDK호환) 1 백호 2009.02.22 1040
908 타이틀/게임오버 타이틀과 타이틀 BGM 랜덤으로 변경하는 스크립트 2 file 백호 2009.02.21 1045
907 기타 기본설정 강화ㄴ 1 백호 2009.02.21 1047
906 이동 및 탈것 이동루트에 애니메이션커맨드 추가 1 file 백호 2009.02.21 1047
905 파티 파티원 포션 나눠먹기 스크립트 1 file 백호 2009.02.22 1047
904 기타 [KGC] 개요 스크립트 2 백호 2009.02.21 1049
903 메뉴 링메뉴+음악도입스크립트 백호 2009.02.21 1051
902 저장 [KGC] 스크립트 저장된 리셋 불어오기 [스샷첨부] 1 file 백호 2009.02.22 1052
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 52 Next
/ 52