dsiver144

Common Event Menu Option

Sep 13th, 2013
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.10 KB | None | 0 0
  1. =begin
  2. #===============================================================================
  3. #   Name          : Common Event Menu Option
  4. #   Version       : 1.0
  5. #   Author        : Dark Sky
  6. #   Terms of use  : Can be use in any project. Credit me if u like
  7. #   Website       : www.taotrochoi.com & www.gamevts.org
  8. #===============================================================================
  9. =end
  10. #===============================================================================
  11. #  ** CommonEvent_Drk
  12. #===============================================================================
  13. module CommonEvent_Drk
  14.   #------------------You can be edit that thing below---------------------------
  15.  
  16.   CommonEventID             = 1               #Comond Event will be activate
  17.   Custom_Name               = "Common Event"  #Name of this command in Menu
  18.  
  19.   #-----------------------------------------------------------------------------
  20. end
  21. include CommonEvent_Drk
  22.  
  23. #===============================================================================
  24. #  ** Scene_Menu
  25. #===============================================================================
  26. class Scene_Menu < Scene_MenuBase
  27.   alias drk_commond_event_options  create_command_window
  28.   def create_command_window
  29.     drk_commond_event_options
  30.     @command_window.set_handler(:cmevent,   method(:command_event))
  31.   end
  32.   def command_event
  33.     SceneManager.return
  34.     $game_temp.reserve_common_event(CommonEventID)
  35.     end
  36. end
  37. #===============================================================================
  38. #  ** Window_MenuCommand
  39. #===============================================================================
  40. class Window_MenuCommand < Window_Command
  41.   alias drk_add_common_event_command   make_command_list
  42.   def make_command_list
  43.     drk_add_common_event_command
  44.     add_commonevent_command
  45.   end
  46.   def add_commonevent_command
  47.     add_command(Custom_Name, :cmevent)
  48.   end
  49. end
  50. #===============================================================================
  51. #   ** End of File
  52. #===============================================================================
Advertisement
Add Comment
Please, Sign In to add comment