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

Project1

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

[已经解决] 职业解锁系统的问题

[复制链接]

Lv4.逐梦者

梦石
0
星屑
9280
在线时间
2504 小时
注册时间
2011-5-20
帖子
15389

开拓者

跳转到指定楼层
1
发表于 2012-10-22 13:53:04 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
先放上脚本···
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Class System v1.08
  4. # -- Last Updated: 2012.01.08
  5. # -- Level: Normal, Hard
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YEA-ClassSystem"] = true
  11. =begin
  12. #================================================= =============================
  13. #▼更新
  14. #= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - =- = - = - = - = - = - = - = - = - = - = - = - = - = - =
  15. 2012年1月8日 - 兼容性更新:学习技能引擎
  16. 2012.01.05 - 修正:设备不再被复制。
  17. 2012.01.04 - 更新:Autobattle将不再使用技能无法使用
  18. #中,类的具体实施者。
  19. 2012年1月2日 - 效率更新。
  20. 2011.12.26 - 添加自定义命令的功能。
  21. 2011.12.23 - 兼容性更新:类具体细节。
  22. #2011.12.22 - 兼容性更新:王牌菜单引擎。
  23. 2011.12.20 - 兼容性更新:类解锁级。
  24. #2011.12.19 - 开始脚本和成品。

  25. #================================================= =============================
  26. #▼公司简介
  27. #= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - =- = - = - = - = - = - = - = - = - = - = - = - = - = - =
  28. #这个脚本为您的播放器添加了自由改变类
  29. 演员外的战斗从菜单中。当改变类,这个脚本
  30. #为开发者提供的选项选择是否有类
  31. #自己的水平(导致演员的水平,以重置回类的
  32. #水平),或维持目前的水平。除了提供的能力
  33. #更改类的一个子类,装备也是可行的,和力学
  34. #具有该脚本内的一个子类也可以被定义。

  35. #================================================= =============================
  36. #▼说明
  37. #= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - =- = - = - = - = - = - = - = - = - = - = - = - = - = - =
  38. #如果要安装这个脚本,脚本编辑器打开你的复制/粘贴此脚本
  39. #▼材料/素材,但高于▼主要的开放式插槽下面。记住要保存。

  40. #------------------------------------------------- ----------------------------
  41. #的演员Notetags - 这些notetags中的的演员notebox数据库中的。
  42. #------------------------------------------------- ----------------------------
  43. #<unlocked classes: X>
  44. #<unlocked classes: x, X>
  45. #这将设置默认的类作为解锁的演员。这不
  46. 覆盖默认的类模块中的解锁,而是,再加上
  47. #解锁的类的数量。

  48. #------------------------------------------------- ----------------------------
  49. 在数据库中的类notebox#类Notetags的 - 这些notetags去。
  50. #------------------------------------------------- ----------------------------
  51. #<icon: X>
  52. #设置图标表示类为x。

  53. #<说明说明>
  54. #字符串
  55. #字符串
  56. #</帮助说明>
  57. #设置的文本用于帮助窗口类中的场景。多线
  58. #notebox将被串在一起。使用一个换行符。

  59. #------------------------------------------------- ----------------------------
  60. #脚本调用 - 使用脚本调用这些命令。
  61. #------------------------------------------------- ----------------------------
  62. #$ game_actors [X]。unlock_class(Y)
  63. #这使演员x的解锁等级Y,使其可用于切换中
  64. #在类的场景。

  65. #$ game_actors [X]。remove_class(Y)
  66. #这将导致演员能够切换到X删除类y。
  67. ,如果目前的演员是Y类,这个类不会被删除。如果
  68. #演员的子类是y,则子类将束手无策。

  69. #================================================= =============================
  70. #▼兼容性
  71. #= - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - =- = - = - = - = - = - = - = - = - = - = - = - = - = - =
  72. #这个脚本是为RPG制作VX王牌的严格。这是极不可能的
  73. #将运行与的RPG制造商VX没有调整。

  74. =end

  75. module YEA
  76.   module CLASS_SYSTEM
  77. =begin   
  78.     # - 通用类设置 -
  79.     #这是整个脚本的一般设置。他们控制
  80.     #各项规章制度,这个脚本经历。这些设置
  81.     #也将决定一个球员的一个子类可以做什么。
  82. =end
  83.     CLASS_MENU_TEXT = "职业"  # 在主菜单中显示的文本.
  84.     MAINTAIN_LEVELS = false    # 保持的所有类。默认值:false.
  85.     DEFAULT_UNLOCKS = [ ]   # 默认情况下,类解锁。
  86. =begin
  87. #显示之间的主类和子类的时候写的一个
  88.     #窗口将出现等。
  89. =end
  90.     SUBCLASS_TEXT = "%s/%s"
  91. =begin   
  92. #这对于一个演员如果调整的统计继承一个演员都有一个
  93.     #子类装备。如果您希望禁用这个选项,设置速率为0.0。
  94. =end
  95.     SUBCLASS_STAT_RATE = 0.20
  96.    
  97.     # 这增加了子类技能类型可使用的技能类型.
  98.     SUBCLASS_SKILL_TYPES = true
  99.    
  100.     # 这增加了子类武器装备的武器类型.
  101.     SUBCLASS_WEAPON_TYPES = true
  102.    
  103.     # 这增加了子类防具装备的武器类型.
  104.     SUBCLASS_ARMOUR_TYPES = true
  105. =begin
  106.     # - 类场景“命令 -
  107.     这些设置调整类的一幕出现了。在这里,你可以调整
  108.     #命令列表和命令,在出现的项目。这些大多是
  109.     #可视化设置。调整您认为合适的。
  110.     #:命令说明
  111.     #:初级允许玩家改变主类。
  112.     #:子类,允许玩家改变的子类。
  113.     #
  114.     #:learn_skill。需要YEA - 学习技能引擎
  115.     #
  116. =end
  117.     COMMANDS =[ # 在该菜单项目的顺序显示.
  118.     # [ :command,   "Display"],
  119.       [ :primary,   "主要职业"],
  120.       [:subclass,  "次要职业"],
  121.       [:learn_skill, "学习技能"],
  122.     # [ :custom1,   "Custom1"],
  123.     # [ :custom2,   "Custom2"],
  124.     ] # 不要删除此。
  125. =begin   
  126.     # - 状态类的命令 -
  127.     #-------------------------------------
  128.     #对于那些使用脚本,可能会产生独特的效果
  129.     #类的菜单,使用这个散列管理类的自定义命令
  130.     #命令窗口。您可以禁用特定的命令或阻止他们
  131.     #通过交换机出现。如果您不希望将它们绑定到一个开关,
  132.     #设置适当的开关为0,它有没有影响。
  133. =end
  134.     CUSTOM_CLASS_COMMANDS ={
  135.     # :command => [EnableSwitch, ShowSwitch, Handler Method,
  136.       :custom1 => [           0,          0, :command_name1],
  137.       :custom2 => [           0,          0, :command_name2],
  138.     } # Do not remove this.
  139.    
  140.     # These settings adjust the colour displays for classes.
  141.     CURRENT_CLASS_COLOUR = 17     # "Window" colour used for current class.
  142.     SUBCLASS_COLOUR      = 4      # "Window" colour used for subclass.
  143.    
  144.     # This adjusts the display for class levels if MAINTAIN_LEVELS is false.
  145.     CLASS_LEVEL     = "LV%s"      # Text display for level.
  146.     LEVEL_FONT_SIZE = 16          # Font size used for level.
  147.    
  148.     # This array sets the order of how classes are ordered in the class listing
  149.     # window. Any class ID's unlisted will not be shown.
  150.     CLASS_ORDER = [41..999, 1..40]
  151.    
  152.     # This adjusts the font size for the Parameters window.
  153.     PARAM_FONT_SIZE = 20
  154.    
  155.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  156.     # - Switch Settings -
  157.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  158.     # These are the switches that govern whether or not certain menu items will
  159.     # appear and/or will be enabled. By binding them to a Switch, you can just
  160.     # set the Switch ON/OFF to show/hide or enable/disable a menu command. If
  161.     # you do not wish to use this feature, set these commands to 0.
  162.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  163.     SWITCH_SHOW_CLASS      = 0    # Switch that shows Class in Main Menu.
  164.     SWITCH_ENABLE_CLASS    = 0    # Switch that enables Class in Main Menu.
  165.     SWITCH_SHOW_PRIMARY    = 0    # Switch that shows Subclass in Class Menu.
  166.     SWITCH_ENABLE_PRIMARY  = 0    # Switch that enables Subclass in Class Menu.
  167.     SWITCH_SHOW_SUBCLASS   = 0    # Switch that shows Subclass in Class Menu.
  168.     SWITCH_ENABLE_SUBCLASS = 0    # Switch that enables Subclass in Class Menu.
  169.    
  170.   end # CLASS_SYSTEM
  171. end # YEA

  172. #==============================================================================
  173. # ▼ Editting anything past this point may potentially result in causing
  174. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  175. # halitosis so edit at your own risk.
  176. #==============================================================================

  177. module YEA
  178.   module CLASS_SYSTEM
  179.     module_function
  180.     #--------------------------------------------------------------------------
  181.     # convert_integer_array
  182.     #--------------------------------------------------------------------------
  183.     def convert_integer_array(array)
  184.       result = []
  185.       array.each { |i|
  186.         case i
  187.         when Range; result |= i.to_a
  188.         when Integer; result |= [i]
  189.         end }
  190.       return result
  191.     end
  192.     #--------------------------------------------------------------------------
  193.     # converted_contants
  194.     #--------------------------------------------------------------------------
  195.     DEFAULT_UNLOCKS = convert_integer_array(DEFAULT_UNLOCKS)
  196.     CLASS_ORDER = convert_integer_array(CLASS_ORDER)
  197.   end # CLASS_SYSTEM
  198.   module REGEXP
  199.   module ACTOR
  200.    
  201.     UNLOCKED_CLASSES =
  202.       /<(?:UNLOCKED_CLASSES|unlocked classes):[ ]*(\d+(?:\s*,\s*\d+)*)>/i
  203.    
  204.   end # ACTOR
  205.   module CLASS
  206.    
  207.     ICON_INDEX = /<(?:ICON_INDEX|icon index|icon):[ ](\d+)>/i
  208.     HELP_DESCRIPTION_ON  = /<(?:HELP_DESCRIPTION|help description)>/i
  209.     HELP_DESCRIPTION_OFF = /<\/(?:HELP_DESCRIPTION|help description)>/i
  210.    
  211.   end # CLASS
  212.   end # REGEXP
  213. end # YEA

  214. #==============================================================================
  215. # ■ Switch
  216. #==============================================================================

  217. module Switch
  218.   
  219.   #--------------------------------------------------------------------------
  220.   # self.class_show
  221.   #--------------------------------------------------------------------------
  222.   def self.class_show
  223.     return true if YEA::CLASS_SYSTEM::SWITCH_SHOW_CLASS <= 0
  224.     return $game_switches[YEA::CLASS_SYSTEM::SWITCH_SHOW_CLASS]
  225.   end
  226.   
  227.   #--------------------------------------------------------------------------
  228.   # self.class_enable
  229.   #--------------------------------------------------------------------------
  230.   def self.class_enable
  231.     return true if YEA::CLASS_SYSTEM::SWITCH_ENABLE_CLASS <= 0
  232.     return $game_switches[YEA::CLASS_SYSTEM::SWITCH_ENABLE_CLASS]
  233.   end
  234.   
  235.   #--------------------------------------------------------------------------
  236.   # self.primary_show
  237.   #--------------------------------------------------------------------------
  238.   def self.primary_show
  239.     return true if YEA::CLASS_SYSTEM::SWITCH_SHOW_PRIMARY <= 0
  240.     return $game_switches[YEA::CLASS_SYSTEM::SWITCH_SHOW_PRIMARY]
  241.   end
  242.   
  243.   #--------------------------------------------------------------------------
  244.   # self.primary_enable
  245.   #--------------------------------------------------------------------------
  246.   def self.primary_enable
  247.     return true if YEA::CLASS_SYSTEM::SWITCH_ENABLE_PRIMARY <= 0
  248.     return $game_switches[YEA::CLASS_SYSTEM::SWITCH_ENABLE_PRIMARY]
  249.   end
  250.   
  251.   #--------------------------------------------------------------------------
  252.   # self.subclass_show
  253.   #--------------------------------------------------------------------------
  254.   def self.subclass_show
  255.     return true if YEA::CLASS_SYSTEM::SWITCH_SHOW_SUBCLASS <= 0
  256.     return $game_switches[YEA::CLASS_SYSTEM::SWITCH_SHOW_SUBCLASS]
  257.   end
  258.   
  259.   #--------------------------------------------------------------------------
  260.   # self.subclass_enable
  261.   #--------------------------------------------------------------------------
  262.   def self.subclass_enable
  263.     return true if YEA::CLASS_SYSTEM::SWITCH_ENABLE_SUBCLASS <= 0
  264.     return $game_switches[YEA::CLASS_SYSTEM::SWITCH_ENABLE_SUBCLASS]
  265.   end
  266.    
  267. end # Switch

  268. #==============================================================================
  269. # ■ Numeric
  270. #==============================================================================

  271. class Numeric
  272.   
  273.   #--------------------------------------------------------------------------
  274.   # new method: group_digits
  275.   #--------------------------------------------------------------------------
  276.   unless $imported["YEA-CoreEngine"]
  277.   def group; return self.to_s; end
  278.   end # $imported["YEA-CoreEngine"]
  279.    
  280. end # Numeric

  281. #==============================================================================
  282. # ■ DataManager
  283. #==============================================================================

  284. module DataManager
  285.   
  286.   #--------------------------------------------------------------------------
  287.   # alias method: load_database
  288.   #--------------------------------------------------------------------------
  289.   class <<self; alias load_database_cs load_database; end
  290.   def self.load_database
  291.     load_database_cs
  292.     load_notetags_cs
  293.   end
  294.   
  295.   #--------------------------------------------------------------------------
  296.   # new method: load_notetags_cs
  297.   #--------------------------------------------------------------------------
  298.   def self.load_notetags_cs
  299.     groups = [$data_actors, $data_classes]
  300.     for group in groups
  301.       for obj in group
  302.         next if obj.nil?
  303.         obj.load_notetags_cs
  304.       end
  305.     end
  306.   end
  307.   
  308. end # DataManager

  309. #==============================================================================
  310. # ■ RPG::Actor
  311. #==============================================================================

  312. class RPG::Actor < RPG::BaseItem
  313.   
  314.   #--------------------------------------------------------------------------
  315.   # public instance variables
  316.   #--------------------------------------------------------------------------
  317.   attr_accessor :unlocked_classes
  318.   
  319.   #--------------------------------------------------------------------------
  320.   # common cache: load_notetags_cs
  321.   #--------------------------------------------------------------------------
  322.   def load_notetags_cs
  323.     @unlocked_classes = []
  324.     #---
  325.     self.note.split(/[\r\n]+/).each { |line|
  326.       case line
  327.       #---
  328.       when YEA::REGEXP::ACTOR::UNLOCKED_CLASSES
  329.         $1.scan(/\d+/).each { |num|
  330.         @unlocked_classes.push(num.to_i) if num.to_i > 0 }
  331.       #---
  332.       end
  333.     } # self.note.split
  334.     #---
  335.   end
  336.   
  337. end # RPG::Actor

  338. #==============================================================================
  339. # ■ RPG::Class
  340. #==============================================================================

  341. class RPG::Class < RPG::BaseItem
  342.   
  343.   #--------------------------------------------------------------------------
  344.   # public instance variables
  345.   #--------------------------------------------------------------------------
  346.   attr_accessor :icon_index
  347.   
  348.   #--------------------------------------------------------------------------
  349.   # common cache: load_notetags_cs
  350.   #--------------------------------------------------------------------------
  351.   def load_notetags_cs
  352.     @icon_index = 0
  353.     @help_description_on = false
  354.     #---
  355.     self.note.split(/[\r\n]+/).each { |line|
  356.       case line
  357.       #---
  358.       when YEA::REGEXP::CLASS::ICON_INDEX
  359.         @icon_index = $1.to_i
  360.       #---
  361.       when YEA::REGEXP::CLASS::HELP_DESCRIPTION_ON
  362.         @help_description_on = true
  363.       when YEA::REGEXP::CLASS::HELP_DESCRIPTION_OFF
  364.         @help_description_on = false
  365.       #---
  366.       else
  367.         @description += line.to_s if @help_description_on
  368.       end
  369.     } # self.note.split
  370.     #---
  371.     @description.gsub!(/[|]/i) { "\n" }
  372.   end
  373.   
  374. end # RPG::Class

  375. #==============================================================================
  376. # ■ Game_Temp
  377. #==============================================================================

  378. class Game_Temp
  379.   
  380.   #--------------------------------------------------------------------------
  381.   # public instance variables
  382.   #--------------------------------------------------------------------------
  383.   attr_accessor :scene_class_index
  384.   attr_accessor :scene_class_oy
  385.   
  386. end # Game_Temp

  387. #==============================================================================
  388. # ■ Game_Action
  389. #==============================================================================

  390. class Game_Action
  391.   
  392.   #--------------------------------------------------------------------------
  393.   # alias method: valid?
  394.   #--------------------------------------------------------------------------
  395.   alias game_action_valid_cs valid?
  396.   def valid?
  397.     return false if check_auto_battle_class
  398.     return game_action_valid_cs
  399.   end
  400.   
  401.   #--------------------------------------------------------------------------
  402.   # new method: check_auto_battle_class
  403.   #--------------------------------------------------------------------------
  404.   def check_auto_battle_class
  405.     return false unless subject.actor?
  406.     return false unless subject.auto_battle?
  407.     return false if item.nil?
  408.     return false if subject.added_skill_types.include?(item.stype_id)
  409.     return false if item.id == subject.attack_skill_id
  410.     return true
  411.   end
  412.   
  413. end # Game_Action

  414. #==============================================================================
  415. # ■ Game_BattlerBase
  416. #==============================================================================

  417. class Game_BattlerBase
  418.   
  419.   #--------------------------------------------------------------------------
  420.   # public instance variables
  421.   #--------------------------------------------------------------------------
  422.   attr_accessor :temp_flag
  423.   
  424.   #--------------------------------------------------------------------------
  425.   # alias method: added_skill_types
  426.   #--------------------------------------------------------------------------
  427.   alias game_battlerbase_added_skill_types_cs added_skill_types
  428.   def added_skill_types
  429.     result = game_battlerbase_added_skill_types_cs
  430.     result |= subclass_skill_types
  431.     return result
  432.   end
  433.   
  434.   #--------------------------------------------------------------------------
  435.   # new method: subclass_skill_types
  436.   #--------------------------------------------------------------------------
  437.   def subclass_skill_types; return []; end
  438.   
  439.   #--------------------------------------------------------------------------
  440.   # alias method: equip_wtype_ok?
  441.   #--------------------------------------------------------------------------
  442.   alias game_battlerbase_equip_wtype_ok_cs equip_wtype_ok?
  443.   def equip_wtype_ok?(wtype_id)
  444.     return true if subclass_equip_wtype?(wtype_id)
  445.     return game_battlerbase_equip_wtype_ok_cs(wtype_id)
  446.   end
  447.   
  448.   #--------------------------------------------------------------------------
  449.   # new method: subclass_equip_wtype?
  450.   #--------------------------------------------------------------------------
  451.   def subclass_equip_wtype?(wtype_id); return false; end
  452.   
  453.   #--------------------------------------------------------------------------
  454.   # alias method: equip_atype_ok?
  455.   #--------------------------------------------------------------------------
  456.   alias game_battlerbase_equip_atype_ok_cs equip_atype_ok?
  457.   def equip_atype_ok?(atype_id)
  458.     return true if subclass_equip_atype?(atype_id)
  459.     return game_battlerbase_equip_atype_ok_cs(atype_id)
  460.   end
  461.   
  462.   #--------------------------------------------------------------------------
  463.   # new method: subclass_equip_atype?
  464.   #--------------------------------------------------------------------------
  465.   def subclass_equip_atype?(atype_id); return false; end
  466.   
  467. end # Game_BattlerBase

  468. #==============================================================================
  469. # ■ Game_Actor
  470. #==============================================================================

  471. class Game_Actor < Game_Battler
  472.   
  473.   #--------------------------------------------------------------------------
  474.   # alias method: setup
  475.   #--------------------------------------------------------------------------
  476.   alias game_actor_setup_cs setup
  477.   def setup(actor_id)
  478.     game_actor_setup_cs(actor_id)
  479.     init_unlocked_classes
  480.     init_subclass
  481.   end
  482.   
  483.   #--------------------------------------------------------------------------
  484.   # new method: init_unlocked_classes
  485.   #--------------------------------------------------------------------------
  486.   def init_unlocked_classes
  487.     @unlocked_classes = actor.unlocked_classes.clone
  488.     @unlocked_classes.push(@class_id) if !@unlocked_classes.include?(@class_id)
  489.     @unlocked_classes.sort!
  490.   end
  491.   
  492.   #--------------------------------------------------------------------------
  493.   # new method: init_subclass
  494.   #--------------------------------------------------------------------------
  495.   def init_subclass
  496.     @subclass_id = 0
  497.   end
  498.   
  499.   #--------------------------------------------------------------------------
  500.   # new method: unlocked_classes
  501.   #--------------------------------------------------------------------------
  502.   def unlocked_classes
  503.     init_unlocked_classes if @unlocked_classes.nil?
  504.     return @unlocked_classes
  505.   end
  506.   
  507.   #--------------------------------------------------------------------------
  508.   # new method: unlock_class
  509.   #--------------------------------------------------------------------------
  510.   def unlock_class(class_id)
  511.     init_unlocked_classes if @unlocked_classes.nil?
  512.     return if @unlocked_classes.include?(class_id)
  513.     @unlocked_classes.push(class_id)
  514.     learn_class_skills(class_id)
  515.   end
  516.   
  517.   #--------------------------------------------------------------------------
  518.   # new method: remove_class
  519.   #--------------------------------------------------------------------------
  520.   def remove_class(class_id)
  521.     init_unlocked_classes if @unlocked_classes.nil?
  522.     return if class_id == @class_id
  523.     @unlocked_classes.delete(class_id)
  524.     @subclass_id = 0 if class_id == @subclass_id
  525.     refresh
  526.   end
  527.   
  528.   #--------------------------------------------------------------------------
  529.   # new method: subclass
  530.   #--------------------------------------------------------------------------
  531.   def subclass
  532.     init_subclass if @subclass_id.nil?
  533.     return $data_classes[@subclass_id]
  534.   end
  535.   
  536.   #--------------------------------------------------------------------------
  537.   # alias method: change_class
  538.   #--------------------------------------------------------------------------
  539.   alias game_actor_change_class_cs change_class
  540.   def change_class(class_id, keep_exp = false)
  541.     @subclass_id = 0 if @subclass_id == class_id
  542.     game_actor_change_class_cs(class_id, keep_exp)
  543.     learn_class_skills(class_id)
  544.     unlock_class(class_id)
  545.   end
  546.   
  547.   #--------------------------------------------------------------------------
  548.   # new method: learn_class_skills
  549.   #--------------------------------------------------------------------------
  550.   def learn_class_skills(class_id)
  551.     return if class_id <= 0
  552.     return if $data_classes[class_id].nil?
  553.     $data_classes[class_id].learnings.each do |learning|
  554.       learn_skill(learning.skill_id) if learning.level == class_level(class_id)
  555.     end
  556.   end
  557.   
  558.   #--------------------------------------------------------------------------
  559.   # new method: change_subclass
  560.   #--------------------------------------------------------------------------
  561.   def change_subclass(class_id)
  562.     return if class_id == @class_id
  563.     unlock_class(class_id)
  564.     @subclass_id = @subclass_id == class_id ? 0 : class_id
  565.     learn_class_skills(@subclass_id)
  566.     refresh
  567.   end
  568.   
  569.   #--------------------------------------------------------------------------
  570.   # new method: class_level
  571.   #--------------------------------------------------------------------------
  572.   def class_level(class_id)
  573.     return @level if YEA::CLASS_SYSTEM::MAINTAIN_LEVELS
  574.     temp_class = $data_classes[class_id]
  575.     @exp[class_id] = 0 if @exp[class_id].nil?
  576.     n = 1
  577.     loop do
  578.       break if temp_class.exp_for_level(n+1) > @exp[class_id]
  579.       n += 1
  580.     end
  581.     return n
  582.   end
  583.   
  584.   #--------------------------------------------------------------------------
  585.   # new method: subclass_level
  586.   #--------------------------------------------------------------------------
  587.   def subclass_level
  588.     return 0 if @subclass_id == 0
  589.     return @level if YEA::CLASS_SYSTEM::MAINTAIN_LEVELS
  590.     return class_level(@subclass_id)
  591.   end
  592.   
  593.   #--------------------------------------------------------------------------
  594.   # alias method: param_base
  595.   #--------------------------------------------------------------------------
  596.   alias game_actor_param_base_cs param_base
  597.   def param_base(param_id)
  598.     result = game_actor_param_base_cs(param_id)
  599.     unless subclass.nil?
  600.       subclass_rate = YEA::CLASS_SYSTEM::SUBCLASS_STAT_RATE
  601.       slevel = subclass_level
  602.       result += subclass.params[param_id, slevel] * subclass_rate
  603.     end
  604.     return result.to_i
  605.   end
  606.   
  607.   #--------------------------------------------------------------------------
  608.   # new method: subclass_skill_types
  609.   #--------------------------------------------------------------------------
  610.   def subclass_skill_types
  611.     return [] unless YEA::CLASS_SYSTEM::SUBCLASS_SKILL_TYPES
  612.     return [] if subclass.nil?
  613.     array = []
  614.     for feature in subclass.features
  615.       next unless feature.code == FEATURE_STYPE_ADD
  616.       next if features_set(FEATURE_STYPE_ADD).include?(feature.data_id)
  617.       array.push(feature.data_id)
  618.     end
  619.     return array
  620.   end
  621.   
  622.   #--------------------------------------------------------------------------
  623.   # new method: subclass_equip_wtype?
  624.   #--------------------------------------------------------------------------
  625.   def subclass_equip_wtype?(wtype_id)
  626.     return false unless YEA::CLASS_SYSTEM::SUBCLASS_WEAPON_TYPES
  627.     return false if subclass.nil?
  628.     for feature in subclass.features
  629.       next unless feature.code == FEATURE_EQUIP_WTYPE
  630.       return true if wtype_id == feature.data_id
  631.     end
  632.     return super
  633.   end
  634.   
  635.   #--------------------------------------------------------------------------
  636.   # new method: subclass_equip_atype?
  637.   #--------------------------------------------------------------------------
  638.   def subclass_equip_atype?(atype_id)
  639.     return false unless YEA::CLASS_SYSTEM::SUBCLASS_ARMOUR_TYPES
  640.     return false if subclass.nil?
  641.     for feature in subclass.features
  642.       next unless feature.code == FEATURE_EQUIP_ATYPE
  643.       return true if atype_id == feature.data_id
  644.     end
  645.     return super
  646.   end
  647.   
  648.   #--------------------------------------------------------------------------
  649.   # alias method: release_unequippable_items
  650.   #--------------------------------------------------------------------------
  651.   alias game_actor_release_unequippable_items_cs release_unequippable_items
  652.   def release_unequippable_items(item_gain = true)
  653.     item_gain = false if @temp_flag
  654.     game_actor_release_unequippable_items_cs(item_gain)
  655.   end
  656.   
  657. end # Game_Actor

  658. #==============================================================================
  659. # ■ Game_Interpreter
  660. #==============================================================================

  661. class Game_Interpreter
  662.   
  663.   #--------------------------------------------------------------------------
  664.   # overwrite method: command_321
  665.   #--------------------------------------------------------------------------
  666.   def command_321
  667.     actor = $game_actors[@params[0]]
  668.     if actor && $data_classes[@params[1]]
  669.       maintain = YEA::CLASS_SYSTEM::MAINTAIN_LEVELS
  670.       actor.change_class(@params[1], maintain)
  671.     end
  672.   end
  673.   
  674. end # Game_Interpreter

  675. #==============================================================================
  676. # ■ Window_Base
  677. #==============================================================================

  678. class Window_Base < Window
  679.   
  680.   #--------------------------------------------------------------------------
  681.   # overwrite method: draw_actor_class
  682.   #--------------------------------------------------------------------------
  683.   def draw_actor_class(actor, x, y, width = 112)
  684.     change_color(normal_color)
  685.     if actor.subclass.nil?
  686.       text = actor.class.name
  687.     else
  688.       fmt = YEA::CLASS_SYSTEM::SUBCLASS_TEXT
  689.       text = sprintf(fmt, actor.class.name, actor.subclass.name)
  690.     end
  691.     draw_text(x, y, width, line_height, text)
  692.   end
  693.   
  694. end # Window_Base

  695. #==============================================================================
  696. # ■ Window_MenuCommand
  697. #==============================================================================

  698. class Window_MenuCommand < Window_Command
  699.   
  700.   #--------------------------------------------------------------------------
  701.   # alias method: add_formation_command
  702.   #--------------------------------------------------------------------------
  703.   alias window_menucommand_add_formation_command_cs add_formation_command
  704.   def add_formation_command
  705.     add_class_command unless $imported["YEA-AceMenuEngine"]
  706.     window_menucommand_add_formation_command_cs
  707.   end
  708.   
  709.   #--------------------------------------------------------------------------
  710.   # new method: add_class_command
  711.   #--------------------------------------------------------------------------
  712.   def add_class_command
  713.     return unless Switch.class_show
  714.     text = YEA::CLASS_SYSTEM::CLASS_MENU_TEXT
  715.     add_command(text, :class, Switch.class_enable)
  716.   end
  717.   
  718. end # Window_MenuCommand

  719. #==============================================================================
  720. # ■ Window_ClassCommand
  721. #==============================================================================

  722. class Window_ClassCommand < Window_Command
  723.   
  724.   #--------------------------------------------------------------------------
  725.   # initialize
  726.   #--------------------------------------------------------------------------
  727.   def initialize(x, y)
  728.     super(x, y)
  729.     @actor = nil
  730.   end
  731.   
  732.   #--------------------------------------------------------------------------
  733.   # ● ウィンドウ幅の取得
  734.   #--------------------------------------------------------------------------
  735.   def window_width; return 160; end
  736.   
  737.   #--------------------------------------------------------------------------
  738.   # actor=
  739.   #--------------------------------------------------------------------------
  740.   def actor=(actor)
  741.     return if @actor == actor
  742.     @actor = actor
  743.     refresh
  744.   end
  745.   
  746.   #--------------------------------------------------------------------------
  747.   # item_window=
  748.   #--------------------------------------------------------------------------
  749.   def item_window=(window)
  750.     @item_window = window
  751.   end
  752.   
  753.   #--------------------------------------------------------------------------
  754.   # visible_line_number
  755.   #--------------------------------------------------------------------------
  756.   def visible_line_number; return 4; end
  757.   
  758.   #--------------------------------------------------------------------------
  759.   # make_command_list
  760.   #--------------------------------------------------------------------------
  761.   def make_command_list
  762.     return if @actor.nil?
  763.     for command in YEA::CLASS_SYSTEM::COMMANDS
  764.       case command[0]
  765.       when :primary
  766.         next unless Switch.primary_show
  767.         add_command(command[1], command[0], Switch.primary_enable)
  768.       when :subclass
  769.         next unless Switch.subclass_show
  770.         add_command(command[1], command[0], Switch.subclass_enable)
  771.       when :learn_skill
  772.         next unless $imported["YEA-LearnSkillEngine"]
  773.         add_learn_skill_command
  774.       else
  775.         process_custom_command(command)
  776.       end
  777.     end
  778.     if !$game_temp.scene_class_index.nil?
  779.       select($game_temp.scene_class_index)
  780.       self.oy = $game_temp.scene_class_oy
  781.     end
  782.     $game_temp.scene_class_index = nil
  783.     $game_temp.scene_class_oy = nil
  784.   end
  785.   
  786.   #--------------------------------------------------------------------------
  787.   # process_ok
  788.   #--------------------------------------------------------------------------
  789.   def process_ok
  790.     $game_temp.scene_class_index = index
  791.     $game_temp.scene_class_oy = self.oy
  792.     super
  793.   end
  794.   
  795.   #--------------------------------------------------------------------------
  796.   # process_custom_command
  797.   #--------------------------------------------------------------------------
  798.   def process_custom_command(command)
  799.     return unless YEA::CLASS_SYSTEM::CUSTOM_CLASS_COMMANDS.include?(command[0])
  800.     show = YEA::CLASS_SYSTEM::CUSTOM_CLASS_COMMANDS[command[0]][1]
  801.     continue = show <= 0 ? true : $game_switches[show]
  802.     return unless continue
  803.     text = command[1]
  804.     switch = YEA::CLASS_SYSTEM::CUSTOM_CLASS_COMMANDS[command[0]][0]
  805.     enabled = switch <= 0 ? true : $game_switches[switch]
  806.     add_command(text, command[0], enabled)
  807.   end
  808.   
  809.   #--------------------------------------------------------------------------
  810.   # update
  811.   #--------------------------------------------------------------------------
  812.   def update
  813.     super
  814.     update_visible_windows
  815.   end
  816.   
  817.   #--------------------------------------------------------------------------
  818.   # update_visible_windows
  819.   #--------------------------------------------------------------------------
  820.   def update_visible_windows
  821.     return if @current_index == current_symbol
  822.     @current_index = current_symbol
  823.     @item_window.refresh unless @item_window.nil?
  824.   end
  825.   
  826.   #--------------------------------------------------------------------------
  827.   # add_learn_skill_command
  828.   #--------------------------------------------------------------------------
  829.   def add_learn_skill_command
  830.     return unless Switch.show_learn_skill
  831.     name = YEA::LEARN_SKILL::COMMAND_NAME
  832.     add_command(name, :learn_skill, true)
  833.   end
  834.   
  835. end # Window_ClassCommand

  836. #==============================================================================
  837. # ■ Window_ClassStatus
  838. #==============================================================================

  839. class Window_ClassStatus < Window_Base
  840.   
  841.   #--------------------------------------------------------------------------
  842.   # initialize
  843.   #--------------------------------------------------------------------------
  844.   def initialize(dx, dy)
  845.     super(dx, dy, window_width, fitting_height(4))
  846.     @actor = nil
  847.   end
  848.   
  849.   #--------------------------------------------------------------------------
  850.   # window_width
  851.   #--------------------------------------------------------------------------
  852.   def window_width; Graphics.width - 160; end
  853.   
  854.   #--------------------------------------------------------------------------
  855.   # actor=
  856.   #--------------------------------------------------------------------------
  857.   def actor=(actor)
  858.     return if @actor == actor
  859.     @actor = actor
  860.     refresh
  861.   end
  862.   
  863.   #--------------------------------------------------------------------------
  864.   # refresh
  865.   #--------------------------------------------------------------------------
  866.   def refresh
  867.     contents.clear
  868.     return if @actor.nil?
  869.     draw_actor_face(@actor, 0, 0)
  870.     draw_actor_simple_status(@actor, 108, line_height / 2)
  871.   end
  872.   
  873. end # Window_ClassStatus

  874. #==============================================================================
  875. # ■ Window_ClassParam
  876. #==============================================================================

  877. class Window_ClassParam < Window_Base
  878.   
  879.   #--------------------------------------------------------------------------
  880.   # initialize
  881.   #--------------------------------------------------------------------------
  882.   def initialize(dx, dy)
  883.     super(dx, dy, window_width, Graphics.height - dy)
  884.     @actor = nil
  885.     @temp_actor = nil
  886.     refresh
  887.   end
  888.   
  889.   #--------------------------------------------------------------------------
  890.   # window_width
  891.   #--------------------------------------------------------------------------
  892.   def window_width; return Graphics.width * 2 / 5; end
  893.   
  894.   #--------------------------------------------------------------------------
  895.   # actor=
  896.   #--------------------------------------------------------------------------
  897.   def actor=(actor)
  898.     return if @actor == actor
  899.     @actor = actor
  900.     refresh
  901.   end
  902.   
  903.   #--------------------------------------------------------------------------
  904.   # refresh
  905.   #--------------------------------------------------------------------------
  906.   def refresh
  907.     contents.clear
  908.     8.times {|i| draw_item(0, line_height * i, i) }
  909.   end
  910.   
  911.   #--------------------------------------------------------------------------
  912.   # set_temp_actor
  913.   #--------------------------------------------------------------------------
  914.   def set_temp_actor(temp_actor)
  915.     return if @temp_actor == temp_actor
  916.     @temp_actor = temp_actor
  917.     refresh
  918.   end
  919.   
  920.   #--------------------------------------------------------------------------
  921.   # draw_item
  922.   #--------------------------------------------------------------------------
  923.   def draw_item(dx, dy, param_id)
  924.     draw_background_colour(dx, dy)
  925.     draw_param_name(dx + 4, dy, param_id)
  926.     draw_current_param(dx + 4, dy, param_id) if @actor
  927.     drx = (contents.width + 22) / 2
  928.     draw_right_arrow(drx, dy)
  929.     draw_new_param(drx + 22, dy, param_id) if @temp_actor
  930.     reset_font_settings
  931.   end
  932.   
  933.   #--------------------------------------------------------------------------
  934.   # draw_background_colour
  935.   #--------------------------------------------------------------------------
  936.   def draw_background_colour(dx, dy)
  937.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  938.     rect = Rect.new(dx+1, dy+1, contents.width - 2, line_height - 2)
  939.     contents.fill_rect(rect, colour)
  940.   end
  941.   
  942.   #--------------------------------------------------------------------------
  943.   # overwrite method: draw_param_name
  944.   #--------------------------------------------------------------------------
  945.   def draw_param_name(dx, dy, param_id)
  946.     contents.font.size = YEA::CLASS_SYSTEM::PARAM_FONT_SIZE
  947.     change_color(system_color)
  948.     draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id))
  949.   end
  950.   
  951.   #--------------------------------------------------------------------------
  952.   # overwrite method: draw_current_param
  953.   #--------------------------------------------------------------------------
  954.   def draw_current_param(dx, dy, param_id)
  955.     change_color(normal_color)
  956.     dw = (contents.width + 22) / 2
  957.     draw_text(0, dy, dw, line_height, @actor.param(param_id).group, 2)
  958.     reset_font_settings
  959.   end
  960.   
  961.   #--------------------------------------------------------------------------
  962.   # draw_right_arrow
  963.   #--------------------------------------------------------------------------
  964.   def draw_right_arrow(x, y)
  965.     change_color(system_color)
  966.     draw_text(x, y, 22, line_height, "→", 1)
  967.   end
  968.   
  969.   #--------------------------------------------------------------------------
  970.   # draw_new_param
  971.   #--------------------------------------------------------------------------
  972.   def draw_new_param(dx, dy, param_id)
  973.     contents.font.size = YEA::CLASS_SYSTEM::PARAM_FONT_SIZE
  974.     new_value = @temp_actor.param(param_id)
  975.     change_color(param_change_color(new_value - @actor.param(param_id)))
  976.     draw_text(0, dy, contents.width-4, line_height, new_value.group, 2)
  977.     reset_font_settings
  978.   end
  979.   
  980. end # Window_ClassParam

  981. #==============================================================================
  982. # ■ Window_ClassList
  983. #==============================================================================

  984. class Window_ClassList < Window_Selectable
  985.   
  986.   #--------------------------------------------------------------------------
  987.   # initialize
  988.   #--------------------------------------------------------------------------
  989.   def initialize(dx, dy)
  990.     dw = Graphics.width - (Graphics.width * 2 / 5)
  991.     dh = Graphics.height - dy
  992.     super(dx, dy, dw, dh)
  993.     @actor = nil
  994.     @command_window = nil
  995.     @status_window
  996.     @data = []
  997.   end
  998.   
  999.   #--------------------------------------------------------------------------
  1000.   # actor=
  1001.   #--------------------------------------------------------------------------
  1002.   def actor=(actor)
  1003.     return if @actor == actor
  1004.     @actor = actor
  1005.     @last_item = nil
  1006.     refresh
  1007.     self.oy = 0
  1008.   end
  1009.   
  1010.   #--------------------------------------------------------------------------
  1011.   # command_window=
  1012.   #--------------------------------------------------------------------------
  1013.   def command_window=(command_window)
  1014.     @command_window = command_window
  1015.   end
  1016.   
  1017.   #--------------------------------------------------------------------------
  1018.   # status_window=
  1019.   #--------------------------------------------------------------------------
  1020.   def status_window=(status_window)
  1021.     @status_window = status_window
  1022.   end
  1023.   
  1024.   #--------------------------------------------------------------------------
  1025.   # item_max
  1026.   #--------------------------------------------------------------------------
  1027.   def item_max; return @data ? @data.size : 1; end
  1028.   
  1029.   #--------------------------------------------------------------------------
  1030.   # item
  1031.   #--------------------------------------------------------------------------
  1032.   def item; return @data && index >= 0 ? @data[index] : nil; end
  1033.   
  1034.   #--------------------------------------------------------------------------
  1035.   # current_item_enabled?
  1036.   #--------------------------------------------------------------------------
  1037.   def current_item_enabled?; return enable?(@data[index]); end
  1038.   
  1039.   #--------------------------------------------------------------------------
  1040.   # include?
  1041.   #--------------------------------------------------------------------------
  1042.   def include?(item)
  1043.     return true if YEA::CLASS_SYSTEM::DEFAULT_UNLOCKS.include?(item.id)
  1044.     return @actor.unlocked_classes.include?(item.id)
  1045.   end
  1046.   
  1047.   #--------------------------------------------------------------------------
  1048.   # enable?
  1049.   #--------------------------------------------------------------------------
  1050.   def enable?(item)
  1051.     return false if item == @actor.class
  1052.     return true
  1053.   end
  1054.   
  1055.   #--------------------------------------------------------------------------
  1056.   # make_item_list
  1057.   #--------------------------------------------------------------------------
  1058.   def make_item_list
  1059.     @data = []
  1060.     for class_id in YEA::CLASS_SYSTEM::CLASS_ORDER
  1061.       next if $data_classes[class_id].nil?
  1062.       item = $data_classes[class_id]
  1063.       @data.push(item) if include?(item)
  1064.     end
  1065.   end
  1066.   
  1067.   #--------------------------------------------------------------------------
  1068.   # select_last
  1069.   #--------------------------------------------------------------------------
  1070.   def select_last
  1071.     case @command_window.current_symbol
  1072.     when :primary
  1073.       select(@data.index(@actor.class))
  1074.     when :subclass
  1075.       select(0) if @actor.subclass.nil?
  1076.       select(@data.index(@actor.subclass)) unless @actor.subclass.nil?
  1077.     else
  1078.       select(0)
  1079.     end
  1080.   end
  1081.   
  1082.   #--------------------------------------------------------------------------
  1083.   # draw_item
  1084.   #--------------------------------------------------------------------------
  1085.   def draw_item(index)
  1086.     item = @data[index]
  1087.     return if item.nil?
  1088.     rect = item_rect(index)
  1089.     rect.width -= 4
  1090.     reset_font_settings
  1091.     set_item_colour(item)
  1092.     draw_class_icon(item, rect)
  1093.     draw_class_name(item, rect)
  1094.     draw_class_level(item, rect)
  1095.   end
  1096.   
  1097.   #--------------------------------------------------------------------------
  1098.   # set_item_colour
  1099.   #--------------------------------------------------------------------------
  1100.   def set_item_colour(item)
  1101.     if item == @actor.class
  1102.       change_color(text_color(YEA::CLASS_SYSTEM::CURRENT_CLASS_COLOUR))
  1103.     elsif item == @actor.subclass
  1104.       change_color(text_color(YEA::CLASS_SYSTEM::SUBCLASS_COLOUR))
  1105.     else
  1106.       change_color(normal_color, enable?(item))
  1107.     end
  1108.   end
  1109.   
  1110.   #--------------------------------------------------------------------------
  1111.   # draw_class_icon
  1112.   #--------------------------------------------------------------------------
  1113.   def draw_class_icon(item, rect)
  1114.     icon = item.icon_index
  1115.     draw_icon(icon, rect.x, rect.y)
  1116.   end
  1117.   
  1118.   #--------------------------------------------------------------------------
  1119.   # draw_class_name
  1120.   #--------------------------------------------------------------------------
  1121.   def draw_class_name(item, rect)
  1122.     text = item.name
  1123.     draw_text(24, rect.y, rect.width-24, line_height, text)
  1124.   end
  1125.   
  1126.   #--------------------------------------------------------------------------
  1127.   # draw_class_level
  1128.   #--------------------------------------------------------------------------
  1129.   def draw_class_level(item, rect)
  1130.     return if YEA::CLASS_SYSTEM::MAINTAIN_LEVELS
  1131.     return if @actor.nil?
  1132.     level = @actor.class_level(item.id)
  1133.     contents.font.size = YEA::CLASS_SYSTEM::LEVEL_FONT_SIZE
  1134.     text = sprintf(YEA::CLASS_SYSTEM::CLASS_LEVEL, level.group)
  1135.     draw_text(rect, text, 2)
  1136.   end
  1137.   
  1138.   #--------------------------------------------------------------------------
  1139.   # update_help
  1140.   #--------------------------------------------------------------------------
  1141.   def update_help
  1142.     @help_window.set_item(item)
  1143.     return if @actor.nil?
  1144.     return if @status_window.nil?
  1145.     update_param_window
  1146.   end
  1147.   
  1148.   #--------------------------------------------------------------------------
  1149.   # update_param_window
  1150.   #--------------------------------------------------------------------------
  1151.   def update_param_window
  1152.     return if @last_item == item
  1153.     @last_item = item
  1154.     class_id = item.nil? ? @actor.class_id : item.id
  1155.     temp_actor = Marshal.load(Marshal.dump(@actor))
  1156.     temp_actor.temp_flag = true
  1157.     case @command_window.current_symbol
  1158.     when :primary
  1159.       temp_actor.change_class(class_id, YEA::CLASS_SYSTEM::MAINTAIN_LEVELS)
  1160.     when :subclass
  1161.       temp_actor.change_subclass(class_id)
  1162.     end
  1163.     @status_window.set_temp_actor(temp_actor)
  1164.   end
  1165.   
  1166.   #--------------------------------------------------------------------------
  1167.   # update_class
  1168.   #--------------------------------------------------------------------------
  1169.   def update_class
  1170.     @last_item = nil
  1171.     update_help
  1172.     refresh
  1173.     activate
  1174.   end
  1175.   
  1176.   #--------------------------------------------------------------------------
  1177.   # refresh
  1178.   #--------------------------------------------------------------------------
  1179.   def refresh
  1180.     make_item_list
  1181.     create_contents
  1182.     draw_all_items
  1183.   end
  1184.   
  1185. end # Window_ClassList

  1186. #==============================================================================
  1187. # ■ Scene_Menu
  1188. #==============================================================================

  1189. class Scene_Menu < Scene_MenuBase
  1190.   
  1191.   #--------------------------------------------------------------------------
  1192.   # alias method: create_command_window
  1193.   #--------------------------------------------------------------------------
  1194.   alias scene_menu_create_command_window_cs create_command_window
  1195.   def create_command_window
  1196.     scene_menu_create_command_window_cs
  1197.     @command_window.set_handler(:class, method(:command_personal))
  1198.   end
  1199.   
  1200.   #--------------------------------------------------------------------------
  1201.   # alias method: on_personal_ok
  1202.   #--------------------------------------------------------------------------
  1203.   alias scene_menu_on_personal_ok_cs on_personal_ok
  1204.   def on_personal_ok
  1205.     case @command_window.current_symbol
  1206.     when :class
  1207.       SceneManager.call(Scene_Class)
  1208.     else
  1209.       scene_menu_on_personal_ok_cs
  1210.     end
  1211.   end
  1212.   
  1213. end # Scene_Menu

  1214. #==============================================================================
  1215. # ■ Scene_Class
  1216. #==============================================================================

  1217. class Scene_Class < Scene_MenuBase
  1218.   
  1219.   #--------------------------------------------------------------------------
  1220.   # start
  1221.   #--------------------------------------------------------------------------
  1222.   def start
  1223.     super
  1224.     create_help_window
  1225.     create_command_window
  1226.     create_status_window
  1227.     create_param_window
  1228.     create_item_window
  1229.     relocate_windows
  1230.   end
  1231.   
  1232.   #--------------------------------------------------------------------------
  1233.   # create_command_window
  1234.   #--------------------------------------------------------------------------
  1235.   def create_command_window
  1236.     wy = @help_window.height
  1237.     @command_window = Window_ClassCommand.new(0, wy)
  1238.     @command_window.viewport = @viewport
  1239.     @command_window.help_window = @help_window
  1240.     @command_window.actor = @actor
  1241.     @command_window.set_handler(:cancel,   method(:return_scene))
  1242.     @command_window.set_handler(:primary,  method(:command_class_change))
  1243.     @command_window.set_handler(:subclass, method(:command_class_change))
  1244.     process_custom_class_commands
  1245.     return if $game_party.in_battle
  1246.     @command_window.set_handler(:pagedown, method(:next_actor))
  1247.     @command_window.set_handler(:pageup,   method(:prev_actor))
  1248.     @command_window.set_handler(:learn_skill, method(:command_learn_skill))
  1249.   end
  1250.   
  1251.   #--------------------------------------------------------------------------
  1252.   # process_custom_class_commands
  1253.   #--------------------------------------------------------------------------
  1254.   def process_custom_class_commands
  1255.     for command in YEA::CLASS_SYSTEM::COMMANDS
  1256.       next unless YEA::CLASS_SYSTEM::CUSTOM_CLASS_COMMANDS.include?(command[0])
  1257.       called_method = YEA::CLASS_SYSTEM::CUSTOM_CLASS_COMMANDS[command[0]][2]
  1258.       @command_window.set_handler(command[0], method(called_method))
  1259.     end
  1260.   end
  1261.   
  1262.   #--------------------------------------------------------------------------
  1263.   # create_status_window
  1264.   #--------------------------------------------------------------------------
  1265.   def create_status_window
  1266.     wy = @help_window.height
  1267.     @status_window = Window_ClassStatus.new(@command_window.width, wy)
  1268.     @status_window.viewport = @viewport
  1269.     @status_window.actor = @actor
  1270.   end
  1271.   
  1272.   #--------------------------------------------------------------------------
  1273.   # create_param_window
  1274.   #--------------------------------------------------------------------------
  1275.   def create_param_window
  1276.     dx = Graphics.width - (Graphics.width * 2 / 5)
  1277.     dy = @status_window.y + @status_window.height
  1278.     @param_window = Window_ClassParam.new(dx, dy)
  1279.     @param_window.viewport = @viewport
  1280.     @param_window.actor = @actor
  1281.   end
  1282.   
  1283.   #--------------------------------------------------------------------------
  1284.   # create_item_window
  1285.   #--------------------------------------------------------------------------
  1286.   def create_item_window
  1287.     dy = @status_window.y + @status_window.height
  1288.     @item_window = Window_ClassList.new(0, dy)
  1289.     @item_window.help_window = @help_window
  1290.     @item_window.command_window = @command_window
  1291.     @item_window.status_window = @param_window
  1292.     @item_window.viewport = @viewport
  1293.     @item_window.actor = @actor
  1294.     @command_window.item_window = @item_window
  1295.     @item_window.set_handler(:ok,     method(:on_class_ok))
  1296.     @item_window.set_handler(:cancel, method(:on_class_cancel))
  1297.   end
  1298.   
  1299.   #--------------------------------------------------------------------------
  1300.   # relocate_windows
  1301.   #--------------------------------------------------------------------------
  1302.   def relocate_windows
  1303.     return unless $imported["YEA-AceMenuEngine"]
  1304.     case Menu.help_window_location
  1305.     when 0 # Top
  1306.       @help_window.y = 0
  1307.       @command_window.y = @help_window.height
  1308.       @param_window.y = @command_window.y + @command_window.height
  1309.     when 1 # Middle
  1310.       @command_window.y = 0
  1311.       @help_window.y = @command_window.height
  1312.       @param_window.y = @help_window.y + @help_window.height
  1313.     else # Bottom
  1314.       @command_window.y = 0
  1315.       @param_window.y = @command_window.height
  1316.       @help_window.y = @param_window.y + @param_window.height
  1317.     end
  1318.     @status_window.y = @command_window.y
  1319.     @item_window.y = @param_window.y
  1320.   end
  1321.   
  1322.   #--------------------------------------------------------------------------
  1323.   # on_actor_change
  1324.   #--------------------------------------------------------------------------
  1325.   def on_actor_change
  1326.     @command_window.actor = @actor
  1327.     @status_window.actor = @actor
  1328.     @param_window.actor = @actor
  1329.     @item_window.actor = @actor
  1330.     @command_window.activate
  1331.   end
  1332.   
  1333.   #--------------------------------------------------------------------------
  1334.   # command_class_change
  1335.   #--------------------------------------------------------------------------
  1336.   def command_class_change
  1337.     @item_window.activate
  1338.     @item_window.select_last
  1339.   end
  1340.   
  1341.   #--------------------------------------------------------------------------
  1342.   # on_class_cancel
  1343.   #--------------------------------------------------------------------------
  1344.   def on_class_cancel
  1345.     @item_window.unselect
  1346.     @command_window.activate
  1347.     @param_window.set_temp_actor(nil)
  1348.   end
  1349.   
  1350.   #--------------------------------------------------------------------------
  1351.   # on_class_ok
  1352.   #--------------------------------------------------------------------------
  1353.   def on_class_ok
  1354.     Sound.play_equip
  1355.     class_id = @item_window.item.id
  1356.     maintain = YEA::CLASS_SYSTEM::MAINTAIN_LEVELS
  1357.     hp = @actor.hp * 1.0 / @actor.mhp
  1358.     mp = @actor.mp * 1.0 / [@actor.mmp, 1].max
  1359.     case @command_window.current_symbol
  1360.     when :primary
  1361.       @actor.change_class(class_id, maintain)
  1362.     when :subclass
  1363.       @actor.change_subclass(class_id)
  1364.     else
  1365.       @item_window.activate
  1366.       return
  1367.     end
  1368.     @actor.hp = (@actor.mhp * hp).to_i
  1369.     @actor.mp = (@actor.mmp * mp).to_i
  1370.     @status_window.refresh
  1371.     @item_window.update_class
  1372.   end
  1373.   
  1374.   #--------------------------------------------------------------------------
  1375.   # new method: command_learn_skill
  1376.   #--------------------------------------------------------------------------
  1377.   def command_learn_skill
  1378.     return unless $imported["YEA-LearnSkillEngine"]
  1379.     SceneManager.call(Scene_LearnSkill)
  1380.   end
  1381.   
  1382.   #--------------------------------------------------------------------------
  1383.   # command_name1
  1384.   #--------------------------------------------------------------------------
  1385.   def command_name1
  1386.     # Do nothing.
  1387.   end
  1388.   
  1389.   #--------------------------------------------------------------------------
  1390.   # command_name2
  1391.   #--------------------------------------------------------------------------
  1392.   def command_name2
  1393.     # Do nothing.
  1394.   end
  1395.   
  1396. end # Scene_Class

  1397. #==============================================================================
  1398. #
  1399. # ▼ End of File
  1400. #
  1401. #==============================================================================
复制代码
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Class System Add-On: Class Unlock Level v1.00
  4. # -- Last Updated: 2011.12.20
  5. # -- Level: Normal
  6. # -- Requires: YEA - Class System v1.01+
  7. #
  8. #==============================================================================

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

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2011.12.20 - Started Script and Finished.
  15. #
  16. #==============================================================================
  17. # ▼ Introduction
  18. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  19. # This script allows for classes to be unlocked after a class reaches a certain
  20. # level. Note that this script is made for the Class System script and not
  21. # using the MAINTAIN_LEVELS feature. Requirements for unlocking a class can be
  22. # multiple level requirements as well.
  23. #
  24. #==============================================================================
  25. # ▼ Instructions
  26. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  27. # To install this script, open up your script editor and copy/paste this script
  28. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  29. #
  30. # -----------------------------------------------------------------------------
  31. # Class Notetags - These notetags go in the class notebox in the database.
  32. # -----------------------------------------------------------------------------
  33. # <level unlock requirements>
  34. #   class x: level y
  35. #   class x: level y
  36. # </level unlock requirements>
  37. # Sets the requirements for unlocking that particular class. The unlocking of
  38. # the class will require classes x to be at level y. Insert multiple of the
  39. # strings in between the two opening and closing notetags to require all of the
  40. # class levels to be met.
  41. #
  42. #==============================================================================
  43. # ▼ Compatibility
  44. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  45. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  46. # it will run with RPG Maker VX without adjusting.
  47. #
  48. # This script requires Yanfly Engine Ace - Class System v1.01+.
  49. #
  50. #==============================================================================
  51. # ▼ Editting anything past this point may potentially result in causing
  52. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  53. # halitosis so edit at your own risk.
  54. #==============================================================================

  55. if $imported["YEA-ClassSystem"] && !YEA::CLASS_SYSTEM::MAINTAIN_LEVELS

  56. module YEA
  57.   module REGEXP
  58.   module CLASS
  59.    
  60.     LV_UNLOCK_ON =
  61.       /<(?:LEVEL_UNLOCK_REQUIREMENTS|level unlock requirements)>/i
  62.     LV_UNLOCK_OFF =
  63.       /<\/(?:LEVEL_UNLOCK_REQUIREMENTS|level unlock requirements)>/i
  64.     LV_UNLOCK_STR = /CLASS[ ](\d+): LEVEL[ ](\d+)/i
  65.    
  66.   end # CLASS
  67.   end # REGEXP
  68. end # YEA

  69. #==============================================================================
  70. # ■ DataManager
  71. #==============================================================================

  72. module DataManager
  73.   
  74.   #--------------------------------------------------------------------------
  75.   # alias method: load_database
  76.   #--------------------------------------------------------------------------
  77.   class <<self; alias load_database_cul load_database; end
  78.   def self.load_database
  79.     load_database_cul
  80.     load_notetags_cul
  81.   end
  82.   
  83.   #--------------------------------------------------------------------------
  84.   # new method: load_notetags_cul
  85.   #--------------------------------------------------------------------------
  86.   def self.load_notetags_cul
  87.     for obj in $data_classes
  88.       next if obj.nil?
  89.       obj.load_notetags_cul
  90.     end
  91.   end
  92.   
  93. end # DataManager

  94. #==============================================================================
  95. # ■ RPG::Class
  96. #==============================================================================

  97. class RPG::Class < RPG::BaseItem
  98.   
  99.   #--------------------------------------------------------------------------
  100.   # public instance variables
  101.   #--------------------------------------------------------------------------
  102.   attr_accessor :level_unlock
  103.   
  104.   #--------------------------------------------------------------------------
  105.   # common cache: load_notetags_cul
  106.   #--------------------------------------------------------------------------
  107.   def load_notetags_cul
  108.     @level_unlock = {}
  109.     @level_unlock_on = false
  110.     #---
  111.     self.note.split(/[\r\n]+/).each { |line|
  112.       case line
  113.       #---
  114.       when YEA::REGEXP::CLASS::LV_UNLOCK_ON
  115.         @level_unlock_on = true
  116.       when YEA::REGEXP::CLASS::LV_UNLOCK_OFF
  117.         @level_unlock_on = false
  118.       when YEA::REGEXP::CLASS::LV_UNLOCK_STR
  119.         next unless @level_unlock_on
  120.         @level_unlock[$1.to_i] = $2.to_i
  121.       end
  122.     } # self.note.split
  123.     #---
  124.   end
  125.   
  126. end # RPG::Class

  127. #==============================================================================
  128. # ■ Game_Actor
  129. #==============================================================================

  130. class Game_Actor < Game_Battler
  131.   
  132.   #--------------------------------------------------------------------------
  133.   # check_level_unlocked_classes
  134.   #--------------------------------------------------------------------------
  135.   def check_level_unlocked_classes
  136.     for item in $data_classes
  137.       next if item.nil?
  138.       next if unlocked_classes.include?(item.id)
  139.       next if item.level_unlock == {}
  140.       next unless class_unlock_level_requirements_met?(item)
  141.       unlock_class(item.id)
  142.     end
  143.   end
  144.   
  145.   #--------------------------------------------------------------------------
  146.   # class_unlock_level_requirements_met?
  147.   #--------------------------------------------------------------------------
  148.   def class_unlock_level_requirements_met?(item)
  149.     for key in item.level_unlock
  150.       class_id = key[0]
  151.       level_req = key[1]
  152.       return false if class_level(class_id) < level_req
  153.     end
  154.     return true
  155.   end
  156.   
  157. end # Game_Actor

  158. #==============================================================================
  159. # ■ Window_ClassList
  160. #==============================================================================

  161. class Window_ClassList < Window_Selectable
  162.   
  163.   #--------------------------------------------------------------------------
  164.   # alias method: actor=
  165.   #--------------------------------------------------------------------------
  166.   alias window_classlist_actor_equals_cul actor=
  167.   def actor=(actor)
  168.     return if @actor == actor
  169.     actor.check_level_unlocked_classes
  170.     window_classlist_actor_equals_cul(actor)
  171.   end
  172.   
  173. end # Window_ClassList

  174. end # $imported["YEA-ClassSystem"] && !YEA::CLASS_SYSTEM::MAINTAIN_LEVELS

  175. #==============================================================================
  176. #
  177. # ▼ End of File
  178. #
  179. #==============================================================================
复制代码
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Class Specifics v1.00
  4. # -- Last Updated: 2011.12.23
  5. # -- Level: Normal
  6. # -- Requires: YEA - Class System v1.03+
  7. #
  8. #==============================================================================

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

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2011.12.23 - Started Script and Finished.
  15. #
  16. #==============================================================================
  17. # ▼ Introduction
  18. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  19. # This script allows for certain classes to be primary-only or sublcass-only.
  20. # In addition to that, subclasses can require certain classes to be primary
  21. # classes in order to be applied.
  22. #
  23. #==============================================================================
  24. # ▼ Instructions
  25. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  26. # To install this script, open up your script editor and copy/paste this script
  27. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  28. #
  29. # -----------------------------------------------------------------------------
  30. # Class Notetags - These notetags go in the class notebox in the database.
  31. # -----------------------------------------------------------------------------
  32. # <primary only>
  33. # Makes this class equippable only if it's the primary class.
  34. #
  35. # <subclass only>
  36. # Makes this class equippable only if it's the subclass class.
  37. #
  38. # <subclass to: x>
  39. # <subclass to: x, x>
  40. # This makes the class subclass only and only equippable if the primary class
  41. # is one of the listed x classes.
  42. #
  43. #==============================================================================
  44. # ▼ Compatibility
  45. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  46. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  47. # it will run with RPG Maker VX without adjusting.
  48. #
  49. # This script requires Yanfly Engine Ace - Class System v1.03+.
  50. #
  51. #==============================================================================
  52. # ▼ Editting anything past this point may potentially result in causing
  53. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  54. # halitosis so edit at your own risk.
  55. #==============================================================================

  56. if $imported["YEA-ClassSystem"]

  57. module YEA
  58.   module REGEXP
  59.   module CLASS
  60.    
  61.     PRIMARY_ONLY  = /<(?:PRIMARY_ONLY|primary only)>/i
  62.     SUBCLASS_ONLY = /<(?:SUBCLASS_ONLY|subclass only)>/i
  63.     SUBCLASS_TO = /<(?:SUBCLASS_TO|subclass to):[ ]*(\d+(?:\s*,\s*\d+)*)>/i
  64.    
  65.   end # CLASS
  66.   end # REGEXP
  67. end # YEA

  68. #==============================================================================
  69. # ■ DataManager
  70. #==============================================================================

  71. module DataManager
  72.   
  73.   #--------------------------------------------------------------------------
  74.   # alias method: load_database
  75.   #--------------------------------------------------------------------------
  76.   class <<self; alias load_database_csp load_database; end
  77.   def self.load_database
  78.     load_database_csp
  79.     load_notetags_csp
  80.   end
  81.   
  82.   #--------------------------------------------------------------------------
  83.   # new method: load_notetags_csp
  84.   #--------------------------------------------------------------------------
  85.   def self.load_notetags_csp
  86.     for obj in $data_classes
  87.       next if obj.nil?
  88.       obj.load_notetags_csp
  89.     end
  90.   end
  91.   
  92. end # DataManager

  93. #==============================================================================
  94. # ■ RPG::Class
  95. #==============================================================================

  96. class RPG::Class < RPG::BaseItem
  97.   
  98.   #--------------------------------------------------------------------------
  99.   # public instance variables
  100.   #--------------------------------------------------------------------------
  101.   attr_accessor :primary_only
  102.   attr_accessor :subclass_only
  103.   attr_accessor :subclass_to
  104.   
  105.   #--------------------------------------------------------------------------
  106.   # common cache: load_notetags_csp
  107.   #--------------------------------------------------------------------------
  108.   def load_notetags_csp
  109.     @primary_only = false
  110.     @subclass_only = false
  111.     @subclass_to = []
  112.     #---
  113.     self.note.split(/[\r\n]+/).each { |line|
  114.       case line
  115.       #---
  116.       when YEA::REGEXP::CLASS::PRIMARY_ONLY
  117.         @primary_only = true
  118.         @subclass_only = false
  119.         @subclass_to = []
  120.       when YEA::REGEXP::CLASS::SUBCLASS_ONLY
  121.         @primary_only = false
  122.         @subclass_only = true
  123.       when YEA::REGEXP::CLASS::SUBCLASS_TO
  124.         @primary_only = false
  125.         @subclass_only = true
  126.         $1.scan(/\d+/).each { |num|
  127.         @subclass_to.push(num.to_i) if num.to_i > 0 }
  128.       end
  129.     } # self.note.split
  130.     #---
  131.   end
  132.   
  133. end # RPG::Class

  134. #==============================================================================
  135. # ■ Game_Actor
  136. #==============================================================================

  137. class Game_Actor < Game_Battler
  138.   
  139.   #--------------------------------------------------------------------------
  140.   # alias method: change_class
  141.   #--------------------------------------------------------------------------
  142.   alias game_actor_change_class_csp change_class
  143.   def change_class(class_id, keep_exp = false)
  144.     return if $data_classes[class_id].subclass_only
  145.     game_actor_change_class_csp(class_id, keep_exp)
  146.     correct_subclass
  147.   end
  148.   
  149.   #--------------------------------------------------------------------------
  150.   # alias method: change_subclass
  151.   #--------------------------------------------------------------------------
  152.   alias game_actor_change_subclass_csp change_subclass
  153.   def change_subclass(class_id)
  154.     return unless subclass_requirements_met?(class_id)
  155.     game_actor_change_subclass_csp(class_id)
  156.   end
  157.   
  158.   #--------------------------------------------------------------------------
  159.   # new method: subclass_requirements_met?
  160.   #--------------------------------------------------------------------------
  161.   def subclass_requirements_met?(class_id)
  162.     subclass = $data_classes[class_id]
  163.     return false if subclass.primary_only
  164.     return subclass_to?(class_id) if subclass.subclass_to != []
  165.     return true
  166.   end
  167.   
  168.   #--------------------------------------------------------------------------
  169.   # new method: subclass_to?
  170.   #--------------------------------------------------------------------------
  171.   def subclass_to?(class_id)
  172.     return true if class_id == 0
  173.     subclass = $data_classes[class_id]
  174.     return false if subclass.nil?
  175.     for class_id in subclass.subclass_to
  176.       return true if class_id == self.class.id
  177.     end
  178.     return false
  179.   end
  180.   
  181.   #--------------------------------------------------------------------------
  182.   # new method: correct_subclass
  183.   #--------------------------------------------------------------------------
  184.   def correct_subclass
  185.     return if @subclass_id == 0
  186.     subclass = $data_classes[@subclass_id]
  187.     return if subclass.nil?
  188.     return if subclass.subclass_to == []
  189.     @subclass_id = 0 if !subclass_to?(@subclass_id)
  190.   end
  191.   
  192. end # Game_Actor

  193. #==============================================================================
  194. # ■ Window_ClassList
  195. #==============================================================================

  196. class Window_ClassList < Window_Selectable
  197.   
  198.   #--------------------------------------------------------------------------
  199.   # alias method: enable?
  200.   #--------------------------------------------------------------------------
  201.   alias window_classlist_enable_csp enable?
  202.   def enable?(item)
  203.     case @command_window.current_symbol
  204.     when :primary
  205.       return false if item.subclass_only
  206.     when :subclass
  207.       return false if item.primary_only
  208.       return @actor.subclass_to?(item.id) if item.subclass_to != []
  209.     end
  210.     return window_classlist_enable_csp(item)
  211.   end
  212.   
  213. end # Window_ClassList

  214. end # $imported["YEA-ClassSystem"]

  215. #==============================================================================
  216. #
  217. # ▼ End of File
  218. #
  219. #==============================================================================
复制代码
[fly]我想知道的是用什么脚本可以让指定角色或当前角色或队伍里指定角色解锁可以转换的新职业![/fly]
[img]http://service.t.sina.com.cn/widget/qmd/5339802982/c02e16bd/7.png

Lv3.寻梦者

梦石
0
星屑
1344
在线时间
962 小时
注册时间
2012-4-30
帖子
1475

开拓者

2
发表于 2012-10-22 16:15:39 | 只看该作者
大神使用谷歌翻译使我很头疼啊。。。<unlocked classes: X>在角色备注中添加。。默认解锁X号职业貌似吧。。。谷歌翻译很疼。。。
<level unlock requirements>
#   class x: level y
#   class x: level y
# </level unlock requirements>
是角色备注指职业x在该角色Y等级时解锁。。。。
<icon: x>
显示几号图标。。
<help description>
  string
  string
</help description>
string为帮助中显示的。。。
===================
<primary only>
只能当主职业
<subclass only>>
只能当主职业
<subclass to: x>
<subclass to: x, x>
只能在X等级使使用的主职业。。。。
  在职业备注里加
  1. $game_actors[x].unlock_class(y)#使X角色解锁y 职业
复制代码
  1. $game_actors[x].remove_class(y)#使X角色切换y 职业
复制代码
这个系统有三个部分的。这里是所有的用法。。所以有些可能没有用。。。。

点评

脚本框里的是事件脚本。。。  发表于 2012-10-22 16:16

评分

参与人数 1梦石 +2 收起 理由
Mic_洛洛 + 2 认可答案,6R精美好人卡+1

查看全部评分

回复

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
9280
在线时间
2504 小时
注册时间
2011-5-20
帖子
15389

开拓者

3
 楼主| 发表于 2012-10-22 18:07:02 | 只看该作者
铅笔描绘的思念 发表于 2012-10-22 16:15
大神使用谷歌翻译使我很头疼啊。。。在角色备注中添加。。默认解锁X号职业貌似吧。。。谷歌翻译很疼。。。 ...

如果我要角色完成某个任务后才可以解锁职业呢?

点评

如果是事件任务就事件脚本来搞定。。如果是脚本可以改改。。  发表于 2012-10-22 19:54
[img]http://service.t.sina.com.cn/widget/qmd/5339802982/c02e16bd/7.png
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-14 20:04

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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