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
921 기타 창고 스크립트 2 백호 2009.02.21 1203
920 기타 참 시스템 완성! 1 file 백호 2009.02.22 1523
919 장비 착용한 장비에 따라 모습이 달라지는 스크립트 예제 5 file 게임애호가 2015.02.14 2005
918 HUD 직업명띄우기 스크립트 2 백호 2009.02.21 1123
917 직업 직업마다 다른 성장 2 백호 2009.02.22 1723
916 직업 직업 10 file 이안 2010.01.17 2838
915 아이템 지정한 아이템 갯수 제한 3 백호 2009.02.22 1282
914 기타 지정범위안에 들어오면 특정한 움직임을 취한다!! 1 백호 2009.02.21 919
913 변수/스위치 지정범위안에 들어오면 특정 스위치를 온/오프/교환 한다!! 2 백호 2009.02.21 1365
912 전투 중복일지도 모르는 ATB 전투 11 file 백호 2009.02.22 4057
911 타이틀/게임오버 죽었을떄 마을로이동하기&생명초 사용하기 9 WMN 2008.03.17 2097
910 타이틀/게임오버 죽엇을경우 마을로이동하기 스크립트 16 file 백호 2009.02.22 3325
909 HUD 주인공,NPC이름 머리 나타내기 49 file 송긔 2010.11.28 6060
908 좌표 표시 하는 스크랩트 1 WMN 2008.03.17 1214
907 기타 좌표 스크립트 2 백호 2009.02.21 908
906 이동 및 탈것 젤다 스타일 맵스크롤 5 file 백호 2009.02.21 1838
905 스킬 제한시간내 커맨드를 입력해야 스킬이 발동~ 3 file 백호 2009.02.22 2614
904 기타 제작한 게임의 파일을 모두 exe파일 하나에 쓸어담기 by sheefo@Creation Asylum 1 file 백호 2009.02.22 1239
903 기타 제련시스템 수정본입니다. 3 file 백호 2009.02.21 1020
902 메뉴 제가추천하는 메뉴스크립트 11 file 백호 2009.02.22 5298
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