class Game_Interpreter
def 统计字数
total = 0
for map_id in 1..999
map_name = sprintf("Data/Map%03d.rvdata2", map_id)
if FileTest.exist?(map_name)
map = load_data(map_name)
for i in 1..999
event = map.events[i]
if event != nil
event.pages.each do |page|
if page.list.length > 0
page.list.each do |command|
case command.code
when 401
total += command.parameters[0].size
end
end
end
end
end
end
end
end
msgbox(total)
end
end