XP 스크립트

#アイテム図鑑
#
#アイテム図鑑ですが、汎用性を持たせようと色々やってしまった結果
#ちょっと、複雑になってしまったかも知れません…
#
#●設定方法
#・基本的な使い方
# 普通に使うだけなら、このままコピペで大丈夫です(多分)
# アイテムに「図鑑登録無効」属性をつけていると
# 図鑑に登録されなくなります。
#
#・武器、防具、道具を細かく分類する方法
# まず、 Data_ItemBook の initialize で設定している
# @item_kind_name :道具の表示名
# @weapon_kind_name :武器の表示名
# @armor_kind_name :防具の表示名
# を、書き換えてください。
# 具体的には、@item_kind_name = ["貴重品", "回復薬", "戦闘用", "その他"]
# みたいな感じで書き換えればOKです。(武器、防具も同様です。)
# これは、実際に画面に表示される分類名です。
# 最低1つは設定しておかなければいけません。
#
# 次に、そのすぐ下にある @kind_row を設定します。
# これは、分類名が表示されるリストの並び順です。
# 先程設定した分類名を自分が並べたい順番に書いていってください。
# @kind_row = ["武器",
# "防具",
# "回復薬",
# "戦闘用",
# "その他",
# "貴重品"]
# こんな感じです。
# このとき、名前を間違えないように気をつけてください
# 名前で色々判別してたりするので、間違ってしまうと正常に動きません(多分)
#
# 最後に、更に下にある
# @item_kind_element_name :道具の分類判定用属性名
# @weapon_kind_element_name :武器の分類判定用属性名
# @armor_kind_element_name :防具の分類判定用属性名
# を書き換えます。
# これは、分類を判別するため使う属性の名前です。
# これを、最初に設定した分類名に対応するように設定してください。
# 最初に
# @item_kind_name = ["貴重品", "回復薬", "戦闘用", "その他"]
# こう、設定したとしたら
# @item_kind_element_name = ["貴重", "回復", "戦闘", "その他"]
# こんな感じです。
# そして、実際にデータベースで設定した名前で属性を作り
# アイテムに付与してください。
# ちなみに、ここに何も設定しないと属性とか関係なく
# 全てのアイテムが判定されるようになります。(初期設定)
#
# 下に、適当な設定例を載せておきます(テストプレイ時に使用したものです)
#
# @item_kind_name = ["だいじなもの", "ふつうなもの"]
# @weapon_kind_name = ["武器"]
# @armor_kind_name = ["盾", "鎧", "その他"]
# @kind_row = ["だいじなもの",
# "武器",
# "盾",
# "鎧",
# "その他",
# "ふつうなもの"]
# @item_kind_element_name = ["貴重品", "普通道具"]
# @weapon_kind_element_name = []
# @armor_kind_element_name = ["盾", "鎧", "その他"]
#
#ちなみに、アイテムの詳細画面は
#要・自力でカスタマイズです。
#別にそのままでも使えなくはないと思いますが
#いろいろ不便な事があるかもしれません。
#
#説明長いですね…

class Data_ItemBook
attr_reader :item_kind_name
attr_reader :weapon_kind_name
attr_reader :armor_kind_name
attr_reader :kind_row
attr_reader :item_id_data
attr_reader :weapon_id_data
attr_reader :armor_id_data
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize

# ↓以下、設定用のいろいろ
@item_kind_name = ["도구"]
@weapon_kind_name = ["무기"]
@armor_kind_name = ["방어구"]
@kind_row = ["도구",
"무기",
"방어구"]
@item_kind_element_name = []
@weapon_kind_element_name = []
@armor_kind_element_name = []
# ↑ココまで

@item_id_data = item_book_id_set
@weapon_id_data = weapon_book_id_set
@armor_id_data = armor_book_id_set
end
#--------------------------------------------------------------------------
# ● 指定された種類表示名の情報を返す
#--------------------------------------------------------------------------
def kind_search(name)
if @item_kind_name.include?(name)
return [0, @item_kind_name.index(name)]
elsif @weapon_kind_name.include?(name)
return [1, @weapon_kind_name.index(name)]
elsif @armor_kind_name.include?(name)
return [2, @armor_kind_name.index(name)]
end
end
#--------------------------------------------------------------------------
# ● 図鑑用登録無視属性取得
#--------------------------------------------------------------------------
def no_add_element
no_add = 0
# 登録無視の属性IDを取得
for i in 1...$data_system.elements.size
if $data_system.elements[i] =~ /図鑑登録無効/
no_add = i
break
end
end
return no_add
end

#--------------------------------------------------------------------------
# ● 指定された属性名のIDを返す
#--------------------------------------------------------------------------
def element_search(element_name)
for i in 1...$data_items.size
if $data_system.elements[i] =~ /^#{element_name}/
return i
end
end
end

#--------------------------------------------------------------------------
# ● 図鑑用アイテムID設定
#--------------------------------------------------------------------------
def item_book_id_set
data = []
no_add = no_add_element
if @item_kind_element_name.size == 0
data[0] = [0]
for i in 1...$data_items.size
item = $data_items[i]
next if item.name == ""
next if item.element_set.include?(no_add)
data[0].push(item.id)
end
else
for i in 0...@item_kind_element_name.size
data[i] = [0]
element_id = element_search(@item_kind_element_name[i])
for j in 1...$data_items.size
item = $data_items[j]
next if item.name == ""
next if item.element_set.include?(no_add)
if item.element_set.include?(element_id)
data[i].push(item.id)
end
end
end
end
return data
end
#--------------------------------------------------------------------------
# ● 図鑑用武器ID設定
#--------------------------------------------------------------------------
def weapon_book_id_set
data = []
no_add = no_add_element
if @weapon_kind_element_name.size == 0
data[0] = [0]
for i in 1...$data_weapons.size
item = $data_weapons[i]
next if item.name == ""
next if item.element_set.include?(no_add)
data[0].push(item.id)
end
else
for i in 0...@weapon_kind_element_name.size
data[i] = [0]
element_id = element_search(@weapon_kind_element_name[i])
for j in 1...$data_weapons.size
item = $data_weapons[j]
next if item.name == ""
next if item.element_set.include?(no_add)
if item.element_set.include?(element_id)
data[i].push(item.id)
end
end
end
end
return data
end
#--------------------------------------------------------------------------
# ● 図鑑用防具ID設定
#--------------------------------------------------------------------------
def armor_book_id_set
data = []
no_add = no_add_element
if @armor_kind_element_name.size == 0
data[0] = [0]
for i in 1...$data_armors.size
item = $data_armors[i]
next if item.name == ""
next if item.guard_element_set.include?(no_add)
data[0].push(item.id)
end
else
for i in 0...@armor_kind_element_name.size
data[i] = [0]
element_id = element_search(@armor_kind_element_name[i])
for j in 1...$data_armors.size
item = $data_armors[j]
next if item.name == ""
next if item.guard_element_set.include?(no_add)
if item.guard_element_set.include?(element_id)
data[i].push(item.id)
end
end
end
end
return data
end
end

class Window_Base < Window
#--------------------------------------------------------------------------
# ● 基本属性表示
#--------------------------------------------------------------------------
def draw_attack_element(x, y, element_set)
elem_temp = []
for i in element_set
elem = $data_system.elements[i]
elem_temp.push("화") if elem == "화"
elem_temp.push("빙") if elem == "빙"
elem_temp.push("뇌") if elem == "뇌"
elem_temp.push("수") if elem == "수"
elem_temp.push("지") if elem == "지"
elem_temp.push("풍") if elem == "풍"
elem_temp.push("성") if elem == "성"
elem_temp.push("암") if elem == "암"
elem_temp.push("악") if elem == "악"
elem_temp.push("염") if elem == "염"
elem_temp.push("독") if elem == "독"
elem_temp.push("무") if elem == "무"
elem_temp.push("평도") if elem == "평도"
elem_temp.push("대검") if elem == "대검"
elem_temp.push("세검") if elem == "세검"
elem_temp.push("단검") if elem == "단검"
elem_temp.push("단도") if elem == "단도"
elem_temp.push("지팡이") if elem == "지팡이"
elem_temp.push("둔기") if elem == "둔기"
end
if elem_temp.size == 0
self.contents.draw_text(x, y, 64, 32, "없음")
return
end
ox = 0
for name in elem_temp
cx = self.contents.text_size(name).width
self.contents.draw_text(x+ox, y, cx, 32, name)
ox += cx+8
end
end
#--------------------------------------------------------------------------
# ● 武器属性表示
#--------------------------------------------------------------------------
def draw_attack_wp_element(x, y, element_set)
elem_temp = []
for i in element_set
elem = $data_system.elements[i]
elem_temp.push("베기") if elem == "베기"
elem_temp.push("타격") if elem == "타격"
elem_temp.push("찌르기") if elem == "찌르기"
elem_temp.push("평도") if elem == "평도"
elem_temp.push("대검") if elem == "대검"
elem_temp.push("세검") if elem == "세검"
elem_temp.push("단검") if elem == "단검"
elem_temp.push("단도") if elem == "단도"
elem_temp.push("지팡이") if elem == "지팡이"
elem_temp.push("둔기") if elem == "둔기"
end
if elem_temp.size == 0
self.contents.draw_text(x, y, 64, 32, "없음")
return
end
ox = 0
for name in elem_temp
cx = self.contents.text_size(name).width
self.contents.draw_text(x+ox, y, cx, 32, name)
ox += cx+8
end
end
#--------------------------------------------------------------------------
# ● 特攻属性表示
#--------------------------------------------------------------------------
def draw_attack_weak_element(x, y, element_set)
elem_temp = []
for i in element_set
elem = $data_system.elements[i]
elem_temp.push("不死") if elem == "対 不死"
elem_temp.push("蛇") if elem == "対 蛇"
elem_temp.push("水棲") if elem == "対 水棲"
elem_temp.push("獣") if elem == "対 獣"
elem_temp.push("鬼") if elem == "対 鬼"
elem_temp.push("鳥") if elem == "対 鳥"
elem_temp.push("悪魔") if elem == "対 悪魔"
elem_temp.push("天使") if elem == "対 天使"
end
if elem_temp.size == 0
self.contents.draw_text(x, y, 64, 32, "없음")
return
end
ox = 0
for name in elem_temp
cx = self.contents.text_size(name).width
self.contents.draw_text(x+ox, y, cx, 32, name)
ox += cx+8
end
end
#--------------------------------------------------------------------------
# ● ステート付与表示
#--------------------------------------------------------------------------
def draw_attack_add_state(x, y, plus_state_set)
state_temp = []
for i in plus_state_set
state = $data_states[i]
state_temp.push(state.name) if state.name != ""
end
if state_temp.size == 0
self.contents.draw_text(x, y, 64, 32, "없음")
return
end
ox = 0
oy = 0
for name in state_temp
cx = self.contents.text_size(name).width
if ox + cx + 4 >= self.contents.width - 128
ox = 0
oy += 1
end
self.contents.draw_text(x+ox, y+oy*32, cx, 32, name)
ox += cx+8
end
end
#--------------------------------------------------------------------------
# ● 効果範囲を返す
#--------------------------------------------------------------------------
def draw_scope(scope)
case scope
when 0
return "없음"
when 1
return "敵単体"
when 2
return "敵全体"
when 3
return "味方単体"
when 4
return "味方全体"
when 5
return "味方単体"
when 6
return "味方全体"
when 7
return "使用者"
end
end
end

class Game_Temp
attr_accessor :item_book_data
alias temp_item_book_data_initialize initialize
def initialize
temp_item_book_data_initialize
@item_book_data = Data_ItemBook.new
end
end

class Game_Party
attr_accessor :item_count # 入手アイテム情報(図鑑用)
attr_accessor :weapon_count # 入手武器情報(図鑑用)
attr_accessor :armor_count # 入手防具情報(図鑑用)
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
alias item_book_info_initialize initialize
def initialize
item_book_info_initialize
@item_count = {}
@weapon_count = {}
@armor_count = {}
end
alias item_book_gain_item gain_item
def gain_item(item_id, n)
add_item_count(item_id, 0) if n > 0
item_book_gain_item(item_id, n)
end
alias item_book_gain_weapon gain_weapon
def gain_weapon(item_id, n)
add_weapon_count(item_id, 0) if n > 0
item_book_gain_weapon(item_id, n)
end
alias item_book_gain_armor gain_armor
def gain_armor(item_id, n)
add_armor_count(item_id, 0) if n > 0
item_book_gain_armor(item_id, n)
end

#--------------------------------------------------------------------------
# ● アイテムの獲得情報の追加(図鑑用)
# 0:無獲得 1:獲得済
#--------------------------------------------------------------------------
def add_item_count(item_id, type = 0)
if type == -1
@item_count[item_id] = 0
else
@item_count[item_id] = 1
end
end
#--------------------------------------------------------------------------
# ● 武器の獲得情報の追加(図鑑用)
# 0:無獲得 1:獲得済
#--------------------------------------------------------------------------
def add_weapon_count(weapon_id, type = 0)
if type == -1
@weapon_count[weapon_id] = 0
else
@weapon_count[weapon_id] = 1
end
end
#--------------------------------------------------------------------------
# ● 防具の獲得情報の追加(図鑑用)
# 0:無獲得 1:獲得済
#--------------------------------------------------------------------------
def add_armor_count(armor_id, type = 0)
if type == -1
@armor_count[armor_id] = 0
else
@armor_count[armor_id] = 1
end
end
end


class Window_ItemBook < Window_Selectable
attr_reader :data
attr_reader :item_kind
attr_reader :item_index
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(index=0)
super(0, 64, 640, 416)
@column_max = 2
@book_data = $game_temp.item_book_data
@data = data_set(index)
@data.shift
#@data.sort!
@item_max = @data.size
@item_kind = index
self.index = 0
#refresh
end
def new_data_set(index)
@data = data_set(index)
@data.shift
#@data.sort!
@item_max = @data.size
end
#--------------------------------------------------------------------------
# ● 入手データを取得
#--------------------------------------------------------------------------
def data_set(index)
kind_row_data = @book_data.kind_search(@book_data.kind_row[index])
@item_kind = kind_row_data[0]
@item_index = kind_row_data[1]
data = []
case @item_kind
when 0
data = @book_data.item_id_data[@item_index].dup
when 1
data = @book_data.weapon_id_data[@item_index].dup
when 2
data = @book_data.armor_id_data[@item_index].dup
end
return data
end
#--------------------------------------------------------------------------
# ● 表示許可取得
#--------------------------------------------------------------------------
def show?(kind, id)
case kind
when 0
if $game_party.item_count[id] == 0 or $game_party.item_count[id] == nil
return false
else
return true
end
when 1
if $game_party.weapon_count[id] == 0 or $game_party.weapon_count[id] == nil
return false
else
return true
end
when 2
if $game_party.armor_count[id] == 0 or $game_party.armor_count[id] == nil
return false
else
return true
end
end
end
#--------------------------------------------------------------------------
# ● アイテム取得
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
#項目数が 0 でなければビットマップを作成し、全項目を描画
return if @item_max == 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
#--------------------------------------------------------------------------
# ● 項目の描画
# index : 項目番号
#--------------------------------------------------------------------------
def draw_item(index)
case @item_kind
when 0
item = $data_items[@data[index]]
id = @book_data.item_id_data[@item_index].index(item.id)
when 1
item = $data_weapons[@data[index]]
id = @book_data.weapon_id_data[@item_index].index(item.id)
when 2
item = $data_armors[@data[index]]
id = @book_data.armor_id_data[@item_index].index(item.id)
end
return if item == nil
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 32, 32, id.to_s)
if show?(@item_kind, item.id)
bitmap = RPG::Cache.icon(item.icon_name)
opacity = 255
self.contents.blt(x+48, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x+48 + 28, y, 212, 32, item.name, 0)
else
self.contents.draw_text(x+48 + 28, y, 212, 32, "-----", 0)
return
end
end
end


class Window_ItemBook_Info < Window_Selectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0+64+64, 640, 480-64-64)
@book_data = $game_temp.item_book_data
self.contents = Bitmap.new(width - 32, height - 32)
self.index = -1
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh(item_id, item_kind, item_index)
self.contents.clear
self.contents.font.size = 22
case item_kind
when 0
draw_item_info(item_id, item_index)
when 1
draw_weapon_info(item_id, item_index)
when 2
draw_armor_info(item_id, item_index)
end
end
#--------------------------------------------------------------------------
# ● アイテム描画
#--------------------------------------------------------------------------
def draw_item_info(item_id, item_index)
item = $data_items[item_id]
rect = Rect.new(4, 0, 160, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = 255
self.contents.blt(4+48, 0 + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.font.color = normal_color
id = @book_data.item_id_data[item_index].index(item.id)
self.contents.draw_text(4, 0, 32, 32, id.to_s)
self.contents.draw_text(4+48 + 28, 0, 212, 32, item.name, 0)
self.contents.draw_text(640-128-88-4, 0, 88, 32, item.price.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(640-128, 0, 128, 32, $data_system.words.gold, 0)
self.contents.font.color = normal_color
@help_window.set_text(item.description)
end
#--------------------------------------------------------------------------
# ● 武器描画
#--------------------------------------------------------------------------
def draw_weapon_info(item_id, item_index)
item = $data_weapons[item_id]
rect = Rect.new(4, 0, 160, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = 255
self.contents.blt(4+48, 0 + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.font.color = normal_color
id = @book_data.weapon_id_data[item_index].index(item.id)
self.contents.draw_text(4, 0, 32, 32, id.to_s)
self.contents.draw_text(4+48 + 28, 0, 212, 32, item.name, 0)
self.contents.draw_text(640-128-88-4, 0, 88, 32, item.price.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(640-128, 0, 128, 32, $data_system.words.gold, 0)
self.contents.font.color = text_color(2)
self.contents.draw_text(4, 32, 48, 32, "ATK", 0)
self.contents.font.color = text_color(4)
self.contents.draw_text(4+128, 32, 48, 32, "DEF", 0)
self.contents.font.color = text_color(6)
self.contents.draw_text(4+256, 32, 48, 32, "MDF", 0)
self.contents.font.color = normal_color
self.contents.draw_text(4+48, 32, 48, 32, item.atk.to_s, 2)
self.contents.draw_text(4+48+128, 32, 48, 32, item.pdef.to_s, 2)
self.contents.draw_text(4+48+256, 32, 48, 32, item.mdef.to_s, 2)

self.contents.font.color = system_color
self.contents.draw_text(4, 64, 48, 32, "STR", 0)
self.contents.draw_text(4+128, 64, 48, 32, "DEX", 0)
self.contents.draw_text(4+256, 64, 48, 32, "SPD", 0)
self.contents.draw_text(4+384, 64, 48, 32, "MAT", 0)
self.contents.font.color = normal_color
self.contents.draw_text(4+48, 64, 48, 32, item.str_plus.to_s, 2)
self.contents.draw_text(4+48+128, 64, 48, 32, item.dex_plus.to_s, 2)
self.contents.draw_text(4+48+256, 64, 48, 32, item.agi_plus.to_s, 2)
self.contents.draw_text(4+48+384, 64, 48, 32, item.int_plus.to_s, 2)

self.contents.font.color = system_color
self.contents.draw_text(4, 96, 96, 32, "基本属性")
self.contents.draw_text(4, 128, 96, 32, "特攻属性")
self.contents.draw_text(4, 160, 96, 32, "付与ステート")
#self.contents.draw_text(4, 128, 96, 32, "武器属性")
self.contents.font.color = normal_color
draw_attack_element(4+96+16, 96, item.element_set)
draw_attack_weak_element(4+96+16, 128, item.element_set)
draw_attack_add_state(4+96+16, 160, item.plus_state_set)
#draw_attack_wp_element(4+96+16, 128, item.element_set)

@help_window.set_text(item.description)
end
#--------------------------------------------------------------------------
# ● 防具描画
#--------------------------------------------------------------------------
def draw_armor_info(item_id, item_index)
item = $data_armors[item_id]
rect = Rect.new(4, 0, 160, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = 255
self.contents.blt(4+48, 0 + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.font.color = normal_color
id = @book_data.armor_id_data[item_index].index(item.id)
self.contents.draw_text(4, 0, 32, 32, id.to_s)
self.contents.draw_text(4+48 + 28, 0, 212, 32, item.name, 0)
self.contents.draw_text(640-128-88-4, 0, 88, 32, item.price.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(640-128, 0, 128, 32, $data_system.words.gold, 0)
self.contents.font.color = text_color(4)
self.contents.draw_text(4, 32, 48, 32, "DEF", 0)
self.contents.font.color = text_color(6)
self.contents.draw_text(4+128, 32, 48, 32, "MDF", 0)
self.contents.font.color = system_color
self.contents.draw_text(4+256, 32, 48, 32, "回避", 0)
self.contents.font.color = normal_color
self.contents.draw_text(4+48, 32, 48, 32, item.pdef.to_s, 2)
self.contents.draw_text(4+48+128, 32, 48, 32, item.mdef.to_s, 2)
self.contents.draw_text(4+48+256, 32, 48, 32, item.eva.to_s, 2)

self.contents.font.color = system_color
self.contents.draw_text(4, 64, 48, 32, "STR", 0)
self.contents.draw_text(4+128, 64, 48, 32, "DEX", 0)
self.contents.draw_text(4+256, 64, 48, 32, "SPD", 0)
self.contents.draw_text(4+384, 64, 48, 32, "MAT", 0)
self.contents.font.color = normal_color
self.contents.draw_text(4+48, 64, 48, 32, item.str_plus.to_s, 2)
self.contents.draw_text(4+48+128, 64, 48, 32, item.dex_plus.to_s, 2)
self.contents.draw_text(4+48+256, 64, 48, 32, item.agi_plus.to_s, 2)
self.contents.draw_text(4+48+384, 64, 48, 32, item.int_plus.to_s, 2)

self.contents.font.color = system_color
self.contents.draw_text(4, 96, 96, 32, "基本耐性")
self.contents.draw_text(4, 128, 96, 32, "特攻耐性")
self.contents.draw_text(4, 160, 96, 32, "防御ステート")
#self.contents.draw_text(4, 128, 96, 32, "武器耐性")
self.contents.font.color = normal_color
draw_attack_element(4+96+16, 96, item.guard_element_set)
draw_attack_weak_element(4+96+16, 128, item.guard_element_set)
draw_attack_add_state(4+96+16, 160, item.guard_state_set)
#draw_attack_wp_element(4+96+16, 128, item.guard_element_set)

@help_window.set_text(item.description)
end
#--------------------------------------------------------------------------
# ● ヘルプテキスト更新
#--------------------------------------------------------------------------
def update_help
#ダミー
end
end


class Scene_ItemBook
#--------------------------------------------------------------------------
# ● メイン処理
#--------------------------------------------------------------------------
def main
# ウィンドウを作成
@title_window = Window_Base.new(0, 0, 640, 64)
@title_window.contents = Bitmap.new(640 - 32, 64 - 32)
@title_window.contents.draw_text(4, 0, 320, 32, "아이템 도감", 0)
@main_window = Window_ItemBook.new
@main_window.active = false
@help_window = Window_Help.new
@help_window.z = 110
@help_window.y = 64
@help_window.visible = false
command = $game_temp.item_book_data.kind_row
@kind_window = Window_Command.new(160, command)
@kind_window.z = 110
@kind_window.x = 320 - @kind_window.width / 2
@kind_window.y = 240 - @kind_window.height / 2
@kind_window.active = true
# インフォウィンドウを作成 (不可視・非アクティブに設定)
@info_window = Window_ItemBook_Info.new
@info_window.z = 110
@info_window.visible = false
@info_window.active = false
# ヘルプウィンドウを関連付け
@info_window.help_window = @help_window
@visible_index = 0
@now_kind = nil
# トランジション実行
Graphics.transition
# メインループ
loop do
# ゲーム画面を更新
Graphics.update
# 入力情報を更新
Input.update
# フレーム更新
update
# 画面が切り替わったらループを中断
if $scene != self
break
end
end
# トランジション準備
Graphics.freeze
# ウィンドウを解放
@title_window.dispose
@help_window.dispose
@main_window.dispose
@kind_window.dispose
@info_window.dispose
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
# ウィンドウを更新
#@help_window.update
@main_window.update
@kind_window.update
@info_window.update
if @info_window.active
update_info
return
end
# メインウィンドウがアクティブの場合: update_target を呼ぶ
if @main_window.active
update_main
return
end
# 種類ウィンドウがアクティブの場合: update_kind を呼ぶ
if @kind_window.active
update_kind
return
end
end
#--------------------------------------------------------------------------
# ● フレーム更新 (種類ウィンドウがアクティブの場合)
#--------------------------------------------------------------------------
def update_kind
# C ボタンが押された場合
if Input.trigger?(Input::C)
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
if @now_kind != @kind_window.index
@main_window.new_data_set(@kind_window.index)
@main_window.refresh
subtitle = $game_temp.item_book_data.kind_row[@kind_window.index]
title = "아이템 도감:"+subtitle
@now_kind = @kind_window.index
@title_window.contents.clear
@title_window.contents = Bitmap.new(640 - 32, 64 - 32)
@title_window.contents.draw_text(4, 0, 320, 32, title, 0)
end
@kind_window.active = false
@kind_window.visible = false
@main_window.active = true
return
end
# B ボタンが押された場合
if Input.trigger?(Input::B)
# キャンセル SE を演奏
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
end
#--------------------------------------------------------------------------
# ● フレーム更新 (メインウィンドウがアクティブの場合)
#--------------------------------------------------------------------------
def update_main
# B ボタンが押された場合
if Input.trigger?(Input::B)
# キャンセル SE を演奏
$game_system.se_play($data_system.cancel_se)
@main_window.active = false
@kind_window.active = true
@kind_window.visible = true
@main_window.index = 0
return
end
# C ボタンが押された場合
if Input.trigger?(Input::C)
if @main_window.item == nil or
@main_window.show?(@main_window.item_kind, @main_window.item) == false
# ブザー SE を演奏
$game_system.se_play($data_system.buzzer_se)
return
end
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
@main_window.active = false
@info_window.active = true
@info_window.visible = true
@visible_index = @main_window.index
@info_window.refresh(@main_window.item, @main_window.item_kind, @main_window.item_index)
return
end
end
#--------------------------------------------------------------------------
# ● フレーム更新 (インフォウィンドウがアクティブの場合)
#--------------------------------------------------------------------------
def update_info
# B ボタンが押された場合
if Input.trigger?(Input::B)
# キャンセル SE を演奏
$game_system.se_play($data_system.cancel_se)
@main_window.active = true
@info_window.active = false
@info_window.visible = false
@help_window.visible = false
return
end
# C ボタンが押された場合
if Input.trigger?(Input::C)
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
return
end
if Input.trigger?(Input::L)
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
loop_end = false
while loop_end == false
if @visible_index != 0
@visible_index -= 1
else
@visible_index = @main_window.data.size - 1
end
loop_end = true if @main_window.show?(@main_window.item_kind,@main_window.data[@visible_index])
end
id = @main_window.data[@visible_index]
@info_window.refresh(id, @main_window.item_kind, @main_window.item_index)
return
end
if Input.trigger?(Input::R)
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
loop_end = false
while loop_end == false
if @visible_index != @main_window.data.size - 1
@visible_index += 1
else
@visible_index = 0
end
loop_end = true if @main_window.show?(@main_window.item_kind,@main_window.data[@visible_index])
end
id = @main_window.data[@visible_index]
@info_window.refresh(id, @main_window.item_kind, @main_window.item_index)
return
end
end
end

 

불러오는법
$scene = Scene_ItemBook.new

Comment '14'
  • ?
    아부리 2009.01.23 01:01
    항상 좋은자료 감사합니다
  • ?
    후르츠파르페 2009.01.23 14:36
    ㅡ.ㅡ 뭔지 약간이라도 설명을 쫌..ㄷㄷ
  • ?
    Aakerse 2009.01.25 10:24
    좋은자료이긴 하지만.. 여기는 우리집이 아니여서 RPG만들기를 못 깐다는 ㅠ.ㅠ
  • ?
    섭현김 2009.01.30 11:25
    이거 스크립트 처음에 복사해 놔요??
    아니면 끝에 복사해 나요?
  • ?
    나뚜루 2009.01.31 11:34
    일본어 ㅜ.ㅜ
    자세한 설명을 해주셨으면..
  • ?
    뱅뱅뱅 2009.02.02 21:16

    물르는사람있을까봐 하는법 알려드릴게요 일단 저걸 복사합니다 그다음 F11를 눌른다음 맨아래
    스크립트있는걸 오른쪽버튼으로해서 삽입합니다(그러면칸이하나생깁니다)
    그다음 그쪽에 붙여넣기를 하세요 ㅎㅎ 그다음 아이템 만듭니다 아이템이름:아이템도감 소리 그런거 님이..
    그다음에 커먼 으로갑니다
    그리고 메뉴에서 3번쨰 마지막에있는 스크립트 눌러서$scene = Scene_ItemBook.new를 쓰고 아이템으로가 커먼 답니다
    그다음 그걸 쓰셈 ㅎㅎ 그럼 됩니다 그리고 그거 한글... 영어 그런거 절대없음

     
  • ?
    백년술사 2009.02.12 17:30
    오류가 많은가...
    왜 안돼지..
    407번하고 412번쯤이 문제 인듯..
  • profile
    박빙고 2009.07.30 10:57

    좋은 자료 잘 쓸개요^^

  • ?
    Amaster 2009.07.30 16:52

    이거 XP에 사용되는거 맞죠? ㄷ

  • ?
    우왕궅키 2010.01.05 20:58

  • ?
    뱅뱅뱅 2010.01.06 21:02

    다보게되면 완성된 도감으로 변해서 같다주면 보상주는 스크립트 같은것 없나 (개솔 ㅈㅅ)

    )

  • ?
    내로미 2010.03.25 01:01

    한글로 번역해 보았습니다.

    ▼한글로 번역된 스크립트

    #==============================================================================
    #  ◇◇◆아이템 도감◆◇◇ 편리성을 강조해 한글화를 변역자 - 내로미

    #==============================================================================

    # 아이템 도감하지만 범용성을 갖게하려고 다양 해 버린 결과
    # 조금 복잡하게되어 버린지도 모릅니다 ...
    #==============================================================================
    # ● 설정 방법
    # * 기본적인 사용법
    # 일반적으로 사용 뿐이라면, 이대로 코피페 괜찮은 (아마)
    # 항목에 "도감 등록 무효"속성을 클릭하고 있다고
    # 도감 등록되지 않습니다.
    #
    # * 무기, 방어구, 방안을 세밀하게 분류하는 방법
    # 먼저 Data_ItemBook의 initialize에 설정된
    # @ item_kind_name : 도구의 표시 이름
    # @ weapon_kind_name : 무기의 표시 이름
    # @ armor_kind_name : 방어구의 표시 이름
    #을 바꿔줍니다.
    # 특히, @ item_kind_name = [ "귀중품", "회복 약", "전투용", "기타"]
    # 같은 느낌으로 書き換えれ면 OK입니다. (무기, 방어구도 마찬가지입니다.)
    # 이것은 실제로 화면에 표시되는 범주 이름입니다.
    # 최소 1 개는 설정해 놓아야합니다.
    #
    # 다음 바로 아래에 @ kind_row을 설정합니다.
    # 이것은 분류 이름이 표시되는 목록의 순서입니다.
    # 방금 설정한 범주 이름을 자신이 정렬하려는 순서대로 쓰고 가셨.
    # @ kind_row = [ "무기"
    # "방구"
    # "복구 약"
    # "전투용"
    # "기타"
    # "귀중품"]
    # 다음과 같습니다.
    #이 때, 이름을 실수하지 않도록 조심하세요
    # 이름으로 다양한 확인하고 수도있어서 잘못 버리면 정상적으로 동작하지 않습니다 (아마)
    #
    # 마지막으로, 또는 아래에있는
    # @ item_kind_element_name : 도구의 분류 판정에 대한 속성 이름
    # @ weapon_kind_element_name : 무기의 분류 판정에 대한 속성 이름
    # @ armor_kind_element_name : 방구 분류 판정에 대한 속성 이름
    #를 다시 씁니다.
    # 이것은 분류를 결정하기 위해 사용하는 속성의 이름입니다.
    # 이것을 먼저 설정한 분류 이름과 일치하도록 설정하십시오.
    # 처음으로
    # @ item_kind_name = [ "귀중품", "회복 약", "전투용", "기타"]
    # 이렇게 설정했다고하면
    # @ item_kind_element_name = [ "귀중한", "회복", "전투", "기타"]
    # 다음과 같습니다.
    # 그리고 실제로 데이터베이스에서 설정한 이름으로 속성을 만들고
    # 상품에 부여합니다.
    # 참고로, 여기에서 아무것도 설정하지 않으면 속성이나 관계없이
    # 모든 아이템이 결정되는 것입니다. (기본값)
    #
    # 아래에 알맞은 설정 방법을 올려 둡니다 (테스토뿌레이 때 사용됩니다)
    #
    # @ item_kind_name = [ "중요한 것" "일반적인 것"]
    # @ weapon_kind_name = [ "무기"]
    # @ armor_kind_name = [ "방패", "갑옷", "기타"]
    # @ kind_row = [ "중요한 것"
    # "무기"
    # "방패"
    # "갑옷"
    # "기타"
    # "일반적인 것"]
    # @ item_kind_element_name = [ "귀중품", "일반적으로 도구"]
    # @ weapon_kind_element_name = []
    # @ armor_kind_element_name = [ "방패", "갑옷", "기타"]
    #
    # 참고로, 상품 정보 화면
    # 필요 자력으로 지정됩니다.
    # 별도 그대로도 사용할 수 없게 아니라고 생각 합니다만
    # 여러 가지 불편한 것이 있을지도 모릅니다.
    #
    # 설명 긴하네요 ...

    class Data_ItemBook
    attr_reader :item_kind_name
    attr_reader :weapon_kind_name
    attr_reader :armor_kind_name
    attr_reader :kind_row
    attr_reader :item_id_data
    attr_reader :weapon_id_data
    attr_reader :armor_id_data
    #------------------------------------------------- -------------------------
    # ● 오브젝트 초기화
    #------------------------------------------------- -------------------------
    def initialize

    # ↓ 다음, 설정을위한 다양한
    @item_kind_name = ["도구"]
    @weapon_kind_name = ["무기"]
    @armor_kind_name = ["방어구"]
    @kind_row = ["도구",
    "무기",
    "방어구"]
    @item_kind_element_name = []
    @weapon_kind_element_name = []
    @armor_kind_element_name = []
    # ↑ 코코까지

    @item_id_data = item_book_id_set
    @weapon_id_data = weapon_book_id_set
    @armor_id_data = armor_book_id_set
    end
    #------------------------------------------------- -------------------------
    # ● 지정된 형식 표시 이름 정보를 반환
    #------------------------------------------------- -------------------------
    def kind_search(name)
    if @item_kind_name.include?(name)
    return [0, @item_kind_name.index(name)]
    elsif @weapon_kind_name.include?(name)
    return [1, @weapon_kind_name.index(name)]
    elsif @armor_kind_name.include?(name)
    return [2, @armor_kind_name.index(name)]
    end
    end
    #------------------------------------------------- -------------------------
    # ● 도감 용 등록 무시 속성 검색
    #------------------------------------------------- -------------------------
    def no_add_element
    no_add = 0
    # 등록 무시 특성 ID를
    for i in 1...$data_system.elements.size
    if $data_system.elements[i] =~ / 도감 등록 해제 /
    no_add = i
    break
    end
    end
    return no_add
    end

    #------------------------------------------------- -------------------------
    # ● 지정된 속성 이름의 ID를 반환
    #------------------------------------------------- -------------------------
    def element_search(element_name)
    for i in 1...$data_items.size
    if $data_system.elements[i] =~ /^#{element_name}/
    return i
    end
    end
    end

    #------------------------------------------------- -------------------------
    # ● 도감 대한 항목 ID 설정
    #------------------------------------------------- -------------------------
    def item_book_id_set
    data = []
    no_add = no_add_element
    if @item_kind_element_name.size == 0
    data[0] = [0]
    for i in 1...$data_items.size
    item = $data_items[i]
    next if item.name == ""
    next if item.element_set.include?(no_add)
    data[0].push(item.id)
    end
    else
    for i in 0...@item_kind_element_name.size
    data[i] = [0]
    element_id = element_search(@item_kind_element_name[i])
    for j in 1...$data_items.size
    item = $data_items[j]
    next if item.name == ""
    next if item.element_set.include?(no_add)
    if item.element_set.include?(element_id)
    data[i].push(item.id)
    end
    end
    end
    end
    return data
    end
    #------------------------------------------------- -------------------------
    # ● 도감 무기 ID 설정
    #------------------------------------------------- -------------------------
    def weapon_book_id_set
    data = []
    no_add = no_add_element
    if @weapon_kind_element_name.size == 0
    data[0] = [0]
    for i in 1...$data_weapons.size
    item = $data_weapons[i]
    next if item.name == ""
    next if item.element_set.include?(no_add)
    data[0].push(item.id)
    end
    else
    for i in 0...@weapon_kind_element_name.size
    data[i] = [0]
    element_id = element_search(@weapon_kind_element_name[i])
    for j in 1...$data_weapons.size
    item = $data_weapons[j]
    next if item.name == ""
    next if item.element_set.include?(no_add)
    if item.element_set.include?(element_id)
    data[i].push(item.id)
    end
    end
    end
    end
    return data
    end
    #------------------------------------------------- -------------------------
    # ● 도감 용 방구 ID 설정
    #------------------------------------------------- -------------------------
    def armor_book_id_set
    data = []
    no_add = no_add_element
    if @armor_kind_element_name.size == 0
    data[0] = [0]
    for i in 1...$data_armors.size
    item = $data_armors[i]
    next if item.name == ""
    next if item.guard_element_set.include?(no_add)
    data[0].push(item.id)
    end
    else
    for i in 0...@armor_kind_element_name.size
    data[i] = [0]
    element_id = element_search(@armor_kind_element_name[i])
    for j in 1...$data_armors.size
    item = $data_armors[j]
    next if item.name == ""
    next if item.guard_element_set.include?(no_add)
    if item.guard_element_set.include?(element_id)
    data[i].push(item.id)
    end
    end
    end
    end
    return data
    end
    end

    class Window_Base < Window
    #------------------------------------------------- -------------------------
    # ● 기본 속성 표시
    #------------------------------------------------- -------------------------
    def draw_attack_element(x, y, element_set)
    elem_temp = []
    for i in element_set
    elem = $data_system.elements[i]
    elem_temp.push("화") if elem == "화"
    elem_temp.push("빙") if elem == "빙"
    elem_temp.push("뇌") if elem == "뇌"
    elem_temp.push("수") if elem == "수"
    elem_temp.push("지") if elem == "지"
    elem_temp.push("풍") if elem == "풍"
    elem_temp.push("성") if elem == "성"
    elem_temp.push("암") if elem == "암"
    elem_temp.push("악") if elem == "악"
    elem_temp.push("염") if elem == "염"
    elem_temp.push("독") if elem == "독"
    elem_temp.push("무") if elem == "무"
    elem_temp.push("평도") if elem == "평도"
    elem_temp.push("대검") if elem == "대검"
    elem_temp.push("세검") if elem == "세검"
    elem_temp.push("단검") if elem == "단검"
    elem_temp.push("단도") if elem == "단도"
    elem_temp.push("지팡이") if elem == "지팡이"
    elem_temp.push("둔기") if elem == "둔기"
    end
    if elem_temp.size == 0
    self.contents.draw_text(x, y, 64, 32, "없음")
    return
    end
    ox = 0
    for name in elem_temp
    cx = self.contents.text_size(name).width
    self.contents.draw_text(x+ox, y, cx, 32, name)
    ox += cx+8
    end
    end
    #------------------------------------------------- -------------------------
    # ● 무기 속성 표시
    #------------------------------------------------- -------------------------
    def draw_attack_wp_element(x, y, element_set)
    elem_temp = []
    for i in element_set
    elem = $data_system.elements[i]
    elem_temp.push("베기") if elem == "베기"
    elem_temp.push("타격") if elem == "타격"
    elem_temp.push("찌르기") if elem == "찌르기"
    elem_temp.push("평도") if elem == "평도"
    elem_temp.push("대검") if elem == "대검"
    elem_temp.push("세검") if elem == "세검"
    elem_temp.push("단검") if elem == "단검"
    elem_temp.push("단도") if elem == "단도"
    elem_temp.push("지팡이") if elem == "지팡이"
    elem_temp.push("둔기") if elem == "둔기"
    end
    if elem_temp.size == 0
    self.contents.draw_text(x, y, 64, 32, "없음")
    return
    end
    ox = 0
    for name in elem_temp
    cx = self.contents.text_size(name).width
    self.contents.draw_text(x+ox, y, cx, 32, name)
    ox += cx+8
    end
    end
    #------------------------------------------------- -------------------------
    # ● For 속성 표시
    #------------------------------------------------- -------------------------
    def draw_attack_weak_element (x, y, element_set)
    elem_temp = []
    for i in element_set
    elem = $ data_system.elements [i]
    elem_temp.push ( "영생") if elem == "대 불사"
    elem_temp.push ( "뱀") if elem == "대 독사"
    elem_temp.push ( "수서") if elem == "대 수서"
    elem_temp.push ( "짐승") if elem == "대 짐승"
    elem_temp.push ( "악마") if elem == "대 악마"
    elem_temp.push ( "새") if elem == "대 새"
    elem_temp.push ( "악마") if elem == "대 악마"
    elem_temp.push ( "천사") if elem == "대 천사"
    end
    if elem_temp.size == 0
    self.contents.draw_text (x, y, 64, 32, "없음")
    return
    end
    ox = 0
    for name in elem_temp
    cx = self.contents.text_size (name) width
    self.contents.draw_text (x + ox, y, cx, 32, name)
    ox + = cx +8
    end
    end
    #------------------------------------------------- -------------------------
    # ● 상태 부여보기
    #------------------------------------------------- -------------------------
    def draw_attack_add_state(x, y, plus_state_set)
    state_temp = []
    for i in plus_state_set
    state = $data_states[i]
    state_temp.push(state.name) if state.name != ""
    end
    if state_temp.size == 0
    self.contents.draw_text(x, y, 64, 32, "없음")
    return
    end
    ox = 0
    oy = 0
    for name in state_temp
    cx = self.contents.text_size(name).width
    if ox + cx + 4 >= self.contents.width - 128
    ox = 0
    oy += 1
    end
    self.contents.draw_text(x+ox, y+oy*32, cx, 32, name)
    ox += cx+8
    end
    end
    #------------------------------------------------- -------------------------
    # ● 효력 범위를 반환
    #------------------------------------------------- -------------------------
    def draw_scope (scope)
    case scope
    when 0
    return "없음"
    when 1
    return "적 단체"
    when 2
    return "적 세계"
    when 3
    return "아군 단체"
    when 4
    return "아군 전체"
    when 5
    return "아군 단체"
    when 6
    return "아군 전체"
    when 7
    return "사용자"
    end
    end
    end

    class Game_Temp
    attr_accessor : item_book_data
    alias temp_item_book_data_initialize initialize
    def initialize
    temp_item_book_data_initialize
    @ item_book_data = Data_ItemBook.new
    end
    end

    class Game_Party
    attr_accessor : item_count # 구매 상품 정보 (도감 용)
    attr_accessor : weapon_count # 재고 무기 정보 (도감 용)
    attr_accessor : armor_count # 구매 방어구 정보 (도감 용)
    #------------------------------------------------- -------------------------
    # ● 오브젝트 초기화
    #------------------------------------------------- -------------------------
    alias item_book_info_initialize initialize
    def initialize
    item_book_info_initialize
    @item_count = {}
    @weapon_count = {}
    @armor_count = {}
    end
    alias item_book_gain_item gain_item
    def gain_item(item_id, n)
    add_item_count(item_id, 0) if n > 0
    item_book_gain_item(item_id, n)
    end
    alias item_book_gain_weapon gain_weapon
    def gain_weapon(item_id, n)
    add_weapon_count(item_id, 0) if n > 0
    item_book_gain_weapon(item_id, n)
    end
    alias item_book_gain_armor gain_armor
    def gain_armor(item_id, n)
    add_armor_count(item_id, 0) if n > 0
    item_book_gain_armor(item_id, n)
    end

    #------------------------------------------------- -------------------------
    # ● 상품 확보의 정보 추가 (도감 용)
    # 0 : 소득 1 : 소득받는
    #------------------------------------------------- -------------------------
    def add_item_count (item_id, type = 0)
    if type == -1
    @ item_count [item_id] = 0
    else
    @ item_count [item_id] = 1
    end
    end
    #------------------------------------------------- -------------------------
    # ● 무기 획득 정보 추가 (도감 용)
    # 0 : 소득 1 : 소득받는
    #------------------------------------------------- -------------------------
    def add_weapon_count (weapon_id type = 0)
    if type == -1
    @ weapon_count [weapon_id] = 0
    else
    @ weapon_count [weapon_id] = 1
    end
    end
    #------------------------------------------------- -------------------------
    # ● 방어구의 획득 정보 추가 (도감 용)
    # 0 : 소득 1 : 소득받는
    #------------------------------------------------- -------------------------
    def add_armor_count (armor_id type = 0)
    if type == -1
    @ armor_count [armor_id] = 0
    else
    @ armor_count [armor_id] = 1
    end
    end
    end


    class Window_ItemBook "Window_Selectable
    attr_reader : data
    attr_reader : item_kind
    attr_reader : item_index
    #------------------------------------------------- -------------------------
    # ● 오브젝트 초기화
    #------------------------------------------------- -------------------------
    def initialize (index = 0)
    super (0, 64, 640, 416)
    @ column_max = 2
    @ book_data = $ game_temp.item_book_data
    @ data = data_set (index)
    @ data.shift
    # @ data.sort!
    @ item_max = @ data.size
    @ item_kind = index
    self.index = 0
    # refresh
    end
    def new_data_set (index)
    @ data = data_set (index)
    @ data.shift
    # @ data.sort!
    @ item_max = @ data.size
    end
    #------------------------------------------------- -------------------------
    # ● 충전 데이터 검색
    #------------------------------------------------- -------------------------
    def data_set(index)
    kind_row_data = @book_data.kind_search(@book_data.kind_row[index])
    @item_kind = kind_row_data[0]
    @item_index = kind_row_data[1]
    data = []
    case @item_kind
    when 0
    data = @book_data.item_id_data[@item_index].dup
    when 1
    data = @book_data.weapon_id_data[@item_index].dup
    when 2
    data = @book_data.armor_id_data[@item_index].dup
    end
    return data
    end
    #------------------------------------------------- -------------------------
    # ● 표시 허가 취득
    #------------------------------------------------- -------------------------
    def show? (kind, id)
    case kind
    when 0
    if $ game_party.item_count [id] == 0 or $ game_party.item_count [id] == nil
    return false
    else
    return true
    end
    when 1
    if $ game_party.weapon_count [id] == 0 or $ game_party.weapon_count [id] == nil
    return false
    else
    return true
    end
    when 2
    if $ game_party.armor_count [id] == 0 or $ game_party.armor_count [id] == nil
    return false
    else
    return true
    end
    end
    end
    #------------------------------------------------- -------------------------
    # ● 상품 검색
    #------------------------------------------------- -------------------------
    def item
    return @ data [self.index]
    end
    #------------------------------------------------- -------------------------
    # ● 재생
    #------------------------------------------------- -------------------------
    def refresh
    if self.contents! = nil
    self.contents.dispose
    self.contents = nil
    end
    # 항목 수가 0이 아닌 비트맵을 만들고 모든 항목을 그리는
    return if @ item_max == 0
    self.contents = Bitmap.new (width - 32, row_max * 32)
    for i in 0 ... @ item_max
    draw_item (i)
    end
    end
    #------------------------------------------------- -------------------------
    # ● 항목 그리기
    # index : 항목 번호
    #------------------------------------------------- -------------------------
    def draw_item (index)
    case @ item_kind
    when 0
    item = $ data_items [@ data [index]]
    id = @ book_data.item_id_data [@ item_index] index (item.id)
    when 1
    item = $ data_weapons [@ data [index]]
    id = @ book_data.weapon_id_data [@ item_index] index (item.id)
    when 2
    item = $ data_armors [@ data [index]]
    id = @ book_data.armor_id_data [@ item_index] index (item.id)
    end
    return if item == nil
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new (x, y, self.width / @ column_max - 32, 32)
    self.contents.fill_rect (rect, Color.new (0, 0, 0, 0))
    self.contents.font.color = normal_color
    self.contents.draw_text (x, y, 32, 32, id.to_s)
    if show? (@ item_kind, item.id)
    bitmap = RPG : : Cache.icon (item.icon_name)
    opacity = 255
    self.contents.blt (x +48, y + 4, bitmap, Rect.new (0, 0, 24, 24), opacity)
    self.contents.draw_text (x +48 + 28, y, 212, 32, item.name, 0)
    else
    self.contents.draw_text (x +48 + 28, y, 212, 32, "-----", 0)
    return
    end
    end
    end


    class Window_ItemBook_Info "Window_Selectable
    #------------------------------------------------- -------------------------
    # ● 오브젝트 초기화
    #------------------------------------------------- -------------------------
    def initialize
    super (0, 0 +64 +64, 640, 480-64-64)
    @ book_data = $ game_temp.item_book_data
    self.contents = Bitmap.new (width - 32, height - 32)
    self.index = -1
    end
    #------------------------------------------------- -------------------------
    # ● 재생
    #------------------------------------------------- -------------------------
    def refresh (item_id, item_kind, item_index)
    self.contents.clear
    self.contents.font.size = 22
    case item_kind
    when 0
    draw_item_info (item_id, item_index)
    when 1
    draw_weapon_info (item_id, item_index)
    when 2
    draw_armor_info (item_id, item_index)
    end
    end
    #------------------------------------------------- -------------------------
    # ● 상품 그리기
    #------------------------------------------------- -------------------------
    def draw_item_info (item_id, item_index)
    item = $ data_items [item_id]
    rect = Rect.new (4, 0, 160, 32)
    self.contents.fill_rect (rect, Color.new (0, 0, 0, 0))
    bitmap = RPG : : Cache.icon (item.icon_name)
    opacity = 255
    self.contents.blt (4 +48, 0 + 4, bitmap, Rect.new (0, 0, 24, 24), opacity)
    self.contents.font.color = normal_color
    id = @ book_data.item_id_data [item_index] index (item.id)
    self.contents.draw_text (4, 0, 32, 32, id.to_s)
    self.contents.draw_text (4 +48 + 28, 0, 212, 32, item.name, 0)
    self.contents.draw_text (640-128-88-4, 0, 88, 32, item.price.to_s 2)
    self.contents.font.color = system_color
    self.contents.draw_text (640-128, 0, 128, 32, $ data_system.words.gold, 0)
    self.contents.font.color = normal_color
    @ help_window.set_text (item.description)
    end
    #------------------------------------------------- -------------------------
    # ● 무기 그리기
    #------------------------------------------------- -------------------------
    def draw_weapon_info (item_id, item_index)
    item = $ data_weapons [item_id]
    rect = Rect.new (4, 0, 160, 32)
    self.contents.fill_rect (rect, Color.new (0, 0, 0, 0))
    bitmap = RPG : : Cache.icon (item.icon_name)
    opacity = 255
    self.contents.blt (4 +48, 0 + 4, bitmap, Rect.new (0, 0, 24, 24), opacity)
    self.contents.font.color = normal_color
    id = @ book_data.weapon_id_data [item_index] index (item.id)
    self.contents.draw_text (4, 0, 32, 32, id.to_s)
    self.contents.draw_text (4 +48 + 28, 0, 212, 32, item.name, 0)
    self.contents.draw_text (640-128-88-4, 0, 88, 32, item.price.to_s 2)
    self.contents.font.color = system_color
    self.contents.draw_text (640-128, 0, 128, 32, $ data_system.words.gold, 0)
    self.contents.font.color = text_color (2)
    self.contents.draw_text (4, 32, 48, 32, "ATK", 0)
    self.contents.font.color = text_color (4)
    self.contents.draw_text (4 +128, 32, 48, 32, "DEF", 0)
    self.contents.font.color = text_color (6)
    self.contents.draw_text (4 +256, 32, 48, 32, "MDF", 0)
    self.contents.font.color = normal_color
    self.contents.draw_text (4 +48, 32, 48, 32, item.atk.to_s 2)
    self.contents.draw_text (4 +48 +128, 32, 48, 32, item.pdef.to_s 2)
    self.contents.draw_text (4 +48 +256, 32, 48, 32, item.mdef.to_s 2)

    self.contents.font.color = system_color
    self.contents.draw_text (4, 64, 48, 32, "STR", 0)
    self.contents.draw_text (4 +128, 64, 48, 32, "DEX", 0)
    self.contents.draw_text (4 +256, 64, 48, 32, "SPD", 0)
    self.contents.draw_text (4 +384, 64, 48, 32, "MAT", 0)
    self.contents.font.color = normal_color
    self.contents.draw_text (4 +48, 64, 48, 32, item.str_plus.to_s 2)
    self.contents.draw_text (4 +48 +128, 64, 48, 32, item.dex_plus.to_s 2)
    self.contents.draw_text (4 +48 +256, 64, 48, 32, item.agi_plus.to_s 2)
    self.contents.draw_text (4 +48 +384, 64, 48, 32, item.int_plus.to_s 2)

    self.contents.font.color = system_color
    self.contents.draw_text (4, 96, 96, 32, "기본 속성")
    self.contents.draw_text (4, 128, 96, 32, "For 속성")
    self.contents.draw_text (4, 160, 96, 32, "부여 상태")
    # self.contents.draw_text (4, 128, 96, 32, "무기 속성")
    self.contents.font.color = normal_color
    draw_attack_element (4 +96 +16, 96, item.element_set)
    draw_attack_weak_element (4 +96 +16, 128, item.element_set)
    draw_attack_add_state (4 +96 +16, 160, item.plus_state_set)
    # draw_attack_wp_element (4 +96 +16, 128, item.element_set)

    @ help_window.set_text (item.description)
    end
    #------------------------------------------------- -------------------------
    # ● 방구 그리기
    #------------------------------------------------- -------------------------
    def draw_armor_info (item_id, item_index)
    item = $ data_armors [item_id]
    rect = Rect.new (4, 0, 160, 32)
    self.contents.fill_rect (rect, Color.new (0, 0, 0, 0))
    bitmap = RPG : : Cache.icon (item.icon_name)
    opacity = 255
    self.contents.blt (4 +48, 0 + 4, bitmap, Rect.new (0, 0, 24, 24), opacity)
    self.contents.font.color = normal_color
    id = @ book_data.armor_id_data [item_index] index (item.id)
    self.contents.draw_text (4, 0, 32, 32, id.to_s)
    self.contents.draw_text (4 +48 + 28, 0, 212, 32, item.name, 0)
    self.contents.draw_text (640-128-88-4, 0, 88, 32, item.price.to_s 2)
    self.contents.font.color = system_color
    self.contents.draw_text (640-128, 0, 128, 32, $ data_system.words.gold, 0)
    self.contents.font.color = text_color (4)
    self.contents.draw_text (4, 32, 48, 32, "DEF", 0)
    self.contents.font.color = text_color (6)
    self.contents.draw_text (4 +128, 32, 48, 32, "MDF", 0)
    self.contents.font.color = system_color
    self.contents.draw_text (4 +256, 32, 48, 32, "해결", 0)
    self.contents.font.color = normal_color
    self.contents.draw_text (4 +48, 32, 48, 32, item.pdef.to_s 2)
    self.contents.draw_text (4 +48 +128, 32, 48, 32, item.mdef.to_s 2)
    self.contents.draw_text (4 +48 +256, 32, 48, 32, item.eva.to_s 2)

    self.contents.font.color = system_color
    self.contents.draw_text (4, 64, 48, 32, "STR", 0)
    self.contents.draw_text (4 +128, 64, 48, 32, "DEX", 0)
    self.contents.draw_text (4 +256, 64, 48, 32, "SPD", 0)
    self.contents.draw_text (4 +384, 64, 48, 32, "MAT", 0)
    self.contents.font.color = normal_color
    self.contents.draw_text (4 +48, 64, 48, 32, item.str_plus.to_s 2)
    self.contents.draw_text (4 +48 +128, 64, 48, 32, item.dex_plus.to_s 2)
    self.contents.draw_text (4 +48 +256, 64, 48, 32, item.agi_plus.to_s 2)
    self.contents.draw_text (4 +48 +384, 64, 48, 32, item.int_plus.to_s 2)

    self.contents.font.color = system_color
    self.contents.draw_text (4, 96, 96, 32, "기본 내성")
    self.contents.draw_text (4, 128, 96, 32, "For 내성")
    self.contents.draw_text (4, 160, 96, 32, "방어 상태")
    # self.contents.draw_text (4, 128, 96, 32, "무기 내성")
    self.contents.font.color = normal_color
    draw_attack_element (4 +96 +16, 96, item.guard_element_set)
    draw_attack_weak_element (4 +96 +16, 128, item.guard_element_set)
    draw_attack_add_state (4 +96 +16, 160, item.guard_state_set)
    # draw_attack_wp_element (4 +96 +16, 128, item.guard_element_set)

    @ help_window.set_text (item.description)
    end
    #------------------------------------------------- -------------------------
    # ● 도움말 텍스트 문서
    #------------------------------------------------- -------------------------
    def update_help
    # 거짓
    end
    end


    class Scene_ItemBook
    #------------------------------------------------- -------------------------
    # ● 메인 처리
    #------------------------------------------------- -------------------------
    def main
    # 창 만들기
    @ title_window = Window_Base.new (0, 0, 640, 64)
    @ title_window.contents = Bitmap.new (640 - 32 64 - 32)
    @ title_window.contents.draw_text (4, 0, 320, 32, "아이템 도감", 0)
    @ main_window = Window_ItemBook.new
    @ main_window.active = false
    @ help_window = Window_Help.new
    @ help_window.z = 110
    @ help_window.y = 64
    @ help_window.visible = false
    command = $ game_temp.item_book_data.kind_row
    @ kind_window = Window_Command.new (160, command)
    @ kind_window.z = 110
    @ kind_window.x = 320 - @ kind_window.width / 2
    @ kind_window.y = 240 - @ kind_window.height / 2
    @ kind_window.active = true
    # 인호윙도우 만들기 (보이지 않는 비활성 상태로 설정)
    @ info_window = Window_ItemBook_Info.new
    @ info_window.z = 110
    @ info_window.visible = false
    @ info_window.active = false
    # 도움말 창을 관련
    @ info_window.help_window = @ help_window
    @ visible_index = 0
    @ now_kind = nil
    # 변환 실행
    Graphics.transition
    # 메인 루프
    loop do
    # 게임 화면을 새로
    Graphics.update
    # 입력 정보를 갱신
    Input.update
    # 프레임 갱신
    update
    # 화면이 전환되면 루프를 중단
    if $ scene! = self
    break
    end
    end
    # 전환 준비
    Graphics.freeze
    # 창을 해제
    @ title_window.dispose
    @ help_window.dispose
    @ main_window.dispose
    @ kind_window.dispose
    @ info_window.dispose
    end
    #------------------------------------------------- -------------------------
    # ● 프레임 갱신
    #------------------------------------------------- -------------------------
    def update
    # 윈도우 업데이트
    # @ help_window.update
    @ main_window.update
    @ kind_window.update
    @ info_window.update
    if@info_window.active
    update_info
    return
    end
    # 메인 윈도우가 활성화된 경우 : update_target을 부른다
    if@main_window.active
    update_main
    return
    end
    # 종류 창이 활성화의 경우 update_kind을 부른다
    if@kind_window.active
    update_kind
    return
    end
    end
    #------------------------------------------------- -------------------------
    # ● 프레임 갱신 (종류 창이 활성화된 경우)
    #------------------------------------------------- -------------------------
    def update_kind
    # C 버튼을 누를 경우
    if Input.trigger? (Input : : C)
    # 결정 SE를 연주
    $ game_system.se_play ($ data_system.decision_se)
    if @ now_kind! = @ kind_window.index
    @ main_window.new_data_set (@ kind_window.index)
    @ main_window.refresh
    subtitle = $ game_temp.item_book_data.kind_row [@ kind_window.index]
    title = "아이템 도감 :"+ subtitle
    @ now_kind = @ kind_window.index
    @ title_window.contents.clear
    @ title_window.contents = Bitmap.new (640 - 32 64 - 32)
    @ title_window.contents.draw_text (4, 0, 320, 32, title, 0)
    end
    @ kind_window.active = false
    @ kind_window.visible = false
    @ main_window.active = true
    return
    end
    # B 버튼을 누를 경우
    if Input.trigger? (Input : : B)
    # 취소 SE를 연주
    $ game_system.se_play ($ data_system.cancel_se)
    $ scene = Scene_Map.new
    return
    end
    end
    #------------------------------------------------- -------------------------
    # ● 프레임 갱신 (주 창이 활성화된 경우)
    #------------------------------------------------- -------------------------
    def update_main
    # B 버튼을 누를 경우
    if Input.trigger? (Input : : B)
    # 취소 SE를 연주
    $ game_system.se_play ($ data_system.cancel_se)
    @ main_window.active = false
    @ kind_window.active = true
    @ kind_window.visible = true
    @ main_window.index = 0
    return
    end
    # C 버튼을 누를 경우
    if Input.trigger? (Input : : C)
    if@main_window.item == nil or
    @ main_window.show? (@ main_window.item_kind @ main_window.item) == false
    # 초인종 SE를 연주
    $ game_system.se_play ($ data_system.buzzer_se)
    return
    end
    # 결정 SE를 연주
    $ game_system.se_play ($ data_system.decision_se)
    @ main_window.active = false
    @ info_window.active = true
    @ info_window.visible = true
    @ visible_index = @ main_window.index
    @ info_window.refresh (@ main_window.item @ main_window.item_kind @ main_window.item_index)
    return
    end
    end
    #------------------------------------------------- -------------------------
    # ● 프레임 갱신 (인호윙도우이 활성화된 경우)
    #------------------------------------------------- -------------------------
    def update_info
    # B 버튼을 누를 경우
    if Input.trigger? (Input : : B)
    # 취소 SE를 연주
    $ game_system.se_play ($ data_system.cancel_se)
    @ main_window.active = true
    @ info_window.active = false
    @ info_window.visible = false
    @ help_window.visible = false
    return
    end
    # C 버튼을 누를 경우
    if Input.trigger? (Input : : C)
    # 결정 SE를 연주
    $ game_system.se_play ($ data_system.decision_se)
    return
    end
    if Input.trigger? (Input : L)
    # 결정 SE를 연주
    $ game_system.se_play ($ data_system.decision_se)
    loop_end = false
    while loop_end == false
    if @ visible_index! = 0
    @ visible_index -= 1
    else
    @ visible_index = @ main_window.data.size - 1
    end
    loop_end = true if@main_window.show? (@ main_window.item_kind @ main_window.data [@ visible_index)
    end
    id = @ main_window.data [@ visible_index]
    @ info_window.refresh (id, @ main_window.item_kind @ main_window.item_index)
    return
    end
    if Input.trigger? (Input : R)
    # 결정 SE를 연주
    $ game_system.se_play ($ data_system.decision_se)
    loop_end = false
    while loop_end == false
    if @ visible_index! = @ main_window.data.size - 1
    @ visible_index + = 1
    else
    @ visible_index = 0
    end
    loop_end = true if@main_window.show? (@ main_window.item_kind @ main_window.data [@ visible_index)
    end
    id = @ main_window.data [@ visible_index]
    @ info_window.refresh (id, @ main_window.item_kind @ main_window.item_index)
    return
    end
    end
    end


    #불러오는법
    #$scene = Scene_ItemBook.new

  • ?
    류휀 2010.11.25 03:01

    찾고있던 건데 오류나서ㅠㅠ

  • ?
    GTGs 2011.07.14 21:45

    오류수정


    #==============================================================================
    #  ◇◇◆아이템 도감◆◇◇ 편리성을 강조해 한글화를 변역자 - 내로미

    #==============================================================================

    # 아이템 도감하지만 범용성을 갖게하려고 다양 해 버린 결과
    # 조금 복잡하게되어 버린지도 모릅니다 ...
    #==============================================================================
    # ● 설정 방법
    # * 기본적인 사용법
    # 일반적으로 사용 뿐이라면, 이대로 코피페 괜찮은 (아마)
    # 항목에 "도감 등록 무효"속성을 클릭하고 있다고
    # 도감 등록되지 않습니다.
    #
    # * 무기, 방어구, 방안을 세밀하게 분류하는 방법
    # 먼저 Data_ItemBook의 initialize에 설정된
    # @ item_kind_name : 도구의 표시 이름
    # @ weapon_kind_name : 무기의 표시 이름
    # @ armor_kind_name : 방어구의 표시 이름
    #을 바꿔줍니다.
    # 특히, @ item_kind_name = [ "귀중품", "회복 약", "전투용", "기타"]
    # 같은 느낌으로 書き換えれ면 OK입니다. (무기, 방어구도 마찬가지입니다.)
    # 이것은 실제로 화면에 표시되는 범주 이름입니다.
    # 최소 1 개는 설정해 놓아야합니다.
    #
    # 다음 바로 아래에 @ kind_row을 설정합니다.
    # 이것은 분류 이름이 표시되는 목록의 순서입니다.
    # 방금 설정한 범주 이름을 자신이 정렬하려는 순서대로 쓰고 가셨.
    # @ kind_row = [ "무기" ]
    # "방구"
    # "복구 약"
    # "전투용"
    # "기타"
    # "귀중품"]
    # 다음과 같습니다.
    #이 때, 이름을 실수하지 않도록 조심하세요
    # 이름으로 다양한 확인하고 수도있어서 잘못 버리면 정상적으로 동작하지 않습니다 (아마)
    #
    # 마지막으로, 또는 아래에있는
    # @ item_kind_element_name : 도구의 분류 판정에 대한 속성 이름
    # @ weapon_kind_element_name : 무기의 분류 판정에 대한 속성 이름
    # @ armor_kind_element_name : 방구 분류 판정에 대한 속성 이름
    #를 다시 씁니다.
    # 이것은 분류를 결정하기 위해 사용하는 속성의 이름입니다.
    # 이것을 먼저 설정한 분류 이름과 일치하도록 설정하십시오.
    # 처음으로
    # @ item_kind_name = [ "귀중품", "회복 약", "전투용", "기타"]
    # 이렇게 설정했다고하면
    # @ item_kind_element_name = [ "귀중한", "회복", "전투", "기타"]
    # 다음과 같습니다.
    # 그리고 실제로 데이터베이스에서 설정한 이름으로 속성을 만들고
    # 상품에 부여합니다.
    # 참고로, 여기에서 아무것도 설정하지 않으면 속성이나 관계없이
    # 모든 아이템이 결정되는 것입니다. (기본값)
    #
    # 아래에 알맞은 설정 방법을 올려 둡니다 (테스토뿌레이 때 사용됩니다)
    #
    # @ item_kind_name = [ "중요한 것" "일반적인 것"]
    # @ weapon_kind_name = [ "무기"]
    # @ armor_kind_name = [ "방패", "갑옷", "기타"]
    # @ kind_row = [ "중요한 것"
    # "무기"
    # "방패"
    # "갑옷"
    # "기타"
    # "일반적인 것"]
    # @ item_kind_element_name = [ "귀중품", "일반적으로 도구"]
    # @ weapon_kind_element_name = []
    # @ armor_kind_element_name = [ "방패", "갑옷", "기타"]
    #
    # 참고로, 상품 정보 화면
    # 필요 자력으로 지정됩니다.
    # 별도 그대로도 사용할 수 없게 아니라고 생각 합니다만
    # 여러 가지 불편한 것이 있을지도 모릅니다.
    #
    # 설명 긴하네요 ...

    class Data_ItemBook
    attr_reader :item_kind_name
    attr_reader :weapon_kind_name
    attr_reader :armor_kind_name
    attr_reader :kind_row
    attr_reader :item_id_data
    attr_reader :weapon_id_data
    attr_reader :armor_id_data
    #------------------------------------------------- -------------------------
    # ● 오브젝트 초기화
    #------------------------------------------------- -------------------------
    def initialize

    # ↓ 다음, 설정을위한 다양한
    @item_kind_name =["도구"]
    @weapon_kind_name =["무기"]
    @armor_kind_name =["방어구"]
    @kind_row =["도구",
    "무기",
    "방어구",]
    @item_kind_element_name = []
    @weapon_kind_element_name = []
    @armor_kind_element_name = []
    # ↑ 코코까지

    @item_id_data = item_book_id_set
    @weapon_id_data = weapon_book_id_set
    @armor_id_data = armor_book_id_set
    end
    #------------------------------------------------- -------------------------
    # ● 지정된 형식 표시 이름 정보를 반환
    #------------------------------------------------- -------------------------
    def kind_search(name)
    if @item_kind_name.include?(name)
    return [0, @item_kind_name.index(name)]
    elsif @weapon_kind_name.include?(name)
    return [1, @weapon_kind_name.index(name)]
    elsif @armor_kind_name.include?(name)
    return [2, @armor_kind_name.index(name)]
    end
    end
    #------------------------------------------------- -------------------------
    # ● 도감 용 등록 무시 속성 검색
    #------------------------------------------------- -------------------------
    def no_add_element
    no_add = 0
    # 등록 무시 특성 ID를
    for i in 1...$data_system.elements.size
    if $data_system.elements[i] =~ / 도감 등록 해제 /
    no_add = i
    break
    end
    end
    return no_add
    end

    #------------------------------------------------- -------------------------
    # ● 지정된 속성 이름의 ID를 반환
    #------------------------------------------------- -------------------------
    def element_search(element_name)
    for i in 1...$data_items.size
    if $data_system.elements[i] =~ /^#{element_name}/
    return i
    end
    end
    end

    #------------------------------------------------- -------------------------
    # ● 도감 대한 항목 ID 설정
    #------------------------------------------------- -------------------------
    def item_book_id_set
    data = []
    no_add = no_add_element
    if @item_kind_element_name.size == 0
    data[0] = [0]
    for i in 1...$data_items.size
    item = $data_items[i]
    next if item.name == ""
    next if item.element_set.include?(no_add)
    data[0].push(item.id)
    end
    else
    for i in 0...@item_kind_element_name.size
    data[i] = [0]
    element_id = element_search(@item_kind_element_name[i])
    for j in 1...$data_items.size
    item = $data_items[j]
    next if item.name == ""
    next if item.element_set.include?(no_add)
    if item.element_set.include?(element_id)
    data[i].push(item.id)
    end
    end
    end
    end
    return data
    end
    #------------------------------------------------- -------------------------
    # ● 도감 무기 ID 설정
    #------------------------------------------------- -------------------------
    def weapon_book_id_set
    data = []
    no_add = no_add_element
    if @weapon_kind_element_name.size == 0
    data[0] = [0]
    for i in 1...$data_weapons.size
    item = $data_weapons[i]
    next if item.name == ""
    next if item.element_set.include?(no_add)
    data[0].push(item.id)
    end
    else
    for i in 0...@weapon_kind_element_name.size
    data[i] = [0]
    element_id = element_search(@weapon_kind_element_name[i])
    for j in 1...$data_weapons.size
    item = $data_weapons[j]
    next if item.name == ""
    next if item.element_set.include?(no_add)
    if item.element_set.include?(element_id)
    data[i].push(item.id)
    end
    end
    end
    end
    return data
    end
    #------------------------------------------------- -------------------------
    # ● 도감 용 방구 ID 설정
    #------------------------------------------------- -------------------------
    def armor_book_id_set
    data = []
    no_add = no_add_element
    if @armor_kind_element_name.size == 0
    data[0] = [0]
    for i in 1...$data_armors.size
    item = $data_armors[i]
    next if item.name == ""
    next if item.guard_element_set.include?(no_add)
    data[0].push(item.id)
    end
    else
    for i in 0...@armor_kind_element_name.size
    data[i] = [0]
    element_id = element_search(@armor_kind_element_name[i])
    for j in 1...$data_armors.size
    item = $data_armors[j]
    next if item.name == ""
    next if item.guard_element_set.include?(no_add)
    if item.guard_element_set.include?(element_id)
    data[i].push(item.id)
    end
    end
    end
    end
    return data
    end
    end

    class Window_Base < Window
    #------------------------------------------------- -------------------------
    # ● 기본 속성 표시
    #------------------------------------------------- -------------------------
    def draw_attack_element(x, y, element_set)
    elem_temp = []
    for i in element_set
    elem = $data_system.elements[i]
    elem_temp.push("화염") if elem == "화염"
    elem_temp.push("얼음") if elem == "얼음"
    elem_temp.push("번개") if elem == "번개"
    elem_temp.push("물") if elem == "물"
    elem_temp.push("땅") if elem == "땅"
    elem_temp.push("바람") if elem == "바람"
    elem_temp.push("빛") if elem == "빛"
    elem_temp.push("어둠") if elem == "어둠"
    elem_temp.push("철") if elem == "철"
    elem_temp.push("염") if elem == "염"
    elem_temp.push("독") if elem == "독"
    elem_temp.push("무") if elem == "무"
    elem_temp.push("평도") if elem == "평도"
    elem_temp.push("대검") if elem == "대검"
    elem_temp.push("세검") if elem == "세검"
    elem_temp.push("단검") if elem == "단검"
    elem_temp.push("단도") if elem == "단도"
    elem_temp.push("지팡이") if elem == "지팡이"
    elem_temp.push("둔기") if elem == "둔기"
    end
    if elem_temp.size == 0
    self.contents.draw_text(x, y, 64, 32, "없음")
    return
    end
    ox = 0
    for name in elem_temp
    cx = self.contents.text_size(name).width
    self.contents.draw_text(x+ox, y, cx, 32, name)
    ox += cx+8
    end
    end
    #------------------------------------------------- -------------------------
    # ● 무기 속성 표시
    #------------------------------------------------- -------------------------
    def draw_attack_wp_element(x, y, element_set)
    elem_temp = []
    for i in element_set
    elem = $data_system.elements[i]
    elem_temp.push("베기") if elem == "베기"
    elem_temp.push("타격") if elem == "타격"
    elem_temp.push("찌르기") if elem == "찌르기"
    elem_temp.push("평도") if elem == "평도"
    elem_temp.push("대검") if elem == "대검"
    elem_temp.push("세검") if elem == "세검"
    elem_temp.push("단검") if elem == "단검"
    elem_temp.push("단도") if elem == "단도"
    elem_temp.push("지팡이") if elem == "지팡이"
    elem_temp.push("둔기") if elem == "둔기"
    end
    if elem_temp.size == 0
    self.contents.draw_text(x, y, 64, 32, "없음")
    return
    end
    ox = 0
    for name in elem_temp
    cx = self.contents.text_size(name).width
    self.contents.draw_text(x+ox, y, cx, 32, name)
    ox += cx+8
    end
    end
    #------------------------------------------------- -------------------------
    # ● For 속성 표시
    #------------------------------------------------- -------------------------
    def draw_attack_weak_element (x, y, element_set)
    elem_temp = []
    for i in element_set
    elem = $data_system.elements[i]
    elem_temp.push ( "영생") if elem == "대 불사"
    elem_temp.push ( "뱀") if elem == "대 독사"
    elem_temp.push ( "수서") if elem == "대 수서"
    elem_temp.push ( "짐승") if elem == "대 짐승"
    elem_temp.push ( "악마") if elem == "대 악마"
    elem_temp.push ( "새") if elem == "대 새"
    elem_temp.push ( "악마") if elem == "대 악마"
    elem_temp.push ( "천사") if elem == "대 천사"
    end
    if elem_temp.size == 0
    self.contents.draw_text (x, y, 64, 32, "없음")
    return
    end
    ox = 0
    for name in elem_temp
    cx = self.contents.text_size(name).width
    self.contents.draw_text (x + ox, y, cx, 32, name)
    ox += cx+8
    end
    end
    #------------------------------------------------- -------------------------
    # ● 상태 부여보기
    #------------------------------------------------- -------------------------
    def draw_attack_add_state(x, y, plus_state_set)
    state_temp = []
    for i in plus_state_set
    state = $data_states[i]
    state_temp.push(state.name) if state.name != ""
    end
    if state_temp.size == 0
    self.contents.draw_text(x, y, 64, 32, "없음")
    return
    end
    ox = 0
    oy = 0
    for name in state_temp
    cx = self.contents.text_size(name).width
    if ox + cx + 4 >= self.contents.width - 128
    ox = 0
    oy += 1
    end
    self.contents.draw_text(x+ox, y+oy*32, cx, 32, name)
    ox += cx+8
    end
    end
    #------------------------------------------------- -------------------------
    # ● 효력 범위를 반환
    #------------------------------------------------- -------------------------
    def draw_scope (scope)
    case scope
    when 0
    return "없음"
    when 1
    return "적 단체"
    when 2
    return "적 세계"
    when 3
    return "아군 단체"
    when 4
    return "아군 전체"
    when 5
    return "아군 단체"
    when 6
    return "아군 전체"
    when 7
    return "사용자"
    end
    end
    end

    class Game_Temp
    attr_accessor :item_book_data
    alias temp_item_book_data_initialize initialize
    def initialize
    temp_item_book_data_initialize
    @item_book_data =Data_ItemBook.new
    end
    end

    class Game_Party
    attr_accessor :item_count # 구매 상품 정보 (도감 용)
    attr_accessor :weapon_count # 재고 무기 정보 (도감 용)
    attr_accessor :armor_count # 구매 방어구 정보 (도감 용)
    #------------------------------------------------- -------------------------
    # ● 오브젝트 초기화
    #------------------------------------------------- -------------------------
    alias item_book_info_initialize initialize
    def initialize
    item_book_info_initialize
    @item_count = {}
    @weapon_count = {}
    @armor_count = {}
    end
    alias item_book_gain_item gain_item
    def gain_item(item_id, n)
    add_item_count(item_id, 0) if n > 0
    item_book_gain_item(item_id, n)
    end
    alias item_book_gain_weapon gain_weapon
    def gain_weapon(item_id, n)
    add_weapon_count(item_id, 0) if n > 0
    item_book_gain_weapon(item_id, n)
    end
    alias item_book_gain_armor gain_armor
    def gain_armor(item_id, n)
    add_armor_count(item_id, 0) if n > 0
    item_book_gain_armor(item_id, n)
    end

    #------------------------------------------------- -------------------------
    # ● 상품 확보의 정보 추가 (도감 용)
    # 0 : 소득 1 : 소득받는
    #------------------------------------------------- -------------------------
    def add_item_count (item_id, type = 0)
    if type == -1
    @item_count [item_id] = 0
    else
    @item_count [item_id] = 1
    end
    end
    #------------------------------------------------- -------------------------
    # ● 무기 획득 정보 추가 (도감 용)
    # 0 : 소득 1 : 소득받는
    #------------------------------------------------- -------------------------
    def add_weapon_count(weapon_id, type = 0)
    if type == -1
    @weapon_count[weapon_id] = 0
    else
    @weapon_count[weapon_id] = 1
    end
    end
    #------------------------------------------------- -------------------------
    # ● 방어구의 획득 정보 추가 (도감 용)
    # 0 : 소득 1 : 소득받는
    #------------------------------------------------- -------------------------
    def add_armor_count(armor_id, type = 0)
    if type == -1
    @armor_count [armor_id] = 0
    else
    @armor_count [armor_id] = 1
    end
    end
    end


    class Window_ItemBook < Window_Selectable
    attr_reader :data
    attr_reader :item_kind
    attr_reader :item_index
    #------------------------------------------------- -------------------------
    # ● 오브젝트 초기화
    #------------------------------------------------- -------------------------
    def initialize (index = 0)
    super (0, 64, 640, 416)
    @column_max = 2
    @book_data = $game_temp.item_book_data
    @data = data_set (index)
    @data.shift
    # @data.sort!
    @item_max = @data.size
    @item_kind = index
    self.index = 0
    # refresh
    end
    def new_data_set (index)
    @data = data_set (index)
    @data.shift
    # @data.sort!
    @item_max = @data.size
    end
    #------------------------------------------------- -------------------------
    # ● 충전 데이터 검색
    #------------------------------------------------- -------------------------
    def data_set(index)
    kind_row_data = @book_data.kind_search(@book_data.kind_row[index])
    @item_kind = kind_row_data[0]
    @item_index = kind_row_data[1]
    data = []
    case @item_kind
    when 0
    data = @book_data.item_id_data[@item_index].dup
    when 1
    data = @book_data.weapon_id_data[@item_index].dup
    when 2
    data = @book_data.armor_id_data[@item_index].dup
    end
    return data
    end
    #------------------------------------------------- -------------------------
    # ● 표시 허가 취득
    #------------------------------------------------- -------------------------
    def show? (kind, id)
    case kind
    when 0
    if $game_party.item_count[id] == 0 or $game_party.item_count[id] == nil
    return false
    else
    return true
    end
    when 1
    if $game_party.weapon_count[id] == 0 or $game_party.weapon_count[id] == nil
    return false
    else
    return true
    end
    when 2
    if $game_party.armor_count[id] == 0 or $game_party.armor_count[id] == nil
    return false
    else
    return true
    end
    end
    end
    #------------------------------------------------- -------------------------
    # ● 상품 검색
    #------------------------------------------------- -------------------------
    def item
    return @data [self.index]
    end
    #------------------------------------------------- -------------------------
    # ● 재생
    #------------------------------------------------- -------------------------
    def refresh
    if self.contents != nil
    self.contents.dispose
    self.contents = nil
    end
    # 항목 수가 0이 아닌 비트맵을 만들고 모든 항목을 그리는
    return if @item_max == 0
    self.contents = Bitmap.new (width - 32, row_max * 32)
    for i in 0 ... @item_max
    draw_item (i)
    end
    end
    #------------------------------------------------- -------------------------
    # ● 항목 그리기
    # index : 항목 번호
    #------------------------------------------------- -------------------------
    def draw_item (index)
    case @item_kind
    when 0
    item = $data_items [@data [index]]
    id = @book_data.item_id_data[@item_index].index(item.id)
    when 1
    item = $data_weapons [@data [index]]
    id = @book_data.weapon_id_data[@item_index].index(item.id)
    when 2
    item = $data_armors [@data [index]]
    id = @book_data.armor_id_data[@item_index].index(item.id)
    end
    return if item == nil
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new (x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect (rect, Color.new (0, 0, 0, 0))
    self.contents.font.color = normal_color
    self.contents.draw_text (x, y, 32, 32, id.to_s)
    if show? (@item_kind, item.id)
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = 255
    self.contents.blt (x +48, y + 4, bitmap, Rect.new (0, 0, 24, 24), opacity)
    self.contents.draw_text (x +48 + 28, y, 212, 32, item.name, 0)
    else
    self.contents.draw_text (x +48 + 28, y, 212, 32, "-----", 0)
    return
    end
    end
    end


    class Window_ItemBook_Info < Window_Selectable
    #------------------------------------------------- -------------------------
    # ● 오브젝트 초기화
    #------------------------------------------------- -------------------------
    def initialize
    super (0, 0 +64 +64, 640, 480-64-64)
    @book_data = $game_temp.item_book_data
    self.contents = Bitmap.new (width - 32, height - 32)
    self.index = -1
    end
    #------------------------------------------------- -------------------------
    # ● 재생
    #------------------------------------------------- -------------------------
    def refresh (item_id, item_kind, item_index)
    self.contents.clear
    self.contents.font.size = 22
    case item_kind
    when 0
    draw_item_info (item_id, item_index)
    when 1
    draw_weapon_info (item_id, item_index)
    when 2
    draw_armor_info (item_id, item_index)
    end
    end
    #------------------------------------------------- -------------------------
    # ● 상품 그리기
    #------------------------------------------------- -------------------------
    def draw_item_info (item_id, item_index)
    item = $data_items [item_id]
    rect = Rect.new (4, 0, 160, 32)
    self.contents.fill_rect (rect, Color.new (0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = 255
    self.contents.blt (4 +48, 0 + 4, bitmap, Rect.new (0, 0, 24, 24), opacity)
    self.contents.font.color = normal_color
    id = @book_data.item_id_data[item_index].index(item.id)
    self.contents.draw_text (4, 0, 32, 32, id.to_s)
    self.contents.draw_text (4 +48 + 28, 0, 212, 32, item.name, 0)
    self.contents.draw_text(640-128-88-4, 0, 88, 32, item.price.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(640-128, 0, 128, 32, $data_system.words.gold, 0)
    self.contents.font.color = normal_color
    @help_window.set_text (item.description)
    end
    #------------------------------------------------- -------------------------
    # ● 무기 그리기
    #------------------------------------------------- -------------------------
    def draw_weapon_info (item_id, item_index)
    item = $data_weapons [item_id]
    rect = Rect.new (4, 0, 160, 32)
    self.contents.fill_rect (rect, Color.new (0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = 255
    self.contents.blt (4 +48, 0 + 4, bitmap, Rect.new (0, 0, 24, 24), opacity)
    self.contents.font.color = normal_color
    id = @book_data.weapon_id_data[item_index].index(item.id)
    self.contents.draw_text (4, 0, 32, 32, id.to_s)
    self.contents.draw_text (4 +48 + 28, 0, 212, 32, item.name, 0)
    self.contents.draw_text(640-128-88-4, 0, 88, 32, item.price.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text (640-128, 0, 128, 32, $data_system.words.gold, 0)
    self.contents.font.color = text_color (2)
    self.contents.draw_text (4, 32, 48, 32, "공격력", 0)
    self.contents.font.color = text_color (4)
    self.contents.draw_text (4 +128, 32, 48, 32, "방어력", 0)
    self.contents.font.color = text_color (6)
    self.contents.draw_text (4 +256, 32, 48, 32, "마법방어력", 0)
    self.contents.font.color = normal_color
    self.contents.draw_text(4+48, 32, 48, 32, item.atk.to_s, 2)
    self.contents.draw_text(4+48+128, 32, 48, 32, item.pdef.to_s, 2)
    self.contents.draw_text(4+48+256, 32, 48, 32, item.mdef.to_s, 2)

    self.contents.font.color = system_color
    self.contents.draw_text (4, 64, 48, 32, "힘", 0)
    self.contents.draw_text (4 +128, 64, 48, 32, "민첩성", 0)
    self.contents.draw_text (4 +256, 64, 48, 32, "스피드", 0)
    self.contents.draw_text (4 +384, 64, 48, 32, "손재주", 0)
    self.contents.font.color = normal_color
    self.contents.draw_text(4+48, 64, 48, 32, item.str_plus.to_s, 2)
    self.contents.draw_text(4+48+128, 64, 48, 32, item.dex_plus.to_s, 2)
    self.contents.draw_text(4+48+256, 64, 48, 32, item.agi_plus.to_s, 2)
    self.contents.draw_text(4+48+384, 64, 48, 32, item.int_plus.to_s, 2)

    self.contents.font.color = system_color
    self.contents.draw_text (4, 96, 96, 32, "기본 속성")
    self.contents.draw_text (4, 128, 96, 32, "For 속성")
    self.contents.draw_text (4, 160, 96, 32, "부여 상태")
    # self.contents.draw_text (4, 128, 96, 32, "무기 속성")
    self.contents.font.color = normal_color
    draw_attack_element (4 +96 +16, 96, item.element_set)
    draw_attack_weak_element (4 +96 +16, 128, item.element_set)
    draw_attack_add_state (4 +96 +16, 160, item.plus_state_set)
    # draw_attack_wp_element (4 +96 +16, 128, item.element_set)

    @help_window.set_text (item.description)
    end
    #------------------------------------------------- -------------------------
    # ● 방구 그리기
    #------------------------------------------------- -------------------------
    def draw_armor_info (item_id, item_index)
    item = $data_armors [item_id]
    rect = Rect.new (4, 0, 160, 32)
    self.contents.fill_rect (rect, Color.new (0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = 255
    self.contents.blt (4 +48, 0 + 4, bitmap, Rect.new (0, 0, 24, 24), opacity)
    self.contents.font.color = normal_color
    id = @book_data.armor_id_data[item_index].index(item.id)
    self.contents.draw_text (4, 0, 32, 32, id.to_s)
    self.contents.draw_text (4 +48 + 28, 0, 212, 32, item.name, 0)
    self.contents.draw_text (640-128-88-4, 0, 88, 32, item.price.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text (640-128, 0, 128, 32, $data_system.words.gold, 0)
    self.contents.font.color = text_color (4)
    self.contents.draw_text (4, 32, 48, 32, "방어력", 0)
    self.contents.font.color = text_color (6)
    self.contents.draw_text (4 +128, 32, 48, 32, "마법방어", 0)
    self.contents.font.color = system_color
    self.contents.draw_text (4 +256, 32, 48, 32, "회피", 0)
    self.contents.font.color = normal_color
    self.contents.draw_text(4+48, 32, 48, 32, item.pdef.to_s, 2)
    self.contents.draw_text(4+48+128, 32, 48, 32, item.mdef.to_s, 2)
    self.contents.draw_text(4+48+256, 32, 48, 32, item.eva.to_s, 2)

    self.contents.font.color = system_color
    self.contents.draw_text (4, 64, 48, 32, "힘", 0)
    self.contents.draw_text (4 +128, 64, 48, 32, "민첩성", 0)
    self.contents.draw_text (4 +256, 64, 48, 32, "스피드", 0)
    self.contents.draw_text (4 +384, 64, 48, 32, "지능", 0)
    self.contents.font.color = normal_color
    self.contents.draw_text (4+48, 64, 48, 32, item.str_plus.to_s, 2)
    self.contents.draw_text (4+48+128, 64, 48, 32, item.dex_plus.to_s, 2)
    self.contents.draw_text (4+48+256, 64, 48, 32, item.agi_plus.to_s, 2)
    self.contents.draw_text (4+48+384, 64, 48, 32, item.int_plus.to_s, 2)

    self.contents.font.color = system_color
    self.contents.draw_text (4, 96, 96, 32, "기본 내성")
    self.contents.draw_text (4, 128, 96, 32, "For 내성")
    self.contents.draw_text (4, 160, 96, 32, "방어 상태")
    # self.contents.draw_text (4, 128, 96, 32, "무기 내성")
    self.contents.font.color = normal_color
    draw_attack_element (4 +96 +16, 96, item.guard_element_set)
    draw_attack_weak_element (4 +96 +16, 128, item.guard_element_set)
    draw_attack_add_state (4 +96 +16, 160, item.guard_state_set)
    # draw_attack_wp_element (4 +96 +16, 128, item.guard_element_set)

    @help_window.set_text (item.description)
    end
    #------------------------------------------------- -------------------------
    # ● 도움말 텍스트 문서
    #------------------------------------------------- -------------------------
    def update_help
    # 거짓
    end
    end


    class Scene_ItemBook
    #------------------------------------------------- -------------------------
    # ● 메인 처리
    #------------------------------------------------- -------------------------
    def main
    # 창 만들기
    @title_window = Window_Base.new (0, 0, 640, 64)
    @title_window.contents = Bitmap.new(640 - 32, 64 - 32)
    @title_window.contents.draw_text (4, 0, 320, 32, "아이템 도감", 0)
    @main_window = Window_ItemBook.new
    @main_window.active = false
    @help_window = Window_Help.new
    @help_window.z = 110
    @help_window.y = 64
    @help_window.visible = false
    command = $game_temp.item_book_data.kind_row
    @kind_window = Window_Command.new (160, command)
    @kind_window.z = 110
    @kind_window.x = 320 - @kind_window.width / 2
    @kind_window.y = 240 - @kind_window.height / 2
    @kind_window.active = true
    # 인호윙도우 만들기 (보이지 않는 비활성 상태로 설정)
    @info_window = Window_ItemBook_Info.new
    @info_window.z = 110
    @info_window.visible = false
    @info_window.active = false
    # 도움말 창을 관련
    @info_window.help_window = @help_window
    @visible_index = 0
    @now_kind = nil
    # 변환 실행
    Graphics.transition
    # 메인 루프
    loop do
    # 게임 화면을 새로
    Graphics.update
    # 입력 정보를 갱신
    Input.update
    # 프레임 갱신
    update
    # 화면이 전환되면 루프를 중단
    if $scene != self
    break
    end
    end
    # 전환 준비
    Graphics.freeze
    # 창을 해제
    @title_window.dispose
    @help_window.dispose
    @main_window.dispose
    @kind_window.dispose
    @info_window.dispose
    end
    #------------------------------------------------- -------------------------
    # ● 프레임 갱신
    #------------------------------------------------- -------------------------
    def update
    # 윈도우 업데이트
    # @help_window.update
    @main_window.update
    @kind_window.update
    @info_window.update
    if@info_window.active
    update_info
    return
    end
    # 메인 윈도우가 활성화된 경우 : update_target을 부른다
    if@main_window.active
    update_main
    return
    end
    # 종류 창이 활성화의 경우 update_kind을 부른다
    if@kind_window.active
    update_kind
    return
    end
    end
    #------------------------------------------------- -------------------------
    # ● 프레임 갱신 (종류 창이 활성화된 경우)
    #------------------------------------------------- -------------------------
    def update_kind
    # C 버튼을 누를 경우
    if Input.trigger?(Input::C)
    # 결정 SE를 연주
    $game_system.se_play ($data_system.decision_se)
    if @now_kind != @kind_window.index
    @main_window.new_data_set (@kind_window.index)
    @main_window.refresh
    subtitle = $game_temp.item_book_data.kind_row[@kind_window.index]
    title = "아이템 도감 :"+ subtitle
    @now_kind = @kind_window.index
    @title_window.contents.clear
    @title_window.contents = Bitmap.new(640 - 32, 64 - 32)
    @title_window.contents.draw_text (4, 0, 320, 32, title, 0)
    end
    @kind_window.active = false
    @kind_window.visible = false
    @main_window.active = true
    return
    end
    # B 버튼을 누를 경우
    if Input.trigger?(Input::B)
    # 취소 SE를 연주
    $game_system.se_play ($data_system.cancel_se)
    $scene = Scene_Map.new
    return
    end
    end
    #------------------------------------------------- -------------------------
    # ● 프레임 갱신 (주 창이 활성화된 경우)
    #------------------------------------------------- -------------------------
    def update_main
    # B 버튼을 누를 경우
    if Input.trigger?(Input::B)
    # 취소 SE를 연주
    $game_system.se_play ($data_system.cancel_se)
    @main_window.active = false
    @kind_window.active = true
    @kind_window.visible = true
    @main_window.index = 0
    return
    end
    # C 버튼을 누를 경우
    if Input.trigger?(Input::C)
    if@main_window.item == nil or
    @main_window.show?(@main_window.item_kind, @main_window.item) == false
    # 초인종 SE를 연주
    $game_system.se_play ($data_system.buzzer_se)
    return
    end
    # 결정 SE를 연주
    $game_system.se_play ($data_system.decision_se)
    @main_window.active = false
    @info_window.active = true
    @info_window.visible = true
    @visible_index = @main_window.index
    @info_window.refresh(@main_window.item, @main_window.item_kind, @main_window.item_index)
    return
    end
    end
    #------------------------------------------------- -------------------------
    # ● 프레임 갱신 (인호윙도우이 활성화된 경우)
    #------------------------------------------------- -------------------------
    def update_info
    # B 버튼을 누를 경우
    if Input.trigger?(Input::B)
    # 취소 SE를 연주
    $game_system.se_play ($data_system.cancel_se)
    @main_window.active = true
    @info_window.active = false
    @info_window.visible = false
    @help_window.visible = false
    return
    end
    # C 버튼을 누를 경우
    if Input.trigger? (Input::C)
    # 결정 SE를 연주
    $game_system.se_play ($data_system.decision_se)
    return
    end
    if Input.trigger?(Input::L)
    # 결정 SE를 연주
    $game_system.se_play ($data_system.decision_se)
    loop_end = false
    while loop_end == false
    if @visible_index != 0
    @visible_index -= 1
    else
    @visible_index = @main_window.data.size - 1
    end
    loop_end = true if @main_window.show?(@main_window.item_kind,@main_window.data[@visible_index])
    end
    id = @main_window.data [@visible_index]
    @info_window.refresh(id, @main_window.item_kind, @main_window.item_index)
    return
    end
    if Input.trigger?(Input::R)
    # 결정 SE를 연주
    $game_system.se_play ($data_system.decision_se)
    loop_end = false
    while loop_end == false
    if @visible_index != @main_window.data.size - 1
    @visible_index += 1
    else
    @visible_index = 0
    end
    loop_end = true if @main_window.show?(@main_window.item_kind,@main_window.data[@visible_index])
    end
    id = @main_window.data [@visible_index]
    @info_window.refresh(id, @main_window.item_kind, @main_window.item_index)
    return
    end
    end
    end


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6317
101 저장 KGC_2PaneSave 15 file 키라링 2009.01.23 1872
100 전투 오버드라이브 8 file 키라링 2009.01.23 2194
99 HUD 맵이름표시 ps인간 2009.01.23 3442
98 이름입력 이름입력스크립트 ps인간 2009.01.23 3635
97 타이틀/게임오버 게..임..오버.. ps인간 2009.01.23 2637
96 기타 mog-스테이터스 업그레이드? ps인간 2009.01.23 1906
95 장비 장비창업그레이드 ps인간 2009.01.23 2482
94 아이템 mog-아이템창업그레이드? ps인간 2009.01.23 2557
93 메뉴 Mog-메뉴업그레이드? ps인간 2009.01.23 2950
92 스킬 스킬창 업그레이드? ps인간 2009.01.23 3062
91 상점 Mog- 상점업그레이드 ps인간 2009.01.23 2685
90 전투 캐릭터고르기스크립트? ps인간 2009.01.23 3264
89 아이템 아이템제한스크립트 ps인간 2009.01.23 1680
88 아이템 아이템획득스크립트 ps인간 2009.01.23 2993
87 기타 타이머스크립트 ps인간 2009.01.23 1768
» 아이템 아이템도감 14 키라링 2009.01.22 2306
85 기타 몬스터 게이지바 턴알 22 file 키라링 2009.01.22 4018
84 메시지 한글 채팅 스크립트 32 file こなた 2009.01.22 4950
83 메뉴 KGC스크립트모음 12 file 키라링 2009.01.18 2690
82 기타 모험일기 5 키라링 2009.01.18 1825
Board Pagination Prev 1 ... 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 Next
/ 52