本帖最后由 喵呜喵5 于 2013-11-30 22:30 编辑
先加入这个脚本:
http://rpg.blue/thread-99474-1-1.html
然后加入这个脚本(如果有添加其他战斗类脚本,建议把下面的脚本放到比它们高的位置):
class Scene_Battle def use_item item = @subject.current_action.item @log_window.display_use_item(@subject, item) @subject.use_item(item) refresh_status targets = @subject.current_action.make_targets.compact show_animation(targets, item.animation_id) if item.class == RPG::Skill repeats = ($data_skills[item.id].read_note('重复次数')).to_i else repeats = ($data_items[item.id].read_note('重复次数')).to_i end repeats = item.repeats if !repeats or repeats <= 0 targets.each {|target| repeats.times { invoke_item(target, item) } } end end class Scene_ItemBase def use_item_to_actors if item.class == RPG::Skill repeats = ($data_skills[item.id].read_note('重复次数')).to_i else repeats = ($data_items[item.id].read_note('重复次数')).to_i end repeats = item.repeats if !repeats or repeats <= 0 item_target_actors.each do |target| repeats.times { target.item_apply(user, item) } end end end
class Scene_Battle
def use_item
item = @subject.current_action.item
@log_window.display_use_item(@subject, item)
@subject.use_item(item)
refresh_status
targets = @subject.current_action.make_targets.compact
show_animation(targets, item.animation_id)
if item.class == RPG::Skill
repeats = ($data_skills[item.id].read_note('重复次数')).to_i
else
repeats = ($data_items[item.id].read_note('重复次数')).to_i
end
repeats = item.repeats if !repeats or repeats <= 0
targets.each {|target| repeats.times { invoke_item(target, item) } }
end
end
class Scene_ItemBase
def use_item_to_actors
if item.class == RPG::Skill
repeats = ($data_skills[item.id].read_note('重复次数')).to_i
else
repeats = ($data_items[item.id].read_note('重复次数')).to_i
end
repeats = item.repeats if !repeats or repeats <= 0
item_target_actors.each do |target|
repeats.times { target.item_apply(user, item) }
end
end
end
最后在需要设定的物品/技能的备注栏里多回车一行,写上即可 |