XP 스크립트

일시정지 스크립트 적용 방법 **

pause 라는 파일을 픽쳐에 넣어주세요.

이름이 꼭 pause 이여야 함.

pause 파일은 만들어서 넣어주세요.

 

 

#==============================================================================
# ** Pausing with F12
#------------------------------------------------------------------------------
# Zeriab
# Version 1.1
# 2009-05-25 (Year-Month-Day)
#------------------------------------------------------------------------------
# * Version History :
#
#   Version 1.0 -------------------------------------------------- (2009-05-22)
#   - First release
#
#   Version 1.1 -------------------------------------------------- (2009-05-25)
#   - The pause image now appears immediately when F12 is pressed.
#   - Transitions are cut short rather than restarted when F12 is pressed.
#------------------------------------------------------------------------------
# * Description :
#
#   This script changes the functionality of pressing F12 during the game
#   from resetting the game to (un)pausing the game. A picture is displayed
#   while the game is paused. (Having a picture is optional)
#------------------------------------------------------------------------------
# * License :
#
#   Copyright (C) 2009  Zeriab
#
#   This program is free software: you can redistribute it and/or modify
#   it under the terms of the GNU Lesser Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU Lesser Public License for more details.
#
#   For the full license see <http://www.gnu.org/licenses/>
#   The GNU General Public License: http://www.gnu.org/licenses/gpl.txt
#   The GNU Lesser General Public License: http://www.gnu.org/licenses/lgpl.txt
#------------------------------------------------------------------------------
# * Compatibility :
#
#   Is most likely not compatible with other F12 prevention scripts.
#------------------------------------------------------------------------------
# * Instructions :
#
#   Place this script anywhere above main.
#   The image file 'pause' present in Graphics/Pictures is used.
#   Note: No picture is shown if there is no 'pause' in Graphics/Pictures.
#==============================================================================
 
#=============================================================================
# ** Reset class (because it won't be defined until F12 is pressed otherwise)
#=============================================================================
class Reset < Exception
 
end
#=============================================================================
# ** Module Graphics
#=============================================================================
module Graphics
  class << self
    #-------------------------------------------------------------------------
    # * Aliases Graphics.update and Graphics.transition
    #-------------------------------------------------------------------------
    unless self.method_defined?(:zeriab_f12_pause_update)
      alias_method(:zeriab_f12_pause_update, :update)
      alias_method(:zeriab_f12_pause_transition, :transition)
    end
    #-------------------------------------------------------------------------
    # Change the update method so F12 toggles pause
    #-------------------------------------------------------------------------
    def update(*args)
      # Try to update normally
      begin
        zeriab_f12_pause_update(*args)
        return
      rescue Reset
        # Do nothing
      end
      # F12 has been pressed
      done = false
      # Store frame count
      frame_count = Graphics.frame_count
      # Show pause image
      @sprite = Sprite.new
      @sprite.z = 9999
      begin
        @sprite.bitmap = RPG::Cache.picture('pause')
      rescue
        @sprite.bitmap = Bitmap.new(32,32)
      end
      # Keep trying to do the update
      while !done
        begin
          zeriab_f12_pause_update(*args)
          done = true
        rescue Reset
          # Do Nothing
        end
      end
      # F12 has been released, update until it is pressed again
      while done
        begin
          zeriab_f12_pause_update(*args)
        rescue Reset
          done = false
        end
      end
      # F12 has been pressed, keep trying to update
      while !done
        begin
          zeriab_f12_pause_update(*args)
          done = true
        rescue Reset
          # Do nothing
        end
      end
      # F12 has been released, dispose pause image
      @sprite.dispose
      # Set proper frame count
      Graphics.frame_count = frame_count
    end
    #-------------------------------------------------------------------------
    # Changes the transition so it is cut short if F12 is pressed
    #-------------------------------------------------------------------------
    def transition(*args)
      done = false
      # Keep trying to do the transition
      while !done
        begin
          zeriab_f12_pause_transition(*args)
          done = true
        rescue Reset
          # Set transition length to 0 frames.
          args[0] = 0
        end
      end
    end
  end
end

Comment '13'
  • ?
    Outsider2 2011.03.02 17:48

    와우굉장히좋은스크립트인거같습니다. 유용하게사용하겠습니다.

  • profile
    초아™ 2011.03.05 16:50

    오호~멋져요^^

  • ?
    daisun99 2011.04.30 17:13

    오홍!!1 잘받아 가요!!!

  • ?
    포인트 팡팡 2011.04.30 17:13
    축하합니다. daisun99님은 35포인트에 당첨되셨습니다.
  • ?
    ★밀레니엄★ 2011.05.01 22:30

    오홋!! 일싲ㅇ지라니!!

  • ?
    포인트 팡팡 2011.05.01 22:30
    축하합니다. ★밀레니엄★님은 75포인트에 당첨되셨습니다.
  • profile
    데버 2011.05.11 23:07

    뭘 일시정지하는거죠?

  • profile
    은색바람 2011.05.15 12:07

    다음에는

    sikp 스크립트가 생기면 좋겠네요...

    (이건 이벤트로 할 수 있는건가?)

  • ?
    샤프심 2011.05.31 15:24

    좋네요

  • ?
    David:) 2011.06.06 22:57

    오오 좋으네요 ㅎㅎ 감사합니다 ^^

  • ?
    베넘 2011.07.23 02:45

    감사요-^^

  • ?
    타케찌 2011.10.16 23:40

    읭?

  • ?
    메토즈메군 2012.01.31 11:46

    저는 왜 적용이 않될까요?

    이거 쉬프트로 작동하는거 맞나요?


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
234 기타 FPLE 2 - First Person Labyrinth Explorer by MGC 1 Alkaid 2012.01.17 3415
233 기타 Note Editor for RMXP by NEWOLD 1 Alkaid 2012.01.15 2101
232 기타 간단한 Scene_Base #2 2 Alkaid 2012.01.15 1738
231 기타 쓸만한스크립트61개포함 28 file 궭크이 2012.01.09 4296
230 기타 탤레포트 스크립트 3 앞잡이 2011.12.10 2260
229 기타 업데이트 (죽었을경우부활 )스크립트한글화 2 by향온 2011.09.27 2438
228 기타 부활스크립트 4 캉쿤 2011.09.19 2061
227 기타 Text to RGSS by DerVVulfman Alkaid 2011.04.18 1319
226 기타 [게이지바]HelloCoaVer4.0 업데이트 속도 변경 [오랜만의 업데이트] 30 file 코아 코스튬 2011.04.02 3787
225 기타 3d 렌더링스크립트 어렵게 찾음 9 라구나 2011.03.05 3610
224 기타 The General Monster Generator 1.1 by DerVVulfman 1 file Alkaid 2011.03.02 1496
» 기타 일시정지 스크립트 13 【§㉤ㅏ법㉧ㅣ§】 2011.02.26 1841
222 기타 sandgolem Script Archive (RMXP SDK 1.5 이상 필요) file Alkaid 2011.02.17 1453
221 기타 [게이지바]게이지바 스크립트 2.5 (실용적?) 17 file 코아 코스튬 2010.12.05 4216
220 기타 Upload & Download files with RGSS 2.1 by berka (XP/VX 공용) 5 Alkaid 2010.11.20 2134
219 기타 Advanced Gold Display by Dubealex (돈 액수를 세자리씩 끊어 표기) 2 Alkaid 2010.11.18 1557
218 기타 [회복] 대기 회복 스크립트4.0 여러 오류 문제 해결 및 길이 줄임 11 file 코아 코스튬 2010.11.06 2189
217 기타 현재시간표시 33 file 코아 코스튬 2010.10.09 2528
216 기타 [맵 아이디 확인 스크립트] 맵아이디 모르는 사람을 위한 스크립트 9 file 코아 코스튬 2010.10.09 2161
215 기타 Seph's Test Bed v.4 (파일첨부) (SDK2.x용) Alkaid 2010.10.08 1533
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 Next
/ 13