Advertisement
CompanionWulf

Single Key Shut Down Scriptlet - RGSS2/RMVX

Jan 23rd, 2015
471
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 4.75 KB | None | 0 0
  1. #==============================================================================
  2. # ** Single Key Shut Down Scriptlet - Version 1.0
  3. #------------------------------------------------------------------------------
  4. #   Version      : 1.0.0
  5. #   Author       : Companion Wulf
  6. #   Release Date : 26 April 2014
  7. #   Last Update  : 26 April 2014
  8. #   Websites
  9. #     * RPG Maker Times           - http://rpgmakertimes.blogspot.com
  10. #     * RMT Companion Blog        - http://blog.rpgmakertimes.info
  11. #     * RPG Maker Times Facebook  - http://facebook.com/RPGMakerTimes
  12. #
  13. #------------------------------------------------------------------------------
  14. # ** Description
  15. #------------------------------------------------------------------------------
  16. # This scriptlet provides a way to shut down the game very quickly, without
  17. # having to either click on the X to close the window or go through any of the
  18. # menus to end the game.
  19. #
  20. #------------------------------------------------------------------------------
  21. # ** Instructions
  22. #------------------------------------------------------------------------------
  23. # Place the script between "Materials" and "Main".
  24. #
  25. #------------------------------------------------------------------------------
  26. # ** Development Notes
  27. #------------------------------------------------------------------------------
  28. # The scriptlet actually developed out of boredom, but I guess it could have its
  29. # practical uses, such as when playing at work and the boss approaches, you'll
  30. # likely need a fast, effective method of shutting RPG Maker down.
  31. #
  32. #------------------------------------------------------------------------------
  33. # ** Compatibility Issues
  34. #------------------------------------------------------------------------------
  35. # As far as I know there are no compatibility issues.
  36. #
  37. #------------------------------------------------------------------------------
  38. # ** Future Updates
  39. #------------------------------------------------------------------------------
  40. #   * Auto-Save on Exit
  41. #==============================================================================
  42.  
  43. $imported = {} if $imported == nil; $imported["CW-Sksds-1.0"] = true
  44.  
  45. module SKSDS
  46.   # Available keys to use: Z, SHIFT, CTRL, ALT, F5, F6, F7 and F8
  47.   KEYPRESS = Input::CTRL
  48. end
  49.  
  50. #==============================================================================
  51. # ** Scene_Title
  52. #==============================================================================
  53. class Scene_Title < Scene_Base
  54.   #--------------------------------------------------------------------------
  55.   # * Frame Update
  56.   #--------------------------------------------------------------------------
  57.   alias cwkpsds_scnttl_update update
  58.   def update
  59.     cwkpsds_scnttl_update
  60.     if Input.trigger?(SKSDS::KEYPRESS); exit; end
  61.   end
  62. end
  63.  
  64. #==============================================================================
  65. # ** Scene_Map
  66. #==============================================================================
  67. class Scene_Map < Scene_Base
  68.   #--------------------------------------------------------------------------
  69.   # * Frame Update
  70.   #--------------------------------------------------------------------------
  71.   alias cwkpsds_scnmap_update update
  72.   def update
  73.     cwkpsds_scnmap_update
  74.     if Input.trigger?(SKSDS::KEYPRESS); exit; end
  75.   end
  76. end
  77.  
  78. #==============================================================================
  79. # COPYRIGHT NOTICE
  80. #==============================================================================
  81. # This script is copyrighted to Companion Wulf under the provisions of the
  82. # Digital Millennium Copyright Act (DMCA).
  83. #
  84. # However, permission is granted to use the script in non-commercial projects
  85. # only, provided that credit (to Companion Wulf) is given somewhere in the game.
  86. # Beginning or end credits are fine (or even in the game itself!).
  87. #
  88. # The script cannot be distributed without my express written permission. It is
  89. # only allowed for distribution (at present) on the following websites:
  90. #
  91. #   RPG Maker Times               - http://rpgmakertimes.blogspot.com
  92. #   RPG Maker Times Companion   - http://blog.rpgmakertimes.info
  93. #  
  94. #  If you would like to share the script on a website or other forum, write to me
  95. #  for permission via RPG Maker Times Companion and the likelihood is I'll grant
  96. #  it and add to the list of approved distribution sites.
  97. #  
  98. #  Not understanding the above conditions, or not understanding English, will not
  99. #  exempt you in any way, shape or form.
  100. #  
  101. #  *For use in commercial projects*, I ask that a nominal fee of $3 for non-
  102. #  exclusive rights be paid. This will then go towards domain costs and
  103. #  additional scripts.
  104. #  
  105. #  Please do NOT use that email address for anything other than asking permission
  106. #  or, of course, letting me know about your project. ~Wulf
  107. #==============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement