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 장비 MultiSlots! 2.4 by DerVVulfman 2 Alkaid 2011.09.05 1466
920 전투 Mr. Mo's ABS Ultimate by DerVVulfman Alkaid 2011.09.05 1438
919 전투 에너미 HP&SP 스크립트 4 파이널판타지 2011.08.16 2901
918 메시지 TXT 메세지 렌더링 스크립트 16 에돌이 2011.07.14 4069
917 전투 Minkoff's Animated Battlers - Enhanced 13.4 by DerVVulfman 2 Alkaid 2011.07.13 1458
916 전투 Mr Mo DVV Addon #18~#19 Alkaid 2011.07.13 1266
915 메시지 txt 메세징 스크립트 4 에돌이 2011.07.12 2198
914 전투 Mr Mo DVV Addon #14~#17 3 Alkaid 2011.05.23 1285
913 스킬 Grouping and Details 8.1 by DerVVulfman 4 file Alkaid 2011.04.18 1437
912 기타 Text to RGSS by DerVVulfman Alkaid 2011.04.18 1319
911 기타 [게이지바]HelloCoaVer4.0 업데이트 속도 변경 [오랜만의 업데이트] 30 file 코아 코스튬 2011.04.02 3787
910 키입력 Glitchfinder's Input Modules (XP/VX 공용) 2 Alkaid 2011.03.19 1952
909 스킬 MicKo's Skill Tree 1.2 by DerVVulfman 2 Alkaid 2011.03.15 2010
908 기타 3d 렌더링스크립트 어렵게 찾음 9 라구나 2011.03.05 3610
907 기타 The General Monster Generator 1.1 by DerVVulfman 1 file Alkaid 2011.03.02 1496
906 메시지 Hermes(Hermes Extends RPGXP Message System) 0.4 by derula 1 Alkaid 2011.02.27 3053
» 기타 일시정지 스크립트 13 【§㉤ㅏ법㉧ㅣ§】 2011.02.26 1841
904 저장 심플 세이브&로드 개조(필요할 때 원하는 슬롯에 자동저장) 5 나렌시아 2011.02.24 2291
903 XP의 느린FPS 빠르게하기 16 주유공근615 2011.02.22 3138
902 장비 Multislots! 2.2 by DerVVulfman 4 file Alkaid 2011.02.18 1611
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