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
981 오디오 WhiteFlute - AudioEX (XP/VX/VXA) file Alkaid 2012.12.26 1255
980 그래픽 WhiteFlute - BitmapEX 4 file JACKY 2012.12.10 2950
979 오디오 Audio Module Rewrite mciSendString 1.1 by DerVVulfman Alkaid 2012.09.18 1367
978 전투 Trickster씨의 전투 시스템 (SDK 필수?) Alkaid 2012.09.18 3256
977 스킬 Trickster's Bag of Skill Effects (SDK 필요) Alkaid 2012.09.17 1289
976 변수/스위치 Switchless Common Events by PK8(XP/VX/VXA) Alkaid 2012.09.15 1199
975 변수/스위치 Initial Switches and Variables by PK8 (XP/VX/VXA) Alkaid 2012.09.14 1296
974 변수/스위치 The Self Data Suite by PK8 (XP/VX/VXA) Alkaid 2012.09.14 1232
973 그래픽 부드럽게 화면이 움직이는 스크립트 입니다. 16 GangSin 2012.09.12 4587
972 맵/타일 Editor Tiles by PK8 (XP/VX/VXA) Alkaid 2012.09.11 1868
971 장비 Auto Equipment Optimization for Guillaume777's Multi Slot Script by DerVVulfman Alkaid 2012.09.09 1497
970 메뉴 Leidy's Ring Command Window 1.2 by DerVVulfman Alkaid 2012.09.09 1430
969 그래픽 Pictures below Characters by PK8 (XP/VXA) Alkaid 2012.09.07 1640
968 그래픽 Event Transparency by DerVVulfman (XP/VX/VXA) Alkaid 2012.09.01 1485
967 전투 Etude87_Custom_Slip_Damage_XP ver.1.0 5 습작 2012.08.26 1856
966 전투 Mr.Mo's ABS Ultimate 7.0 by DerVVulfman 4 Alkaid 2012.08.26 2587
965 그래픽 Composite Window Skins by PK8 (XP/VX/VXA) Alkaid 2012.08.26 1559
964 스킬 Miriam's Handicrafts! 1.3 by DerVVulfman Alkaid 2012.08.26 1204
963 전투 Minkoff's Animated Battlers - Enhanced 13.8 by DerVVulfman 1 Alkaid 2012.08.26 1831
» 메뉴 메뉴를 바꾸는 스크립트 14 №1 2012.08.04 4205
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