设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2356|回复: 7
打印 上一主题 下一主题

[已经解决] 想在菜单里加上对话的指令

[复制链接]

Lv2.观梦者

梦石
0
星屑
624
在线时间
125 小时
注册时间
2013-10-25
帖子
56
跳转到指定楼层
1
发表于 2014-7-31 21:11:17 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
就是在其他人在队伍的里的时候用菜单的对话的指令就可以和别人对话这样...
然后对话的内容是随机的...加加好感度什么的....

评分

参与人数 1星屑 +50 收起 理由
余烬之中 + 50 头像好评

查看全部评分

Lv3.寻梦者 (版主)

…あたしは天使なんかじゃないわ

梦石
0
星屑
2208
在线时间
4033 小时
注册时间
2010-10-4
帖子
10779

开拓者贵宾

2
发表于 2014-7-31 21:12:04 | 只看该作者
本帖最后由 taroxd 于 2014-7-31 21:45 编辑

https://rpg.blue/forum.php?mod=viewthread&tid=368001

参考

@VIPArcher

你就随手做一个吧。
看楼主要求,enabled 参数可以设定为 $game_party.members.size == 1。
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
624
在线时间
125 小时
注册时间
2013-10-25
帖子
56
3
 楼主| 发表于 2014-7-31 21:25:46 | 只看该作者
taroxd 发表于 2014-7-31 21:12
https://rpg.blue/forum.php?mod=viewthread&tid=368001

参考

认真的看了一下
但是我想要的是利用脚本建立一个新指令实现而不是物品..(´・ω・`)

点评

点击这个指令会发生什么呢?对话内容在哪里?实现怎么样的对话?你并没有写清楚。 建议就使用上面那个贴子的方式即可。实在不行可以自己学脚本  发表于 2014-7-31 21:31

评分

参与人数 1梦石 +1 收起 理由
taroxd + 1 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10074
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

4
发表于 2014-7-31 21:31:47 | 只看该作者
aa838320582 发表于 2014-7-31 21:25
认真的看了一下
但是我想要的是利用脚本建立一个新指令实现而不是物品..(´・ω・`) ...

那就添加一个菜单指令,按下去执行一个公共事件咯。
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
624
在线时间
125 小时
注册时间
2013-10-25
帖子
56
5
 楼主| 发表于 2014-7-31 21:39:23 | 只看该作者
taroxd 发表于 2014-7-31 21:12
https://rpg.blue/forum.php?mod=viewthread&tid=368001

参考

真对不起 那就是我没说清楚了
是菜单中多出来个对话选项
有人在队的时候可以对话
没有人在队的时候则不能对话
对话就是一般的对话
对话内容根据地点的不同而变化

点评

听4L的  发表于 2014-7-31 21:43
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
115 小时
注册时间
2012-11-15
帖子
119
6
发表于 2014-7-31 21:55:34 | 只看该作者
你这系统挺复杂....
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Ace Menu Engine v1.07
  4. # -- Last Updated: 2012.01.03
  5. # -- Level: Normal, Hard
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YEA-AceMenuEngine"] = true

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.01.03 - Compatibility Update: Ace Item Menu
  15. # 2012.01.01 - Compatibility Update: Kread-EX's Synthesis
  16. #            - Compatibility Update: Kread-EX's Grathnode Install
  17. #            - Compatibility Update: Yami's Slot Battle
  18. # 2011.12.23 - Script efficiency optimized.
  19. # 2011.12.19 - Compatibility Update: Class System
  20. # 2011.12.15 - Updated for better menu MP/TP gauge management.
  21. # 2011.12.13 - Compatibility Update: Ace Equip Engine
  22. # 2011.12.07 - Update to allow for switches to also hide custom commands.
  23. # 2011.12.06 - Started Script and Finished.
  24. #
  25. #==============================================================================
  26. # ▼ Introduction
  27. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  28. # The menu system in RPG Maker VX Ace is great. However, it lacks the user
  29. # customization that RPG Maker 2003 allowed. With this script, you can add,
  30. # remove, and rearrange menu commands as you see fit. In addition to that, you
  31. # can add in menu commands that lead to common events or even custom commands
  32. # provided through other scripts.
  33. #
  34. # This script also provides window appearance management such as setting almost
  35. # all command windows to be center aligned or changing the position of the
  36. # help window. You can also opt to show the TP Gauge in the main menu as well
  37. # as in the skill menu.
  38. #
  39. #==============================================================================
  40. # ▼ Instructions
  41. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  42. # To install this script, open up your script editor and copy/paste this script
  43. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  44. #
  45. # Edit the settings in the module below as you see fit.
  46. #
  47. #==============================================================================
  48. # ▼ Compatibility
  49. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  50. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  51. # it will run with RPG Maker VX without adjusting.
  52. #
  53. #==============================================================================

  54. module YEA
  55.   module MENU
  56.    
  57.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  58.     # - General Menu Settings -
  59.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  60.     # This changes the way menus appear in your game. You can change their
  61.     # alignment, and the location of the help window, Note that any non-Yanfly
  62.     # Engine Ace scripts may not conform to these menu styles.
  63.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  64.     HELP_WINDOW_LOCATION = 0     # 0-Top, 1-Middle, 2-Bottom.
  65.     COMMAND_WINDOW_ALIGN = 1     # 0-Left, 1-Middle, 2-Right.
  66.    
  67.     # These settings below adjust the visual appearance of the main menu.
  68.     # Change the settings as you see fit.
  69.     MAIN_MENU_ALIGN = 0          # 0-Left, 1-Middle, 2-Right.
  70.     MAIN_MENU_RIGHT = false      # false-Left, true-Right.
  71.     MAIN_MENU_ROWS  = 14         # Maximum number of rows for main menu.
  72.     DRAW_TP_GAUGE   = true       # If true, draws TP in the main menu.
  73.    
  74.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  75.     # - Main Menu Settings -
  76.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  77.     # These settings adjust the main menu, the order at which commands appear,
  78.     # what text is displayed, and what the commands are linked to. Here's a
  79.     # list of which commands do what:
  80.     #
  81.     # -------------------------------------------------------------------------
  82.     # :command         Description
  83.     # -------------------------------------------------------------------------
  84.     # :item            Opens up the item menu. Default menu item.
  85.     # :skill           Opens up the skill menu. Default menu item.
  86.     # :equip           Opens up the equip menu. Default menu item.
  87.     # :status          Opens up the status menu. Default menu item.
  88.     # :formation       Lets player manage party. Default menu item.
  89.     # :save            Opens up the save menu. Default menu item.
  90.     # :game_end        Opens up the shutdown menu. Default menu item.
  91.     #
  92.     # :class           Requires YEA - Class System
  93.     #
  94.     # :gogototori      Requires Kread-EX's Go Go Totori! Synthesis
  95.     # :grathnode       Requires Kread-EX's Grathnote Install
  96.     # :sslots          Requires Yami's YSA - Slot Battle
  97.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  98.     COMMANDS =[
  99.       :item,         # Opens up the item menu. Default menu item.
  100.       :skill,        # Opens up the skill menu. Default menu item.
  101.       :equip,        # Opens up the equip menu. Default menu item.
  102.       :class,        # Requires YEA - Class System.
  103.       :guardian,
  104.       :formation,
  105.       :status,       # Opens up the status menu. Default menu item.
  106.     #:formation,    # Lets player manage party. Default menu item.
  107.       :event_3,      # Launches Common Event 3. Common Event Command.
  108.       :event_4,      # Launches Common Event 4. Common Event Command.
  109.       :event_11,      # Launches Common Event 13. Common Event Command.
  110.       :event_12,      # Launches Common Event 13. Common Event Command.
  111.       :event_13,      # Launches Common Event 13. Common Event Command.
  112.       :event_14,      # Launches Common Event 14. Common Event Command.
  113.       :event_15,      # Launches Common Event 15. Common Event Command.
  114.       :event_16,      # Launches Common Event 16. Common Event Command.
  115.       :event_19,      # Launches Common Event 16. Common Event Command.
  116.       :event_22,      # Launches Common Event 16. Common Event Command.
  117.       :event_24,      # Launches Common Event 16. Common Event Command.
  118.       :event_54,
  119.       :event_61,
  120.     # :debug,        # Opens up debug menu. Custom Command.
  121.       :shop,         # Opens up a shop to pawn items. Custom Command.
  122.       :save,         # Opens up the save menu. Default menu item.
  123.       :game_end,     # Opens up the shutdown menu. Default menu item.
  124.     ] # Do not remove this.
  125.    
  126.     #--------------------------------------------------------------------------
  127.     # - Common Event Commands -
  128.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  129.     # If you insert one of the following commands into the COMMANDS array, the
  130.     # player can trigger a common event to launch. You can disable certain
  131.     # commands in the menu by binding them to a switch. If you don't want to
  132.     # disable them, set the switch to 0 and it will always be enabled. The
  133.     # ShowSwitch will prevent a command from appear if that switch is false.
  134.     # Set it to 0 for it to have no impact.
  135.     #--------------------------------------------------------------------------
  136.     COMMON_EVENT_COMMANDS ={
  137.     # :command => ["Display Name", EnableSwitch, ShowSwitch, Event ID],
  138.       :event_19 => [   "对话",            0,          0,        19],
  139.       } # Do not remove this.
  140.    
  141.     #--------------------------------------------------------------------------
  142.     # - Custom Commands -
  143.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  144.     # For those who use scripts that may lead to other menu scenes, use this
  145.     # hash to manage custom commands that run specific script calls. You can
  146.     # disable certain commands in the menu by binding them to a switch. If you
  147.     # don't want to disable them, set the switch to 0. The ShowSwitch will
  148.     # prevent a command from appear if that switch is false. Set it to 0 for
  149.     # it to have no impact.
  150.     #--------------------------------------------------------------------------
  151.     CUSTOM_COMMANDS ={
  152.     # :command => ["Display Name", EnableSwitch, ShowSwitch, Handler Method],
  153.       :debug   => [       "Debug",            0,          0, :command_debug],
  154.       :formation => ["整队",            0,        0,  :command_formation],
  155.       :gogototori => ["Synthesis",            0,        0,  :command_totori],
  156.       :grathnode => [ "Grathnode",            0,        0, :command_install],
  157.       } # Do not remove this.
  158.    
  159.   end # MENU
  160. end # YEA

  161. #==============================================================================
  162. # ▼ Editting anything past this point may potentially result in causing
  163. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  164. # halitosis so edit at your own risk.
  165. #==============================================================================

  166. #==============================================================================
  167. # ■ Window_MenuCommand
  168. #------------------------------------------------------------------------------
  169. # This class is kept towards the top of the script to provide easier access.
  170. #==============================================================================

  171. class Window_MenuCommand < Window_Command
  172.   
  173.   #--------------------------------------------------------------------------
  174.   # overwrite method: make_command_list
  175.   #--------------------------------------------------------------------------
  176.   def make_command_list
  177.     for command in YEA::MENU::COMMANDS
  178.       case command
  179.       #--- Default Commands ---
  180.       when :item
  181.         add_command(Vocab::item,   :item,   main_commands_enabled)
  182.       when :skill
  183.         add_command(Vocab::skill,  :skill,  main_commands_enabled)
  184.       when :equip
  185.         add_command(Vocab::equip,  :equip,  main_commands_enabled)
  186.       when :status
  187.         add_command(Vocab::status, :status, main_commands_enabled)
  188.       when :formation
  189.         add_formation_command
  190.       when :save
  191.         add_original_commands
  192.         add_save_command
  193.       when :game_end
  194.         add_game_end_command
  195.       #--- Yanfly Engine Ace Commands ---
  196.       when :class
  197.         next unless $imported["YEA-ClassSystem"]
  198.         add_class_command
  199.       #--- Imported Commands ---
  200.       when :sslots
  201.         next unless $imported["YSA-SlotBattle"]
  202.         add_sslots_command
  203.       when :grathnode
  204.         next unless $imported["KRX-GrathnodeInstall"]
  205.         process_custom_command(command)
  206.       when :gogototori
  207.         next unless $imported["KRX-AlchemicSynthesis"]
  208.         process_custom_command(command)
  209.       #--- Imported Commands ---
  210.       else
  211.         process_common_event_command(command)
  212.         process_custom_command(command)
  213.       end
  214.     end
  215.   end
  216.   
  217.   #--------------------------------------------------------------------------
  218.   # new method: process_common_event_command
  219.   #--------------------------------------------------------------------------
  220.   def process_common_event_command(command)
  221.     return unless YEA::MENU::COMMON_EVENT_COMMANDS.include?(command)
  222.     show = YEA::MENU::COMMON_EVENT_COMMANDS[command][2]
  223.     continue = show <= 0 ? true : $game_switches[show]
  224.     return unless continue
  225.     text = YEA::MENU::COMMON_EVENT_COMMANDS[command][0]
  226.     switch = YEA::MENU::COMMON_EVENT_COMMANDS[command][1]
  227.     ext = YEA::MENU::COMMON_EVENT_COMMANDS[command][3]
  228.     enabled = switch <= 0 ? true : $game_switches[switch]
  229.     add_command(text, command, enabled, ext)
  230.   end
  231.   
  232.   #--------------------------------------------------------------------------
  233.   # new method: process_custom_command
  234.   #--------------------------------------------------------------------------
  235.   def process_custom_command(command)
  236.     return unless YEA::MENU::CUSTOM_COMMANDS.include?(command)
  237.     show = YEA::MENU::CUSTOM_COMMANDS[command][2]
  238.     continue = show <= 0 ? true : $game_switches[show]
  239.     return unless continue
  240.     text = YEA::MENU::CUSTOM_COMMANDS[command][0]
  241.     switch = YEA::MENU::CUSTOM_COMMANDS[command][1]
  242.     enabled = switch <= 0 ? true : $game_switches[switch]
  243.     add_command(text, command, enabled)
  244.   end
  245.   
  246. end # Window_MenuCommand

  247. #==============================================================================
  248. # ■ Menu
  249. #==============================================================================

  250. module Menu
  251.   
  252.   #--------------------------------------------------------------------------
  253.   # self.help_window_location
  254.   #--------------------------------------------------------------------------
  255.   def self.help_window_location
  256.     return YEA::MENU::HELP_WINDOW_LOCATION
  257.   end
  258.   
  259.   #--------------------------------------------------------------------------
  260.   # self.command_window_align
  261.   #--------------------------------------------------------------------------
  262.   def self.command_window_align
  263.     return YEA::MENU::COMMAND_WINDOW_ALIGN
  264.   end
  265.   
  266.   #--------------------------------------------------------------------------
  267.   # self.main_menu_align
  268.   #--------------------------------------------------------------------------
  269.   def self.main_menu_align
  270.     return YEA::MENU::MAIN_MENU_ALIGN
  271.   end
  272.   
  273.   #--------------------------------------------------------------------------
  274.   # self.main_menu_right
  275.   #--------------------------------------------------------------------------
  276.   def self.main_menu_right
  277.     return YEA::MENU::MAIN_MENU_RIGHT
  278.   end
  279.   
  280. end # Menu

  281. #==============================================================================
  282. # ■ Game_Actor
  283. #==============================================================================

  284. class Game_Actor < Game_Battler
  285.   
  286.   #--------------------------------------------------------------------------
  287.   # new method: draw_mp?
  288.   #--------------------------------------------------------------------------
  289.   def draw_mp?
  290.     return true unless draw_tp?
  291.     for skill in skills
  292.       next unless added_skill_types.include?(skill.stype_id)
  293.       return true if skill.mp_cost > 0
  294.     end
  295.     return false
  296.   end
  297.   
  298.   #--------------------------------------------------------------------------
  299.   # new method: draw_tp?
  300.   #--------------------------------------------------------------------------
  301.   def draw_tp?
  302.     return false unless $data_system.opt_display_tp
  303.     for skill in skills
  304.       next unless added_skill_types.include?(skill.stype_id)
  305.       return true if skill.tp_cost > 0
  306.     end
  307.     return false
  308.   end
  309.   
  310. end # Game_Actor

  311. #==============================================================================
  312. # ■ Window_Base
  313. #==============================================================================

  314. class Window_Base < Window
  315.   
  316.   #--------------------------------------------------------------------------
  317.   # overwrite method: draw_actor_simple_status
  318.   #--------------------------------------------------------------------------
  319.   def draw_actor_simple_status(actor, dx, dy)
  320.     dy -= line_height / 2
  321.     draw_actor_name(actor, dx, dy)
  322.     draw_actor_level(actor, dx, dy + line_height * 1)
  323.     draw_actor_icons(actor, dx, dy + line_height * 2)
  324.     dw = contents.width - dx - 124
  325.     draw_actor_class(actor, dx + 120, dy, dw)
  326.     draw_actor_hp(actor, dx + 120, dy + line_height * 1, dw)
  327.     if YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && !actor.draw_mp?
  328.       draw_actor_tp(actor, dx + 120, dy + line_height * 2, dw)
  329.     elsif YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && actor.draw_mp?
  330.       if $imported["YEA-BattleEngine"]
  331.         draw_actor_tp(actor, dx + 120, dy + line_height * 2, dw/2 + 1)
  332.         draw_actor_mp(actor, dx + 120 + dw/2, dy + line_height * 2, dw/2)
  333.       else
  334.         draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw/2 + 1)
  335.         draw_actor_tp(actor, dx + 120 + dw/2, dy + line_height * 2, dw/2)
  336.       end
  337.     else
  338.       draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw)
  339.     end
  340.   end
  341.   
  342. end # Window_Base

  343. #==============================================================================
  344. # ■ Window_Command
  345. #==============================================================================

  346. class Window_Command < Window_Selectable
  347.   
  348.   #--------------------------------------------------------------------------
  349.   # overwrite method: alignment
  350.   #--------------------------------------------------------------------------
  351.   def alignment
  352.     return Menu.command_window_align
  353.   end
  354.   
  355. end # Window_Command

  356. #==============================================================================
  357. # ■ Window_MenuCommand
  358. #==============================================================================

  359. class Window_MenuCommand < Window_Command
  360.   
  361.   #--------------------------------------------------------------------------
  362.   # alias method: init_command_position
  363.   #--------------------------------------------------------------------------
  364.   class <<self; alias init_command_position_ame init_command_position; end
  365.   def self.init_command_position
  366.     init_command_position_ame
  367.     @@last_command_oy = nil
  368.   end
  369.   
  370.   #--------------------------------------------------------------------------
  371.   # overwrite method: visible_line_number
  372.   #--------------------------------------------------------------------------
  373.   def visible_line_number
  374.     return [[item_max, YEA::MENU::MAIN_MENU_ROWS].min, 1].max
  375.   end
  376.   
  377.   #--------------------------------------------------------------------------
  378.   # overwrite method: alignment
  379.   #--------------------------------------------------------------------------
  380.   def alignment
  381.     return Menu.main_menu_align
  382.   end
  383.   
  384.   #--------------------------------------------------------------------------
  385.   # alias method: process_ok
  386.   #--------------------------------------------------------------------------
  387.   alias window_menucommand_process_ok_ame process_ok
  388.   def process_ok
  389.     @@last_command_oy = self.oy
  390.     window_menucommand_process_ok_ame
  391.   end
  392.   
  393.   #--------------------------------------------------------------------------
  394.   # alias method: select_last
  395.   #--------------------------------------------------------------------------
  396.   alias window_menucommand_select_last_ame select_last
  397.   def select_last
  398.     window_menucommand_select_last_ame
  399.     self.oy = @@last_command_oy unless @@last_command_oy.nil?
  400.     @@last_command_oy = nil
  401.   end
  402.   
  403. end # Window_MenuCommand

  404. #==============================================================================
  405. # ■ Scene_Menu
  406. #==============================================================================

  407. class Scene_Menu < Scene_MenuBase
  408.   
  409.   #--------------------------------------------------------------------------
  410.   # alias method: start
  411.   #--------------------------------------------------------------------------
  412.   alias scene_menu_start_ame start
  413.   def start
  414.     scene_menu_start_ame
  415.     relocate_windows
  416.   end
  417.   
  418.   #--------------------------------------------------------------------------
  419.   # new method: relocate_windows
  420.   #--------------------------------------------------------------------------
  421.   def relocate_windows
  422.     return unless Menu.main_menu_right
  423.     @command_window.x = Graphics.width - @command_window.width
  424.     @gold_window.x = Graphics.width - @gold_window.width
  425.     @status_window.x = 0
  426.   end
  427.   
  428.   def return_scene
  429.     $game_map.autoplay
  430.     SceneManager.return
  431.   end
  432.   
  433. end # Scene_Menu

  434. #==============================================================================
  435. # ■ Scene_Item
  436. #==============================================================================

  437. class Scene_Item < Scene_ItemBase
  438.   
  439.   #--------------------------------------------------------------------------
  440.   # alias method: start
  441.   #--------------------------------------------------------------------------
  442.   alias scene_item_start_ame start
  443.   def start
  444.     scene_item_start_ame
  445.     return if $imported["YEA-ItemMenu"]
  446.     relocate_windows
  447.   end
  448.   
  449.   #--------------------------------------------------------------------------
  450.   # new method: relocate_windows
  451.   #--------------------------------------------------------------------------
  452.   def relocate_windows
  453.     case Menu.help_window_location
  454.     when 0 # Top
  455.       @help_window.y = 0
  456.       @category_window.y = @help_window.height
  457.       @item_window.y = @category_window.y + @category_window.height
  458.     when 1 # Middle
  459.       @category_window.y = 0
  460.       @help_window.y = @category_window.height
  461.       @item_window.y = @help_window.y + @help_window.height
  462.     else # Bottom
  463.       @category_window.y = 0
  464.       @item_window.y = @category_window.height
  465.       @help_window.y = @item_window.y + @item_window.height
  466.     end
  467.     if $imported["YEA-ItemMenu"]
  468.       @types_window.y = @category_window.y
  469.       @status_window.y = @category_window.y
  470.     end
  471.   end
  472.   
  473. end # Scene_Item

  474. #==============================================================================
  475. # ■ Scene_Skill
  476. #==============================================================================

  477. class Scene_Skill < Scene_ItemBase
  478.   
  479.   #--------------------------------------------------------------------------
  480.   # alias method: start
  481.   #--------------------------------------------------------------------------
  482.   alias scene_skill_start_ame start
  483.   def start
  484.     scene_skill_start_ame
  485.     relocate_windows
  486.   end
  487.   
  488.   #--------------------------------------------------------------------------
  489.   # new method: relocate_windows
  490.   #--------------------------------------------------------------------------
  491.   def relocate_windows
  492.     case Menu.help_window_location
  493.     when 0 # Top
  494.       @help_window.y = 0
  495.       @command_window.y = @help_window.height
  496.       @status_window.y = @help_window.height
  497.       @item_window.y = @status_window.y + @status_window.height
  498.     when 1 # Middle
  499.       @command_window.y = 0
  500.       @status_window.y = 0
  501.       @help_window.y = @status_window.y + @status_window.height
  502.       @item_window.y = @help_window.y + @help_window.height
  503.     else # Bottom
  504.       @command_window.y = 0
  505.       @status_window.y = 0
  506.       @item_window.y = @status_window.y + @status_window.height
  507.       @help_window.y = @item_window.y + @item_window.height
  508.     end
  509.   end
  510.   
  511. end # Scene_Skill

  512. #==============================================================================
  513. # ■ Scene_Equip
  514. #==============================================================================

  515. class Scene_Equip < Scene_MenuBase
  516.   
  517.   #--------------------------------------------------------------------------
  518.   # alias method: start
  519.   #--------------------------------------------------------------------------
  520.   alias scene_equip_start_ame start
  521.   def start
  522.     scene_equip_start_ame
  523.     relocate_windows
  524.     relocate_aee_windows
  525.   end
  526.   
  527.   #--------------------------------------------------------------------------
  528.   # new method: relocate_windows
  529.   #--------------------------------------------------------------------------
  530.   def relocate_windows
  531.     return if $imported["YEA-AceEquipEngine"]
  532.     case Menu.help_window_location
  533.     when 0 # Top
  534.       @help_window.y = 0
  535.       @status_window.y = @help_window.height
  536.       @command_window.y = @help_window.height
  537.       @slot_window.y = @command_window.y + @command_window.height
  538.       @item_window.y = @slot_window.y + @slot_window.height
  539.     when 1 # Middle
  540.       @status_window.y = 0
  541.       @command_window.y = 0
  542.       @slot_window.y = @command_window.y + @command_window.height
  543.       @help_window.y = @slot_window.y + @slot_window.height
  544.       @item_window.y = @help_window.y + @help_window.height
  545.     else # Bottom
  546.       @status_window.y = 0
  547.       @command_window.y = 0
  548.       @slot_window.y = @command_window.y + @command_window.height
  549.       @item_window.y = @slot_window.y + @slot_window.height
  550.       @help_window.y = @item_window.y + @item_window.height
  551.     end
  552.   end
  553.   
  554.   #--------------------------------------------------------------------------
  555.   # new method: relocate_aee_windows
  556.   #--------------------------------------------------------------------------
  557.   def relocate_aee_windows
  558.     return unless $imported["YEA-AceEquipEngine"]
  559.     case Menu.help_window_location
  560.     when 0 # Top
  561.       @help_window.y = 0
  562.       @command_window.y = @help_window.height
  563.       @slot_window.y = @command_window.y + @command_window.height
  564.     when 1 # Middle
  565.       @command_window.y = 0
  566.       @help_window.y = @command_window.height
  567.       @slot_window.y = @help_window.y + @help_window.height
  568.     else # Bottom
  569.       @command_window.y = 0
  570.       @slot_window.y = @command_window.height
  571.       @help_window.y = @slot_window.y + @slot_window.height
  572.     end
  573.     @actor_window.y = @command_window.y
  574.     @item_window.y = @slot_window.y
  575.     @status_window.y = @slot_window.y
  576.   end
  577.   
  578. end # Scene_Equip

  579. #==============================================================================
  580. # ■ Scene_Menu
  581. #==============================================================================

  582. class Scene_Menu < Scene_MenuBase
  583.   
  584.   #--------------------------------------------------------------------------
  585.   # alias method: create_command_window
  586.   #--------------------------------------------------------------------------
  587.   alias scene_menu_create_command_window_ame create_command_window
  588.   def create_command_window
  589.     scene_menu_create_command_window_ame
  590.     process_common_event_commands
  591.     process_custom_commands
  592.   end
  593.   
  594.   #--------------------------------------------------------------------------
  595.   # new method: process_common_event_commands
  596.   #--------------------------------------------------------------------------
  597.   def process_common_event_commands
  598.     for command in YEA::MENU::COMMANDS
  599.       next unless YEA::MENU::COMMON_EVENT_COMMANDS.include?(command)
  600.       @command_window.set_handler(command, method(:command_common_event))
  601.     end
  602.   end
  603.   
  604.   #--------------------------------------------------------------------------
  605.   # new method: command_common_event
  606.   #--------------------------------------------------------------------------
  607.   def command_common_event
  608.     event_id = @command_window.current_ext
  609.     return return_scene if event_id.nil?
  610.     return return_scene if $data_common_events[event_id].nil?
  611.     $game_temp.reserve_common_event(event_id)
  612.     return_scene
  613.   end
  614.   
  615.   #--------------------------------------------------------------------------
  616.   # new method: process_custom_commands
  617.   #--------------------------------------------------------------------------
  618.   def process_custom_commands
  619.     for command in YEA::MENU::COMMANDS
  620.       next unless YEA::MENU::CUSTOM_COMMANDS.include?(command)
  621.       called_method = YEA::MENU::CUSTOM_COMMANDS[command][3]
  622.       @command_window.set_handler(command, method(called_method))
  623.     end
  624.   end
  625.   
  626.   #--------------------------------------------------------------------------
  627.   # new method: command_debug
  628.   #--------------------------------------------------------------------------
  629.   def command_debug
  630.     SceneManager.call(Scene_Debug)
  631.   end
  632.   
  633.   #--------------------------------------------------------------------------
  634.   # new method: command_shop
  635.   #--------------------------------------------------------------------------
  636.   def command_shop
  637.     goods = []
  638.     SceneManager.call(Scene_Shop)
  639.     SceneManager.scene.prepare(goods, false)
  640.   end
  641.   
  642.   #--------------------------------------------------------------------------
  643.   # new method: command_totori
  644.   #--------------------------------------------------------------------------
  645.   def command_totori
  646.     return unless $imported['KRX-AlchemicSynthesis']
  647.     SceneManager.call(Scene_Alchemy)
  648.   end
  649.   
  650. end # Scene_Menu

  651. #==============================================================================
  652. #
  653. # ▼ End of File
  654. #
  655. #==============================================================================
复制代码
这个脚本可以在菜单中新加一个选项,选项内容是指定的公共事件。
剩下的就是你用公共事件做选项对话了,通过分歧来改变不同地图说的话什么的,这就是你自己弄了。
回复 支持 反对

使用道具 举报

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10074
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

7
发表于 2014-7-31 22:14:36 | 只看该作者
aa838320582 发表于 2014-7-31 21:25
认真的看了一下
但是我想要的是利用脚本建立一个新指令实现而不是物品..(´・ω・`) ...
  1. class Scene_Menu < Scene_MenuBase
  2.   alias vip_create_command_window create_command_window
  3.   def create_command_window
  4.     vip_create_command_window
  5.     @command_window.set_handler(:dialog,    method(:command_dialog))
  6.   end
  7.   def command_dialog
  8.     SceneManager.goto(Scene_Map)
  9.     $game_temp.reserve_common_event(2)  #(x)内为调用的公告事件
  10.   end
  11. end


  12. class Window_MenuCommand < Window_Command
  13.   alias vip_add_main_commands add_main_commands
  14.   def add_main_commands
  15.     vip_add_main_commands
  16.     add_command("对话", :dialog,   dialog_commands_enabled)#添加按钮
  17.   end  
  18.   def dialog_commands_enabled
  19.     $game_party.members.size != 1
  20.   end
  21. end
复制代码
公共事件自己做好吗?

点评

解决了 非常感谢,辛苦您了  发表于 2014-8-1 09:21
你一个公共事件可以用分支条件,选项,变量,开关什么的控制。花样可以有很多的。就看你怎么设置了。  发表于 2014-7-31 23:25
公用事件还能调用公用事件....  发表于 2014-7-31 23:00
那个...说起来这个脚本是只能调用一个公共事件吗?  发表于 2014-7-31 22:33

评分

参与人数 1梦石 +1 收起 理由
taroxd + 1 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
624
在线时间
125 小时
注册时间
2013-10-25
帖子
56
8
 楼主| 发表于 2014-8-1 09:21:58 | 只看该作者
问题解决了,非常感谢
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-12 23:09

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表