LZ还放了哪些脚本? ‘‘──chd120于2012-6-5 13:30补充以下内容: 有些脚本会和其他脚本冲突,比如AWRP伤害显示和地图显示事件名 ’’ ‘‘──chd120于2012-6-5 13:44补充以下内容: 我发誓LZ你绝对没关闭这个帖子 ’’ |
试着用用”容错脚本第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 |
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2025-2-28 00:57
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.