Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # =============================================================================
- # TheoAllen - Disable Event Command
- # Version : 1.0
- # Contact : www.rpgmakerid.com (or) http://theolized.blogspot.com
- # (This script documentation is written in informal indonesian language)
- # =============================================================================
- ($imported ||= {})[:Theo_DisableEventCmd] = true
- # =============================================================================
- # CHANGE LOGS:
- # -----------------------------------------------------------------------------
- # 2013.10.14 - Finished script
- # =============================================================================
- =begin
- Perkenalan :
- Script ini untuk ngedisable command yang ada dalam event untuk keperluan
- debugging.
- Cara penggunaan :
- Pasang script ini dibawah material namun diatas main
- Gunakan label <event skip> untuk memulai skip event command yang ga dipake
- Gunakan label </event skip> untuk mengakhiri skip event command
- Terms of use :
- Ini cuman buat debuggging doank. Ga dikredit pun gapapa :v
- =end
- # =============================================================================
- # Tidak ada konfigurasi
- # =============================================================================
- class Game_Interpreter
- alias theo_decmd_init initialize
- def initialize(*args)
- theo_decmd_init(*args)
- @event_skip = false
- end
- alias theo_decmd_118 command_118
- def command_118
- theo_decmd_118
- if !(@params[0] =~ /<event skip>/i).nil?
- @event_skip = true
- elsif !(@params[0] =~ /<\/event skip>/i).nil?
- @event_skip = false
- end
- end
- alias theo_decmd_exe_cmd execute_command
- def execute_command
- return skip_event_command if @event_skip
- return theo_decmd_exe_cmd
- end
- def skip_event_command
- command = @list[@index]
- @params = command.parameters
- @indent = command.indent
- if command.code == 118
- method_name = "command_#{command.code}"
- send(method_name) if respond_to?(method_name)
- else
- command_skip
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment