XP 스크립트





그림의 2에서 보면 플레이어가 메세지창의 가려서
잘 안보이는걸 보실수 있을겁니다


애니메이션등을 사용할때 메세지창에 가려저서
잘 안보이면 이상하겠죠?

그래서 문장옵션을 일일이 지정하는데
그 번거로움을 해소 시키기위한 스크립트 입니다.


#==============================================================================
# 걾 Window_Message
#------------------------------------------------------------------------------
# ?빒뤞?렑궸럊궎긽긞긜?긙긂귻깛긤긂궳궥갃
#==============================================================================

class Window_Message < Window_Selectable
# Start
  #==========================================================================
  # 걶 믦릶궻먠믦
  #==========================================================================
    # 롥릐뚺궻됪뽋뤵Y띆뷭궕댥돷궻릶뭠댥뤵궻렄갂긽긞긜?긙긂귽깛긤긂궕뤵궸?렑궠귢귏궥갃
    UP_DW_POS = 10
# End
  #--------------------------------------------------------------------------
  # 걶 긆긳긙긃긏긣룊딖돸
  #--------------------------------------------------------------------------
  def initialize
    super(80, 304, 480, 160)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.visible = false
    self.z = 9998
    @fade_in = false
    @fade_out = false
    @contents_showing = false
    @cursor_width = 0
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # 걶 됶뺳
  #--------------------------------------------------------------------------
  def dispose
    terminate_message
    $game_temp.message_window_showing = false
    if @input_number_window != nil
      @input_number_window.dispose
    end
    super
  end
  #--------------------------------------------------------------------------
  # 걶 긽긞긜?긙뢎뿹룉뿚
  #--------------------------------------------------------------------------
  def terminate_message
    self.active = false
    self.pause = false
    self.index = -1
    self.contents.clear
    # ?렑뭷긲깋긐귩긏깏귺
    @contents_showing = false
    # 긽긞긜?긙 긓?깑긫긞긏귩뚁귆
    if $game_temp.message_proc != nil
      $game_temp.message_proc.call
    end
    # 빒뤞갂멗묖럥갂릶뭠볺쀍궸듫궥귡빾릶귩긏깏귺
    $game_temp.message_text = nil
    $game_temp.message_proc = nil
    $game_temp.choice_start = 99
    $game_temp.choice_max = 0
    $game_temp.choice_cancel_type = 0
    $game_temp.choice_proc = nil
    $game_temp.num_input_start = 99
    $game_temp.num_input_variable_id = 0
    $game_temp.num_input_digits_max = 0
    # 긕?깑긤긂귻깛긤긂귩둎뺳
    if @gold_window != nil
      @gold_window.dispose
      @gold_window = nil
    end
  end
  #--------------------------------------------------------------------------
  # 걶 깏긲깒긞긘깄
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    x = y = 0
    @cursor_width = 0
    # 멗묖럥궶귞럻돷궛귩뛱궎
    if $game_temp.choice_start == 0
      x = 8
    end
    # ?렑뫲궭궻긽긞긜?긙궕궇귡뤾뜃
    if $game_temp.message_text != nil
      text = $game_temp.message_text
      # 맕뚥빒럻룉뿚
      begin
        last_text = text.clone
        text.gsub!(/\[Vv][([0-9]+)]/) { $game_variables[$1.to_i] }
      end until text == last_text
      text.gsub!(/\[Nn][([0-9]+)]/) do
        $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
      end
      # 뺇딿뤵갂"\\" 귩 "00" 궸빾듂
      text.gsub!(/\\/) { "00" }
      # "\C" 귩 "01" 궸갂"\G" 귩 "02" 궸빾듂
      text.gsub!(/\[Cc][([0-9]+)]/) { "01[#{$1}]" }
      text.gsub!(/\[Gg]/) { "02" }
      # c 궸 1 빒럻귩롦벦 (빒럻궕롦벦궳궖궶궘궶귡귏궳깑?긵)
      while ((c = text.slice!(/./m)) != nil)
        # \ 궻뤾뜃
        if c == "00"
          # ?뿀궻빒럻궸뽣궥
          c = "\"
        end
        # C[n] 궻뤾뜃
        if c == "01"
          # 빒럻륡귩빾뛛
          text.sub!(/[([0-9]+)]/, "")
          color = $1.to_i
          if color >= 0 and color <= 7
            self.contents.font.color = text_color(color)
          end
          # 렅궻빒럻귉
          next
        end
        # G 궻뤾뜃
        if c == "02"
          # 긕?깑긤긂귻깛긤긂귩띿맟
          if @gold_window == nil
            @gold_window = Window_Gold.new
            @gold_window.x = 560 - @gold_window.width
            if $game_temp.in_battle
              @gold_window.y = 192
            else
              @gold_window.y = self.y >= 128 ? 32 : 384
            end
            @gold_window.opacity = self.opacity
            @gold_window.back_opacity = self.back_opacity
          end
          # 렅궻빒럻귉
          next
        end
        # 둂뛱빒럻궻뤾뜃
        if c == "n"
          # 멗묖럥궶귞긇??깑궻븴귩뛛륷
          if y >= $game_temp.choice_start
            @cursor_width = [@cursor_width, x].max
          end
          # y 궸 1 귩돿럁
          y += 1
          x = 0
          # 멗묖럥궶귞럻돷궛귩뛱궎
          if y >= $game_temp.choice_start
            x = 8
          end
          # 렅궻빒럻귉
          next
        end
        # 빒럻귩?됪
        self.contents.draw_text(4 + x, 32 * y, 40, 32, c)
        # x 궸?됪궢궫빒럻궻븴귩돿럁
        x += self.contents.text_size(c).width
      end
    end
    # 멗묖럥궻뤾뜃
    if $game_temp.choice_max > 0
      @item_max = $game_temp.choice_max
      self.active = true
      self.index = 0
    end
    # 릶뭠볺쀍궻뤾뜃
    if $game_temp.num_input_variable_id > 0
      digits_max = $game_temp.num_input_digits_max
      number = $game_variables[$game_temp.num_input_variable_id]
      @input_number_window = Window_InputNumber.new(digits_max)
      @input_number_window.number = number
      @input_number_window.x = self.x + 8
      @input_number_window.y = self.y + $game_temp.num_input_start * 32
    end
  end
  #--------------------------------------------------------------------------
  # 걶 긂귻깛긤긂궻댧뭫궴븉벁뼻뱗궻먠믦
  #--------------------------------------------------------------------------
  def reset_window
# Start 빾뛛
#    if $game_temp.in_battle
    # 먰벉렄궴롥릐뚺궻됪뽋뤵궳궻Y띆뷭궕UP_DW_OS댥뤵궻렄궼긽긞긜?긙긂귽깛긤긂귩뤵궸?렑
    if $game_temp.in_battle or ($game_system.message_position == 2 and $game_player.y - [$game_map.display_y  / 128 - 1, 0].max >= UP_DW_POS)
# End 빾뛛
      self.y = 16
    else
      case $game_system.message_position
      when 0  # 뤵
        self.y = 16
      when 1  # 뭷
        self.y = 160
      when 2  # 돷
        self.y = 304
      end
    end
    if $game_system.message_frame == 0
      self.opacity = 255
    else
      self.opacity = 0
    end
    self.back_opacity = 160
  end
  #--------------------------------------------------------------------------
  # 걶 긲깒??뛛륷
  #--------------------------------------------------------------------------
  def update
    super
    # 긲긃?긤귽깛궻뤾뜃
    if @fade_in
      self.contents_opacity += 24
      if @input_number_window != nil
        @input_number_window.contents_opacity += 24
      end
      if self.contents_opacity == 255
        @fade_in = false
      end
      return
    end
    # 릶뭠볺쀍뭷궻뤾뜃
    if @input_number_window != nil
      @input_number_window.update
      # 뙂믦
      if Input.trigger?(Input::C)
        $game_system.se_play($data_system.decision_se)
        $game_variables[$game_temp.num_input_variable_id] =
          @input_number_window.number
        $game_map.need_refresh = true
        # 릶뭠볺쀍긂귻깛긤긂귩됶뺳
        @input_number_window.dispose
        @input_number_window = nil
        terminate_message
      end
      return
    end
    # 긽긞긜?긙?렑뭷궻뤾뜃
    if @contents_showing
      # 멗묖럥궻?렑뭷궳궶궚귢궽??긛긖귽깛귩?렑
      if $game_temp.choice_max == 0
        self.pause = true
      end
      # 긌긿깛긜깑
      if Input.trigger?(Input::B)
        if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
          $game_system.se_play($data_system.cancel_se)
          $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
          terminate_message
        end
      end
      # 뙂믦
      if Input.trigger?(Input::C)
        if $game_temp.choice_max > 0
          $game_system.se_play($data_system.decision_se)
          $game_temp.choice_proc.call(self.index)
        end
        terminate_message
      end
      return
    end
    # 긲긃?긤귺긂긣뭷댥둖궳?렑뫲궭궻긽긞긜?긙궔멗묖럥궕궇귡뤾뜃
    if @fade_out == false and $game_temp.message_text != nil
      @contents_showing = true
      $game_temp.message_window_showing = true
      reset_window
      refresh
      Graphics.frame_reset
      self.visible = true
      self.contents_opacity = 0
      if @input_number_window != nil
        @input_number_window.contents_opacity = 0
      end
      @fade_in = true
      return
    end
    # ?렑궥귊궖긽긞긜?긙궕궶궋궕갂긂귻깛긤긂궕됀럨륉뫴궻뤾뜃
    if self.visible
      @fade_out = true
      self.opacity -= 48
      if self.opacity == 0
        self.visible = false
        @fade_out = false
        $game_temp.message_window_showing = false
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # 걶 긇??깑궻뗩?뛛륷
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index >= 0
      n = $game_temp.choice_start + @index
      self.cursor_rect.set(8, n * 32, @cursor_width, 32)
    else
      self.cursor_rect.empty
    end
  end
end
#추천 주세요~

Who's 백호

?

이상혁입니다.

http://elab.kr

Atachment
첨부 '2'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
241 전투 Mr. Mo's ABS Ultimate by DerVVulfman Alkaid 2011.09.05 1438
240 전투 Mr. Mo's ABS Ultimate 1.9 by DerVVulfman 2 Alkaid 2011.12.01 1900
239 전투 Mr. Mo's ABS Ultimate 1.2 by DerVVulfman Alkaid 2011.11.13 1640
238 전투 Mr. Mo's ABS 5.5 13 Alkaid 2010.09.10 3459
237 전투 Mr Mo DVV Addon #20~#21 Alkaid 2011.09.05 1432
236 전투 Mr Mo DVV Addon #18~#19 Alkaid 2011.07.13 1266
235 전투 Mr Mo DVV Addon #14~#17 3 Alkaid 2011.05.23 1285
234 이동 및 탈것 Mouse_move 호환버전 1 file 백호 2009.02.21 1059
233 이동 및 탈것 Mouse_move 호환 100%강화버전 4 file 백호 2009.02.21 1512
232 이동 및 탈것 Mouse_move file 백호 2009.02.21 922
231 키입력 Mouse Input Module v5 by Near Fantastica (SDK호환) 2 백호 2009.02.22 962
230 기타 Monster Arena by trickster file 백호 2009.02.22 812
229 HUD MOG_C_HUD. 6 file Bera 2010.09.11 2329
228 HUD MOG_Active_Hud 3 file Bera 2010.09.11 2468
227 아이템 mog-아이템창업그레이드? ps인간 2009.01.23 2555
226 기타 mog-스테이터스 업그레이드? ps인간 2009.01.23 1904
225 메뉴 Mog-메뉴업그레이드? ps인간 2009.01.23 2948
224 상점 Mog- 상점업그레이드 ps인간 2009.01.23 2682
223 메뉴 MOG - Scroll Bar for XP file 습작 2014.07.06 1533
222 맵/타일 Mode07 0.5 by mewsterus 3 백호 2009.02.22 1149
Board Pagination Prev 1 ... 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 ... 52 Next
/ 52