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

Project1

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

[已经过期] 请问一下怎么在菜单栏里增加【任务】

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
144 小时
注册时间
2012-12-16
帖子
54
跳转到指定楼层
1
 楼主| 发表于 2013-2-23 19:47:06 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
求求求求求方法啊..最好附带任务系统的脚本或图文教程。求了!!

Lv1.梦旅人

梦石
0
星屑
50
在线时间
141 小时
注册时间
2011-8-29
帖子
47
2
发表于 2013-2-23 20:51:12 | 只看该作者
我用的任务脚本是这个,你借鉴地看吧。
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
605
在线时间
194 小时
注册时间
2012-6-1
帖子
720
3
发表于 2013-2-23 21:00:15 | 只看该作者
首先下载一个人物脚本
然后下载一个ACE菜单脚本
在ACE菜单中更改即可
ACE菜单脚本
  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. # ▼介绍
  27. # = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - =
  28. #菜单系统在游戏制作一起王牌是伟大的。然而,它缺乏用户
  29. #定制,游戏制作2003允许。与此脚本,您可以添加,
  30. #删除,并重新排列菜单命令为您认为合适的。此外,你
  31. #可以添加菜单命令,导致共同的事件或自定义命令
  32. #
  33. #这个脚本也提供窗口外观等的管理,设置几乎
  34. #所有命令为中心对齐或改变立场的
  35. #帮助窗口。你也可以选择显示总磷计在主菜单等
  36. #在技能菜单。
  37. #
  38. # ==============================================================================
  39. #▼指令
  40. # = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - =
  41. #安装此脚本,打开你的脚本编辑和复制/粘贴此脚本
  42. #开口槽低于▼材料/素材但▼主。记得保存。
  43. #
  44. #编辑设置在模块下面为您认为合适的。
  45. #
  46. #==============================================================================
  47. # ▼ Compatibility
  48. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  49. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  50. # it will run with RPG Maker VX without adjusting.
  51. #
  52. #==============================================================================

  53. module YEA
  54.   module MENU
  55.    
  56.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  57.     # -通用菜单设置—
  58.     # = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - =—
  59.     #这改变了菜单出现在你的游戏。你可以改变自己
  60.     #对齐,和位置的帮助窗口,请注意,任何non-yanfly
  61.     #ACE脚本引擎可能不符合这些菜单样式。
  62.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  63.     HELP_WINDOW_LOCATION = 0     # 0-Top, 1-Middle, 2-Bottom.
  64.     COMMAND_WINDOW_ALIGN = 1     # 0-Left, 1-Middle, 2-Right.
  65.    
  66.     #这些设置调整的视觉外观的主菜单。
  67.     #更改设置为您认为合适的。
  68.     MAIN_MENU_ALIGN = 0          # 0-Left, 1-Middle, 2-Right.
  69.     MAIN_MENU_RIGHT = false      # false-Left, true-Right.
  70.     MAIN_MENU_ROWS  = 14         # Maximum number of rows for main menu.
  71.     DRAW_TP_GAUGE   = true       # If true, draws TP in the main menu.
  72.    
  73.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  74.     # 主菜单设置—
  75.     # = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - =—
  76.     #这些设置调整主菜单,命令,命令出现,
  77.     #什么文本显示,而命令与。在这里
  78.     #名单,命令做:
  79.     #
  80.     # -------------------------------------------------------------------------
  81.     # :command         描述
  82.     # -------------------------------------------------------------------------
  83.     # :item            打开项目菜单。默认的菜单项.
  84.     # :skill           打开技能菜单。默认的菜单项.
  85.     # :equip           打开了装备菜单。默认的菜单项.
  86.     # :status          打开状态菜单。默认的菜单项.
  87.     # :formation       让玩家管理方。默认的菜单项.
  88.     # :save            打开保存菜单。默认的菜单项.
  89.     # :game_end        打开了关机菜单。默认的菜单项.
  90.     #
  91.     # :class           Requires YEA - Class System
  92.     #
  93.     # :gogototori      需要kread-ex走totori!合成
  94.     # :grathnode       需要kread-ex的grathnote安装
  95.     # :sslots          需要雅美的经理槽战斗
  96.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  97.     COMMANDS =[
  98.       :item,         # 打开项目菜单。默认的菜单项目m.
  99.       :skill,        # 打开技能菜单。默认的菜单项.
  100.       :equip,        # 打开了装备菜单。默认的菜单项.
  101.       :class,        # Requires YEA - Class System.      # Requires YEA - Class System.
  102.       
  103.       :formation,
  104.       :status,       # 打开状态菜单。默认的菜单项.
  105.     #:formation,    # 让玩家管理方。默认的菜单项.
  106.       :event_101,      # 发射普通事件 101。常见的事件命令.
  107.       :event_102,      # 发射普通事件 102. 常见的事件命令.
  108.       :event_103,      # 发射普通事件 103. 常见的事件命令.
  109.       :event_104,      # 发射普通事件 104. 常见的事件命令.
  110.       :event_105,      # 发射普通事件 105. 常见的事件命令.
  111.       :event_106,      # 发射普通事件 106. 常见的事件命令.
  112.       :event_107,      # 发射普通事件 107. 常见的事件命令.
  113.       :event_108,      # 发射普通事件 108. 常见的事件命令.
  114.       :event_109,      # 发射普通事件 109. 常见的事件命令.
  115.       :event_110,      # 发射普通事件 110. 常见的事件命令.
  116.       :event_111,      # 发射普通事件 111. 常见的事件命令.
  117.       :event_112,
  118.       
  119.     # :debug,        # 打开调试菜单。自定义命令。
  120.       :shop,         # Opens up a shop to pawn items. Custom Command.
  121.       :save,
  122.       :game_end,     # 打开了关机菜单。默认的菜单项.
  123.     ] # Do not remove this.
  124.    
  125.     #--------------------------------------------------------------------------
  126.     # - 常见的事件命令s -
  127.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  128.     # 如果您插入一个下面的命令到命令阵列,该
  129.     #玩家可以触发一个共同的事件展开。您可以禁用某些
  130.     #命令在菜单绑定到一个开关。如果你不想
  131.     #禁用它们,开关设置,0,它将始终启用。本
  132.     # showswitch将防止命令从如果开关是假的。
  133.     #设定为0,它没有影响。
  134.     #--------------------------------------------------------------------------
  135.     COMMON_EVENT_COMMANDS ={
  136.     # :command => ["Display Name", EnableSwitch, ShowSwitch, Event ID],
  137.      :event_101 => [   "物品图鉴",            0,          0,        101],
  138.       :event_102 => [   "任务",            0,          0,        102],

  139.     } # Do not remove this.
  140.    
  141.     #--------------------------------------------------------------------------
  142.     # - 自定义命令—
  143.     #—————————————————————————————————————
  144.     #为那些谁使用脚本可能导致其他菜单的场景,使用此
  145.     #散列管理自定义命令运行特定的脚本调用。你可以
  146.     #禁用某些命令在菜单绑定到一个开关。如果你
  147.     #不想禁用,开关设置,0。该showswitch会
  148.     #防止命令从如果开关是假的。它集0
  149.     #它有没有影响。
  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 => ["合成",            106,        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. # 这个类是保持对榜首的脚本提供更容易获得。
  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. #==============================================================================
复制代码
下面放上任务脚
  1. =begin
  2. 领取任务:$game_party.get_task(任意数字,任务名称,任务描述)
  3. 完成任务:$game_party.finish_task(领取任务时设定的数字)
  4. 对已有任务追加说明:$game_party.add_task(任务编号,任务追加描述)

  5. 如:
  6. 前面有事件$game_party.get_task(1,"测试","只是测试")

  7. 此时任务1的说明为

  8. >只是测试

  9. 后面完成任务的脚本就是$game_party.finish_task(1)

  10. 追加说明$game_party.add_task(1,"真的只是测试哦")

  11. 此时任务1的说明为:
  12. >只是测试
  13. >真的只是测试哦

  14. 召唤任务界面:SceneManager.call(Scene_Task)

  15. 该脚本来自66rpg,发布者:韩云溪
  16. 改进:工藤由纪(论坛ID:zyyczp)
  17. =end

  18. #===========================================================
  19. #●任务系统
  20. #===========================================================
  21. class Task
  22.   attr_reader :desc
  23.   attr_reader :finished
  24.   def initialize(origin_name,desc)
  25.     @origin_name = origin_name
  26.     @desc = desc
  27.     @finished = false
  28.   end
  29.   def name
  30.     if @finished
  31.       return @origin_name + "(完成)"
  32.     else
  33.       return @origin_name
  34.     end
  35.   end
  36.   def desc=(desc)
  37.     @desc = desc
  38.   end
  39.   
  40.   def finish
  41.     @finished = true
  42.   end
  43.    
  44. end

  45. class Game_Party < Game_Unit
  46.   alias old_init initialize
  47.   def initialize
  48.     old_init
  49.     @tasks = {}
  50.   end
  51.   def add_task(i,desc)
  52.     @tasks[i].desc = @tasks[i].desc + "\n" + desc
  53.   end
  54.   def get_task(i,name,desc)
  55.     @tasks[i]=Task.new(name,desc)
  56.   end
  57.   def have_task?(i)
  58.     @tasks[i] != nil
  59.   end
  60.   def finish_task(i)
  61.     @tasks[i].finish if have_task?(i)
  62.   end
  63.   def unfinished_tasks
  64.     n = []
  65.     for i in @tasks.values
  66.       next if i.finished
  67.       n.push(i)
  68.     end
  69.     return n
  70.   end
  71.   def finished_tasks
  72.     n = []
  73.     for i in @tasks.values
  74.       next unless i.finished
  75.       n.push(i)
  76.     end
  77.     return n
  78.   end
  79. end

  80. class Window_Task_Type < Window_HorzCommand
  81.   #--------------------------------------------------------------------------
  82.   # ● オブジェクト初期化
  83.   #--------------------------------------------------------------------------
  84.   def initialize
  85.     super(0, 0)
  86.     activate
  87.   end
  88.   def window_width
  89.     return Graphics.width
  90.   end
  91.   def col_max
  92.     return 3
  93.   end
  94.   #--------------------------------------------------------------------------
  95.   # ● コマンドリストの作成
  96.   #--------------------------------------------------------------------------
  97.   def make_command_list
  98.     add_command("未完成任务",  :unfinished_task)
  99.     add_command("已完成任务", :finished_task)
  100.     add_command("取消", :cancel)
  101.   end
  102. end

  103. class Window_TaskLeft < Window_Selectable
  104.   attr_reader :finished
  105.   def initialize
  106.     super(0,48,160,Graphics.height - 48)
  107.     create_contents
  108.     @finished = false
  109.     @index = 0
  110.     refresh
  111.     deactivate
  112.   end
  113.   def set_finish(finish)
  114.     @finished = finish
  115.     set_item_max
  116.   end
  117.   def item_max
  118.     return @item_max != nil ? @item_max : 0
  119.   end
  120.   def set_item_max
  121.     if @finished
  122.       @item_max = $game_party.finished_tasks.size
  123.     else
  124.       @item_max = $game_party.unfinished_tasks.size
  125.     end
  126.   end

  127.   def refresh
  128.     set_item_max
  129.     super
  130.   end
  131.   #--------------------------------------------------------------------------
  132.   # ● 項目の描画
  133.   #--------------------------------------------------------------------------
  134.   def draw_item(index)
  135.     text = ""
  136.     unless @finished
  137.       if $game_party.unfinished_tasks[index] != nil
  138.         text = $game_party.unfinished_tasks[index].name
  139.       end
  140.     else
  141.       if $game_party.finished_tasks[index] != nil
  142.         text = $game_party.finished_tasks[index].name  
  143.       end
  144.     end
  145.     draw_text(item_rect_for_text(index), text)
  146.   end

  147. end

  148. class Window_TaskRight < Window_Base
  149.   attr_reader :left_index
  150.   def initialize
  151.     super(160,48,Graphics.width - 160,Graphics.height - 48)
  152.     create_contents
  153.     @left_index = 0
  154.     @finished = false
  155.     refresh
  156.   end
  157.   def set_index(i)
  158.     @left_index = i
  159.     refresh
  160.   end
  161.   def set_finish(i)
  162.     @finished = i
  163.   end
  164.   
  165.   def refresh
  166.     contents.clear
  167.     draw_desc
  168.   end
  169.   def draw_desc
  170.     if @finished
  171.       if $game_party.finished_tasks[@left_index] != nil
  172.         draw_text_ex(0,0,$game_party.finished_tasks[@left_index].desc)
  173.       end
  174.     else
  175.       if $game_party.unfinished_tasks[@left_index] != nil
  176.         draw_text_ex(0,0,$game_party.unfinished_tasks[@left_index].desc)
  177.       end
  178.     end
  179.   end
  180.   
  181. end

  182. class Scene_Task < Scene_Base
  183.   def start
  184.     super
  185.     create_task_type_window
  186.     create_left_window
  187.     create_right_window
  188.   end
  189.   def update
  190.     super
  191.     if @left_window.active
  192.       if Input.trigger?(:B)
  193.         @left_window.deactivate
  194.         @task_type_window.activate
  195.       end
  196.       if Input.trigger?(:UP) || Input.trigger?(:DOWN)
  197.         @right_window.set_finish(@left_window.finished)
  198.         @right_window.set_index(@left_window.index)
  199.       end
  200.     end
  201.   end
  202.   
  203.   def terminate
  204.     super
  205.   end
  206.   def create_task_type_window
  207.     @task_type_window = Window_Task_Type.new
  208.     @task_type_window.set_handler(:unfinished_task,method(:view_unfinished_task))
  209.     @task_type_window.set_handler(:finished_task,method(:view_finished_task))
  210.     @task_type_window.set_handler(:cancel,method(:return_scene))
  211.   end
  212.   def create_left_window
  213.     @left_window = Window_TaskLeft.new
  214.     @left_window.set_finish(false)
  215.     @left_window.refresh
  216.   end
  217.   def create_right_window
  218.     @right_window = Window_TaskRight.new
  219.     @right_window.refresh
  220.   end
  221.   def view_unfinished_task
  222.     @left_window.set_finish(false)
  223.     @left_window.refresh
  224.     @left_window.activate
  225.     @task_type_window.deactivate
  226.     @right_window.set_finish(false)
  227.     @right_window.set_index(@left_window.index)
  228.   end
  229.   def view_finished_task
  230.     @left_window.set_finish(true)
  231.     @left_window.refresh
  232.     @left_window.activate
  233.     @task_type_window.deactivate
  234.     @right_window.set_finish(true)
  235.     @right_window.set_index(@left_window.index)
  236.   end
  237.   
  238. end
复制代码
死亡
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
141 小时
注册时间
2011-8-29
帖子
47
4
发表于 2013-2-23 21:10:05 | 只看该作者
1715063941 发表于 2013-2-23 21:00
首先下载一个人物脚本
然后下载一个ACE菜单脚本
在ACE菜单中更改即可

哥们,咱们好像撞衫了。{:2_276:}

点评

是吗,不知道诶  发表于 2013-2-23 21:12
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
144 小时
注册时间
2012-12-16
帖子
54
5
 楼主| 发表于 2013-2-24 13:04:01 | 只看该作者
我去试试..
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
144 小时
注册时间
2012-12-16
帖子
54
6
 楼主| 发表于 2013-2-24 13:10:15 | 只看该作者
1715063941 发表于 2013-2-23 21:00
首先下载一个人物脚本
然后下载一个ACE菜单脚本
在ACE菜单中更改即可

从任务栏和物品图鉴栏都有了。可是打开后什么都没有,这该怎么弄呢,我是个新手不要介意..
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
141 小时
注册时间
2011-8-29
帖子
47
7
发表于 2013-2-25 10:22:17 | 只看该作者
本帖最后由 jerrypan 于 2013-2-25 10:47 编辑

希望给你的链接和3楼的脚本你都仔细看了(其实两个是一样的,这就是“撞衫”吗?){:2_262:}
好吧,其实我也是新手。下面仔细说一下

在事件的脚本中输入  $game_party.get_task(任意数字,任务名称,任务描述)            
以$game_party.get_task(1,"测试","只是测试")为例(如图)


然后再呼出任务界面 SceneManager.call(Scene_Task)

可以看到领取任务的时候  $game_party.get_task(任意数字,任务名称,任务描述)  中的【任务描述】会在任务界面的右边显示。

如果要追加说明就再用事件的脚本$game_party.add_task(任意数字,任务描述追加)
例子是 $game_party.add_task(1,"真的只是测试哦")



另外,完成这个任务的脚本就是$game_party.finish_task(1)

只是将脚本内容复述了一下,如果还不行自己到原帖推敲吧。{:2_275:}
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-7 08:10

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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