Автор: Caveman
Описание: Позволяет запускать SE файл через тег \s[name] прямо в сообщении, и при закрытии окна сообщения, останавливает и проигрывание файла. Аналог без скрипта - перед каждой фразой запускать SE файл командой, после неё - останавливать.
Инструкция: Код (положить в Materials)
Код:class Window_Base #-------------------------------------------------------------------------- # * Control Character Processing # code : the core of the control character # e.g. "C" in the case of the control character \C[1]. #-------------------------------------------------------------------------- def process_escape_character(code, text, pos) case code.upcase when 'C' change_color(text_color(obtain_escape_param(text))) when 'I' process_draw_icon(obtain_escape_param(text), pos) when '{' make_font_bigger when '}' make_font_smaller when 'S' play_voice(obtain_escape_text(text)) end end def play_voice(name) @voice_playing = true Audio.se_play(sprintf("Audio/SE/%s.mp3", name)) end def obtain_escape_text(text) text.slice!(/^\[\w+\]/) [/\w+/] end end class Window_Message #-------------------------------------------------------------------------- # * Input Pause Processing #-------------------------------------------------------------------------- def input_pause self.pause = true wait(10) Fiber.yield until Input.trigger?(:B) || Input.trigger?(:C) Input.update if @voice_playing != nil && @voice_playing @voice_playing = false Audio.se_stop end self.pause = false end end
Скачать: https://yadi.sk/d/W8VUo1_v8eAq4