Advertisement
Dark_Paladin

DKP Website from Title

Jun 9th, 2013
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.00 KB | None | 0 0
  1. #==============================================================================
  2. # DKP Website from Title
  3. # Version: 1.0
  4. # Author: Dark Paladin (rpgmakerweb.com)
  5. # Date: June 9, 2013
  6. # Terms of use: You may use this script any way you see fit. Commercial or not.
  7. # no credit is needed but appriciated.
  8. # Rpg Maker Vx Ace only
  9. #==============================================================================
  10. #  Description:
  11. #    This adds a command to the Title screen above new game to launch a website.
  12. #==============================================================================
  13. #  Instructions:
  14. #    Plug and Play insert above main below materials.
  15. #
  16. #==============================================================================
  17. # *CONFIGURE AREA
  18. #==============================================================================
  19.  
  20. module Dkp_Title_Website_Options
  21.  
  22.   Websiteaddress = "www.google.com"
  23.   CommandName = "Website"
  24. #==============================================================================
  25. # *Do not not edit below this unless you know what your doing!!
  26. #==============================================================================
  27. end
  28. class Window_TitleCommand < Window_Command
  29.   def make_command_list
  30.     add_command(Dkp_Title_Website_Options::CommandName, :website)
  31.     add_command(Vocab::new_game, :new_game)
  32.     add_command(Vocab::continue, :continue, continue_enabled)
  33.     add_command(Vocab::shutdown, :shutdown)
  34.   end  
  35. end
  36. class Scene_Title
  37.     def create_command_window
  38.     @command_window = Window_TitleCommand.new
  39.     @command_window.set_handler(:website, method(:command_website))
  40.     @command_window.set_handler(:new_game, method(:command_new_game))
  41.     @command_window.set_handler(:continue, method(:command_continue))
  42.     @command_window.set_handler(:shutdown, method(:command_shutdown))
  43.   end
  44.     def command_website
  45.       Sound.play_ok
  46.       Thread.new { system("start #{Dkp_Title_Website_Options::Websiteaddress}") }
  47.       @command_window.activate
  48.   end
  49. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement