XP 스크립트

저 스크립트를 메인위에 삽입후
붙여넣기 하시면 됩니다
위에 설명 잘 읽고하세요

사용법은 사람 하나 딱!! 세워논후
이벤트 커맨드에서 스크립트 들어간후 call_depository 하시면 됩니다


31~33 줄에

class Window_DepositoryGold < Window_Base
  # ◆金額指定の桁数
  GOLD_DIGITS = 10

이렇게 되있을 겁니다
GOLD_D... 윽 아무튼 저기 숫자는 최대 맡길 수 있는 돈 자리수 설정입니다
10자리니까 10억 까지 가능하죠
--------------------------------------------------------------------
#이 스크립트를 사용하기전에 [Scene_Debug] 아래에 삽입버튼을 눌러 이름을
#아무렇게나 정한후
#$game_special_elements = {}
#$imported = {}
#$data_states = load_data("Data/States.rxdata")
#$data_system = load_data("Data/System.rxdata")
#이 스크립트를 넣어주세요 (앞에 #는 삭제)


#번역:버밀
#스크립트 에디터 -> 맨 아래의 메인을 우클릭 -> 삽입버튼 클릭 -> 이름을 보관소
#로 한후 이 스크립트를 붙여넣기 한다

#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/  ◆보관소 - KGC_Depository◆
#_/----------------------------------------------------------------------------
#_/ 아이템이나 소지금을 맡길 수가 있는 가게를 작성합니다.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

# 도입 이 끝난 상태 플래그를 온
$imported["Depository"] = true

#==============================================================================
# ★ 커스터마이즈(customize) 항목 ★
#==============================================================================

class Window_DepositoryCommand < Window_Selectable
  # ◆操作ウィンドウのコマンド名
  DEPOSITORY_COMMAND = [
    "입금",      # お金を預ける
    "출금",    # お金を引き出す
    "아이템보관",  # アイテムを預ける
    "아이템찾기"  # アイテムを引き出す
  ]
  # ◆操作ウィンドウのヘルプ
  DEPOSITORY_HELP = [
    "돈을 맡깁니다 최대 10억 까지 가능합니다",              # お金を預ける
    "돈을 찾습니다",    # お金を引き出す
    "아이템을 맡깁니다",          # アイテムを預ける
    "아이템을 찾습니다"  # アイテムを引き出す
  ]
end

class Window_DepositoryGold < Window_Base
  # ◆金額指定の桁?
  GOLD_DIGITS = 10
end

class Scene_Depository
  # ◆ゴ?ルドを預ける際のメッセ?ジ(ヘルプウィンドウ)
  DEPOSIT_GOLD = "돈을 얼마나 입금합니까?"
  # ◆ゴ?ルドを引き出す際のメッセ?ジ(ヘルプウィンドウ)
  WDEPOSIT_GOLD = "돈을 얼마나 출금합니까?"
  # ◆アイテムを預ける際のメッセ?ジ(個?ウィンドウ)
  DEPOSIT_ITEM = "아이템을 몇개 맡깁니까?"
  # ◆アイテムを引き出す際のメッセ?ジ(個?ウィンドウ)
  WDEPOSIT_ITEM = "아이템을 몇개 찾습니까?"
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#--------------------------------------------------------------------------
# ● 預かり所呼び出し
#--------------------------------------------------------------------------
def call_depository
  # プレイヤ?の姿勢を矯正
  $game_player.straighten
  # 預かり所?面に切り替え
  $scene = Scene_Depository.new
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Party
#------------------------------------------------------------------------------
#  パ?ティを扱うクラスです。ゴ?ルドやアイテムなどの情報が含まれます。このク
# ラスのインスタンスは $game_party で?照されます。
#==============================================================================

class Game_Party
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  alias initialize_KGC_Depository initialize
  def initialize
    # 元の?理を?行
    initialize_KGC_Depository

    @deposit_gold = 0
    @deposit_item = []
    @deposit_weapon = []
    @deposit_armor = []
  end
  #--------------------------------------------------------------------------
  # ● 預けた金取得
  #--------------------------------------------------------------------------
  def deposit_gold
    @deposit_gold = 0 if @deposit_gold == nil
    return @deposit_gold
  end
  #--------------------------------------------------------------------------
  # ● 預けた金?加
  #    number : ?加量
  #--------------------------------------------------------------------------
  def gain_deposit_gold(number)
    @deposit_gold = 0 if @deposit_gold == nil
    @deposit_gold += number
  end
  #--------------------------------------------------------------------------
  # ● 預けた金減少
  #    number : 減少量
  #--------------------------------------------------------------------------
  def lose_deposit_gold(number)
    self.gain_deposit_gold(-number)
  end
  #--------------------------------------------------------------------------
  # ● 預けたアイテム取得
  #    id : ID
  #--------------------------------------------------------------------------
  def deposit_item_number(id)
    @deposit_item = [] if @deposit_item == nil
    return @deposit_item[id] != nil ? @deposit_item[id] : 0
  end
  #--------------------------------------------------------------------------
  # ● 預けたアイテム?加
  #    id    : ID
  #    number : 個?
  #--------------------------------------------------------------------------
  def gain_deposit_item(id, number)
    @deposit_item = [] if @deposit_item == nil
    @deposit_item[id] = 0 if @deposit_item[id] == nil
    @deposit_item[id] += number
  end
  #--------------------------------------------------------------------------
  # ● 預けたアイテム減少
  #    id    : ID
  #    number : 個?
  #--------------------------------------------------------------------------
  def lose_deposit_item(id, number)
    self.gain_deposit_item(id, -number)
  end
  #--------------------------------------------------------------------------
  # ● 預けた武器取得
  #    id : ID
  #--------------------------------------------------------------------------
  def deposit_weapon_number(id)
    @deposit_weapon = [] if @deposit_weapon == nil
    return @deposit_weapon[id] != nil ? @deposit_weapon[id] : 0
  end
  #--------------------------------------------------------------------------
  # ● 預けた武器?加
  #    id    : ID
  #    number : 個?
  #--------------------------------------------------------------------------
  def gain_deposit_weapon(id, number)
    @deposit_weapon = [] if @deposit_weapon == nil
    @deposit_weapon[id] = 0 if @deposit_weapon[id] == nil
    @deposit_weapon[id] += number
  end
  #--------------------------------------------------------------------------
  # ● 預けた武器減少
  #    id    : ID
  #    number : 個?
  #--------------------------------------------------------------------------
  def lose_deposit_weapon(id, number)
    self.gain_deposit_weapon(id, -number)
  end
  #--------------------------------------------------------------------------
  # ● 預けた防具取得
  #    id : ID
  #--------------------------------------------------------------------------
  def deposit_armor_number(id)
    @deposit_armor = [] if @deposit_armor == nil
    return @deposit_armor[id] != nil ? @deposit_armor[id] : 0
  end
  #--------------------------------------------------------------------------
  # ● 預けた防具?加
  #    id    : ID
  #    number : 個?
  #--------------------------------------------------------------------------
  def gain_deposit_armor(id, number)
    @deposit_armor = [] if @deposit_armor == nil
    @deposit_armor[id] = 0 if @deposit_armor[id] == nil
    @deposit_armor[id] += number
  end
  #--------------------------------------------------------------------------
  # ● 預けた防具減少
  #    id    : ID
  #    number : 個?
  #--------------------------------------------------------------------------
  def lose_deposit_armor(id, number)
    self.gain_deposit_armor(id, -number)
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Window_DepositoryCommand
#------------------------------------------------------------------------------
#  預かり所?面で、操作を選?するウィンドウです。
#==============================================================================

class Window_DepositoryCommand < Window_Selectable
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 64, 640, 64)
    self.y = 128 if $imported["HelpExtension"]
    self.contents = Bitmap.new(width - 32, height - 32)
    # コマンド一?を作成
    @commands = DEPOSITORY_COMMAND
    @item_max = @commands.size
    @column_max = @commands.size
    @item_width = (width - 32) / @commands.size
    self.back_opacity = 160
    self.index = 0
    refresh
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    for i in 0...@commands.size
      rect = Rect.new(@item_width * i, 0, @item_width, 32)
      self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
      self.contents.font.color = system_color
      self.contents.draw_text(rect, @commands[i], 1)
    end
  end
  #--------------------------------------------------------------------------
  # ● カ?ソルの矩形更新
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if index != -1
      self.cursor_rect.set(@item_width * index, 0, @item_width, 32)
    end
  end
  #--------------------------------------------------------------------------
  # ● ヘルプテキスト更新
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(DEPOSITORY_HELP[self.index])
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Window_DepositoryGold
#------------------------------------------------------------------------------
#  預かり所?面で、金額を入力するウィンドウです。
#==============================================================================

class Window_DepositoryGold < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 128, 640, 352)
    if $imported["HelpExtension"]
      self.y = 192
      self.height = 288
    end
    @digits_max = GOLD_DIGITS
    # ?字の幅からカ?ソルの幅を計算 (0~9 は等幅と?定)
    dummy_bitmap = Bitmap.new(32, 32)
    @cursor_width = dummy_bitmap.text_size("0").width + 8
    dummy_bitmap.dispose
    self.contents = Bitmap.new(width - 32, height - 32)
    self.back_opacity = 160
    self.active = false
    self.visible = false
    @cursor_position = 0
    @max = 0
    @price = 0
    @index = 0
  end
  #--------------------------------------------------------------------------
  # ● 入力された金額の取得
  #--------------------------------------------------------------------------
  def price
    return @price
  end
  #--------------------------------------------------------------------------
  # ● 金額の設定
  #    np : 新しい金額
  #--------------------------------------------------------------------------
  def price=(np)
    @price = [[np, 0].max, @max].min
    redraw_price
  end
  #--------------------------------------------------------------------------
  # ● リセット
  #    type : 形式
  #--------------------------------------------------------------------------
  def reset(type)
    @price = 0
    @index = @digits_max - 1
    refresh(type)
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #    type : 形式
  #--------------------------------------------------------------------------
  def refresh(type)
    # 金額を描?
    self.contents.clear
    domination = $data_system.words.gold
    cx = contents.text_size(domination).width
    @cursor_position = 332 - cx - @cursor_width * @digits_max
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, 608, 32, "골드")
    self.contents.draw_text(0, 64, 608, 32, "예금잔고")
    if type == 0
      self.contents.draw_text(0, 128, 608, 32, "맡기는 금액")
      @max = $game_party.gold
    else
      self.contents.draw_text(0, 128, 608, 32, "꺼내는 금액")
      @max = [10 ** @digits_max - $game_party.gold - 1, $game_party.deposit_gold].min
    end
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 326 - cx, 32, $game_party.gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(332 - cx, 32, cx, 32, domination, 2)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 96, 326 - cx, 32, $game_party.deposit_gold.to_s, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(332 - cx, 96, cx, 32, domination, 2)
    redraw_price
  end
  #--------------------------------------------------------------------------
  # ● 金額再描?
  #--------------------------------------------------------------------------
  def redraw_price
    domination = $data_system.words.gold
    cx = contents.text_size(domination).width
    self.contents.fill_rect(0, 160, 608, 32, Color.new(0, 0, 0, 0))
    self.contents.font.color = normal_color
    text = sprintf("%0#{@digits_max}d", self.price)
    for i in 0...text.length
      x = @cursor_position + (i - 1) * @cursor_width
      self.contents.draw_text(x, 160, 32, 32, text[i, 1], 2)
    end
    self.contents.font.color = system_color
    self.contents.draw_text(332 - cx, 160, cx, 32, domination, 2)
  end
  #--------------------------------------------------------------------------
  # ● カ?ソルの矩形更新
  #--------------------------------------------------------------------------
  def update_cursor_rect
    x = @cursor_position + @index * @cursor_width
    self.cursor_rect.set(x, 160, @cursor_width, 32)
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新
  #--------------------------------------------------------------------------
  def update
    super
    return unless self.active
    # 方向ボタンの上か下が押された場合
    if Input.repeat?(Input::UP) || Input.repeat?(Input::DOWN)
      $game_system.se_play($data_system.cursor_se)
      # 現在の位の?字を取得し、いったん 0 にする
      place = 10 ** (@digits_max - 1 - @index)
      n = self.price / place % 10
      self.price -= n * place
      # 上なら +1、下なら -1
      n = (n + 1) % 10 if Input.repeat?(Input::UP)
      n = (n + 9) % 10 if Input.repeat?(Input::DOWN)
      # 現在の位の?字を再設定
      self.price += n * place
    end
    # カ?ソル右
    if Input.repeat?(Input::RIGHT)
      if @digits_max >= 2
        $game_system.se_play($data_system.cursor_se)
        @index = (@index + 1) % @digits_max
      end
    end
    # カ?ソル左
    if Input.repeat?(Input::LEFT)
      if @digits_max >= 2
        $game_system.se_play($data_system.cursor_se)
        @index = (@index + @digits_max - 1) % @digits_max
      end
    end
    update_cursor_rect
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Window_DepositoryItem
#------------------------------------------------------------------------------
#  預かり所?面で、預けたアイテムの一?を表示するウィンドウです。
#==============================================================================

class Window_DepositoryItem < Window_Selectable
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 128, 640, 352)
    if $imported["HelpExtension"]
      self.y = 192
      self.height = 288
    end
    self.back_opacity = 160
    self.active = false
    self.visible = false
    @column_max = 2
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ● アイテムの取得
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #    type : 形式
  #--------------------------------------------------------------------------
  def refresh(type)
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    self.index = 0
    # アイテム?武器?防具を追加
    if type == 0
      for i in 1...$data_items.size
        if $game_party.item_number(i) > 0
          @data.push($data_items[i])
        end
      end
      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
    else
      for i in 1...$data_items.size
        if $game_party.deposit_item_number(i) > 0
          @data.push($data_items[i])
        end
      end
      for i in 1...$data_weapons.size
        if $game_party.deposit_weapon_number(i) > 0
          @data.push($data_weapons[i])
        end
      end
      for i in 1...$data_armors.size
        if $game_party.deposit_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 * 32)
      for i in 0...@item_max
        draw_item(i, type)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 項目の描?
  #    index : 項目番?
  #    type  : 形式
  #--------------------------------------------------------------------------
  def draw_item(index, type)
    item = @data[index]
    case item
    when RPG::Item
      number = type == 0 ? $game_party.item_number(item.id) :
        $game_party.deposit_item_number(item.id)
    when RPG::Weapon
      number = type == 0 ? $game_party.weapon_number(item.id) :
        $game_party.deposit_weapon_number(item.id)
    when RPG::Armor
      number = type == 0 ? $game_party.armor_number(item.id) :
        $game_party.deposit_armor_number(item.id)
    end
    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))
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # ● ヘルプテキスト更新
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Window_DepositoryNumber
#------------------------------------------------------------------------------
#  預かり所で使用する、?値入力用のウィンドウです。
#==============================================================================

class Window_DepositoryNumber < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    @digits_max = 2
    @number = 0
    # ?字の幅からカ?ソルの幅を計算 (0~9 は等幅と?定)
    dummy_bitmap = Bitmap.new(32, 32)
    @cursor_width = dummy_bitmap.text_size("0").width + 8
    dummy_bitmap.dispose
    @default_size = @cursor_width * @digits_max + 32
    super(0, 0, @default_size, 128)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.z = 1000
    self.back_opacity = 160
    self.active = false
    self.visible = false
    @index = 0
    @item = nil
    refresh
    update_cursor_rect
  end
  #--------------------------------------------------------------------------
  # ● アイテムの設定
  #    item : アイテム
  #--------------------------------------------------------------------------
  def item=(item)
    @item = item
  end
  #--------------------------------------------------------------------------
  # ● ?値の取得
  #--------------------------------------------------------------------------
  def number
    return @number
  end
  #--------------------------------------------------------------------------
  # ● ?値の設定
  #    number : 新しい?値
  #--------------------------------------------------------------------------
  def number=(number)
    @number = [[number, 0].max, @max].min
    refresh
  end
  #--------------------------------------------------------------------------
  # ● カ?ソルの矩形更新
  #--------------------------------------------------------------------------
  def update_cursor_rect
    self.cursor_rect.set(@index * @cursor_width, 32, @cursor_width, 32)
  end
  #--------------------------------------------------------------------------
  # ● リセット
  #--------------------------------------------------------------------------
  def reset(type)
    @number = 0
    @index = @digits_max - 1
    if type == 0
      case @item
      when RPG::Item
        @max = $game_party.item_number(@item.id)
        dep = $game_party.deposit_item_number(@item.id)
      when RPG::Weapon
        @max = $game_party.weapon_number(@item.id)
        dep = $game_party.deposit_weapon_number(@item.id)
      when RPG::Armor
        @max = $game_party.armor_number(@item.id)
        dep = $game_party.deposit_armor_number(@item.id)
      end
      # 預けている個?を描?
      self.contents.fill_rect(0, 64, width - 32, 32, Color.new(0, 0, 0, 0))
      self.contents.font.color = system_color
      self.contents.draw_text(0, 64, width - 32, 32, "가지고 있는 수:#{dep}")
    else
      case @item
      when RPG::Item
        @max = [$game_party.deposit_item_number(@item.id),
          10 ** @digits_max - $game_party.item_number(@item.id) - 1].min
        having = $game_party.item_number(@item.id)
      when RPG::Weapon
        @max = [$game_party.deposit_weapon_number(@item.id),
          10 ** @digits_max - $game_party.weapon_number(@item.id) - 1].min
        having = $game_party.weapon_number(@item.id)
      when RPG::Armor
        @max = [$game_party.deposit_armor_number(@item.id),
          10 ** @digits_max - $game_party.armor_number(@item.id) - 1].min
        having = $game_party.armor_number(@item.id)
      end
      # 所持?を描?
      self.contents.fill_rect(0, 64, width - 32, 32, Color.new(0, 0, 0, 0))
      self.contents.font.color = system_color
      self.contents.draw_text(0, 64, width - 32, 32, "보관소에 맡긴 수:#{having}")
    end
    refresh
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.fill_rect(0, 32, width - 32, 32, Color.new(0, 0, 0, 0))
    self.contents.font.color = normal_color
    s = sprintf("%0*d", @digits_max, @number)
    for i in 0...@digits_max
      self.contents.draw_text(i * @cursor_width + 4, 32, 32, 32, s[i,1])
    end
  end
  #--------------------------------------------------------------------------
  # ● 文字列設定
  #    string : 設定文字列
  #--------------------------------------------------------------------------
  def set_text(string = " ")
    self.resize(self.contents.text_size(string).width + 40)
    self.contents.fill_rect(0, 0, width - 32, 32, Color.new(0, 0, 0, 0))
    self.contents.font.color = normal_color
    self.contents.draw_text(0, 0, width - 32, 32, string, 1)
    refresh
    centering
  end
  #--------------------------------------------------------------------------
  # ● サイズ?更
  #    nw : 新しい幅
  #--------------------------------------------------------------------------
  def resize(nw)
    self.width = nw
    buf = self.contents.dup
    self.contents.dispose
    self.contents = Bitmap.new(nw - 32, 96)
    self.contents.blt(0, 0, buf, buf.rect)
    buf.dispose
  end
  #--------------------------------------------------------------------------
  # ● 中央移動
  #--------------------------------------------------------------------------
  def centering
    self.x = 320 - self.width / 2
    self.y = 240 - self.height / 2
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新
  #--------------------------------------------------------------------------
  def update
    super
    return unless self.active
    # 方向ボタンの上か下が押された場合
    if Input.repeat?(Input::UP) || Input.repeat?(Input::DOWN)
      $game_system.se_play($data_system.cursor_se)
      # 現在の位の?字を取得し、いったん 0 にする
      place = 10 ** (@digits_max - 1 - @index)
      n = self.number / place % 10
      self.number -= n * place
      # 上なら +1、下なら -1
      n = (n + 1) % 10 if Input.repeat?(Input::UP)
      n = (n + 9) % 10 if Input.repeat?(Input::DOWN)
      # 現在の位の?字を再設定
      self.number += n * place
      refresh
    end
    # カ?ソル右
    if Input.repeat?(Input::RIGHT)
      if @digits_max >= 2
        $game_system.se_play($data_system.cursor_se)
        @index = (@index + 1) % @digits_max
      end
    end
    # カ?ソル左
    if Input.repeat?(Input::LEFT)
      if @digits_max >= 2
        $game_system.se_play($data_system.cursor_se)
        @index = (@index + @digits_max - 1) % @digits_max
      end
    end
    update_cursor_rect
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Scene_Depository
#------------------------------------------------------------------------------
#  預かり所?面の?理を行うクラスです。
#==============================================================================

class Scene_Depository
  #--------------------------------------------------------------------------
  # ● メイン?理
  #--------------------------------------------------------------------------
  def main
    # スプライトセット作成
    @spriteset = Spriteset_Map.new
    # 各種ウィンドウを作成
    if $imported["HelpExtension"]
      @dummy_window = Window_Base.new(0, 192, 640, 288)
      @help_window = Window_HelpExtension.new
    else
      @dummy_window = Window_Base.new(0, 128, 640, 352)
      @help_window = Window_Help.new
    end
    @dummy_window.back_opacity = 160
    @help_window.back_opacity = 160
    @command_window = Window_DepositoryCommand.new
    @gold_window = Window_DepositoryGold.new
    @item_window = Window_DepositoryItem.new
    @number_window = Window_DepositoryNumber.new
    # ヘルプウィンドウを?連付け
    @command_window.help_window = @help_window
    @item_window.help_window = @help_window
    # トランジション?行
    Graphics.transition
    # メインル?プ
    loop do
      # ゲ?ム?面を更新
      Graphics.update
      # 入力情報を更新
      Input.update
      # フレ?ム更新
      update
      # ?面が切り替わったらル?プを中?
      if $scene != self
        break
      end
    end
    # トランジション準備
    Graphics.freeze
    # 解放
    @spriteset.dispose
    @dummy_window.dispose
    @help_window.dispose
    @command_window.dispose
    @gold_window.dispose
    @item_window.dispose
    @number_window.dispose
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新
  #--------------------------------------------------------------------------
  def update
    # ウィンドウを更新
    @dummy_window.update
    @help_window.update
    @command_window.update
    @gold_window.update
    @item_window.update
    @number_window.update
    # コマンドウィンドウがアクティブの場合: update_command を呼ぶ
    if @command_window.active
      update_command
      return
    end
    # ゴ?ルドウィンドウがアクティブの場合: update_gold を呼ぶ
    if @gold_window.active
      update_gold
      return
    end
    # アイテムウィンドウがアクティブの場合: update_item を呼ぶ
    if @item_window.active
      update_item
      return
    end
    # 個?ウィンドウがアクティブの場合: update_number を呼ぶ
    if @number_window.active
      update_number
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新 (コマンドウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_command
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # マップ?面に切り替え
      $scene = Scene_Map.new
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      # カ?ソル位置で分岐
      case @command_window.index
      when 0
        # ゴ?ルドウィンドウに切り替え
        @gold_window.active = true
        @gold_window.visible = true
        @gold_window.reset(0)
        @help_window.set_text(DEPOSIT_GOLD)
      when 1
        # ゴ?ルドウィンドウに切り替え
        @gold_window.active = true
        @gold_window.visible = true
        @gold_window.reset(1)
        @help_window.set_text(WDEPOSIT_GOLD)
      when 2
        # アイテムウィンドウに切り替え
        @item_window.active = true
        @item_window.visible = true
        @item_window.refresh(0)
      when 3
        # アイテムウィンドウに切り替え
        @item_window.active = true
        @item_window.visible = true
        @item_window.refresh(1)
      end
      @command_window.active = false
      # ダミ?ウィンドウ消去
      @dummy_window.visible = false
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新 (ゴ?ルドウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_gold
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # コマンドウィンドウに切り替え
      @command_window.active = true
      @gold_window.active = false
      @gold_window.visible = false
      @dummy_window.visible = true
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # 入力した金額を取得
      price = @gold_window.price
      # 金額が 0 の場合
      if price == 0
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # コマンドウィンドウに切り替え
        @command_window.active = true
        @gold_window.active = false
        @gold_window.visible = false
        @dummy_window.visible = true
        return
      end
      # ショップ SE を演奏
      $game_system.se_play($data_system.shop_se)
      # カ?ソル位置で分岐
      case @command_window.index
      when 0  # 預ける
        $game_party.lose_gold(price)
        $game_party.gain_deposit_gold(price)
      when 1  # 引き出す
        $game_party.gain_gold(price)
        $game_party.lose_deposit_gold(price)
      end
      # ゴ?ルドウィンドウをリセット
      @gold_window.reset(@command_window.index)
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新 (アイテムウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_item
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # コマンドウィンドウに切り替え
      @command_window.active = true
      @item_window.active = false
      @item_window.visible = false
      @dummy_window.visible = true
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # 選?アイテムを取得
      @item = @item_window.item
      # 空欄の場合
      if @item == nil
        # ブザ? SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 個?ウィンドウのアイテムを設定
      @number_window.item = @item
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      # カ?ソル位置で分岐
      case @command_window.index
      when 2  # 預ける
        @number_window.set_text(DEPOSIT_ITEM)
      when 3  # 引き出す
        @number_window.set_text(WDEPOSIT_ITEM)
      end
      # 個?ウィンドウをリセット
      @number_window.reset(@command_window.index - 2)
      # 個?ウィンドウに切り替え
      @item_window.active = false
      @number_window.active = true
      @number_window.visible = true
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレ?ム更新 (個?ウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_number
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # アイテムウィンドウに切り替え
      @item_window.active = true
      @number_window.active = false
      @number_window.visible = false
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      number = @number_window.number
      # カ?ソル位置で分岐
      case @command_window.index
      when 2  # 預ける
        case @item
        when RPG::Item
          $game_party.lose_item(@item.id, number)
          $game_party.gain_deposit_item(@item.id, number)
        when RPG::Weapon
          $game_party.lose_weapon(@item.id, number)
          $game_party.gain_deposit_weapon(@item.id, number)
        when RPG::Armor
          $game_party.lose_armor(@item.id, number)
          $game_party.gain_deposit_armor(@item.id, number)
        end
      when 3  # 引き出す
        case @item
        when RPG::Item
          $game_party.gain_item(@item.id, number)
          $game_party.lose_deposit_item(@item.id, number)
        when RPG::Weapon
          $game_party.gain_weapon(@item.id, number)
          $game_party.lose_deposit_weapon(@item.id, number)
        when RPG::Armor
          $game_party.gain_armor(@item.id, number)
          $game_party.lose_deposit_armor(@item.id, number)
        end
      end
      # アイテムウィンドウをリフレッシュ
      @item_window.refresh(@command_window.index - 2)
      # アイテムウィンドウに切り替え
      @item_window.active = true
      @number_window.active = false
      @number_window.visible = false
      return
    end
  end
end

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
1021 키입력 한글입력스크립트 16 file 아방스 2007.11.09 11823
1020 온라인 채팅 가능 온라인 스크립트 배포 107 file 아방스 2009.01.03 10680
1019 온라인 RPG 만들기 xp 온라인 스크립트 33 아방스 2007.11.09 9592
1018 맵/타일 [유니크급] RPG XP 게임을 3D화로 보자! Neo Mode7 script / 52 file 쉴더 2009.02.28 9442
1017 온라인 온라인 스크립트 Unis Net RMXP 공식 배포! 25 file 뮤바보 2011.12.25 9400
1016 온라인 광넷[ 광땡 온라인 + 넷플레이 ] 62 - 하늘 - 2009.08.02 9003
1015 전투 [액알]neo_a-rpg_module_1[1][1].2 스크립트 83 file 은빛바람 2009.10.03 8298
1014 이름입력 대화창에 얼굴, 이름 띄우기 37 킬라롯 2008.11.09 7496
1013 온라인 넷플레이1.7.0+abs5.5+한챗 49 쀍뛝쒧 2009.01.24 7286
1012 메뉴 메이플스토리처럼 메뉴를^^ 57 file 딸기님 2010.07.13 7141
1011 메시지 대화창에 얼굴 그래픽 띠우기 73 아방스 2007.11.09 7119
1010 스킬 ABP액알 v1.2 스킬추가, 버그수정판 36 file 백호 2009.02.22 6919
1009 전투 [신기술 체험] 강회된 횡스크롤 액알 13 file 백호 2009.02.22 6841
1008 메뉴 온라인메뉴처럼!! 메이플 메뉴처럼!! 변신~스크립트 33 WMN 2008.03.17 6816
1007 그래픽 화면을 부드럽게 해주는스크립트[ 아주 유용] 56 file - 하늘 - 2009.08.05 6561
1006 온라인 Mr.Metring NPE 1.0 [RPG XP 온라인 스크립트] 35 아방스 2009.01.07 6535
1005 이름입력 케릭터 위에 또는 NPC 위에 이름 뛰우기 [헬악이님 제공] 49 file 아방스 2007.11.09 6407
1004 액터 시트르산의 XP용 감정 말풍선 표시 스크립트 37 file 시트르산 2011.01.25 6110
1003 HUD 주인공,NPC이름 머리 나타내기 49 file 송긔 2010.11.28 6060
1002 전투 액알 스크립트 24 백호 2009.02.22 6013
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 52 Next
/ 52