for i in 1...$data_items.size if $data_items.name == "物品名" # 持有的情况下 if $game_party.item_number(i) 执行你要的事 # 除此外的场合(不持有的情况下) else 你要做的事 end end end