VX 스크립트

#===========================================
#  Final Fantasy Styled Savepoint System
#               for RMVX
#                 v1.0
#             by  Rubymatt
#===========================================

class Scene_Savepoint < Scene_Base
  def start
    super
    create_menu_background
    create_command_window
  end
  def post_start
    super
    open_command_window
  end
  def terminate
    super
    dispose_command_window
    dispose_menu_background
  end
  def update
    super
    update_menu_background
    @command_window.update
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      case @command_window.index
      when 0 
        Sound.play_decision
        $scene = Scene_File.new(true, false, true)
      when 1
        if $game_party.item_number($data_items[@tent]) < 1         
          Sound.play_buzzer 
        else
          Sound.play_recovery
          $game_party.lose_item($data_items[@tent], 1, false)
          for actor in $game_party.members
            actor.recover_all
          end
          @command_window.dispose
          create_command_window
          @command_window.index = 1
          @command_window.update
        end
      when 2 
        Sound.play_cancel
        $scene = Scene_Map.new
      end
    end
  end
  def update_menu_background
    super
    @menuback_sprite.tone.set(0, 0, 0, 0)
  end
  def create_command_window
    #Edit Below ---------------------------------
    @tent = 21   #ID of Tent item in database
    #Stop Edit ----------------------------------
    s1 = Vocab::save
    s2 = "Tent (" + $game_party.item_number($data_items[@tent]).to_s + " left)"
    s3 = Vocab::cancel
    @command_window = Window_Command.new(172, [s1, s2, s3])
    @command_window.x = (544 - @command_window.width) / 2
    @command_window.y = (416 - @command_window.height) / 2
    if $game_party.item_number($data_items[@tent]) < 1         
      @command_window.draw_item(1, false)   
    end
  end
  def dispose_command_window
    @command_window.dispose
  end
  def open_command_window
    @command_window.open
    begin
      @command_window.update
      Graphics.update
    end until @command_window.openness == 255
  end
  def close_command_window
    @command_window.close
    begin
      @command_window.update
      Graphics.update
    end until @command_window.openness == 0
  end
  def dispose_command_window
    @command_window.dispose
  end
end

으......응?

부속스크립트가아닌 이벤트로 추가해야 하는것가틍데.....

    #Edit Below ---------------------------------
    @tent = 21   #ID of Tent item in database
    #Stop Edit ----------------------------------

 

출처:rmrk

Comment '2'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
197 Limit Break VX 3 Man... 2008.10.28 1777
196 맵/타일 GubiD's Isometric Maps for RPG Maker VX 1 Man... 2008.10.28 1681
195 영상 ??(Avi play ver beta 0.8) 4 Man... 2008.10.28 1575
194 전투 오버 드라이브 프로블럼 2 Man... 2008.10.28 2268
193 새로운 종류의 세이브 스크립트!! 8 Man... 2008.10.28 3517
192 디러그 시스템?? 1 Man... 2008.10.28 1247
191 베틀 스크린 톤 체인지?? 무슨 말? 4 Man... 2008.10.28 1616
190 기타 TagNote v2.0 5 Man... 2008.10.28 1996
189 Detailed Call Script Error Mesage 3 Man... 2008.10.28 1258
188 변수/스위치 Variable Criticals Man... 2008.10.28 1480
187 타이틀/게임오버 New Title Screen 3 Man... 2008.10.28 1832
186 기타 RPG 2000이나 RPG 2003처럼 전체화면으로 나오게 하는 스크립트(대박) 21 Man... 2008.10.28 4821
185 Khai's Window Helper 1.4 1 Man... 2008.10.28 1272
184 More SaveFlies(대박) 2 Man... 2008.10.28 2125
183 Attribute System Man... 2008.10.28 1293
182 폴스 세이브 4 Man... 2008.10.28 2343
181 타이틀/게임오버 Random Title Screen 2 Man... 2008.10.28 1454
180 미니맵 Map-System by AmIMeYet [미니맵] 9 Man... 2008.10.28 2746
179 아이템 아이템 프라이스 체인저?? Man... 2008.10.28 2385
178 Good VS EVil? 4 Man... 2008.10.28 1641
Board Pagination Prev 1 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Next
/ 32