Project1

标题: 求一个在菜单中显示所在地的脚本 [打印本页]

作者: 婉烟沉沫    时间: 2012-7-5 18:53
标题: 求一个在菜单中显示所在地的脚本
RT。表示菜单我已经更新完毕了,就求一个能放在菜单中显示地名的脚本了。表示有的亲们不要藏着哈,照顾照顾我这个只会该坐标的新人= =|||谢谢了。dsu_plus_rewardpost_czw
作者: reguna    时间: 2012-7-5 18:57
本帖最后由 reguna 于 2012-7-5 18:58 编辑
  1. #============================================================================
  2. #Pause Menu Features
  3. #By Ventwig
  4. #Version 1.3 - April 10 2012
  5. #For RPGMaker VX Ace
  6. #============================================================================
  7. # This simple scirpt was a request by JayPB08, then I decided I'd let everyone
  8. # have it :)
  9. # Thanks apoclaydon for pointing out a mistake where the icon didn't change!
  10. #=============================================================================
  11. # Description:
  12. # This code draws a gold window, and a playtime window (which counts up)
  13. # Right under the command window. They're two seperate windows to look nicer,
  14. # and you can disable one if you'd like :)
  15. # You can also draw icons, too!
  16. # And in v 1.3, I added a Gold Window Extension!
  17. #==============================================================================
  18. # Compatability:
  19. #  alias-es Scene_Menu Start
  20. #  Creates two new methods in Scene_Menu
  21. #  Works with Spike's Monentary System! OMG!
  22. #===============================================================================
  23. # Instructions: Put in materials, above main.Plug'N'Play
  24. #==============================================================================
  25. # Please give Credit to Ventwig if you would like to use one of my scripts
  26. # in a NON-COMMERCIAL project.
  27. # Please ask for permission if you would like to use it in a commercial game.
  28. # You may not re-distribute any of my scripts or claim as your own.
  29. # You may not release edits without permission, combatability patches are okay.
  30. #===============================================================================
  31. module VENTWIG #Do not touch

  32. ##################################################################
  33. #Customization! Yay!
  34. ##################################################################

  35.   #Disables (hides) the name/time window.
  36.   #No point in this script if both are true...
  37.   #True and False, default is both false.
  38.   DISABLE_NAME = false
  39.   DISABLE_TIME = false

  40.   #Sets where to draw the window(s)
  41.   #Either under the command menu, or over the gold hud
  42.   #True = Under the command
  43.   #False = Over Gold
  44.   #Default false
  45.   UNDER_COMMAND = false

  46.   #Chooses whether or not an icon will be drawn in the windows.
  47.   DRAW_ICON = true

  48.   #Chooses whether or not to replace the gold window with a
  49.   #new icon-gold window. This is seperate to extend compatibility.
  50.   #Like Spike's Monentary System
  51.   DRAW_GICON = true

  52.   #The index of the icon.
  53.   #Def NAME = 131 TIME = 280 GOLE = 361
  54.   NAME_ICON = 231
  55.   TIME_ICON = 280
  56.   GOLD_ICON = 0


  57. #########################################################################
  58. #End Of configuration. Touch anything below and it'll delete system32   #
  59. #########################################################################
  60. end

  61. class Window_MenuMapName < Window_Base
  62.   def initialize
  63.     super(0,100,160,50)
  64.     if VENTWIG::DRAW_ICON == true
  65.       draw_text(30,0,120,25,$game_map.display_name)
  66.       draw_icon(VENTWIG::NAME_ICON,0,0,enabled = true)
  67.     else
  68.       draw_text(0,0,160,25,$game_map.display_name)
  69.     end
  70.   end
  71. end

  72. class Window_MenuPlaytime < Window_Base
  73.   def initialize
  74.     super(0,100,160,50)
  75.     if VENTWIG::DRAW_ICON == true
  76.       draw_text(30,0,160,25,$game_system.playtime_s)
  77.         self.opacity = 0
  78.       draw_icon(VENTWIG::TIME_ICON,0,0,enabled = true)
  79.     else
  80.       draw_text(0,0,160,25,$game_system.playtime_s)
  81.     end
  82.   end
  83.   def update
  84.     contents.clear
  85.     if VENTWIG::DRAW_ICON == true
  86.       draw_text(30,0,160,25,$game_system.playtime_s)
  87.       draw_icon(VENTWIG::TIME_ICON,0,0,enabled = true)
  88.     else
  89.       draw_text(0,0,160,25,$game_system.playtime_s)
  90.     end
  91.   end
  92. end

  93. class Scene_Menu < Scene_MenuBase
  94.   alias ventwig_map_name_menu_start start
  95.   def start
  96.     ventwig_map_name_menu_start
  97.     if VENTWIG::DISABLE_NAME == false
  98.       create_map_name_window
  99.     end
  100.     if VENTWIG::DISABLE_TIME == false
  101.       create_playtime_window
  102.     end
  103.   end
  104.   def create_map_name_window
  105.     if VENTWIG::UNDER_COMMAND == true
  106.       @namemap_window = Window_MenuMapName.new
  107.       @namemap_window.x = 0
  108.       @namemap_window.y = @command_window.height
  109.       @namemap_window.width = @command_window.width
  110.       @namemap_window.height = 50
  111.     end
  112.     if VENTWIG::UNDER_COMMAND == false
  113.       if VENTWIG::DISABLE_TIME == false
  114.         @namemap_window = Window_MenuMapName.new
  115.         @namemap_window.x = 0
  116.         @namemap_window.y = @gold_window.y - 100
  117.         @namemap_window.width = @command_window.width
  118.         @namemap_window.height = 50
  119.       end
  120.       if VENTWIG::DISABLE_TIME == true
  121.         @namemap_window = Window_MenuMapName.new
  122.         @namemap_window.x = 0
  123.         @namemap_window.y = @gold_window.y - 50
  124.         @namemap_window.width = @command_window.width
  125.         @namemap_window.height = 50
  126.       end
  127.     end
  128.   end
  129.   def create_playtime_window
  130.     if VENTWIG::UNDER_COMMAND == true
  131.       if VENTWIG::DISABLE_NAME == false
  132.         @playtime_window = Window_MenuPlaytime.new
  133.         @playtime_window.x = 0
  134.         @playtime_window.y = @namemap_window.y + @namemap_window.height
  135.         @playtime_window.width = @command_window.width
  136.         @playtime_window.height = 50
  137.       end
  138.       if VENTWIG::DISABLE_NAME == true
  139.         @playtime_window = Window_MenuPlaytime.new
  140.         @playtime_window.x = 0
  141.         @playtime_window.y = @command_window.height
  142.         @playtime_window.width = @command_window.width
  143.         @playtime_window.height = 50
  144.       end
  145.     end
  146.     if VENTWIG::UNDER_COMMAND == false
  147.       if VENTWIG::DISABLE_NAME == false
  148.         @playtime_window = Window_MenuPlaytime.new
  149.         @playtime_window.x = 0
  150.         @playtime_window.y = @namemap_window.y + @namemap_window.height
  151.         @playtime_window.width = @command_window.width
  152.         @playtime_window.height = 50
  153.       end
  154.       if VENTWIG::DISABLE_NAME == true
  155.         @playtime_window = Window_MenuPlaytime.new
  156.         @playtime_window.x = 0
  157.         @playtime_window.y = @gold_window.y - 50
  158.         @playtime_window.width = @command_window.width
  159.         @playtime_window.height = 50
  160.       end
  161.     end
  162.   end
  163. end
复制代码
這還有顯示時間的功能
作者: 婉烟沉沫    时间: 2012-7-5 18:59
reguna 发表于 2012-7-5 19:57
這還有顯示時間的功能

嗯嗯,表示事件功能我自己做了,不过MS不太好。我先试验一下,成功的话马上给分




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1