| 赞 | 3 |
| VIP | |
| 好人卡 | |
| 积分 | 22 |
| 经验 | |
| 最后登录 | 2025-7-3 |
| 在线时间 | 1015 小时 |
- 梦石
- 0
- 星屑
- 2245
- 在线时间
- 1015 小时
- 注册时间
- 2015-10-17
- 回帖
- 1077
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
下面这个脚本是道具加上备注转职的,问下要是加些条件转职能实现吗,例如到一定等级才能使用这个道具转职
或者只有特定的角色使用才能转职,或者是某种职业的前提下用该道具才能转职
知道的告诉下,谢谢
- class RPG::Item
- def transfer_index
- /<TRANSFER\s*(\d+)>/ =~ note ? $1.to_i : 0
- end
- end
- class Scene_ItemBase
-
- #--------------------------------------------------------------------------
- # ● 对角色使用物品
- #--------------------------------------------------------------------------
- def use_item_to_actors
- item_target_actors.each do |target|
- item.repeats.times {
- target.item_apply(user, item)
- use_transfer_item(target, item.transfer_index) if item.transfer_index > 0
- }
- end
- end
-
- def use_transfer_item(user, index)
- user.change_class(index, true)
- end
-
- end
复制代码 |
|