class Interpreter 
 alias sailcat_clear clear 
 def clear 
   sailcat_clear 
   @line_max = 4  # 信息最大行数 
 end 
 #-------------------------------------------------------------------------- 
 # ● 显示文章 
 #-------------------------------------------------------------------------- 
 def command_101 
   # 另外的文章已经设置过 message_text 的情况下 
   if $game_temp.message_text != nil 
     # 结束 
     return false 
   end 
   # 设置信息结束后待机和返回调用标志 
   @message_waiting = true 
   $game_temp.message_proc = Proc.new { @message_waiting = false } 
   # message_text 设置为第 1 行 
   $game_temp.message_text = @list[@index].parameters[0] + "\n" 
   line_count = 1       
   # 循环 
   loop do 
     # 下一个事件指令为文章两行以上的情况 
     if @list[@index+1].code == 401 
       # message_text 添加到第 2 行以下 
       $game_temp.message_text += @list[@index+1].parameters[0] + "\n" 
       line_count += 1 
     # 下一个事件指令为显示文章并且是长文的情况 
     elsif @line_max != 4 and @list[@index+1].code == 101 
       # 如果文章长度足够 
       if line_count < @line_max 
         # message_text 添加到现有文章以后 
         $game_temp.message_text += @list[@index+1].parameters[0] + "\n" 
         line_count += 1 
       # 文章长度不够的情况下 
       else 
         # 继续 
         return true 
       end 
     # 事件指令不在文章两行以下的情况 
     else 
       # 下一个事件指令为显示选择项的情况下 
       if @list[@index+1].code == 102 
         # 如果选择项能收纳在画面里 
         if @list[@index+1].parameters[0].size <= @line_max - line_count 
           # 推进索引 
           @index += 1 
           # 设置选择项 
           $game_temp.choice_start = line_count 
           setup_choices(@list[@index].parameters) 
         end 
       # 下一个事件指令为处理输入数值的情况下 
       elsif @list[@index+1].code == 103 
         # 如果数值输入窗口能收纳在画面里 
         if line_count < @line_max 
           # 推进索引 
           @index += 1 
           # 设置输入数值 
           $game_temp.num_input_start = line_count 
           $game_temp.num_input_variable_id = @list[@index].parameters[0] 
           $game_temp.num_input_digits_max = @list[@index].parameters[1] 
         end 
       end 
       # 继续 
       return true 
     end 
     # 推进索引 
     @index += 1 
   end 
 end 
 #-------------------------------------------------------------------------- 
 # ● 注释 
 #-------------------------------------------------------------------------- 
 def command_108 
   # 注释关键字解释 
   case @parameters[0] 
   # 长文开始标记 
   when "LN_start" 
     if $game_temp.in_battle 
       @line_max = 4 
     else 
       case $game_system.message_position 
       when 0 
         @line_max = 12 
       when 1 
         @line_max = 8 
       when 2 
         @line_max = 4 
       end 
     end 
   # 长文结束标记 
   when "LN_end" 
     @line_max = 4 
   end 
   # 继续 
   return true 
 end 
end