# ============================================================================= # TheoAllen - Message Sound Effect Code # Version : 1.0 # Contact : www.rpgmakerid.com (or) http://theolized.blogspot.com # (This script documentation is written in informal indonesian language) # ============================================================================= ($imported ||= {})[:Theo_MsgSECode] = true # ============================================================================= # CHANGE LOGS: # ----------------------------------------------------------------------------- # 2013.10.08 - Finished script # ============================================================================= =begin Perkenalan : Script ini ngebikin kamu bisa ngeplay SE pas text diketik dalam message box Cara penggunaan : Pasang dibawah material namun diatas main Edit konfigurasinya untuk mencatat SE yang akan kamu gunain Gunakan kode \SE[index] dimana index adalah database SE yang ada dalam konfigurasi dibawah Terms of use : Credit gw, TheoAllen. Kalo semisal u bisa ngedit2 script gw trus jadi lebih keren, terserah. Ane bebasin. Asal ngga ngeklaim aja. Kalo semisal mau dipake buat komersil, jangan lupa, gw dibagi gratisannya. =end # ============================================================================= # Konfigurasi : # ============================================================================= class Window_Message < Window_Base # <-- Jangan disentuh # ---------------------------------------------------------------------------- # Catat SE yang akan digunakan disini SE_Names = { # index => ["SE Name", Volume, Pitch], 1 => ["Absorb1", 100, 100], # Tambahin sendiri } # <-- Jangan disentuh # ============================================================================= # Akhir dari konfigurasi # ============================================================================= alias theo_msgsound_process_esc_char process_escape_character def process_escape_character(code, text, pos) theo_msgsound_process_esc_char(code, text, pos) case code.upcase when 'SE' play_se(obtain_escape_param(text)) rescue show_play_se_error end end def play_se(index) name = SE_Names[index][0] vol = SE_Names[index][1] pitch = SE_Names[index][2] RPG::SE.new(name,vol,pitch).play end def show_play_se_error msgbox "Error: Invalid SE index" SceneManager.exit end end