VX 스크립트

11.PNG

 

이번 스크립트는 메시지가 출력될때 기본족으로 오른쪽정렬되어 출력되게 하는 스크립트입니다.

 

사용법은 스크립트만 추가시켜 주시면 적용이 됩니다. ^^

 

 

=begin
                        Arabic Reading Right to left

Author: Bulletxt
Version: 0.4
Date: 11/07/2009
=end

# this is an id switch, if ON it will reverse the letters of a word.
# example: "Hello World" will be "olleH dlroW"
REVERSE_LETTERS_OF_WORD = 1

############################## END CONFIGURATION ###############################

class Window_Message < Window_Selectable

  #--------------------------------------------------------------------------
  # * Start Message
  #--------------------------------------------------------------------------
  def start_message
    @text = ""
    for i in 0...$game_message.texts.size
      @text += "    " if i >= $game_message.choice_start
      m = $game_message.texts.shift

      m = m.split(//u).reverse.join
      m = m.split(/ /).map { |w| w.split(//u).reverse.join}.join(' ') if $game_switches[REVERSE_LETTERS_OF_WORD]
      
      #debug sentance
      #p sprintf (m)
      @text += m + "x00"

    end
    @item_max = $game_message.choice_max
    convert_special_characters
    reset_window
    new_page
  end
  
  #--------------------------------------------------------------------------
  # * New Page
  #--------------------------------------------------------------------------
  def new_page
    contents.clear
    if $game_message.face_name.empty?
      @contents_x = 512
    else
      name = $game_message.face_name
      index = $game_message.face_index
      draw_face(name, index, 416, 0)
      @contents_x = 406
    end
    @contents_y = 0
    @line_count = 0
    @show_fast = false
    @line_show_fast = false
    @pause_skip = false
    contents.font.color = text_color(0)
  end
  #--------------------------------------------------------------------------
  # * New Line
  #--------------------------------------------------------------------------
  def new_line
    if $game_message.face_name.empty?
      @contents_x = 512
    else
      @contents_x = 406
    end
    @contents_y += WLH
    @line_count += 1
    @line_show_fast = false
  end

  #--------------------------------------------------------------------------
  # * Update Message
  #--------------------------------------------------------------------------
  def update_message
    loop do
      c = @text.slice!(/./m)            # Get next text character
      case c
      when nil                          # There is no text that must be drawn
        finish_message                  # Finish update
        break
      when "x00"                       # New line
        new_line
        if @line_count >= MAX_LINE      # If line count is maximum
          unless @text.empty?           # If there is more
            self.pause = true           # Insert number input
            break
          end
        end
      when "x01"                       # C[n]  (text character color change)
        @text.sub!(/[([0-9]+)]/, "")
        contents.font.color = text_color($1.to_i)
        next
      when "x02"                       # G  (gold display)
        @gold_window.refresh
        @gold_window.open
      when "x03"                       # .  (wait 1/4 second)
        @wait_count = 15
        break
      when "x04"                       # |  (wait 1 second)
        @wait_count = 60
        break
      when "x05"                       # !  (Wait for input)
        self.pause = true
        break
      when "x06"                       # >  (Fast display ON)
        @line_show_fast = true
      when "x07"                       # <  (Fast display OFF)
        @line_show_fast = false
      when "x08"                       # ^  (No wait for input)
        @pause_skip = true
      else                              # Normal text character
        c_width = contents.text_size(c).width
        @contents_x -= c_width
        contents.draw_text(@contents_x, @contents_y, 40, WLH, c)

      end
      break unless @show_fast or @line_show_fast
    end
  end
  
end
Comment '3'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
337 전투 사이드뷰배틀에서 찌르기 공격 가능하게 7 078656577er 2009.09.16 3223
336 타이틀/게임오버 Graphics Load System 1.0.1 14 file NightWind AYARSB 2010.06.10 3230
335 기타 <중수이상>RPG VX의 대표적 참조값 6 까까까 2009.05.31 3236
» 메시지 메시지 오른쪽 정렬되어 나오는 스크립트 3 file 아방스 2009.07.12 3237
333 기타 [kcg] 슬립 데미지 상세화 19 BoneheadedAlien 2009.02.22 3242
332 기타 라이트 이펙트 스크립트 12 file 아방스 2009.02.07 3262
331 상태/속성 어떤 상태일때에만 사용가능한 스킬 14 file 좀비사냥꾼 2009.03.25 3266
330 이동 및 탈것 탈것탑승후 내부로 이동하는 스크립트 16 file 카르와푸딩의아틀리에 2009.07.01 3268
329 기타 KGC파라미터배분 2 (VX전용) 20 file 카르와푸딩의아틀리에 2009.07.21 3269
328 다음 레벨까지의 경험치 강제조정 13 정의로운녀석 2008.07.24 3273
327 액터 한계돌파(렙9999) 18 작은샛별 2010.03.07 3273
326 장비 장비 레벨 개념 추가 스크립트 14 아방스 2010.12.06 3275
325 이름입력 MOG 이름바꾸기 11 file RPGbooster 2008.10.08 3285
324 스킬 DQ특기풍스킬 - KGC 4 카르와푸딩의아틀리에 2009.08.19 3288
323 저장 세이브/로드가 불가능한 스크립트!!! 9 file ~AYARSB~ 2010.03.08 3298
322 아이템 아이템 분류 19 file RPGbooster 2008.10.11 3309
321 저장 세이브 시스템 확장 스크립트 9 file 신규회원 2012.02.24 3315
320 상태/속성 MOG - Menu Status V 2.0 16 아방스 2011.01.01 3316
319 타이틀/게임오버 심플한 게임오버화면 28 file RPGbooster 2008.10.08 3328
318 기타 높이(층)를 설정하는 스크립트 11 file 카르와푸딩의아틀리에 2009.07.01 3343
Board Pagination Prev 1 ... 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ... 32 Next
/ 32