Advertisement
Guest User

RPG MAKER SCREEN OF DEATH v1.1 by Rikifive

a guest
Nov 5th, 2015
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 4.48 KB | None | 0 0
  1. #==============================================================================#
  2. #                            RPG MAKER SCREEN OF DEATH                         #
  3. #==============================================================================#
  4. #                             Author:  Rikifive                                #
  5. #                             For:     RPGMAKER VX ACE                         #
  6. #                             Version: 1.1                                     #
  7. #------------------------------------------------------------------------------#
  8. #  2015-11-05 -> Version 1.1                                                   #
  9. #             - Forces fullscreen! #GETSHREKT                                  #
  10. #             - Heavier explosion and other effects                            #
  11. #             - Stops BGM and BGS upon activating                              #
  12. #  2015-11-03 -> Version 1                                                     #
  13. #             - Release                                                        #
  14. #------------------------------------------------------------------------------#
  15. # DESCRIPTION                                                                  #
  16. #------------------------------------------------------------------------------#
  17. # This script adds a scene, where your game gets shrekt.                       #
  18. #------------------------------------------------------------------------------#
  19. # USAGE                                                                        #
  20. #------------------------------------------------------------------------------#
  21. # Use this script call to make your game get shrekt.                           #
  22. # SceneManager.call(Scene_BSOD)                                                #
  23. #==============================================================================#
  24. # /!\ WARNING!                                                                 #
  25. #------------------------------------------------------------------------------#
  26. # Running this scene will FREEZE your game. ALT + F4 will not work as well as  #
  27. # other combinations. It's not possible to minimalize the game, though pressing#
  28. # random buttons still can do something outside like running programs from     #
  29. # menu start. However, you're still able to run 'Task Manager' properly        #
  30. # (CTRL + ALT + DELETE) and close the game from there.                         #
  31. # I'M NOT RESPONSIBLE FOR ANY POTENTIAL DAMAGE CAUSED BY THIS SCRIPT.          #
  32. # YOU'RE DOING EVERYTHING ON YOUR OWN RISK.                                    #
  33. # However, if there are more problems than expected, please report that.       #
  34. #==============================================================================#
  35.  
  36. #==============================================================================#
  37. #  SCENE                                                                       #
  38. #==============================================================================#
  39. module Graphics
  40.   GetForegroundWindow = Win32API.new('user32', 'GetForegroundWindow', 'V', 'L')
  41.   GetWindowLong = Win32API.new('user32', 'GetWindowLong', 'LI', 'L')
  42.   def self.fullscreen?
  43.     GetWindowLong.call(GetForegroundWindow.call, -16) & 0x00800000 == 0
  44.   end
  45. end
  46. User32DLL = DL.dlopen('user32')
  47. User32DLL__keybd_event = DL::CFunc.new(User32DLL.sym('keybd_event'), DL::TYPE_VOID, 'keybd_event', :stdcall)
  48. class Scene_BSOD < Scene_Base
  49.   def start
  50.     initialize_BSOD
  51.   end
  52.  
  53.   def initialize_BSOD
  54.     RPG::BGM.fade (1)
  55.     RPG::BGS.fade (1)
  56.     @shrekt = false
  57.     @timer = 10
  58.     RPG::SE.new("Fire9",100,50).play
  59.     RPG::SE.new("Fire9",100,60).play
  60.     RPG::SE.new("Fire9",100,70).play
  61.     RPG::SE.new("Fire9",100,80).play
  62.     RPG::SE.new("Fire9",100,90).play
  63.     RPG::SE.new("Fire9",100,100).play
  64.     RPG::SE.new("Fire9",100,110).play
  65.     RPG::SE.new("Fire9",100,120).play
  66.     RPG::SE.new("Fire9",100,130).play
  67.     RPG::SE.new("Fire9",100,140).play
  68.     RPG::SE.new("Fire9",100,150).play
  69.     if !Graphics.fullscreen?
  70.     User32DLL__keybd_event.call([0xA4, 0, 0, 0])
  71.     User32DLL__keybd_event.call([0x0D, 0, 0, 0])
  72.     User32DLL__keybd_event.call([0x0D, 0, 0x0002, 0])
  73.     User32DLL__keybd_event.call([0xA4, 0, 0x0002, 0])
  74.     end
  75.   end
  76.    
  77.   def update
  78.     @timer -= 1 if !@shrekt
  79.     if @timer == 0 && !@shrekt
  80.       @shrekt = true
  81.       RPG::SE.new("Sheep",100,100).play
  82.     end
  83.     super if !@shrekt
  84.   end
  85. end
  86. # OKAY that's enough of that. It will be enough to crash your game. (°͜ʖ°)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement