加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
需要先在电脑里安装ruby 否则不能使用
将以下内容放进新建的文本里 然后将后缀改成.RB
(导出)
# -*- encoding: utf-8 -*- require "kconv" require "zlib" def export_rxdata(filename) File.open(filename, "rb") {|handle| script = Marshal.load(handle) index = 0 script.each {|row| filename = row[1].tosjis.gsub(/\//, "_") + ".rb" no = sprintf("%04d", index) index += 10 File.open("Scripts/#{no}_#{filename}", "wb") {|output| output.write Zlib::Inflate.inflate(row[2]) } } } end if !FileTest::exists?("Scripts") Dir::mkdir("Scripts") end export_rxdata("Data/Scripts.rxdata")
# -*- encoding: utf-8 -*-
require "kconv"
require "zlib"
def export_rxdata(filename)
File.open(filename, "rb") {|handle|
script = Marshal.load(handle)
index = 0
script.each {|row|
filename = row[1].tosjis.gsub(/\//, "_") + ".rb"
no = sprintf("%04d", index)
index += 10
File.open("Scripts/#{no}_#{filename}", "wb") {|output|
output.write Zlib::Inflate.inflate(row[2])
}
}
}
end
if !FileTest::exists?("Scripts")
Dir::mkdir("Scripts")
end
export_rxdata("Data/Scripts.rxdata")
其中里面RXDATA 可以改成RVDATA RVDATA2 来导出 VX 和 VA 的脚本 现在这个默认是导出XP的
# -*- encoding: utf-8 -*- require "kconv" require "zlib" require "date" scripts = [] index = 0 Dir.entries("Scripts").sort.each {|file| next if file=="." || file==".." next if file !~ /\.rb$/ filename = file.toutf8 filename.slice!(".rb") filename = filename[5..-1] script = File.read("Scripts/#{file}") raw = [index, filename, Zlib::Deflate.deflate(script)] scripts.push(raw) index += 1 } if FileTest.exists?("Data/Scripts.rxdata") File.rename("Data/Scripts.rxdata", "Data/Scripts.rxdata_"+DateTime.now.strftime("%Y%m%d_%H%M%S")) end File.open("Data/Scripts.rxdata", "wb") {|output| Marshal.dump(scripts, output) }
# -*- encoding: utf-8 -*-
require "kconv"
require "zlib"
require "date"
scripts = []
index = 0
Dir.entries("Scripts").sort.each {|file|
next if file=="." || file==".."
next if file !~ /\.rb$/
filename = file.toutf8
filename.slice!(".rb")
filename = filename[5..-1]
script = File.read("Scripts/#{file}")
raw = [index, filename, Zlib::Deflate.deflate(script)]
scripts.push(raw)
index += 1
}
if FileTest.exists?("Data/Scripts.rxdata")
File.rename("Data/Scripts.rxdata", "Data/Scripts.rxdata_"+DateTime.now.strftime("%Y%m%d_%H%M%S"))
end
File.open("Data/Scripts.rxdata", "wb") {|output|
Marshal.dump(scripts, output)
}
使用方法同上 |