Advertisement
Dekita

Untitled

May 26th, 2014
1,388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.54 KB | None | 0 0
  1. if true # << Make true to use this script, false to disable.
  2. #===============================================================================
  3. #
  4. # ☆ $D13x - Pokemon Style Menu
  5. # -- Author : Dekita
  6. # -- Version : 1.0
  7. # -- Level : Easy / Normal
  8. # -- Requires : N/A
  9. # -- Engine : RPG Maker VX Ace.
  10. #
  11. #===============================================================================
  12. # ☆ Import
  13. #-------------------------------------------------------------------------------
  14. $D13x={}if$D13x==nil
  15. $D13x[:Pokemon_Menu]=true
  16. #===============================================================================
  17. # ☆ Updates
  18. #-------------------------------------------------------------------------------
  19. # D /M /Y
  20. # 21/o4/2o14 - Started, Finished,
  21. #
  22. #===============================================================================
  23. # ☆ Introduction
  24. #-------------------------------------------------------------------------------
  25. # This script creates a new menu scene - Scene_PokeMenu.
  26. # You can allow this new scene to overwrite the default menu scene.
  27. #
  28. # This script was designed for a 1 actor party. It could be used with more;
  29. # however, it does not show a status page within the menu scene. If you call
  30. # a scene that can display various actors - such as scene status, it will
  31. # always call actor 1's infomation.
  32. #
  33. # Additionally, you can use this script to easily add new commands for custom
  34. # scenes you may be using.
  35. #
  36. #===============================================================================
  37. # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  38. #===============================================================================
  39. # 1. You MUST give credit to "Dekita" !!
  40. # 2. You are NOT allowed to repost this script.(or modified versions)
  41. # 3. You are NOT allowed to convert this script.
  42. # 4. You are NOT allowed to use this script for Commercial games.
  43. # 5. ENJOY!
  44. #
  45. # "FINE PRINT"
  46. # By using this script you hereby agree to the above terms and conditions,
  47. # if any violation of the above terms occurs "legal action" may be taken.
  48. # Not understanding the above terms and conditions does NOT mean that
  49. # they do not apply to you.
  50. # If you wish to discuss the terms and conditions in further detail you can
  51. # contact me at http://dekitarpg.wordpress.com/
  52. #
  53. #===============================================================================
  54. # ☆ Instructions
  55. #-------------------------------------------------------------------------------
  56. # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
  57. #
  58. #===============================================================================
  59. # ☆ Script Calls
  60. #-------------------------------------------------------------------------------
  61. # SceneManager.call( Scene_PokeMenu )
  62. #
  63. #===============================================================================
  64. # ☆ Notetags ( default )
  65. #-------------------------------------------------------------------------------
  66. # N/A
  67. #
  68. #===============================================================================
  69. # ☆ HELP
  70. #-------------------------------------------------------------------------------
  71. # N/A
  72. #
  73. #===============================================================================
  74. module Pokemon ; module Menu
  75. #===============================================================================
  76. #-----------------------------------------------------------------------------
  77. # Overwrite Default Menu ?
  78. #-----------------------------------------------------------------------------
  79. OWDMENU = true
  80. #-----------------------------------------------------------------------------
  81. # Command Array Begin - DO NOT REMOVE
  82. #-----------------------------------------------------------------------------
  83. Commands=[
  84. #-----------------------------------------------------------------------------
  85. # ["Name" , "eval", Icon, Hue, Text_Color, "Scene_Name"]
  86. #-----------------------------------------------------------------------------
  87. ["Bag" , "true", 817, 0, Text_Color::White, "Scene_Item"],
  88. ["Team" , "true", 847, 0, Text_Color::White, "Scene_Team"],
  89. ["Badges" , "true", 994, 0, Text_Color::White,"Scene_Achievement"],
  90. # ["Skill" , "true", 380, 0, Text_Color::White, "Scene_Skill"],
  91. # ["Equip" , "true", 476, 0, Text_Color::White, "Scene_Equip"],
  92. # ["Status" , "true", 847, 0, Text_Color::White, "Scene_Status"],
  93. ["Save" , "true", 848, 0, Text_Color::White, "Scene_Save"],
  94. ["Options" , "true", 1025, 0, Text_Color::White, "Scene_End"],
  95. ["Debug" , "true", 852, 0, Text_Color::White, "Scene_Debug"],
  96. #-----------------------------------------------------------------------------
  97. # Command Array End - DO NOT REMOVE
  98. #-----------------------------------------------------------------------------
  99. ] #####################
  100. # CUSTOMISATION END #
  101. end ; end #####################
  102. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  103. # #
  104. # http://dekitarpg.wordpress.com/ #
  105. # #
  106. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  107. #===============================================================================#
  108. # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
  109. # YES?\.\. #
  110. # OMG, REALLY? \| #
  111. # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
  112. # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
  113. #===============================================================================#
  114. class Window_Pokemon_Menu_Command < Window_Command
  115. #===============================================================================
  116. #-----------------------------------------------------------------------------
  117. #
  118. #-----------------------------------------------------------------------------
  119. def self.init_command_position
  120. @@last_command = nil
  121. end
  122. #-----------------------------------------------------------------------------
  123. #
  124. #-----------------------------------------------------------------------------
  125. def initialize
  126. super(Graphics.width-window_width,0)
  127. select_last
  128. end
  129. #-----------------------------------------------------------------------------
  130. #
  131. #-----------------------------------------------------------------------------
  132. def select_last
  133. select(@@last_command)
  134. end
  135. #-----------------------------------------------------------------------------
  136. #
  137. #-----------------------------------------------------------------------------
  138. def window_width
  139. return Graphics.width / 4
  140. end
  141. #-----------------------------------------------------------------------------
  142. #
  143. #-----------------------------------------------------------------------------
  144. def make_command_list
  145. Pokemon::Menu::Commands.each do |command|
  146. next unless command != nil
  147. enable = (eval(command[1])rescue false)
  148. add_command(command[0],:command,enable)
  149. end
  150. end
  151. #-----------------------------------------------------------------------------
  152. #
  153. #-----------------------------------------------------------------------------
  154. def draw_item(index)
  155. rect = item_rect_for_text(index)
  156. icon = Pokemon::Menu::Commands[index][2]
  157. ihue = Pokemon::Menu::Commands[index][3]
  158. colo = Pokemon::Menu::Commands[index][4]
  159. change_color(colo, command_enabled?(index))
  160. draw_de_icon(icon,rect.x,rect.y,ihue,command_enabled?(index))
  161. draw_text(rect.x+25,rect.y,rect.width,rect.height,command_name(index))
  162. end
  163. #-----------------------------------------------------------------------------
  164. #
  165. #-----------------------------------------------------------------------------
  166. def process_ok
  167. @@last_command = @index
  168. super
  169. end
  170. #-----------------------------------------------------------------------------
  171. #
  172. #-----------------------------------------------------------------------------
  173. def call_scene
  174. SceneManager.call(eval(Pokemon::Menu::Commands[@index][5])) rescue nil
  175. end
  176. end
  177. #===============================================================================
  178. class Scene_PokeMenu < Scene_MenuBase
  179. #===============================================================================
  180. #-----------------------------------------------------------------------------
  181. #
  182. #-----------------------------------------------------------------------------
  183. def start
  184. super
  185. makec
  186. end
  187. #-----------------------------------------------------------------------------
  188. #
  189. #-----------------------------------------------------------------------------
  190. def makec
  191. @command_window = Window_Pokemon_Menu_Command.new
  192. @command_window.set_handler(:command,method(:press_command))
  193. @command_window.set_handler(:cancel, method( :return_scene))
  194. end
  195. #-----------------------------------------------------------------------------
  196. #
  197. #-----------------------------------------------------------------------------
  198. def press_command
  199. @command_window.activate unless @command_window.call_scene
  200. end
  201. end
  202. #===============================================================================
  203. if Pokemon::Menu::OWDMENU
  204. #===============================================================================
  205. module Menu_Caller
  206. #===============================================================================
  207. #-----------------------------------------------------------------------------
  208. #
  209. #-----------------------------------------------------------------------------
  210. def self.call
  211. SceneManager.call(Scene_PokeMenu)
  212. Window_Pokemon_Menu_Command::init_command_position
  213. end
  214. end
  215. #===============================================================================
  216. class Scene_Map < Scene_Base
  217. #===============================================================================
  218. #-----------------------------------------------------------------------------
  219. #
  220. #-----------------------------------------------------------------------------
  221. def call_menu
  222. Sound.play_ok
  223. Menu_Caller.call
  224. end
  225. end
  226. #===============================================================================
  227. class Game_Interpreter
  228. #===============================================================================
  229. #-----------------------------------------------------------------------------
  230. #
  231. #-----------------------------------------------------------------------------
  232. def command_351
  233. return if $game_party.in_battle
  234. Menu_Caller.call
  235. Fiber.yield
  236. end
  237. end
  238. end # if Pokemon::Menu::OWDMENU
  239. #==============================================================================#
  240. # http://dekitarpg.wordpress.com/ #
  241. #==============================================================================#
  242. end # if true # << Make true to use this script, false to disable.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement