本帖最后由 guoxiaomi 于 2019-8-24 16:25 编辑
插件脚本版(未测试):
# encoding: utf-8 # How to Use # 1. $scene = Scene_Skill_Toolsman(10) # 2. $scene = Scene_Item_Toolsman(1 => 10, 2 => 1) class Scene_Skill_Toolsman < Scene_Skill def initialize(actor_id) @actor = $game_actors[actor_id] $game_party.actors.push(@actor) super(-1, 0) end def update_skill super if $scene.is_a?(Scene_Menu) $scene = Scene_Map.new $game_party.actors.delete(@actor) end end end class Scene_Item_Toolsman < Scene_Item def initialize(items = {}) @items = $game_party.instance_variable_get(:@items) $game_party.instance_variable_set(:@items, items) super() end def update_item super if $scene.is_a?(Scene_Menu) $scene = Scene_Map.new $game_party.instance_variable_set(:@items, @items) end end end
# encoding: utf-8
# How to Use
# 1. $scene = Scene_Skill_Toolsman(10)
# 2. $scene = Scene_Item_Toolsman(1 => 10, 2 => 1)
class Scene_Skill_Toolsman < Scene_Skill
def initialize(actor_id)
@actor = $game_actors[actor_id]
$game_party.actors.push(@actor)
super(-1, 0)
end
def update_skill
super
if $scene.is_a?(Scene_Menu)
$scene = Scene_Map.new
$game_party.actors.delete(@actor)
end
end
end
class Scene_Item_Toolsman < Scene_Item
def initialize(items = {})
@items = $game_party.instance_variable_get(:@items)
$game_party.instance_variable_set(:@items, items)
super()
end
def update_item
super
if $scene.is_a?(Scene_Menu)
$scene = Scene_Map.new
$game_party.instance_variable_set(:@items, @items)
end
end
end
|