QUOTE (berka @ Jul 1 2009, 01:08 PM)

in ruby:
CODE
require "zlib"
$scripts={}
File.open("Scripts.rvdata", "rb") { |f|
Marshal.load(f).each{|s| $scripts[s[1]]=Zlib::Inflate.inflate(s[2])}
}
p $scripts
it creates an hash:
$script[sectionname]=>code
and you can write files as:
CODE
require "zlib"
$scripts={}
File.open("Scripts.rvdata", "rb") { |f|
Marshal.load(f).each{|s| $scripts[s[1]]=Zlib::Inflate.inflate(s[2])}
}
Dir.mkdir("Scripts") rescue nil
$scripts.each_pair{|k,v|File.open("Scripts/#{k}.txt","wb")<<v}
berka
Hi,
is possible to get the code for CommonEvents.rvdata into txt files or one file?
I tried it similar to this, but i can`t do it. I tried it with $data_common_events, but i think i don`t know exactly how.
maybe it needs some other argument, but i don`t know. I know little of ruby, but I really need this.
So if I can get the code for this it would be really great

Thnx