XP 스크립트

RKC(RPGXP Korea Cafe)에서 처음 배포했고,

이젠 여기에도 배포를 해드려야겠어요.

  # ◆ 이름 색짓기 스크립트 사용 여부 ( 있다면... )
  TEXT_COLOR_SCRIPT = false # 이 부분에서는 홈페이지에서 배포하는 text_color(아이템색 짓기)가 있어야 합니다.
  
  # ◆ 비트맵(테두리/그림자 효과) 사용 여부 ( 역시 있다면... )
  BITMAP_SCRIPT = false # 이 부분에서는 홈페이지에서 배포하는 KGC에서 제작한 Bitmap(그림자,테두리 짓기)가 있어야 합니다.

43행 부터는 아주 작은 작업에 들어가는데요.

바로 이 스크립트의 로망이죠. 확장이름!

아이템의 이름을 영어 또는 한문으로 쓰실 수 있습니다.

스크립트 복사 시작 준비 !

시작 !

#_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/
#_/ ̄    ◆ 아이템 상세정보 - LPG_ItemStatusMode ◆
#_/ ̄    ◇ Last update : 2009/08/11 ◇
#------------------------------------------------------------------------------
#   아이템 화면을 업그레이드 시켜 상세정보를 보여줍니다.
#   - 스크립트 제작자 : Claymore   저작권 : L PROJECT GAME -
#_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/

#==============================================================================
# ★ 커스터마이즈 항목 - Customize ★
#==============================================================================

module LPG
module ItemStatusMode
  $LPG_imported = {} if $LPG_imported == nil
  $LPG_imported["ItemStatusMode"] = true
 
  # ◆ 이름 색짓기 스크립트 사용 여부 ( 있다면... )
  TEXT_COLOR_SCRIPT = false
 
  # ◆ 비트맵(테두리/그림자 효과) 사용 여부 ( 역시 있다면... )
  BITMAP_SCRIPT = false
 
  # ◆ 아이템의 사용 가능한 상황 텍스트
  # ◇ 평상, 전투
  ALL_OCCASION = "평상, 전투 모두 사용 가능"
  # ◇ 전투
  BATTLE_OCCASION = "전투시 사용 가능"
  # ◇ 평상
  MENU_OCCASION = "평상시 사용 가능"
  # ◇ 사용 불가
  IMPOSSIBLE_OCCASION = "사용 불가"
end

#_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/
#         [ ‡ 소규모 스크립트 ‡ ]
#_/ ̄   ◆ 아이템 상세정보 - LPG_ItemNameExtension ◆
#------------------------------------------------------------------------------
#/ ̄_   아이템 화면을 업그레이드 시켜 상세정보를 보여줍니다.
#        
#_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/

module ItemNameExtension
  $LPG_imported = {} if $LPG_imported == nil
  $LPG_imported["ItemNameExtension"] = true

  # ◆ 정의되있지 않은 아이템/무기/방어구 - 확장
  DEFAULT_EX_NAME = "" # 공백으로 표시합니다.
 
  # ◆ 아이템 이름 정의 - 확장
  ITEM_EX_NAME = { # ← 지우지 마세요 ▒
   # 아이템 ID => "확장이름"
     1 => "Potion",
     2 => "High Potion",
     3 => "Full Potion",
     4 => "Perfume",
     5 => "High Perfume",
     6 => "Full Perfume",
     7 => "Elixir",
     8 => "Full Elixir",
     9 => "Tonic",
     10 => "Full Tonic",
     11 => "Antidote",
     12 => "Dispel Herb",
     13 => "Sharp Stone",
     14 => "Barrier Stone",
     15 => "Resist Stone",
     16 => "Blink Stone",
     17 => "Seed of Life",
     18 => "Seed of Mana",
     19 => "Seed of Strength",
     20 => "Seed of Dextality",
     21 => "Seed of Agility",
     22 => "Seed of Intelligence",
     23 => "Door Key",
     24 => "Chest Key",
     25 => "Jail Key",
     26 => "Pouch",
     27 => "Letter",
     28 => "Feather",
     29 => "Map",
     30 => "Lithograph",
     31 => "Card",
     32 => "Fruit",
  } # ← 지우지 마세요 ▒
  # ◆ 무기 이름 정의 - 확장
  WEAPON_EX_NAME = { # ← 지우지 마세요 ▒
   # 무기 ID => "확장이름"
     1 => "Bronze Sword",
     2 => "Iron Sword",
     3 => "Steel Sword",
     4 => "Mythril Sword",
     5 => "Bronze Spear",
     6 => "Iron Spear",
     7 => "Steel Spear",
     8 => "Mythril Spear",
     9 => "Bronze Axe",
     10 => "Iron Axe",
     11 => "Steel Axe",
     12 => "Mythril Axe",
     13 => "Bronze Knife",
     14 => "Iron Knife",
     15 => "Steel Knife",
     16 => "Mythril Knife",
     17 => "Bronze Bow",
     18 => "Iron Bow",
     19 => "Steel Bow",
     20 => "Mythril Bow",
     21 => "Bronze Gun",
     22 => "Iron Gun",
     23 => "Steel Gun",
     24 => "Mythril Gun",
     25 => "Bronze Mace",
     26 => "Iron Mace",
     27 => "Steel Mace",
     28 => "Mythril Mace",
     29 => "Bronze Rod",
     30 => "Iron Rod",
     31 => "Steel Rod",
     32 => "Mythril Rod",
  } # ← 지우지 마세요 ▒
  # ◆ 방어구 이름 정의 - 확장
  ARMOR_EX_NAME = { # ← 지우지 마세요 ▒
   # 방어구 ID => "확장이름"
     1 => "Bronze Shield",
     2 => "Iron Shield",
     3 => "Steel Shield",
     4 => "Mythril Shield",
     5 => "Bronze Helm",
     6 => "Iron Helm",
     7 => "Steel Helm",
     8 => "Mythril Helm",
     9 => "Cotton Hat",
     10 => "Felt Hat",
     11 => "Magic Hat",
     12 => "Saint Hat",
     13 => "Bronze Armor",
     14 => "Iron Armor",
     15 => "Steel Armor",
     16 => "Mythril Armor",
     17 => "Bronze Plate",
     18 => "Iron Plate",
     19 => "Steel Plate",
     20 => "Mythril Plate",
     21 => "Cotton Robe",
     22 => "Felt Robe",
     23 => "Magic Robe",
     24 => "Saint Robe",
     25 => "Ring of Strength",
     26 => "Ring of Dextality",
     27 => "Ring of Agility",
     28 => "Ring of Intelligence",
     29 => "Ring of Fire",
     30 => "Ring of Ice",
     31 => "Ring of Thunder",
     32 => "Ring of Water",
  } # ← 지우지 마세요 ▒
end
end

=begin

! 해당 스크립트는 아이콘 크기(32x32)를 중심으로한 스크립트입니다.
! 해당 스크립트는 글자크기 15pt를 중심으로한 스크립트입니다.
※ 해당 스크립트를 사용시
  약간의 멋을 내줄 수 있지만, TEXT_COLOR_SCRIPT 또는 BITMAP_SCRIPT 를 활성화시키면
  커서 이동시 업데이트 속도가 다소 느려질 수 있습니다.
문제 있으시면 dkrlgns@naver.com 으로 쪽지 보내주시거나 아래 주소에 댓글을 남겨주시면 감사하겠습니다.
http://cafe.naver.com/ArticleRead.nhn?clubid=10738640&page=1&menuid=14&boardtype=L&articleid=46939

=end

#==============================================================================
# ■ RPG::Weapon
#==============================================================================

class RPG::Weapon
  #--------------------------------------------------------------------------
  # ○ 회피 수정
  #--------------------------------------------------------------------------
  def eva
    return 0
  end
  #--------------------------------------------------------------------------
  # ○ 명중률
  #--------------------------------------------------------------------------
  def hit
    return 0
  end
end
#==============================================================================
# ■ RPG::Armor
#==============================================================================

class RPG::Armor
  #--------------------------------------------------------------------------
  # ○ 공격력
  #--------------------------------------------------------------------------
  def atk
    return 0
  end
  #--------------------------------------------------------------------------
  # ○ 명중률
  #--------------------------------------------------------------------------
  def hit
    return 0
  end
end

#==============================================================================
# ■ Window_Item
#------------------------------------------------------------------------------
#  아이템 화면, 배틀 화면에서, 소지 아이템의 일람을 표시하는 윈도우입니다.
#==============================================================================

class Window_Item < Window_Selectable
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  def initialize
    super(320, 0, 320, 176)
    @column_max = 8
    refresh
    self.index = 0
    # 전투중의 경우는 윈도우를 화면 중앙에 이동해, 반투명으로 한다
    if $game_temp.in_battle
      self.y = 64
      self.height = 256
      self.back_opacity = 160
    end
  end
  #--------------------------------------------------------------------------
  # ● 아이템의 취득
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    # 아이템을 추가
    for i in 1...$data_items.size
      if $game_party.item_number(i) > 0
        @data.push($data_items[i])
      end
    end
    # 전투중 이외라면 무기와 방어구도 추가
    unless $game_temp.in_battle
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0
          @data.push($data_weapons[i])
        end
      end
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0
          @data.push($data_armors[i])
        end
      end
    end
    # 항목수가 0 이 아니면 비트 맵을 작성해, 전항목을 묘화
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 36) # row_max * (아이콘 크기) + 4
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 항목의 묘화
  #     index : 항목 번호
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    if LPG::ItemStatusMode::TEXT_COLOR_SCRIPT   
      self.contents.font.color = sg_artifact_colors(item)
    else
      self.contents.font.color = normal_color
    end
    x = 4 + index % 8 * 36 # 8 * (아이콘 크기+4)
    y = index / 8 * 36 # 8 * (아이콘 크기+4)
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = 255
    self.contents.blt(x - 2, y + 2, bitmap, Rect.new(0, 0, 32, 32), opacity)
    if LPG::ItemStatusMode::BITMAP_SCRIPT
      self.contents.draw_frame_text(x - 4, y + 10, 32, 32, number.to_s, 2)
    else
      self.contents.draw_text(x - 4, y + 10, 32, 32, number.to_s, 2)
    end
  end
  #--------------------------------------------------------------------------
  # ● 선두의 행의 취득
  #--------------------------------------------------------------------------
  def top_row
    # 윈도우 내용의 전송원 Y 좌표를, 1 행의 높이 22 로 나눈다
    return self.oy / 36 # self.oy / (아이콘 크기) + 4
  end
  #--------------------------------------------------------------------------
  # ● 선두의 행의 설정
  #     row : 선두에 표시하는 행
  #--------------------------------------------------------------------------
  def top_row=(row)
    # row 가 0 미만의 경우는 0 에 수정
    if row < 0
      row = 0
    end
    # row 가 row_max - 1 초의 경우는 row_max - 1 에 수정
    if row > row_max - 1
      row = row_max - 1
    end
    # row 에 1 행의 높이 36 를 걸어 윈도우 내용의 전송원 Y 좌표로 한다
    self.oy = row * 36 # row * (아이콘 크기) + 4
  end
  #--------------------------------------------------------------------------
  # ● 1 페이지에 표시할 수 있는 행수의 취득
  #--------------------------------------------------------------------------
  def page_row_max
    # 윈도우의 높이로부터, 프레임의 높이 32 를 빼, 1 행의 높이 32 로 나눈다
    return (self.height - 32) / 36 # (self.height - 32) / (아이콘 크기) + 4
  end
  #--------------------------------------------------------------------------
  # ● 커서의 구형 갱신
  #--------------------------------------------------------------------------
  def update_cursor_rect
    # 커서 위치가 0 미만의 경우
    if @index < 0
      self.cursor_rect.empty
      return
    end
    # 현재의 행을 취득
    row = @index / @column_max
    # 현재의 행이, 표시되고 있는 선두의 행보다 전의 경우
    if row < self.top_row
      # 현재의 행이 선두가 되도록(듯이) 스크롤
      self.top_row = row
    end
    # 현재의 행이, 표시되고 있는 최후미의 행부터 뒤의 경우
    if row > self.top_row + (self.page_row_max - 1)
      # 현재의 행이 최후미가 되도록(듯이) 스크롤
      self.top_row = row - (self.page_row_max - 1)
    end
    # 커서의 좌표를 계산
    x = @index % @column_max * 36 # @index % @column_max * (아이콘 크기) + 4
    y = @index / @column_max * 36 - self.oy # @index / @column_max * (아이콘 크기) + 4 - self.oy
    # 커서의 구형을 갱신
    self.cursor_rect.set(x, y, 36, 36) # (x, y, 아이콘 가로길이, 아이콘 세로길이)
  end
end

#==============================================================================
# ■ Window_ItemStatus
#------------------------------------------------------------------------------
#  아이템 화면에서 소지 아이템의 상세정보를 표시하는 윈도우입니다.
#==============================================================================

class Window_ItemStatus < Window_Base
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 320, 416)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh(nil)
  end
  #--------------------------------------------------------------------------
  # ● 아이템의 취득
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh(item)
    self.contents.clear
    if item.is_a?(RPG::Weapon) or item.is_a?(RPG::Armor)
      draw_parameter(item)
    elsif item.is_a?(RPG::Item)
      draw_item_info(item)
    else
      return
    end
  end
  #--------------------------------------------------------------------------
  # ○ 파라미터 묘화
  #--------------------------------------------------------------------------
  def draw_parameter(item)
    self.contents.font.size = 15
    self.contents.font.color = LPG::ItemStatusMode::TEXT_COLOR_SCRIPT ? sg_artifact_colors(item) : normal_color
    if $LPG_imported["ItemNameExtension"]
      if item.is_a?(RPG::Weapon)
        ex_name = LPG::ItemNameExtension::WEAPON_EX_NAME[item.id]
      elsif ex_name == nil
        ex_name = LPG::ItemNameExtension::DEFAULT_EX_NAME
      end
      if item.is_a?(RPG::Armor)
        ex_name = LPG::ItemNameExtension::ARMOR_EX_NAME[item.id]
      elsif ex_name == nil
        ex_name = LPG::ItemNameExtension::DEFAULT_EX_NAME
      end
    end
    if LPG::ItemStatusMode::BITMAP_SCRIPT
      self.contents.draw_shadow_text(4,     0, 288, 32, item.name.to_s)
      self.contents.draw_shadow_text(4,    16, 288, 32, ex_name.to_s)
    else
      self.contents.draw_text(4,     0, 288, 32, item.name.to_s)
      self.contents.draw_text(4,    16, 288, 32, ex_name.to_s)
    end
    self.contents.font.color = normal_color
    self.contents.draw_text(4,    32, 288, 32, "________________________________________________________")
    if LPG::ItemStatusMode::TEXT_COLOR_SCRIPT
      if item.is_a?(RPG::Weapon)
        if $imported["EquipExtension"]
          conditions = KGC::ER_WEAPON_RESTRICTION[item.id]
        end
        sg_temp = 'element_set'
      elsif item.is_a?(RPG::Armor)
        if $imported["EquipExtension"]
          conditions = KGC::ER_ARMOR_RESTRICTION[item.id]
        end
        sg_temp = 'guard_element_set'
      end
    end
    if item.is_a?(RPG::Armor)
      # 방어구 타입
      # 무기에 속성 ID (n)이 체크되었을 경우
      # 장비확장 스크립트
      if item.kind == 0
        kind = $data_system.words.armor1
      elsif item.kind == 1
        kind = $data_system.words.armor2
      elsif item.kind == 2
        kind = $data_system.words.armor3
      elsif item.kind == 3
        kind = $data_system.words.armor4
      end
    end
    self.contents.draw_text(4,    48, 120, 32, conditions.to_s)
    self.contents.draw_text(-4,    48, 288, 32, item.price.to_s + " " + $data_system.words.gold, 2)
    self.contents.draw_text(-4,    64, 288, 32, kind.to_s, 2)
    self.contents.font.color = system_color
    if LPG::ItemStatusMode::BITMAP_SCRIPT
      self.contents.draw_frame_text(4,    80, 120, 32, $data_system.words.atk)
      self.contents.draw_frame_text(4,    96, 120, 32, $data_system.words.pdef)
      self.contents.draw_frame_text(4,   112, 120, 32, $data_system.words.mdef)
      self.contents.draw_frame_text(4,   144, 120, 32, $data_system.words.str)
      self.contents.draw_frame_text(4,   160, 120, 32, $data_system.words.dex)
      self.contents.draw_frame_text(4,   176, 120, 32, $data_system.words.agi)
      self.contents.draw_frame_text(4,   192, 120, 32, $data_system.words.int)
      self.contents.font.color = system_color
      self.contents.draw_frame_text(4,   224, 120, 32, "명중률")
      self.contents.draw_frame_text(4,   240, 120, 32, "회피율")
      self.contents.font.color = normal_color
      self.contents.draw_frame_text(72,   80, 96, 32, "+"+item.atk.to_s, 0)
      self.contents.draw_frame_text(72,   96, 96, 32, "+"+item.pdef.to_s, 0)
      self.contents.draw_frame_text(72,  112, 96, 32, "+"+item.mdef.to_s, 0)
      self.contents.font.color = crisis_color
      self.contents.draw_frame_text(72,  144, 96, 32, ": "+item.str_plus.to_s, 0)
      self.contents.draw_frame_text(72,  160, 96, 32, ": "+item.dex_plus.to_s, 0)
      self.contents.draw_frame_text(72,  176, 96, 32, ": "+item.agi_plus.to_s, 0)
      self.contents.draw_frame_text(72,  192, 96, 32, ": "+item.int_plus.to_s, 0)
      self.contents.font.color = system_color
      self.contents.draw_frame_text(72,  224, 96, 32, ": "+item.eva.to_s+"%", 0)
      self.contents.draw_frame_text(72,  240, 96, 32, ": "+item.hit.to_s+"%", 0)
      self.contents.font.color = Color.new(128, 128, 128)
      self.contents.draw_frame_text(4, 272, 288, 32, item.description.to_s, 0)
    else
      self.contents.draw_text(4,    80, 120, 32, $data_system.words.atk)
      self.contents.draw_text(4,    96, 120, 32, $data_system.words.pdef)
      self.contents.draw_text(4,   112, 120, 32, $data_system.words.mdef)
      self.contents.draw_text(4,   144, 120, 32, $data_system.words.str)
      self.contents.draw_text(4,   160, 120, 32, $data_system.words.dex)
      self.contents.draw_text(4,   176, 120, 32, $data_system.words.agi)
      self.contents.draw_text(4,   192, 120, 32, $data_system.words.int)
      atk_x = self.contents.text_size($data_system.words.atk).width
      pdef_x = self.contents.text_size($data_system.words.pdef).width
      mdef_x = self.contents.text_size($data_system.words.pdef).width
      str_x = self.contents.text_size($data_system.words.str).width
      dex_x = self.contents.text_size($data_system.words.dex).width
      agi_x = self.contents.text_size($data_system.words.agi).width
      int_x = self.contents.text_size($data_system.words.int).width
      eva_x = self.contents.text_size("회피율").width
      hit_x = self.contents.text_size("명중률").width
      self.contents.font.color = normal_color
      self.contents.draw_text(atk_x + 15,   80, 96, 32, "+"+item.atk.to_s, 0)
      self.contents.draw_text(pdef_x + 15,   96, 96, 32, "+"+item.pdef.to_s, 0)
      self.contents.draw_text(mdef_x + 15,  112, 96, 32, "+"+item.mdef.to_s, 0)     
      self.contents.font.color = system_color
      self.contents.draw_text(4,   224, 120, 32, "회피율")     
      self.contents.draw_text(4,   240, 120, 32, "명중률")
      self.contents.font.color = crisis_color
      self.contents.draw_text(str_x + 15,  144, 96, 32, ": "+item.str_plus.to_s, 0)
      self.contents.draw_text(dex_x + 15,  160, 96, 32, ": "+item.dex_plus.to_s, 0)
      self.contents.draw_text(agi_x + 15,  176, 96, 32, ": "+item.agi_plus.to_s, 0)
      self.contents.draw_text(int_x + 15,  192, 96, 32, ": "+item.int_plus.to_s, 0)
      self.contents.font.color = system_color
      self.contents.draw_text(eva_x + 15,  224, 96, 32, ": "+item.eva.to_s+"%", 0)
      self.contents.draw_text(hit_x + 15,  240, 96, 32, ": "+item.hit.to_s+"%", 0)
      self.contents.font.color = Color.new(128, 128, 128)
      self.contents.draw_text(4, 272, 288, 32, item.description.to_s, 0)
    end
  end
  #--------------------------------------------------------------------------
  # ○ 아이템 정보 묘화
  #--------------------------------------------------------------------------
  def draw_item_info(item)
    self.contents.font.size = 15
    self.contents.font.color = LPG::ItemStatusMode::TEXT_COLOR_SCRIPT ? sg_artifact_colors(item) : normal_color
    if $LPG_imported["ItemNameExtension"]
      ex_name = LPG::ItemNameExtension::ITEM_EX_NAME[item.id]
      if ex_name == nil
        ex_name = LPG::ItemNameExtension::DEFAULT_EX_NAME
      end
    end
    if LPG::ItemStatusMode::BITMAP_SCRIPT
      self.contents.draw_shadow_text(4,     0, 288, 32, item.name.to_s)
      self.contents.draw_shadow_text(4,    16, 288, 32, ex_name.to_s)
    else
      self.contents.draw_text(4,     0, 288, 32, item.name.to_s)
      self.contents.draw_text(4,    16, 288, 32, ex_name.to_s)
    end
    self.contents.font.color = normal_color
    self.contents.draw_text(4,    32, 288, 32, "________________________________________________________")
    self.contents.draw_text(-4,    48, 288, 32, item.price.to_s + " " + $data_system.words.gold, 2)
    number = $game_party.item_number(item.id)
    self.contents.font.color = system_color
    if LPG::ItemStatusMode::BITMAP_SCRIPT
      if $LPG_imported["ItemLimit"]
        # 아이템의 현재 소지수와 소지 한도를 표시한다.
        item_limit = LPG::ItemLimit::ITEM_LIMIT[item.id]
        self.contents.draw_frame_text(4,    64, 120, 32, "수량 : "+number.to_s+" / "+item_limit.to_s)
      else
        # 아이템의 현재 소지수만 표시한다.
        self.contents.draw_frame_text(4,    64, 120, 32, "수량 : "+number.to_s)
      end
    else
      self.contents.draw_text(4,    64, 120, 32, "수량 : "+number.to_s)
    end
    if item.occasion == 0
      use_text = LPG::ItemStatusMode::ALL_OCCASION
    elsif item.occasion == 1
      use_text = LPG::ItemStatusMode::BATTLE_OCCASION
    elsif item.occasion == 2
      use_text = LPG::ItemStatusMode::MENU_OCCASION
    elsif item.occasion == 3
      use_text = LPG::ItemStatusMode::IMPOSSIBLE_OCCASION
    end
    self.contents.font.color = item.occasion == 3 ? knockout_color : normal_color
    if LPG::ItemStatusMode::BITMAP_SCRIPT   
      self.contents.draw_frame_text(-4,    80, 288, 32, use_text.to_s, 2)
    else
      self.contents.draw_text(-4,    80, 288, 32, use_text.to_s, 2)
    end
    self.contents.font.color = normal_color
    if item.scope == 0
      range_text = ""
    elsif item.scope == 1
      range_text = "적 단체"
    elsif item.scope == 2
      range_text = "적 범위"
    elsif item.scope == 3
      range_text = "아군 단체"
    elsif item.scope == 4
      range_text = "아군 범위"
    elsif item.scope == 5
      range_text = "아군 단체 (HP 0)"
      self.contents.font.color = crisis_color
    elsif item.scope == 6
      range_text = "아군 범위 (HP 0)"
      self.contents.font.color = crisis_color
    elsif item.scope == 7
      range_text = "사용자"
    end
    if LPG::ItemStatusMode::BITMAP_SCRIPT   
      self.contents.draw_frame_text(-4,    96, 288, 32, range_text.to_s, 2)
      self.contents.font.color = system_color
      self.contents.draw_frame_text(4,    128, 288, 32, item.description.to_s, 0)
    else
      self.contents.draw_text(-4,    96, 288, 32, range_text.to_s, 2)
      self.contents.font.color = system_color
      self.contents.draw_text(4,    128, 288, 32, item.description.to_s, 0)
    end
  end
end

#==============================================================================
# ■ Scene_Item
#------------------------------------------------------------------------------
#  아이템 화면의 처리를 실시하는 클래스입니다.
#==============================================================================

class Scene_Item
  #--------------------------------------------------------------------------
  # ● 메인 처리
  #--------------------------------------------------------------------------
  def main
    start
    # 아이템 윈도우를 작성
    @item_window = Window_Item.new
    @status_window = Window_ItemStatus.new
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 480 - @gold_window.height
    # 헬프 윈도우를 관련지어
    # 타겟 윈도우를 작성 (불가시·비액티브하게 설정)
    @target_window = Window_Target.new
    @target_window.visible = false
    @target_window.active = false
   
    @item_window.index = 0
    @status_window.refresh(@item_window.item)
   
    # 트란지션 실행
    Graphics.transition
    # 메인 루프
    loop do
      # 게임 화면을 갱신
      Graphics.update
      # 입력 정보를 갱신
      Input.update
      # 프레임 갱신
      update
      # 화면이 바뀌면 루프를 중단
      if $scene != self
        break
      end
    end
    # 트란지션 준비
    Graphics.freeze
    # 윈도우를 해방
    @item_window.dispose
    @status_window.dispose
    @gold_window.dispose
    @target_window.dispose
    @spriteset.dispose
  end
  #--------------------------------------------------------------------------
  # ○ 리프레쉬
  #--------------------------------------------------------------------------
  def refresh
    @item_window.refresh
    @status_window.refresh(nil)
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  def update
    # 윈도우를 갱신
    @item_window.update
    @status_window.update
    @gold_window.update
    @target_window.update
    @spriteset.update
    # 아이템 윈도우가 액티브의 경우: update_item 를 부른다
    if @item_window.active
      update_item
      return
    end
    # 타겟 윈도우가 액티브의 경우: update_target 를 부른다
    if @target_window.active
      update_target
      return
    end
  end
  #--------------------------------------------------------------------------
  # ○ 개시 처리
  #--------------------------------------------------------------------------
  def start
    @spriteset = Spriteset_Map.new
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (아이템 윈도우가 액티브의 경우)
  #--------------------------------------------------------------------------
  def update_item
    if @now_sel_item != @item_window.index
      # 스테이터스 윈도우를 리프레쉬
      @status_window.refresh(@item_window.item)
      @now_sel_item = @item_window.index
    end
    # B 버튼이 밀렸을 경우
    if Input.trigger?(Input::B)
      # 캔슬 SE 를 연주
      $game_system.se_play($data_system.cancel_se)
      # 메뉴 화면으로 전환해
      $scene = Scene_Menu.new(0)
      return
    end
    # C 버튼이 밀렸을 경우
    if Input.trigger?(Input::C)
      # 아이템 윈도우로 현재 선택되고 있는 데이터를 취득
      @item = @item_window.item
      # 사용 아이템이 아닌 경우
      unless @item.is_a?(RPG::Item)
        # 버저 SE 를 연주
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 사용할 수 없는 경우
      unless $game_party.item_can_use?(@item.id)
        # 버저 SE 를 연주
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 결정 SE 를 연주
      $game_system.se_play($data_system.decision_se)
      # 효과 범위가 아군의 경우
      if @item.scope >= 3
        # 타겟 윈도우를 액티브화
        @item_window.active = false
        @target_window.x = (@item_window.index + 1) % 2 * 304
        @target_window.visible = true
        @target_window.active = true
        # 효과 범위 (단체/전체)에 따라 커서 위치를 설정
        if @item.scope == 4 || @item.scope == 6
          @target_window.index = -1
        else
          @target_window.index = 0
        end
      # 효과 범위가 아군 이외의 경우
      else
        # 코먼 이벤트 ID 가 유효의 경우
        if @item.common_event_id > 0
          # 코먼 이벤트 호출 예약
          $game_temp.common_event_id = @item.common_event_id
          # 아이템의 사용시 SE 를 연주
          $game_system.se_play(@item.menu_se)
          # 소모품의 경우
          if @item.consumable
            # 사용한 아이템을 1 줄인다
            $game_party.lose_item(@item.id, 1)
            # 아이템 윈도우의 항목을 재묘화
            @item_window.draw_item(@item_window.index)
          end
          # 맵 화면으로 전환해
          $scene = Scene_Map.new
          return
        end
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (타겟 윈도우가 액티브의 경우)
  #--------------------------------------------------------------------------
  def update_target
    # B 버튼이 밀렸을 경우
    if Input.trigger?(Input::B)
      # 캔슬 SE 를 연주
      $game_system.se_play($data_system.cancel_se)
      # 아이템 조각등에서 사용할 수 없게 되었을 경우
      unless $game_party.item_can_use?(@item.id)
        # 아이템 윈도우의 내용을 재작성
        @item_window.refresh
      end
      # 타겟 윈도우를 소거
      @item_window.active = true
      @target_window.visible = false
      @target_window.active = false
      return
    end
    # C 버튼이 밀렸을 경우
    if Input.trigger?(Input::C)
      # 아이템을 다 사용했을 경우
      if $game_party.item_number(@item.id) == 0
        # 버저 SE 를 연주
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 타겟이 전체의 경우
      if @target_window.index == -1
        # 파티 전체에 아이템의 사용 효과를 적용
        used = false
        for i in $game_party.actors
          used |= i.item_effect(@item)
        end
      end
      # 타겟이 단체의 경우
      if @target_window.index >= 0
        # 타겟의 액터에게 아이템의 사용 효과를 적용
        target = $game_party.actors[@target_window.index]
        used = target.item_effect(@item)
      end
      # 아이템을 사용했을 경우
      if used
        # 아이템의 사용시 SE 를 연주
        $game_system.se_play(@item.menu_se)
        # 소모품의 경우
        if @item.consumable
          # 사용한 아이템을 1 줄인다
          $game_party.lose_item(@item.id, 1)
          # 아이템 윈도우의 항목을 재묘화
          @item_window.draw_item(@item_window.index)
        end
        # 타겟 윈도우의 내용을 재작성
        @target_window.refresh
        # 전멸의 경우
        if $game_party.all_dead?
          # 게임 오버 화면으로 전환해
          $scene = Scene_Gameover.new
          return
        end
        # 코먼 이벤트 ID 가 유효의 경우
        if @item.common_event_id > 0
          # 코먼 이벤트 호출 예약
          $game_temp.common_event_id = @item.common_event_id
          # 맵 화면으로 전환해
          $scene = Scene_Map.new
          return
        end
      end
      # 아이템을 사용하지 않았던 경우
      unless used
        # 버저 SE 를 연주
        $game_system.se_play($data_system.buzzer_se)
      end
      return
    end
  end
end

#_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/
#_/ ̄    ◆ 아이템 상세정보 - LPG_ItemStatusMode ◆
#_/ ̄    ◇ Last update : 2009/08/11 ◇
#------------------------------------------------------------------------------
#   아이템 화면을 업그레이드 시켜 상세정보를 보여줍니다.
#   - 스크립트 제작자 : Claymore   저작권 : L PROJECT GAME -
#_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/

#==============================================================================
# ★ 커스터마이즈 항목 - Customize ★
#==============================================================================

module LPG
module ItemStatusMode
  $LPG_imported = {} if $LPG_imported == nil
  $LPG_imported["ItemStatusMode"] = true
 
  # ◆ 이름 색짓기 스크립트 사용 여부 ( 있다면... )
  TEXT_COLOR_SCRIPT = false
 
  # ◆ 비트맵(테두리/그림자 효과) 사용 여부 ( 역시 있다면... )
  BITMAP_SCRIPT = false
 
  # ◆ 아이템의 사용 가능한 상황 텍스트
  # ◇ 평상, 전투
  ALL_OCCASION = "평상, 전투 모두 사용 가능"
  # ◇ 전투
  BATTLE_OCCASION = "전투시 사용 가능"
  # ◇ 평상
  MENU_OCCASION = "평상시 사용 가능"
  # ◇ 사용 불가
  IMPOSSIBLE_OCCASION = "사용 불가"
end

#_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/
#         [ ‡ 소규모 스크립트 ‡ ]
#_/ ̄   ◆ 아이템 상세정보 - LPG_ItemNameExtension ◆
#------------------------------------------------------------------------------
#/ ̄_   아이템 화면을 업그레이드 시켜 상세정보를 보여줍니다.
#        
#_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/ ̄_/

module ItemNameExtension
  $LPG_imported = {} if $LPG_imported == nil
  $LPG_imported["ItemNameExtension"] = true

  # ◆ 정의되있지 않은 아이템/무기/방어구 - 확장
  DEFAULT_EX_NAME = "" # 공백으로 표시합니다.
 
  # ◆ 아이템 이름 정의 - 확장
  ITEM_EX_NAME = { # ← 지우지 마세요 ▒
   # 아이템 ID => "확장이름"
     1 => "Potion",
     2 => "High Potion",
     3 => "Full Potion",
     4 => "Perfume",
     5 => "High Perfume",
     6 => "Full Perfume",
     7 => "Elixir",
     8 => "Full Elixir",
     9 => "Tonic",
     10 => "Full Tonic",
     11 => "Antidote",
     12 => "Dispel Herb",
     13 => "Sharp Stone",
     14 => "Barrier Stone",
     15 => "Resist Stone",
     16 => "Blink Stone",
     17 => "Seed of Life",
     18 => "Seed of Mana",
     19 => "Seed of Strength",
     20 => "Seed of Dextality",
     21 => "Seed of Agility",
     22 => "Seed of Intelligence",
     23 => "Door Key",
     24 => "Chest Key",
     25 => "Jail Key",
     26 => "Pouch",
     27 => "Letter",
     28 => "Feather",
     29 => "Map",
     30 => "Lithograph",
     31 => "Card",
     32 => "Fruit",
  } # ← 지우지 마세요 ▒
  # ◆ 무기 이름 정의 - 확장
  WEAPON_EX_NAME = { # ← 지우지 마세요 ▒
   # 무기 ID => "확장이름"
     1 => "Bronze Sword",
     2 => "Iron Sword",
     3 => "Steel Sword",
     4 => "Mythril Sword",
     5 => "Bronze Spear",
     6 => "Iron Spear",
     7 => "Steel Spear",
     8 => "Mythril Spear",
     9 => "Bronze Axe",
     10 => "Iron Axe",
     11 => "Steel Axe",
     12 => "Mythril Axe",
     13 => "Bronze Knife",
     14 => "Iron Knife",
     15 => "Steel Knife",
     16 => "Mythril Knife",
     17 => "Bronze Bow",
     18 => "Iron Bow",
     19 => "Steel Bow",
     20 => "Mythril Bow",
     21 => "Bronze Gun",
     22 => "Iron Gun",
     23 => "Steel Gun",
     24 => "Mythril Gun",
     25 => "Bronze Mace",
     26 => "Iron Mace",
     27 => "Steel Mace",
     28 => "Mythril Mace",
     29 => "Bronze Rod",
     30 => "Iron Rod",
     31 => "Steel Rod",
     32 => "Mythril Rod",
  } # ← 지우지 마세요 ▒
  # ◆ 방어구 이름 정의 - 확장
  ARMOR_EX_NAME = { # ← 지우지 마세요 ▒
   # 방어구 ID => "확장이름"
     1 => "Bronze Shield",
     2 => "Iron Shield",
     3 => "Steel Shield",
     4 => "Mythril Shield",
     5 => "Bronze Helm",
     6 => "Iron Helm",
     7 => "Steel Helm",
     8 => "Mythril Helm",
     9 => "Cotton Hat",
     10 => "Felt Hat",
     11 => "Magic Hat",
     12 => "Saint Hat",
     13 => "Bronze Armor",
     14 => "Iron Armor",
     15 => "Steel Armor",
     16 => "Mythril Armor",
     17 => "Bronze Plate",
     18 => "Iron Plate",
     19 => "Steel Plate",
     20 => "Mythril Plate",
     21 => "Cotton Robe",
     22 => "Felt Robe",
     23 => "Magic Robe",
     24 => "Saint Robe",
     25 => "Ring of Strength",
     26 => "Ring of Dextality",
     27 => "Ring of Agility",
     28 => "Ring of Intelligence",
     29 => "Ring of Fire",
     30 => "Ring of Ice",
     31 => "Ring of Thunder",
     32 => "Ring of Water",
  } # ← 지우지 마세요 ▒
end
end

=begin

! 해당 스크립트는 아이콘 크기(32x32)를 중심으로한 스크립트입니다.
! 해당 스크립트는 글자크기 15pt를 중심으로한 스크립트입니다.
※ 해당 스크립트를 사용시
  약간의 멋을 내줄 수 있지만, TEXT_COLOR_SCRIPT 또는 BITMAP_SCRIPT 를 활성화시키면
  커서 이동시 업데이트 속도가 다소 느려질 수 있습니다.
문제 있으시면 dkrlgns@naver.com 으로 쪽지 보내주시거나 아래 주소에 댓글을 남겨주시면 감사하겠습니다.
http://cafe.naver.com/ArticleRead.nhn?clubid=10738640&page=1&menuid=14&boardtype=L&articleid=46939

=end

#==============================================================================
# ■ RPG::Weapon
#==============================================================================

class RPG::Weapon
  #--------------------------------------------------------------------------
  # ○ 회피 수정
  #--------------------------------------------------------------------------
  def eva
    return 0
  end
  #--------------------------------------------------------------------------
  # ○ 명중률
  #--------------------------------------------------------------------------
  def hit
    return 0
  end
end
#==============================================================================
# ■ RPG::Armor
#==============================================================================

class RPG::Armor
  #--------------------------------------------------------------------------
  # ○ 공격력
  #--------------------------------------------------------------------------
  def atk
    return 0
  end
  #--------------------------------------------------------------------------
  # ○ 명중률
  #--------------------------------------------------------------------------
  def hit
    return 0
  end
end

#==============================================================================
# ■ Window_Item
#------------------------------------------------------------------------------
#  아이템 화면, 배틀 화면에서, 소지 아이템의 일람을 표시하는 윈도우입니다.
#==============================================================================

class Window_Item < Window_Selectable
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  def initialize
    super(320, 0, 320, 176)
    @column_max = 8
    refresh
    self.index = 0
    # 전투중의 경우는 윈도우를 화면 중앙에 이동해, 반투명으로 한다
    if $game_temp.in_battle
      self.y = 64
      self.height = 256
      self.back_opacity = 160
    end
  end
  #--------------------------------------------------------------------------
  # ● 아이템의 취득
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    # 아이템을 추가
    for i in 1...$data_items.size
      if $game_party.item_number(i) > 0
        @data.push($data_items[i])
      end
    end
    # 전투중 이외라면 무기와 방어구도 추가
    unless $game_temp.in_battle
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0
          @data.push($data_weapons[i])
        end
      end
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0
          @data.push($data_armors[i])
        end
      end
    end
    # 항목수가 0 이 아니면 비트 맵을 작성해, 전항목을 묘화
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 36) # row_max * (아이콘 크기) + 4
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 항목의 묘화
  #     index : 항목 번호
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    if LPG::ItemStatusMode::TEXT_COLOR_SCRIPT   
      self.contents.font.color = sg_artifact_colors(item)
    else
      self.contents.font.color = normal_color
    end
    x = 4 + index % 8 * 36 # 8 * (아이콘 크기+4)
    y = index / 8 * 36 # 8 * (아이콘 크기+4)
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = 255
    self.contents.blt(x - 2, y + 2, bitmap, Rect.new(0, 0, 32, 32), opacity)
    if LPG::ItemStatusMode::BITMAP_SCRIPT
      self.contents.draw_frame_text(x - 4, y + 10, 32, 32, number.to_s, 2)
    else
      self.contents.draw_text(x - 4, y + 10, 32, 32, number.to_s, 2)
    end
  end
  #--------------------------------------------------------------------------
  # ● 선두의 행의 취득
  #--------------------------------------------------------------------------
  def top_row
    # 윈도우 내용의 전송원 Y 좌표를, 1 행의 높이 22 로 나눈다
    return self.oy / 36 # self.oy / (아이콘 크기) + 4
  end
  #--------------------------------------------------------------------------
  # ● 선두의 행의 설정
  #     row : 선두에 표시하는 행
  #--------------------------------------------------------------------------
  def top_row=(row)
    # row 가 0 미만의 경우는 0 에 수정
    if row < 0
      row = 0
    end
    # row 가 row_max - 1 초의 경우는 row_max - 1 에 수정
    if row > row_max - 1
      row = row_max - 1
    end
    # row 에 1 행의 높이 36 를 걸어 윈도우 내용의 전송원 Y 좌표로 한다
    self.oy = row * 36 # row * (아이콘 크기) + 4
  end
  #--------------------------------------------------------------------------
  # ● 1 페이지에 표시할 수 있는 행수의 취득
  #--------------------------------------------------------------------------
  def page_row_max
    # 윈도우의 높이로부터, 프레임의 높이 32 를 빼, 1 행의 높이 32 로 나눈다
    return (self.height - 32) / 36 # (self.height - 32) / (아이콘 크기) + 4
  end
  #--------------------------------------------------------------------------
  # ● 커서의 구형 갱신
  #--------------------------------------------------------------------------
  def update_cursor_rect
    # 커서 위치가 0 미만의 경우
    if @index < 0
      self.cursor_rect.empty
      return
    end
    # 현재의 행을 취득
    row = @index / @column_max
    # 현재의 행이, 표시되고 있는 선두의 행보다 전의 경우
    if row < self.top_row
      # 현재의 행이 선두가 되도록(듯이) 스크롤
      self.top_row = row
    end
    # 현재의 행이, 표시되고 있는 최후미의 행부터 뒤의 경우
    if row > self.top_row + (self.page_row_max - 1)
      # 현재의 행이 최후미가 되도록(듯이) 스크롤
      self.top_row = row - (self.page_row_max - 1)
    end
    # 커서의 좌표를 계산
    x = @index % @column_max * 36 # @index % @column_max * (아이콘 크기) + 4
    y = @index / @column_max * 36 - self.oy # @index / @column_max * (아이콘 크기) + 4 - self.oy
    # 커서의 구형을 갱신
    self.cursor_rect.set(x, y, 36, 36) # (x, y, 아이콘 가로길이, 아이콘 세로길이)
  end
end

#==============================================================================
# ■ Window_ItemStatus
#------------------------------------------------------------------------------
#  아이템 화면에서 소지 아이템의 상세정보를 표시하는 윈도우입니다.
#==============================================================================

class Window_ItemStatus < Window_Base
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 320, 416)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh(nil)
  end
  #--------------------------------------------------------------------------
  # ● 아이템의 취득
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh(item)
    self.contents.clear
    if item.is_a?(RPG::Weapon) or item.is_a?(RPG::Armor)
      draw_parameter(item)
    elsif item.is_a?(RPG::Item)
      draw_item_info(item)
    else
      return
    end
  end
  #--------------------------------------------------------------------------
  # ○ 파라미터 묘화
  #--------------------------------------------------------------------------
  def draw_parameter(item)
    self.contents.font.size = 15
    self.contents.font.color = LPG::ItemStatusMode::TEXT_COLOR_SCRIPT ? sg_artifact_colors(item) : normal_color
    if $LPG_imported["ItemNameExtension"]
      if item.is_a?(RPG::Weapon)
        ex_name = LPG::ItemNameExtension::WEAPON_EX_NAME[item.id]
      elsif ex_name == nil
        ex_name = LPG::ItemNameExtension::DEFAULT_EX_NAME
      end
      if item.is_a?(RPG::Armor)
        ex_name = LPG::ItemNameExtension::ARMOR_EX_NAME[item.id]
      elsif ex_name == nil
        ex_name = LPG::ItemNameExtension::DEFAULT_EX_NAME
      end
    end
    if LPG::ItemStatusMode::BITMAP_SCRIPT
      self.contents.draw_shadow_text(4,     0, 288, 32, item.name.to_s)
      self.contents.draw_shadow_text(4,    16, 288, 32, ex_name.to_s)
    else
      self.contents.draw_text(4,     0, 288, 32, item.name.to_s)
      self.contents.draw_text(4,    16, 288, 32, ex_name.to_s)
    end
    self.contents.font.color = normal_color
    self.contents.draw_text(4,    32, 288, 32, "________________________________________________________")
    if LPG::ItemStatusMode::TEXT_COLOR_SCRIPT
      if item.is_a?(RPG::Weapon)
        if $imported["EquipExtension"]
          conditions = KGC::ER_WEAPON_RESTRICTION[item.id]
        end
        sg_temp = 'element_set'
      elsif item.is_a?(RPG::Armor)
        if $imported["EquipExtension"]
          conditions = KGC::ER_ARMOR_RESTRICTION[item.id]
        end
        sg_temp = 'guard_element_set'
      end
    end
    if item.is_a?(RPG::Armor)
      # 방어구 타입
      # 무기에 속성 ID (n)이 체크되었을 경우
      # 장비확장 스크립트
      if item.kind == 0
        kind = $data_system.words.armor1
      elsif item.kind == 1
        kind = $data_system.words.armor2
      elsif item.kind == 2
        kind = $data_system.words.armor3
      elsif item.kind == 3
        kind = $data_system.words.armor4
      end
    end
    self.contents.draw_text(4,    48, 120, 32, conditions.to_s)
    self.contents.draw_text(-4,    48, 288, 32, item.price.to_s + " " + $data_system.words.gold, 2)
    self.contents.draw_text(-4,    64, 288, 32, kind.to_s, 2)
    self.contents.font.color = system_color
    if LPG::ItemStatusMode::BITMAP_SCRIPT
      self.contents.draw_frame_text(4,    80, 120, 32, $data_system.words.atk)
      self.contents.draw_frame_text(4,    96, 120, 32, $data_system.words.pdef)
      self.contents.draw_frame_text(4,   112, 120, 32, $data_system.words.mdef)
      self.contents.draw_frame_text(4,   144, 120, 32, $data_system.words.str)
      self.contents.draw_frame_text(4,   160, 120, 32, $data_system.words.dex)
      self.contents.draw_frame_text(4,   176, 120, 32, $data_system.words.agi)
      self.contents.draw_frame_text(4,   192, 120, 32, $data_system.words.int)
      self.contents.font.color = system_color
      self.contents.draw_frame_text(4,   224, 120, 32, "명중률")
      self.contents.draw_frame_text(4,   240, 120, 32, "회피율")
      self.contents.font.color = normal_color
      self.contents.draw_frame_text(72,   80, 96, 32, "+"+item.atk.to_s, 0)
      self.contents.draw_frame_text(72,   96, 96, 32, "+"+item.pdef.to_s, 0)
      self.contents.draw_frame_text(72,  112, 96, 32, "+"+item.mdef.to_s, 0)
      self.contents.font.color = crisis_color
      self.contents.draw_frame_text(72,  144, 96, 32, ": "+item.str_plus.to_s, 0)
      self.contents.draw_frame_text(72,  160, 96, 32, ": "+item.dex_plus.to_s, 0)
      self.contents.draw_frame_text(72,  176, 96, 32, ": "+item.agi_plus.to_s, 0)
      self.contents.draw_frame_text(72,  192, 96, 32, ": "+item.int_plus.to_s, 0)
      self.contents.font.color = system_color
      self.contents.draw_frame_text(72,  224, 96, 32, ": "+item.eva.to_s+"%", 0)
      self.contents.draw_frame_text(72,  240, 96, 32, ": "+item.hit.to_s+"%", 0)
      self.contents.font.color = Color.new(128, 128, 128)
      self.contents.draw_frame_text(4, 272, 288, 32, item.description.to_s, 0)
    else
      self.contents.draw_text(4,    80, 120, 32, $data_system.words.atk)
      self.contents.draw_text(4,    96, 120, 32, $data_system.words.pdef)
      self.contents.draw_text(4,   112, 120, 32, $data_system.words.mdef)
      self.contents.draw_text(4,   144, 120, 32, $data_system.words.str)
      self.contents.draw_text(4,   160, 120, 32, $data_system.words.dex)
      self.contents.draw_text(4,   176, 120, 32, $data_system.words.agi)
      self.contents.draw_text(4,   192, 120, 32, $data_system.words.int)
      atk_x = self.contents.text_size($data_system.words.atk).width
      pdef_x = self.contents.text_size($data_system.words.pdef).width
      mdef_x = self.contents.text_size($data_system.words.pdef).width
      str_x = self.contents.text_size($data_system.words.str).width
      dex_x = self.contents.text_size($data_system.words.dex).width
      agi_x = self.contents.text_size($data_system.words.agi).width
      int_x = self.contents.text_size($data_system.words.int).width
      eva_x = self.contents.text_size("회피율").width
      hit_x = self.contents.text_size("명중률").width
      self.contents.font.color = normal_color
      self.contents.draw_text(atk_x + 15,   80, 96, 32, "+"+item.atk.to_s, 0)
      self.contents.draw_text(pdef_x + 15,   96, 96, 32, "+"+item.pdef.to_s, 0)
      self.contents.draw_text(mdef_x + 15,  112, 96, 32, "+"+item.mdef.to_s, 0)     
      self.contents.font.color = system_color
      self.contents.draw_text(4,   224, 120, 32, "회피율")     
      self.contents.draw_text(4,   240, 120, 32, "명중률")
      self.contents.font.color = crisis_color
      self.contents.draw_text(str_x + 15,  144, 96, 32, ": "+item.str_plus.to_s, 0)
      self.contents.draw_text(dex_x + 15,  160, 96, 32, ": "+item.dex_plus.to_s, 0)
      self.contents.draw_text(agi_x + 15,  176, 96, 32, ": "+item.agi_plus.to_s, 0)
      self.contents.draw_text(int_x + 15,  192, 96, 32, ": "+item.int_plus.to_s, 0)
      self.contents.font.color = system_color
      self.contents.draw_text(eva_x + 15,  224, 96, 32, ": "+item.eva.to_s+"%", 0)
      self.contents.draw_text(hit_x + 15,  240, 96, 32, ": "+item.hit.to_s+"%", 0)
      self.contents.font.color = Color.new(128, 128, 128)
      self.contents.draw_text(4, 272, 288, 32, item.description.to_s, 0)
    end
  end
  #--------------------------------------------------------------------------
  # ○ 아이템 정보 묘화
  #--------------------------------------------------------------------------
  def draw_item_info(item)
    self.contents.font.size = 15
    self.contents.font.color = LPG::ItemStatusMode::TEXT_COLOR_SCRIPT ? sg_artifact_colors(item) : normal_color
    if $LPG_imported["ItemNameExtension"]
      ex_name = LPG::ItemNameExtension::ITEM_EX_NAME[item.id]
      if ex_name == nil
        ex_name = LPG::ItemNameExtension::DEFAULT_EX_NAME
      end
    end
    if LPG::ItemStatusMode::BITMAP_SCRIPT
      self.contents.draw_shadow_text(4,     0, 288, 32, item.name.to_s)
      self.contents.draw_shadow_text(4,    16, 288, 32, ex_name.to_s)
    else
      self.contents.draw_text(4,     0, 288, 32, item.name.to_s)
      self.contents.draw_text(4,    16, 288, 32, ex_name.to_s)
    end
    self.contents.font.color = normal_color
    self.contents.draw_text(4,    32, 288, 32, "________________________________________________________")
    self.contents.draw_text(-4,    48, 288, 32, item.price.to_s + " " + $data_system.words.gold, 2)
    number = $game_party.item_number(item.id)
    self.contents.font.color = system_color
    if LPG::ItemStatusMode::BITMAP_SCRIPT
      if $LPG_imported["ItemLimit"]
        # 아이템의 현재 소지수와 소지 한도를 표시한다.
        item_limit = LPG::ItemLimit::ITEM_LIMIT[item.id]
        self.contents.draw_frame_text(4,    64, 120, 32, "수량 : "+number.to_s+" / "+item_limit.to_s)
      else
        # 아이템의 현재 소지수만 표시한다.
        self.contents.draw_frame_text(4,    64, 120, 32, "수량 : "+number.to_s)
      end
    else
      self.contents.draw_text(4,    64, 120, 32, "수량 : "+number.to_s)
    end
    if item.occasion == 0
      use_text = LPG::ItemStatusMode::ALL_OCCASION
    elsif item.occasion == 1
      use_text = LPG::ItemStatusMode::BATTLE_OCCASION
    elsif item.occasion == 2
      use_text = LPG::ItemStatusMode::MENU_OCCASION
    elsif item.occasion == 3
      use_text = LPG::ItemStatusMode::IMPOSSIBLE_OCCASION
    end
    self.contents.font.color = item.occasion == 3 ? knockout_color : normal_color
    if LPG::ItemStatusMode::BITMAP_SCRIPT   
      self.contents.draw_frame_text(-4,    80, 288, 32, use_text.to_s, 2)
    else
      self.contents.draw_text(-4,    80, 288, 32, use_text.to_s, 2)
    end
    self.contents.font.color = normal_color
    if item.scope == 0
      range_text = ""
    elsif item.scope == 1
      range_text = "적 단체"
    elsif item.scope == 2
      range_text = "적 범위"
    elsif item.scope == 3
      range_text = "아군 단체"
    elsif item.scope == 4
      range_text = "아군 범위"
    elsif item.scope == 5
      range_text = "아군 단체 (HP 0)"
      self.contents.font.color = crisis_color
    elsif item.scope == 6
      range_text = "아군 범위 (HP 0)"
      self.contents.font.color = crisis_color
    elsif item.scope == 7
      range_text = "사용자"
    end
    if LPG::ItemStatusMode::BITMAP_SCRIPT   
      self.contents.draw_frame_text(-4,    96, 288, 32, range_text.to_s, 2)
      self.contents.font.color = system_color
      self.contents.draw_frame_text(4,    128, 288, 32, item.description.to_s, 0)
    else
      self.contents.draw_text(-4,    96, 288, 32, range_text.to_s, 2)
      self.contents.font.color = system_color
      self.contents.draw_text(4,    128, 288, 32, item.description.to_s, 0)
    end
  end
end

#==============================================================================
# ■ Scene_Item
#------------------------------------------------------------------------------
#  아이템 화면의 처리를 실시하는 클래스입니다.
#==============================================================================

class Scene_Item
  #--------------------------------------------------------------------------
  # ● 메인 처리
  #--------------------------------------------------------------------------
  def main
    start
    # 아이템 윈도우를 작성
    @item_window = Window_Item.new
    @status_window = Window_ItemStatus.new
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 480 - @gold_window.height
    # 헬프 윈도우를 관련지어
    # 타겟 윈도우를 작성 (불가시·비액티브하게 설정)
    @target_window = Window_Target.new
    @target_window.visible = false
    @target_window.active = false
   
    @item_window.index = 0
    @status_window.refresh(@item_window.item)
   
    # 트란지션 실행
    Graphics.transition
    # 메인 루프
    loop do
      # 게임 화면을 갱신
      Graphics.update
      # 입력 정보를 갱신
      Input.update
      # 프레임 갱신
      update
      # 화면이 바뀌면 루프를 중단
      if $scene != self
        break
      end
    end
    # 트란지션 준비
    Graphics.freeze
    # 윈도우를 해방
    @item_window.dispose
    @status_window.dispose
    @gold_window.dispose
    @target_window.dispose
    @spriteset.dispose
  end
  #--------------------------------------------------------------------------
  # ○ 리프레쉬
  #--------------------------------------------------------------------------
  def refresh
    @item_window.refresh
    @status_window.refresh(nil)
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  def update
    # 윈도우를 갱신
    @item_window.update
    @status_window.update
    @gold_window.update
    @target_window.update
    @spriteset.update
    # 아이템 윈도우가 액티브의 경우: update_item 를 부른다
    if @item_window.active
      update_item
      return
    end
    # 타겟 윈도우가 액티브의 경우: update_target 를 부른다
    if @target_window.active
      update_target
      return
    end
  end
  #--------------------------------------------------------------------------
  # ○ 개시 처리
  #--------------------------------------------------------------------------
  def start
    @spriteset = Spriteset_Map.new
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (아이템 윈도우가 액티브의 경우)
  #--------------------------------------------------------------------------
  def update_item
    if @now_sel_item != @item_window.index
      # 스테이터스 윈도우를 리프레쉬
      @status_window.refresh(@item_window.item)
      @now_sel_item = @item_window.index
    end
    # B 버튼이 밀렸을 경우
    if Input.trigger?(Input::B)
      # 캔슬 SE 를 연주
      $game_system.se_play($data_system.cancel_se)
      # 메뉴 화면으로 전환해
      $scene = Scene_Menu.new(0)
      return
    end
    # C 버튼이 밀렸을 경우
    if Input.trigger?(Input::C)
      # 아이템 윈도우로 현재 선택되고 있는 데이터를 취득
      @item = @item_window.item
      # 사용 아이템이 아닌 경우
      unless @item.is_a?(RPG::Item)
        # 버저 SE 를 연주
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 사용할 수 없는 경우
      unless $game_party.item_can_use?(@item.id)
        # 버저 SE 를 연주
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 결정 SE 를 연주
      $game_system.se_play($data_system.decision_se)
      # 효과 범위가 아군의 경우
      if @item.scope >= 3
        # 타겟 윈도우를 액티브화
        @item_window.active = false
        @target_window.x = (@item_window.index + 1) % 2 * 304
        @target_window.visible = true
        @target_window.active = true
        # 효과 범위 (단체/전체)에 따라 커서 위치를 설정
        if @item.scope == 4 || @item.scope == 6
          @target_window.index = -1
        else
          @target_window.index = 0
        end
      # 효과 범위가 아군 이외의 경우
      else
        # 코먼 이벤트 ID 가 유효의 경우
        if @item.common_event_id > 0
          # 코먼 이벤트 호출 예약
          $game_temp.common_event_id = @item.common_event_id
          # 아이템의 사용시 SE 를 연주
          $game_system.se_play(@item.menu_se)
          # 소모품의 경우
          if @item.consumable
            # 사용한 아이템을 1 줄인다
            $game_party.lose_item(@item.id, 1)
            # 아이템 윈도우의 항목을 재묘화
            @item_window.draw_item(@item_window.index)
          end
          # 맵 화면으로 전환해
          $scene = Scene_Map.new
          return
        end
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (타겟 윈도우가 액티브의 경우)
  #--------------------------------------------------------------------------
  def update_target
    # B 버튼이 밀렸을 경우
    if Input.trigger?(Input::B)
      # 캔슬 SE 를 연주
      $game_system.se_play($data_system.cancel_se)
      # 아이템 조각등에서 사용할 수 없게 되었을 경우
      unless $game_party.item_can_use?(@item.id)
        # 아이템 윈도우의 내용을 재작성
        @item_window.refresh
      end
      # 타겟 윈도우를 소거
      @item_window.active = true
      @target_window.visible = false
      @target_window.active = false
      return
    end
    # C 버튼이 밀렸을 경우
    if Input.trigger?(Input::C)
      # 아이템을 다 사용했을 경우
      if $game_party.item_number(@item.id) == 0
        # 버저 SE 를 연주
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 타겟이 전체의 경우
      if @target_window.index == -1
        # 파티 전체에 아이템의 사용 효과를 적용
        used = false
        for i in $game_party.actors
          used |= i.item_effect(@item)
        end
      end
      # 타겟이 단체의 경우
      if @target_window.index >= 0
        # 타겟의 액터에게 아이템의 사용 효과를 적용
        target = $game_party.actors[@target_window.index]
        used = target.item_effect(@item)
      end
      # 아이템을 사용했을 경우
      if used
        # 아이템의 사용시 SE 를 연주
        $game_system.se_play(@item.menu_se)
        # 소모품의 경우
        if @item.consumable
          # 사용한 아이템을 1 줄인다
          $game_party.lose_item(@item.id, 1)
          # 아이템 윈도우의 항목을 재묘화
          @item_window.draw_item(@item_window.index)
        end
        # 타겟 윈도우의 내용을 재작성
        @target_window.refresh
        # 전멸의 경우
        if $game_party.all_dead?
          # 게임 오버 화면으로 전환해
          $scene = Scene_Gameover.new
          return
        end
        # 코먼 이벤트 ID 가 유효의 경우
        if @item.common_event_id > 0
          # 코먼 이벤트 호출 예약
          $game_temp.common_event_id = @item.common_event_id
          # 맵 화면으로 전환해
          $scene = Scene_Map.new
          return
        end
      end
      # 아이템을 사용하지 않았던 경우
      unless used
        # 버저 SE 를 연주
        $game_system.se_play($data_system.buzzer_se)
      end
      return
    end
  end
end

끝 끝 끝 끝 끝 끝 끝 끝 끝 끝 끝 끝 끝 끝 끝

Sch_000002.JPG

CafeBanner.gif

Who's Claymore

?

Yellow Imagination ( 노란빛 상상력 )

 

배너를 클릭하시면 해당 홈페이지로 이동합니다.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Yellow Imagination - LESTIminus

Yellow Imagination / LESTIminus

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Yellow Imagination - LESTIminus

발렌시아 온라인 / ??????

 

 ■  Work

┗ Icon

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Atachment
첨부 '2'
Comment '11'
  • profile
    박빙고 2009.08.17 09:48

    오와~!!!!!

    이거 찼던건데!!!

    꼭 던파아이템 소개화면이랑 비슷하네요!

    암튼 님 정말 감사합니다.

  • ?
    G MAX 2009.09.04 12:42
    감사합니다.
  • ?
    G MAX 2009.09.04 12:43
    수정하기가 좀노가다를 해야겟네요;
  • ?
    응가해 2009.09.12 20:09

    와 정말 좋은자료 감사합니다.

    근데 수정 노가다

  • ?
    우왕궅키 2010.01.06 15:22

    ㄳ~!!!!@ 합니다!

  • ?
    하히후헤호 2010.01.15 18:40

    666줄오류나는댕..

     

  • ?
    금빛팬더 2010.01.27 16:32

    음...

    이해가 않가는 저같은 분들을 위해

    예제 파일 하나 올려주셨음

    더 감사했을듯!

     

    아무튼 감사드리고요 잘스겠습니다.

  • ?
    낙서 2010.02.20 15:08

  • ?
    리프네버 2010.03.17 23:43

    데모파일같은것이 있다면 정말 좋겠는데..

  • ?
    룰랄루루 2010.12.06 20:50

    이거 헬름을 부츠로 바꿨는데 그대로인데... 어떻게해야하죠?

  • ?
    하누마 2011.01.19 23:32

    오, 아이템 이름 색 바꾸는 스크립트도 있었군요.. 둘 다 찾던건데 감사합니다.


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
761 메뉴 메뉴....있길래올립니다. 9 벨☆ 2010.01.23 2001
760 기타 턴제새로운거. 39 file 이안 2010.01.17 3293
759 기타 스탯 13 file 이안 2010.01.17 2319
758 직업 직업 10 file 이안 2010.01.17 2838
757 HUD 맵이름스크립트 52 file 이안 2010.01.17 3552
756 기타 rpgxp [체험판] 입니다. 6 file 인웅이 아부지 2010.01.12 2289
755 이동 및 탈것 텔레포트 스크립트. 11 XP광 2010.01.12 2392
754 스탯 포인트 시스템 3차수정 ( ' 백호 ' 님이 올리신 자료 수정.) 26 카이어덱터 2010.01.04 3344
753 HUD 이름띄우기스크립트 - [ID홍길동] 이 아닌 [홍길동]으로 표기하기 27 블루레스 2009.11.06 4054
752 온라인 NetRPGXP Client Core 일부분임 8 백호 2009.10.06 2882
751 전투 [액알]neo_a-rpg_module_1[1][1].2 스크립트 83 file 은빛바람 2009.10.03 8298
750 기타 한계 돌파스크립트 8 G MAX 2009.09.03 2203
749 기타 홈페이지 띄우기 (VX 상관없음.) 6 KNAVE 2009.08.25 2137
748 스킬 스킬샵 스크립트 16 file 독도2005 2009.08.24 4217
747 HUD [VX 가능] 이벤트 이름 띄우기 41 file 독도2005 2009.08.22 3901
746 기타 클리어 횟수 기록하기 1 file 허걱 2009.08.22 2187
745 이동 및 탈것 도트이동 5 file 허걱 2009.08.19 2889
744 스킬 스킬 컷인 - 전투시만.. 4 file 허걱 2009.08.16 3297
» 아이템 [LPG] 아이템 상세정보 - ◇ Last Update : 2009/08/11 ◇ 11 file Claymore 2009.08.16 3307
742 기타 스탭 롤 9 file 허걱 2009.08.13 2904
Board Pagination Prev 1 ... 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ... 52 Next
/ 52