赞 | 0 |
VIP | 4 |
好人卡 | 6 |
积分 | 0 |
经验 | 9089 |
最后登录 | 2013-11-19 |
在线时间 | 186 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 49
- 在线时间
- 186 小时
- 注册时间
- 2012-5-8
- 帖子
- 987
|
试着用用”容错脚本第3版“可能会有用处。
#==============================================================================
# ■ 容错脚本第3版 BY 轮回者
#------------------------------------------------------------------------------
# 本脚本基于星大叔的容错脚本第2版,区别只是“下手”的地方不同而已。
# 说明请参看星大叔的容错脚本第2版。
#==============================================================================
$need_file_bitmap = []
if FileTest.exist?("log_bitmap.txt")
f = File.open("./log_bitmap.txt","r")
$need_file_bitmap = f.read.split(/\n/)
f.close
end
module Graphics
@transition = method("transition")
def self.transition(*arg)
begin
@transition.call(*arg)
rescue Errno::ENOENT
ary=[*arg]
filename=ary[1]
unless $need_file_bitmap.include?(filename)
$need_file_bitmap.push(filename)
f = File.open("./log_bitmap.txt","a")
f.write(filename + "\n")
f.close
end
@transition.call(ary[0])
end
end
end
class Bitmap < Object
alias ini initialize
def initialize(*arg)
begin
ini(*arg)
rescue Errno::ENOENT
filename=[*arg][0]
unless $need_file_bitmap.include?(filename)
$need_file_bitmap.push(filename)
f = File.open("./log_bitmap.txt","a")
f.write(filename + "\n")
f.close
end
ini(32,32)
end
end
end
$need_file_audio = []
if FileTest.exist?("log_audio.txt")
f = File.open("./log_audio.txt","r")
$need_file_audio = f.read.split(/\n/)
f.close
end
module Audio
@me_play = method("me_play")
def self.me_play(*arg)
begin
@me_play.call(*arg)
rescue Errno::ENOENT
filename=[*arg][0]
unless $need_file_audio.include?(filename)
$need_file_audio.push(filename)
f = File.open("./log_audio.txt","a")
f.write(filename + "\n")
f.close
end
me_stop
end
end
@bgm_play = method("bgm_play")
def self.bgm_play(*arg)
begin
@bgm_play.call(*arg)
rescue Errno::ENOENT
filename=[*arg][0]
unless $need_file_audio.include?(filename)
$need_file_audio.push(filename)
f = File.open("./log_audio.txt","a")
f.write(filename + "\n")
f.close
end
bgm_stop
end
end
@se_play = method("se_play")
def self.se_play(*arg)
begin
@se_play.call(*arg)
rescue Errno::ENOENT
filename=[*arg][0]
unless $need_file_audio.include?(filename)
$need_file_audio.push(filename)
f = File.open("./log_audio.txt","a")
f.write(filename + "\n")
f.close
end
se_stop
end
end
@bgs_play = method("bgs_play")
def self.bgs_play(*arg)
begin
@bgs_play.call(*arg)
rescue Errno::ENOENT
filename=[*arg][0]
unless $need_file_audio.include?(filename)
$need_file_audio.push(filename)
f = File.open("./log_audio.txt","a")
f.write(filename + "\n")
f.close
end
bgs_stop
end
end
end
|
|