Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.
|
|
| [Xp] Mencegah Crash karena File yang ilang | |
| 2010-12-25, 12:02 | [Xp] Mencegah Crash karena File yang ilang |
---|
LiTTleDRAgo Senior
Posts : 712 Thanked : 27 Engine : RMXP Skill : Skilled Type : Scripter
Awards:
| No Missing File Crash Versi: ?? Tipe: Auk ah PengenalanEntah karena apa gw ngepost ini skrip Ini skrip bisa dipake juga kalo kk pingin uplot game tp resourcenya kegedean (kyk audio) jadi kk bisa uplot game secara terpisah ama resourcenya
Fitur
- Kalo ada file yang ilang, game ga bakalan crash
Screenshots Scripts - Code:
-
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # No Crash from Missing Files # Version: Auk ah gelap #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
module RPG::Cache class << self alias_method :drago_load_bitmap, :load_bitmap def load_bitmap(x, y, h = 0); drago_load_bitmap(x, y, h) rescue; return no_bitmap; end; def no_bitmap @cache['bitmap'] = Bitmap.new(1, 1) if !@cache['bitmap'] || @cache['bitmap'].disposed?; return @cache['bitmap'] end end end
module Audio class << self alias_method :xbgm_play, :bgm_play; alias_method :xmes_play, :me_play alias_method :xbgs_play, :bgs_play; alias_method :xses_play, :se_play def bgm_play(f, v=100, p=100); xbgm_play(f, v, p);rescue; end def bgs_play(f, v=100, p=100); xbgs_play(f, v, p);rescue; end def me_play (f, v=100, p=100); xmes_play(f, v, p);rescue; end def se_play (f, v=100, p=100); xses_play(f, v, p);rescue; end end end taruh dimana aja kecuali dibawah main Credits
Terakhir diubah oleh LiTTleDRAgo tanggal 2011-01-25, 19:35, total 3 kali diubah |
| | | 2010-12-25, 12:06 | Re: [Xp] Mencegah Crash karena File yang ilang |
---|
Yaden Legendary
Posts : 2056 Thanked : 17 Engine : RMVX Skill : Very Beginner Type : Artist
| BTW PERTAMAX~!! ooh.. apa ini pencegahan penghapusan event tanpa graphic?? atau apakah? aku kurang mengerti.. yang pasti anda selalu membawa script yang bagus dan mudah dipakai.. |
| | | 2010-12-25, 12:13 | Re: [Xp] Mencegah Crash karena File yang ilang |
---|
LiTTleDRAgo Senior
Posts : 712 Thanked : 27 Engine : RMXP Skill : Skilled Type : Scripter
Awards:
| kagak, misalnya situ bikin satu NPC, nah graphic NPC itu kedelete / hilang / corrupt kalo situ mainin kan ntar error, nah script ini ngebypass error tadi jadi bisa terus main |
| | | 2010-12-25, 12:14 | Re: [Xp] Mencegah Crash karena File yang ilang |
---|
TheoAllen ♫ RMID Rebel ♫
Posts : 4935 Thanked : 63
Awards:
| ini hanya untuk file grapic duank ato yang laen? semisal Audio yang kedelet gitu bisa ga? |
| | | 2010-12-25, 12:21 | Re: [Xp] Mencegah Crash karena File yang ilang |
---|
LiTTleDRAgo Senior
Posts : 712 Thanked : 27 Engine : RMXP Skill : Skilled Type : Scripter
Awards:
| yap bisa juga, kalo bgm ilang yaa ga ada suaranya semacam itulah |
| | | 2010-12-25, 12:27 | Re: [Xp] Mencegah Crash karena File yang ilang |
---|
Yaden Legendary
Posts : 2056 Thanked : 17 Engine : RMVX Skill : Very Beginner Type : Artist
| hoo.. bermanfaaat juga.. berarti ini kan cuma bypass dengan mengabaikan resos yang hilang?? gimana tuh kalo resos penting.. |
| | | 2010-12-25, 12:34 | Re: [Xp] Mencegah Crash karena File yang ilang |
---|
LiTTleDRAgo Senior
Posts : 712 Thanked : 27 Engine : RMXP Skill : Skilled Type : Scripter
Awards:
| yaa paling jadinya ntar graphicnya aneh npc tembus pandang |
| | | 2010-12-25, 12:37 | Re: [Xp] Mencegah Crash karena File yang ilang |
---|
nisamerica Living Skeleton
Posts : 1668 Thanked : 25 Engine : RMVX Skill : Very Beginner Type : Artist
Awards:
| Wow~ Wow~ Ini script keren, bagus buat yang bikin game dengan file MP3 musik super gede (kaya gwa ) Jadi ga perlu bikin dua versi buat versi muted game, dan file musik dan game bisa didonlod secara terpisah Cedolled!! Ternyata masih ada scripter hebat yang masih aktif di XP, thanks!! |
| | | 2010-12-25, 12:47 | Re: [Xp] Mencegah Crash karena File yang ilang |
---|
LiTTleDRAgo Senior
Posts : 712 Thanked : 27 Engine : RMXP Skill : Skilled Type : Scripter
Awards:
| yap seperti itulah fungsinya |
| | | 2010-12-25, 15:36 | Re: [Xp] Mencegah Crash karena File yang ilang |
---|
rexoholic Advance
Posts : 330 Thanked : 2 Engine : Multi-Engine User Skill : Beginner Type : Jack of All Trades
| skripnya hebat euy...berguna banget misalnya ada orang yang gamenya punya resos buanyak.wew kk ngebikin skripnya mantep2 semua !you are a cool scripter bro! |
| | | 2011-01-25, 18:26 | Re: [Xp] Mencegah Crash karena File yang ilang |
---|
rusted_71 Scripter Karatan
Posts : 392 Thanked : 11 Engine : RMVX Skill : Beginner Type : Scripter
| sorry neh nambahin dikit... eh ternyata yang audionya ga kebaca... perasaan gw pernah nemuin script yang dah sejenis ini deh... ntar cari dulu ya... coba cek ini deh... - Spoiler:
- Code:
-
#============================================================================== # ** Missing File Logger #------------------------------------------------------------------------------ # by Fantasist # Version: 1.0 # Date: 1-Mar-2009 #------------------------------------------------------------------------------ # Version History: # # 1.0 - First version #------------------------------------------------------------------------------ # Description: # # This script prevents the game from crashing due to missing files. It also # maintains a list of missing files. It can create a text file listing all # the lissing files, the latest time they were used and the number of times # they were used. It can also check for all the missing files. It any files # are found, they are removed from the list. #------------------------------------------------------------------------------ # Compatibility: # # Should be compatible with almost everything. #------------------------------------------------------------------------------ # Instructions: # # Place this script anywhere above "Main". I recommend you place it on top # of all scripts. # # You can save the collected data by using the following code: # FTSConfig.save_missing_file_data # # You can create a readable log file by using the following code: # FTSConfig.write_missing_file_data # # You can check if any of the missing files are found by using: # FTSConfig.check_missing_files #------------------------------------------------------------------------------ # Configuration: # # Scroll down a bit for the configuration. # # RESCUE_BITMAP(true/false): Whether an X is shown in place of a missing file. # SAVE_FREQUENCY_TYPE(0/1): # 0: Saves the data to a file when the game exits. (FOLLOW EXTRA STEPS!!) # 1: Saves the data to a file each time a missing resource is used. # # Extra Steps: # Go to "Main". Erase the last line ("end") and paste the following code: =begin #===========Start copying from here=========== ensure FTSConfig.save_missing_file_data FTSConfig.write_missing_file_data end #=====================END===================== =end # # NOTE: # # The data will be saved when: # - You close the game normally. # - You use Alt+F4 to close the game. # - The game crashes but an but some error message is displayed. # # The data will NOT be saved when: # - You close the game by using the "End Task" command from the Task Manager #------------------------------------------------------------------------------ # Issues: # # None. #------------------------------------------------------------------------------ # Credits and Thanks: # # Credits: Fantasist for making this. #------------------------------------------------------------------------------ # Notes: # # If you have any questions, suggestions or comments, you can # find me (Fantasist) at: # # - www.chaos-project.com # - www.quantumcore.forumotion.com # # Enjoy ^_^ #==============================================================================
#============================================================================== # ** FTSConfig #==============================================================================
module FTSConfig #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # * CONFIG BEGIN #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: RESCUE_BITMAP = true SAVE_FREQUENCY_TYPE = 0 #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # * CONFIG END #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: #-------------------------------------------------------------------------- # * Load Missing File Data #-------------------------------------------------------------------------- def self.load_missing_file_data if @missing_file_data == nil @missing_file_data = {} else f = File.open('Data/Missing File Data.rxdata', 'r') @missing_file_data = Marshal.load(f) f.close end self.check_missing_files end #-------------------------------------------------------------------------- # * Save Missing File Data #-------------------------------------------------------------------------- def self.save_missing_file_data f = File.open('Data/Missing File Data.rxdata', 'w') Marshal.dump(@missing_file_data, f) f.close end #-------------------------------------------------------------------------- # * Check Missing Files #-------------------------------------------------------------------------- def self.check_missing_files @missing_file_data.each_key do |key| @missing_file_data.delete(key) if FileTest.exist?(key) end end #-------------------------------------------------------------------------- # * Log Missing File #-------------------------------------------------------------------------- def self.log_missing_file(key) time = Time.now.strftime("%b-%d-%Y, %I:%M:%S") if @missing_file_data[key] == nil @missing_file_data[key] = [time, 1] else used_times = @missing_file_data[key][1] @missing_file_data[key] = [time, used_times + 1] end end #-------------------------------------------------------------------------- # * Write Missing File Data #-------------------------------------------------------------------------- def self.write_missing_file_data f = File.open('Missing File Log.txt', 'w') if @missing_file_data.empty? f.write('No files are missing.') else @missing_file_data.sort.each {|key, data| time, used = data[0], data[1] f.write("#{time} [#{used}]: #{key}\n")} end f.close end #-------------------------------------------------------------------------- # * Load Missing File Data on Startup #-------------------------------------------------------------------------- self.load_missing_file_data end
#============================================================================== # ** RPG::Cache #==============================================================================
module RPG::Cache class << self #-------------------------------------------------------------------------- # * Aliases #-------------------------------------------------------------------------- alias fts_mfl_cache_load_bitmap load_bitmap #-------------------------------------------------------------------------- # * Load Bitmap #-------------------------------------------------------------------------- def load_bitmap(folder_name, filename, hue = 0) fts_mfl_cache_load_bitmap(folder_name, filename, hue) rescue FTSConfig.log_missing_file(folder_name + filename) if FTSConfig::SAVE_FREQUENCY_TYPE == 1 FTSConfig.save_missing_file_data end return rescue_bitmap end #-------------------------------------------------------------------------- # * Rescue Bitmap #-------------------------------------------------------------------------- def rescue_bitmap if @cache['rescue_bitmap'] == nil || @cache['rescue_bitmap'].disposed? b = Bitmap.new(24, 24) if FTSConfig::RESCUE_BITMAP b.fill_rect(b.rect, Color.new(255, 255, 255)) b.width.times {|i| b.set_pixel(i, i, Color.new(255, 0, 0)) b.set_pixel(i, b.height-i, Color.new(255, 0, 0))} end @cache['rescue_bitmap'] = b end return @cache['rescue_bitmap'] end end end
#============================================================================== # ** Audio #==============================================================================
module Audio class << self #-------------------------------------------------------------------------- # * Aliases #-------------------------------------------------------------------------- alias fts_mfl_audio_bgm_play bgm_play alias fts_mfl_audio_bgs_play bgs_play alias fts_mfl_audio_me_play me_play alias fts_mfl_audio_se_play se_play #-------------------------------------------------------------------------- # * Play Background Music #-------------------------------------------------------------------------- def bgm_play(filename, volume=100, pitch=100) fts_mfl_audio_bgm_play(filename, volume, pitch) rescue FTSConfig.log_missing_file(filename) end #-------------------------------------------------------------------------- # * Play Background Sound #-------------------------------------------------------------------------- def bgs_play(filename, volume=100, pitch=100) fts_mfl_audio_bgs_play(filename, volume, pitch) rescue FTSConfig.log_missing_file(filename) end #-------------------------------------------------------------------------- # * Play Play Music Effect #-------------------------------------------------------------------------- def me_play(filename, volume=100, pitch=100) fts_mfl_audio_me_play(filename, volume, pitch) rescue FTSConfig.log_missing_file(filename) end #-------------------------------------------------------------------------- # * Play Sound Effect #-------------------------------------------------------------------------- def se_play(filename, volume=100, pitch=100) fts_mfl_audio_se_play(filename, volume, pitch) rescue FTSConfig.log_missing_file(filename) end end end
di coba deh... (ga ada RM di laptop seh) trus dia juga bisa bikin log file mana aja yang ilang...
Terakhir diubah oleh rusted_71 tanggal 2011-01-25, 18:32, total 2 kali diubah (Reason for editing : baru nemu) |
| | | | Re: [Xp] Mencegah Crash karena File yang ilang |
---|
Sponsored content
| | | | | [Xp] Mencegah Crash karena File yang ilang | |
|
Similar topics | |
|
Similar topics | |
| |
Halaman 1 dari 1 | |
| Permissions in this forum: | Anda tidak dapat menjawab topik
| |
| |
Latest 10 Topics | [Web Novel] Gloria Infidelis 2016-11-17, 21:27 by LightNightKnight
[Announcement] Forum baru untuk RMID 2016-08-25, 16:39 by TheoAllen
Where I'm Wrong ? 2016-07-24, 16:10 by ReydVires
flakeheartnet's Resources part III 2016-07-08, 14:30 by flakeheartnet
Keira's Art Warehouse 2016-06-28, 19:27 by KeiraBlaze
Theo Core Time System + Bingung 2016-06-27, 16:24 by Lockin
Error Script, Maybe ? 2016-06-27, 16:20 by Lockin
Nusaimoe @ RMID Lounge 2016-06-21, 05:02 by Jihad Bagas
Call Random Battle 2016-06-15, 17:04 by Lockin
Flakeheartnet Resources Part II [come back gift] 2016-06-07, 15:51 by flakeheartnet
|
Statistics
|
Members: [ 4947 ]
Topics: [ 8258 ]
Posts: [ 112606 ]
Newest member: [ https://rmid.forumotion.net/u4968 ]
|
|
|
|
|
|