| 赞 | 168  | 
 
| VIP | 6 | 
 
| 好人卡 | 208 | 
 
| 积分 | 225 | 
 
| 经验 | 137153 | 
 
| 最后登录 | 2025-4-1 | 
 
| 在线时间 | 8598 小时 | 
 
 
 
 
 
Lv5.捕梦者 
	- 梦石
 - 0 
 
        - 星屑
 - 22509 
 
        - 在线时间
 - 8598 小时
 
        - 注册时间
 - 2011-12-31
 
        - 帖子
 - 3361
 
 
 
 | 
	
 本帖最后由 tseyik 于 2014-9-3 16:08 编辑  
 
重量制 
 
 
#==============================================================================     # ■ むー素材用モジュール Ver 1.0     #------------------------------------------------------------------------------     #    スクリプトに必要なモジュールです。                                 By むー     #------------------------------------------------------------------------------     #    使用スクリプト     #    ・ドロップアイテム演出     #    ・アイテム重量制     #==============================================================================     module MOO_GENERAL_MODULE         #--------------------------------------------------------------------------       # 以下、設定箇所です。       #--------------------------------------------------------------------------         # ウィンドウのサイズ(1=544x416 / 2=640x480)       WINDOW_SIZE = 1       # ここで指定しても、ウィンドウサイズが変わるわけではありません。         #--------------------------------------------------------------------------       # ここまで。       #--------------------------------------------------------------------------         #**************************************************************************       # ※ ここ以下は変更しないでください。       #**************************************************************************         #--------------------------------------------------------------------------       # ● 左右どちらかに指定文字を埋める       #     word: 元々の文字列       #     len:  全部で何文字にするか       #     str:  埋める文字       #     lr:   埋める文字を付ける方向(1=左/2=右)       #       bury_plus("world", 8, " ", 1) → 結果: "   world"       #       bury_plus("world", 8, "@", 2) → 結果: "world@@@"       #--------------------------------------------------------------------------       def bury_plus(word, len, str, lr = 1)         return word if word.length >= len         str.to_s         pls = ""         for i in 1..len - word.length           pls += str         end         case lr           when 1; return pls + word           when 2; return word + pls         end       end       #--------------------------------------------------------------------------       # ● 重量制限用:アイテムウィンドウで総重量を示すウィンドウの位置       #--------------------------------------------------------------------------       def weight_item_window_x         return 384 if WINDOW_SIZE == 1         return 480 if WINDOW_SIZE == 2       end       #--------------------------------------------------------------------------       # ● 重量制限用:アイテムウィンドウで総重量を示すウィンドウの位置       #--------------------------------------------------------------------------       def weight_item_window_y         return 72  if WINDOW_SIZE == 1         return 72  if WINDOW_SIZE == 2       end       #--------------------------------------------------------------------------       # ● 重量制限用:アイテムウィンドウで総重量を示すウィンドウの位置       #--------------------------------------------------------------------------       def weight_item_window_w         return 160 if WINDOW_SIZE == 1         return 160 if WINDOW_SIZE == 2       end       #--------------------------------------------------------------------------       # ● 重量制限用:アイテムウィンドウで総重量を示すウィンドウの位置       #--------------------------------------------------------------------------       def weight_item_window_h         return 48  if WINDOW_SIZE == 1         return 48  if WINDOW_SIZE == 2       end       #--------------------------------------------------------------------------       # ● 重量制限用:ショップの売却画面で総重量を示すウィンドウの幅調整       #--------------------------------------------------------------------------       def weight_shop_buy_category_window_adjust_w         return 32  if WINDOW_SIZE == 1         return 32  if WINDOW_SIZE == 2       end     end 
 
 #==============================================================================  
    # ■ むー素材用モジュール Ver 1.0  
    #------------------------------------------------------------------------------  
    #    スクリプトに必要なモジュールです。                                 By むー  
    #------------------------------------------------------------------------------  
    #    使用スクリプト  
    #    ・ドロップアイテム演出  
    #    ・アイテム重量制  
    #==============================================================================  
    module MOO_GENERAL_MODULE  
   
      #--------------------------------------------------------------------------  
      # 以下、設定箇所です。  
      #--------------------------------------------------------------------------  
   
      # ウィンドウのサイズ(1=544x416 / 2=640x480)  
      WINDOW_SIZE = 1  
      # ここで指定しても、ウィンドウサイズが変わるわけではありません。  
   
      #--------------------------------------------------------------------------  
      # ここまで。  
      #--------------------------------------------------------------------------  
   
      #**************************************************************************  
      # ※ ここ以下は変更しないでください。  
      #**************************************************************************  
   
      #--------------------------------------------------------------------------  
      # ● 左右どちらかに指定文字を埋める  
      #     word: 元々の文字列  
      #     len:  全部で何文字にするか  
      #     str:  埋める文字  
      #     lr:   埋める文字を付ける方向(1=左/2=右)  
      #       bury_plus("world", 8, " ", 1) → 結果: "   world"  
      #       bury_plus("world", 8, "@", 2) → 結果: "world@@@"  
      #--------------------------------------------------------------------------  
      def bury_plus(word, len, str, lr = 1)  
        return word if word.length >= len  
        str.to_s  
        pls = ""  
        for i in 1..len - word.length  
          pls += str  
        end  
        case lr  
          when 1; return pls + word  
          when 2; return word + pls  
        end  
      end  
      #--------------------------------------------------------------------------  
      # ● 重量制限用:アイテムウィンドウで総重量を示すウィンドウの位置  
      #--------------------------------------------------------------------------  
      def weight_item_window_x  
        return 384 if WINDOW_SIZE == 1  
        return 480 if WINDOW_SIZE == 2  
      end  
      #--------------------------------------------------------------------------  
      # ● 重量制限用:アイテムウィンドウで総重量を示すウィンドウの位置  
      #--------------------------------------------------------------------------  
      def weight_item_window_y  
        return 72  if WINDOW_SIZE == 1  
        return 72  if WINDOW_SIZE == 2  
      end  
      #--------------------------------------------------------------------------  
      # ● 重量制限用:アイテムウィンドウで総重量を示すウィンドウの位置  
      #--------------------------------------------------------------------------  
      def weight_item_window_w  
        return 160 if WINDOW_SIZE == 1  
        return 160 if WINDOW_SIZE == 2  
      end  
      #--------------------------------------------------------------------------  
      # ● 重量制限用:アイテムウィンドウで総重量を示すウィンドウの位置  
      #--------------------------------------------------------------------------  
      def weight_item_window_h  
        return 48  if WINDOW_SIZE == 1  
        return 48  if WINDOW_SIZE == 2  
      end  
      #--------------------------------------------------------------------------  
      # ● 重量制限用:ショップの売却画面で総重量を示すウィンドウの幅調整  
      #--------------------------------------------------------------------------  
      def weight_shop_buy_category_window_adjust_w  
        return 32  if WINDOW_SIZE == 1  
        return 32  if WINDOW_SIZE == 2  
      end  
    end  
 
 - #==============================================================================
 
 -     # ■ 重量制 Ver 1.21                               By むー
 
 -     #------------------------------------------------------------------------------
 
 -     # アイテムに重量を付加し、所持可能な重量を指定できます。
 
 -     # 本スクリプトを利用するには、[むー素材用]スクリプトが別途必要になります。
 
 -     # 本スクリプトは[むー素材用]よりも下に設置して下さい。
 
 -     #------------------------------------------------------------------------------
 
 -     #
 
 -     # ★簡単な仕様★
 
 -     #
 
 -     # ・ゲームに重量を設置します。
 
 -     # ・設定した総重量以上の物は持てません。
 
 -     # ・チェックコマンドにて、イベントで入手可能チェックができます。
 
 -     # ・戦闘後のドロップアイテムは、持てる分だけ出ます。
 
 -     #   →3個出た場合、最初の2個は持てるけれど残りが持てない場合、
 
 -     #    2個分だけメッセージが出ます。入手も2個だけです。
 
 -     # ・重量オーバーの場合、店で購入ができません。
 
 -     # ・イベントでアイテムの増加をおこなう場合にもチェックが入ります。
 
 -     #   →特にメッセージは出ません。例えば5個入手で持てるだけ入手したい場合は、
 
 -     #    5個いぺっんに入手ではなく、1個入手を5回分作って下さい。
 
 -     #    5個いっぺんに入手する場合、5個持てなかったら1個も入手できません。
 
 -     #
 
 -     # ★チェック機能★
 
 -     #
 
 -     # イベントでアイテムを入手する時、重量オーバーになると取得できません。
 
 -     # イベントのスクリプトで、以下のように記述すると動作する機能があります。
 
 -     #
 
 -     # can_gain_item?(アイテム種類, ID, 数量, スイッチ番号, [取得フラグ])
 
 -     #
 
 -     #  アイテム種類: アイテム="I"、武器="W"、防具="A"
 
 -     #  ID     : 上記アイテム種類別のID ("W",3...) なら武器ID3
 
 -     #  数量    : 取得する数量
 
 -     #  スイッチ番号: 入手できる場合はON、できない場合はOFFが入るスイッチの番号
 
 -     #  取得フラグ : ついでに取得するか(true/false)
 
 -     #
 
 -     # アイテム種類は必ず""で囲って下さい。I、W、A以外のチェックしていません。
 
 -     # 数量が0の場合のエラーチェックはおこなっていません。
 
 -     # アイテム種類、ID、数量、スイッチ番号は必須です。
 
 -     # スイッチを使わない場合は、0にしておいて下さい。
 
 -     # 取得フラグをtrueにしておくと、取得可能な場合は自動的にアイテムを入手します。
 
 -     # falseまたは何も記述しなかった場合は取得しません。
 
 -     # またスイッチに入れなくとも、返り値でtrueかfalseが戻ります。
 
 -     #
 
 -     # ★注意点★
 
 -     #
 
 -     # ・ゲーム開始時に、基本重量を設定して下さい。
 
 -     # ・初期装備によって、総重量がオーバーしている場合があります。
 
 -     #
 
 -     #==============================================================================
 
 -     $rgsslab = {} if $rgsslab.nil?  # 併用対策
 
 -     #==============================================================================
 
 -     $moo_have_item_weight = true
 
 -     module MOO_HAVE_ITEM_WEIGHT
 
 -      
 
 -       #--------------------------------------------------------------------------
 
 -       # 以下、設定箇所です。
 
 -       #--------------------------------------------------------------------------
 
 -      
 
 -       # 総重量を代入する変数番号
 
 -       MAX_WT = 11
 
 -      
 
 -       # 重量指定文字
 
 -       WORD_WT = "重量"
 
 -       # アイテム(および装備品)のメモ欄に書く文字です。
 
 -       # "重量"の場合、<重量:5>とすれば、そのアイテムの重量は5になります。
 
 -       # 他のスクリプトと重複する場合は変更してください。
 
 -      
 
 -       # 重量指定のないアイテムの重量
 
 -       DEFAULT_WT = 1
 
 -       # 重量の指定をしなかったアイテムの重量です。
 
 -      
 
 -       # 所持している総重量計算を個数×重量にするか
 
 -       UNIT_WT = true
 
 -       # 総重量の計算をどうするか決めます。
 
 -       # trueの場合、アイテム個数×個別の重量の総計が、所持している総重量になります。
 
 -       # falseの場合、アイテムが1個でも99個でも1個分の重さが総重量に加算されます。
 
 -      
 
 -       # アイテム欄の重量表示を個数×重量にするか
 
 -       VIEW_WT = true
 
 -       # アイテム個数の後ろに表示される重量表示をどうするか決めます。
 
 -       # trueの場合、アイテムの重量が5で個数が4の場合、20と表示されます。
 
 -       # falseの場合、個数に関係なく、単純にアイテムの重量だけが表示されます。
 
 -       # このVIEW_WTをfalse、上記のUNIT_WTがtrueの場合、錯覚しないようご注意ください。
 
 -       # その場合、()はあくまでそのアイテムの重量であり、総重量は個数×重量となります。
 
 -       # また、UNIT_WTをfalse、VIEW_WTをtrueにすると、混乱の元となります(笑)
 
 -      
 
 -       # 重量計算に装備品を含むか
 
 -       CONT_WT = false
 
 -       # 装備品を総重量に含むかどうかを決めます。
 
 -       # 袋(?)はあくまで袋、装備品は関係ない、などのような場合はfalseにして下さい。
 
 -      
 
 -       # 総重量を表示する上での文字
 
 -       SUM_WEIGHT_WORD = "総重量"
 
 -      
 
 -       # アイテム欄で重量を囲う文字
 
 -       PARENTHESIS_F = "(W:" # 前
 
 -       PARENTHESIS_L = ")"   # 後
 
 -      
 
 -       # 1つのアイテム重量の最大桁数
 
 -       FIGURE_WT = 2
 
 -       # 1つのアイテムに設定する重量の桁数です。99までなら2という感じで。
 
 -       # 上の「アイテム欄で重量を囲う文字」と合わせて表示しますが、
 
 -       # これが"(W:"と")"だった場合、画面上のアイテム欄には
 
 -       # [アイテム名   10(W: 5)] のように表示されます。
 
 -       # ↑       ↑ ↑
 
 -       # アイテム名  個数 重さ(この部分の数字の前の空白に関わってきます)
 
 -      
 
 -       # 売買価格のレートを格納する変数 (1 = 1%)/おまけ機能
 
 -       USE_RATE  = false # レート変動を使う場合
 
 -       BUY_RATE  = 12    # 購入レート(USE_RATE=trueの場合のみ有効)
 
 -       SELL_RATE = 13    # 売却レート(USE_RATE=trueの場合のみ有効)
 
 -       # 指定しない場合、購入価格と売却価格は同じになります。
 
 -       # 小数点以下の価格は切り捨てられます。
 
 -      
 
 -       # 販売不可アイテムの文字
 
 -       CANT_SELL = "重量制販売不可"
 
 -       # アイテムのメモ欄にこの文字があると、価格が0以上でも
 
 -       # ショップで販売不可になります(0はデフォルトのまま販売不可です)。
 
 -       # 重量制販売不可 とした場合、<重量制販売不可> と <>を一緒に記述して下さい。
 
 -       # なお、これはあくまでデフォルト形態のショップだけに有効です。
 
 -      
 
 -       #--------------------------------------------------------------------------
 
 -       # 以下、他のスクリプトを導入しているかどうかの判断です。
 
 -       # これらのスクリプトを使用する場合、本スクリプトより上の位置に置いて下さい。
 
 -       #--------------------------------------------------------------------------
 
 -      
 
 -       # ドロップアイテム系のスクリプトを導入しているか
 
 -       DROP_ITEM = false
 
 -       # 導入している場合は true にして下さい。通常は false にして下さい。
 
 -       # その際、そのスクリプトに$game_party.gain_item(ナントカ)とあると思います。
 
 -       # その前後に、本スクリプトの中身のように改造する必要があります。
 
 -       #
 
 -      
 
 -       #--------------------------------------------------------------------------
 
 -       # ここまで。
 
 -       #--------------------------------------------------------------------------
 
 -      
 
 -     end
 
 -      
 
 -     #==============================================================================
 
 -     # ★ ここより下は変更しないで下さい。
 
 -     #==============================================================================
 
 -      
 
 -     if MOO_HAVE_ITEM_WEIGHT::DROP_ITEM == false
 
 -     #==============================================================================
 
 -     # ■ BattleManager
 
 -     #------------------------------------------------------------------------------
 
 -     #  戦闘の進行を管理するモジュールです。
 
 -     #==============================================================================
 
 -     module BattleManager
 
 -       def self.gain_drop_items
 
 -         $game_troop.make_drop_items.each do |item|
 
 -           if $game_party.gain_item_failed?(item)    # ドロップ系スクリプトに追加部分
 
 -             $game_party.moo_gain_item(item, 1)
 
 -             $game_message.add(sprintf(Vocab::ObtainItem, item.name))
 
 -           end   # ドロップ系スクリプトに追加部分
 
 -         end
 
 -         wait_for_message
 
 -       end
 
 -     end
 
 -     end
 
 -      
 
 -     #==============================================================================
 
 -     # ■ Game_Party
 
 -     #------------------------------------------------------------------------------
 
 -     #  パーティを扱うクラスです。所持金やアイテムなどの情報が含まれます。このクラ
 
 -     # スのインスタンスは $game_party で参照されます。
 
 -     #==============================================================================
 
 -     class Game_Party < Game_Unit
 
 -       include MOO_GENERAL_MODULE
 
 -       #--------------------------------------------------------------------------
 
 -       # ● 公開インスタンス変数
 
 -       #--------------------------------------------------------------------------
 
 -       attr_reader   :gold                     # 所持金
 
 -       attr_reader   :steps                    # 歩数
 
 -       attr_reader   :last_item                # カーソル記憶用 : アイテム
 
 -       #--------------------------------------------------------------------------
 
 -       # ● オブジェクト初期化
 
 -       #--------------------------------------------------------------------------
 
 -       def initialize
 
 -         super
 
 -         @gold = 0
 
 -         @steps = 0
 
 -         @last_item = Game_BaseItem.new
 
 -         @total_weight = 0   # 追加
 
 -         @menu_actor_id = 0
 
 -         @target_actor_id = 0
 
 -         @actors = []
 
 -         init_all_items
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ◎ アイテムの増加(減少)
 
 -       #     include_equip : 装備品も含める
 
 -       #--------------------------------------------------------------------------
 
 -       alias moo_gain_item gain_item
 
 -       def gain_item(item, amount, include_equip = false)
 
 -         # gain_item内では、include_equipの関係からか、memberが使えません。
 
 -         # ですので重量に装備品を含む場合、メンバーの装備情報が取得できません。
 
 -         # 以下の"if MOO_HAVE_ITEM_WEIGHT::CONT_WT == false"があるのはそのためです。
 
 -         # 重量に装備品抜きの場合に限り、ここで重量のチェックをしています。
 
 -         #
 
 -         # 総重量を超える場合は取得不可能
 
 -         # 1度に2以上取得しようとして引っかかった場合は、
 
 -         # たとえ1個分の許容があったとしても、全て取得できません。
 
 -         #
 
 -         # 一応ここ以外にも、以下の箇所で入手可能かどうかのチェックをしています。
 
 -         #
 
 -         # ・イベントでアイテム、武器、防具を入手する時
 
 -         # ・ショップでアイテムを購入する時
 
 -         # ・戦闘後のドロップアイテム入手時
 
 -         # ・装備を変更する時
 
 -         #
 
 -         # 普通に作成していれば、ここでチェックしなくてもよほど大丈夫だとはいますが、
 
 -         # 他のスクリプトを導入する際、アイテム入手がある場合は注意して下さい。
 
 -         # アイテム入手前に $game_party.gain_item(アイテム, 数量) を使って
 
 -         # trueかfalseで判断するようにして下さい。
 
 -         if MOO_HAVE_ITEM_WEIGHT::CONT_WT == false
 
 -           return if gain_item_failed?(item, amount) == false
 
 -         end
 
 -         # moo_gain_item(item, amount, include_equip)
 
 -         container = item_container(item.class)
 
 -         return unless container
 
 -         last_number = item_number(item)
 
 -         new_number = last_number + amount
 
 -         container[item.id] = [[new_number, 0].max, max_item_number(item)].min
 
 -         container.delete(item.id) if container[item.id] == 0
 
 -         if include_equip && new_number < 0
 
 -           discard_members_equip(item, -new_number)
 
 -         end
 
 -         $game_map.need_refresh = true
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ アイテムの個別重量を取得
 
 -       #--------------------------------------------------------------------------
 
 -       def weight_item(item)
 
 -         return 0 if item == nil
 
 -         # アイテムのメモ取得
 
 -         memo = item.note.scan((/<#{MOO_HAVE_ITEM_WEIGHT::WORD_WT}[::](\S+)>/))
 
 -         memo = memo.flatten
 
 -         # 重量取得
 
 -         if memo != nil and not memo.empty?
 
 -           # 重量設定がある場合はそれを採用
 
 -           wt = memo[0].to_i
 
 -         else
 
 -           # 重量設定がない場合は指定した重量とする
 
 -           wt = MOO_HAVE_ITEM_WEIGHT::DEFAULT_WT
 
 -         end
 
 -         return wt
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ 所持アイテムの総重量を取得
 
 -       #--------------------------------------------------------------------------
 
 -       def weight_sum
 
 -         # 変数初期化
 
 -         wt = 0
 
 -         # 所持しているアイテムの重量取得
 
 -         $data_items.each do |item|
 
 -           # アイテムの総重量
 
 -           wt += weight_have_item(item) if item and item.name != ""
 
 -         end
 
 -         $data_weapons.each do |item|
 
 -           # 武器の総重量
 
 -           wt += weight_have_item(item) if item and item.name != ""
 
 -         end
 
 -         $data_armors.each do |item|
 
 -           # 防具の総重量
 
 -           wt += weight_have_item(item) if item and item.name != ""
 
 -         end
 
 -         return wt
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ 所持アイテムの個別重量を取得(フラグがあれば装備品を含む)
 
 -       #--------------------------------------------------------------------------
 
 -       def weight_have_item(item)
 
 -         return 0 if item == nil
 
 -         # アイテムの個別重量を取得
 
 -         wt = weight_item(item)
 
 -         # 所持個数の取得
 
 -         cn = item_number(item)
 
 -         if MOO_HAVE_ITEM_WEIGHT::CONT_WT
 
 -           if item.class == RPG::Weapon or item.class == RPG::Armor
 
 -               members.each do |actor|
 
 -               if item.class == RPG::Weapon
 
 -                 cn += 1 if $game_actors[actor.id].equips[0] == item
 
 -                 cn += 1 if $game_actors[actor.id].equips[1] == item
 
 -               elsif item.class == RPG::Armor
 
 -                 cn += 1 if $game_actors[actor.id].equips[item.etype_id] == item
 
 -               end
 
 -             end
 
 -           end
 
 -         end
 
 -         # 個数×重量の場合の計算
 
 -         if cn == 0
 
 -           wt = 0
 
 -         else
 
 -           wt *= cn if MOO_HAVE_ITEM_WEIGHT::UNIT_WT
 
 -         end
 
 -         return wt
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ 重量をカッコ書き(アイテム一覧に書くため)
 
 -       #--------------------------------------------------------------------------
 
 -       def weight_item_draw(item)
 
 -         wt = weight_item(item).to_i
 
 -         wt *= item_number(item) if MOO_HAVE_ITEM_WEIGHT::VIEW_WT
 
 -         wt = wt.to_s
 
 -         wt = bury_plus(wt, MOO_HAVE_ITEM_WEIGHT::FIGURE_WT, " ", lr = 1)
 
 -         wt = MOO_HAVE_ITEM_WEIGHT::PARENTHESIS_F + wt + MOO_HAVE_ITEM_WEIGHT::PARENTHESIS_L
 
 -         return wt
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ アイテムを取得可能かどうかの判断
 
 -       #--------------------------------------------------------------------------
 
 -       def gain_item_failed?(item, val = 1)
 
 -         val = 1 if MOO_HAVE_ITEM_WEIGHT::UNIT_WT == false
 
 -         if weight_sum + weight_item(item) * val > $game_variables[MOO_HAVE_ITEM_WEIGHT::MAX_WT]
 
 -           false
 
 -         else
 
 -           true
 
 -         end
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ 個数の限界によってアイテムを取得可能かどうかの判断
 
 -       #--------------------------------------------------------------------------
 
 -       def gain_item_max?(item, val = 1)
 
 -         return false if item_number(item) + val > max_item_number(item)
 
 -         return true
 
 -       end
 
 -     end
 
 -      
 
 -     #==============================================================================
 
 -     # ■ Game_Actor
 
 -     #------------------------------------------------------------------------------
 
 -     #  アクターを扱うクラスです。このクラスは Game_Actors クラス($game_actors)
 
 -     # の内部で使用され、Game_Party クラス($game_party)からも参照されます。
 
 -     #==============================================================================
 
 -     class Game_Actor < Game_Battler
 
 -       #--------------------------------------------------------------------------
 
 -       # ◎ 装備の変更
 
 -       #     slot_id : 装備スロット ID
 
 -       #     item    : 武器/防具(nil なら装備解除)
 
 -       #--------------------------------------------------------------------------
 
 -       alias moo_change_equip change_equip
 
 -       def change_equip(slot_id, item)
 
 -         # equips[slot_id]: 装備中アイテム(nil=装備なし)
 
 -         # item: これから装備しようとしているアイテム(nil=装備なし)
 
 -         if MOO_HAVE_ITEM_WEIGHT::CONT_WT == false
 
 -           wt_old = $game_party.weight_item(equips[slot_id])
 
 -           wt_new = $game_party.weight_item(item)
 
 -           wt_clc = $game_party.weight_sum + wt_old - wt_new
 
 -           # wt_clc: 現在の重さ + 外す装備品の重さ - これから装備する物の重さ
 
 -           if wt_clc > $game_variables[MOO_HAVE_ITEM_WEIGHT::MAX_WT]
 
 -             Sound.play_buzzer
 
 -             return
 
 -           end
 
 -         end
 
 -         moo_change_equip(slot_id, item)
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● パーティとアイテムを交換する
 
 -       #     new_item : パーティから取り出すアイテム
 
 -       #     old_item : パーティに返すアイテム
 
 -       #--------------------------------------------------------------------------
 
 -       alias moo_trade_item_with_party trade_item_with_party
 
 -       def trade_item_with_party(new_item, old_item)
 
 -         return false if new_item && !$game_party.has_item?(new_item)
 
 -         # 入手と破棄を逆転
 
 -         $game_party.lose_item(new_item, 1)
 
 -         $game_party.gain_item(old_item, 1)
 
 -         return true
 
 -       end
 
 -     end
 
 -      
 
 -     #==============================================================================
 
 -     # ■ Game_Interpreter
 
 -     #------------------------------------------------------------------------------
 
 -     #  イベントコマンドを実行するインタプリタです。このクラスは Game_Map クラス、
 
 -     # Game_Troop クラス、Game_Event クラスの内部で使用されます。
 
 -     #==============================================================================
 
 -     class Game_Interpreter
 
 -       #--------------------------------------------------------------------------
 
 -       # ● アイテムの増減
 
 -       #--------------------------------------------------------------------------
 
 -       def command_126
 
 -         value = operate_value(@params[1], @params[2], @params[3])
 
 -         if $game_party.gain_item_failed?($data_items[@params[0]], value)
 
 -           $game_party.moo_gain_item($data_items[@params[0]], value)
 
 -         end
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● 武器の増減
 
 -       #--------------------------------------------------------------------------
 
 -       def command_127
 
 -         value = operate_value(@params[1], @params[2], @params[3])
 
 -         if $game_party.gain_item_failed?($data_weapons[@params[0]], value)
 
 -           $game_party.moo_gain_item($data_weapons[@params[0]], value, @params[4])
 
 -         end
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● 防具の増減
 
 -       #--------------------------------------------------------------------------
 
 -       def command_128
 
 -         value = operate_value(@params[1], @params[2], @params[3])
 
 -         if $game_party.gain_item_failed?($data_armors[@params[0]], value)
 
 -           $game_party.moo_gain_item($data_armors[@params[0]], value, @params[4])
 
 -         end
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ 所持品を追加できるかの判断
 
 -       #     kind  : アイテム種類(/[IWA]/)
 
 -       #     id    : アイテムID
 
 -       #     num   : 入手する個数
 
 -       #     val   : 入手可能かどうかを代入するスイッチ番号(使わない場合は0を指定)
 
 -       #     gain  : 入手処理もついでに行なうか(省略時は行なわない)
 
 -       #--------------------------------------------------------------------------
 
 -       def can_gain_item?(kind, id, num = 1, val = 0, gain = false)
 
 -         # アイテム変数初期値
 
 -         item = nil
 
 -         # アイテム種類分別
 
 -         case kind
 
 -           when "I"; item = $data_items[id]
 
 -           when "W"; item = $data_weapons[id]
 
 -           when "A"; item = $data_armors[id]
 
 -         end
 
 -         # 重量による取得可能チェック  
 
 -         flg1 = $game_party.gain_item_failed?(item, num)
 
 -         # 数量による取得可能チェック
 
 -         flg2 = $game_party.gain_item_max?(item, num)
 
 -         # 重量か数量いずれかで取得不能判定があった場合のフラグ
 
 -         flg = true
 
 -         flg = false if flg1 == false or flg2 == false
 
 -         # 取得可能であり取得フラグが立っていたら取得
 
 -         $game_party.moo_gain_item(item, num) if flg and gain
 
 -         # スイッチに値を返す
 
 -         $game_switches[val] = flg if val > 0 and val != nil
 
 -         # 値を返す
 
 -         return flg
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ 所持品の総重量を取得
 
 -       #--------------------------------------------------------------------------
 
 -       def get_weight_sum
 
 -         $game_party.weight_sum
 
 -       end
 
 -     end
 
 -      
 
 -     #==============================================================================
 
 -     # ■ Window_ItemCategory
 
 -     #------------------------------------------------------------------------------
 
 -     #  アイテム画面またはショップ画面で、通常アイテムや装備品の分類を選択するウィ
 
 -     # ンドウです。
 
 -     #==============================================================================
 
 -     class Window_ItemCategory < Window_HorzCommand
 
 -       #--------------------------------------------------------------------------
 
 -       # ● ウィンドウ幅の取得
 
 -       #--------------------------------------------------------------------------
 
 -       def window_width
 
 -         Graphics.width - 160
 
 -       end
 
 -     end
 
 -      
 
 -     #==============================================================================
 
 -     # ■ Window_ItemList
 
 -     #------------------------------------------------------------------------------
 
 -     #  アイテム画面で、所持アイテムの一覧を表示するウィンドウです。
 
 -     #==============================================================================
 
 -     class Window_ItemList < Window_Selectable
 
 -       #--------------------------------------------------------------------------
 
 -       # ● アイテムの個数を描画
 
 -       #--------------------------------------------------------------------------
 
 -       def draw_item_number(rect, item)
 
 -         $game_party.weight_sum
 
 -         # カッコ書きの重量文字列を取得
 
 -         wt = $game_party.weight_item_draw(item)
 
 -         # 数量の後に重量を追加
 
 -         draw_text(rect, sprintf(":%2d", $game_party.item_number(item)) + wt, 2)
 
 -       end
 
 -     end
 
 -      
 
 -     #==============================================================================
 
 -     # ■ Window_ShopBuy
 
 -     #------------------------------------------------------------------------------
 
 -     #  ショップ画面で、購入できる商品の一覧を表示するウィンドウです。
 
 -     #==============================================================================
 
 -     class Window_ShopBuy
 
 -     #  include MOO_GENERAL_MODULE
 
 -       #--------------------------------------------------------------------------
 
 -       # ● オブジェクト初期化
 
 -       #--------------------------------------------------------------------------
 
 -       def initialize(x, y, height, shop_goods)
 
 -         super(x, y, window_width, height)
 
 -         @shop_goods = shop_goods
 
 -         [url=home.php?mod=space&uid=26101]@Money[/url] = 0
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● 商品の値段を取得
 
 -       #--------------------------------------------------------------------------
 
 -       def price(item)
 
 -         if MOO_HAVE_ITEM_WEIGHT::USE_RATE
 
 -           return Integer(@price[item] * $game_variables[MOO_HAVE_ITEM_WEIGHT::BUY_RATE] / 100)
 
 -         else
 
 -           return @price[item]
 
 -         end
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● アイテムリストの作成
 
 -       #--------------------------------------------------------------------------
 
 -       def make_item_list
 
 -         @data = []
 
 -         @price = {}
 
 -         @shop_goods.each do |goods|
 
 -           case goods[0]
 
 -           when 0;  item = $data_items[goods[1]]
 
 -           when 1;  item = $data_weapons[goods[1]]
 
 -           when 2;  item = $data_armors[goods[1]]
 
 -           end
 
 -           if item
 
 -             @data.push(item)
 
 -             @price[item] = goods[2] == 0 ? item.price : goods[3]
 
 -           end
 
 -         end
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● 項目の描画
 
 -       #--------------------------------------------------------------------------
 
 -       def draw_item(index)
 
 -         item = @data[index]
 
 -         rect = item_rect(index)
 
 -         draw_item_name(item, rect.x, rect.y, enable?(item))
 
 -         rect.width -= 4
 
 -     #    wt = $game_party.weight_item(item)
 
 -     #    wt = wt.to_s
 
 -     #    wt = bury_plus(wt, MOO_HAVE_ITEM_WEIGHT::FIGURE_WT, " ", 1)
 
 -     #    wt = MOO_HAVE_ITEM_WEIGHT::PARENTHESIS_F + wt + MOO_HAVE_ITEM_WEIGHT::PARENTHESIS_L
 
 -     #    draw_text(rect, price(item).to_s + wt, 2)
 
 -         draw_text(rect, price(item), 2)
 
 -       end
 
 -     end
 
 -      
 
 -     #==============================================================================
 
 -     # ■ Window_ShopSell
 
 -     #------------------------------------------------------------------------------
 
 -     #  ショップ画面で、売却のために所持アイテムの一覧を表示するウィンドウです。
 
 -     #==============================================================================
 
 -     class Window_ShopSell
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ 桁数の取得
 
 -       #--------------------------------------------------------------------------
 
 -       def col_max
 
 -         return 1
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ 項目の描画
 
 -       #--------------------------------------------------------------------------
 
 -       def draw_item(index)
 
 -         item = @data[index]
 
 -         rect = item_rect(index)
 
 -         draw_item_name(item, rect.x, rect.y, enable?(item))
 
 -         rect.width -= 4
 
 -         draw_text(rect, price(item), 2)
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ◎ アイテムを許可状態で表示するかどうか
 
 -       #--------------------------------------------------------------------------
 
 -       alias moo_weight_enable? enable?
 
 -       def enable?(item)
 
 -         flg = $data_items[item.id].note.include?("<" + MOO_HAVE_ITEM_WEIGHT::CANT_SELL + ">")   if item.class == RPG::Item
 
 -         flg = $data_weapons[item.id].note.include?("<" + MOO_HAVE_ITEM_WEIGHT::CANT_SELL + ">") if item.class == RPG::Weapon
 
 -         flg = $data_armors[item.id].note.include?("<" + MOO_HAVE_ITEM_WEIGHT::CANT_SELL + ">")  if item.class == RPG::Armor
 
 -         return false if flg
 
 -         moo_weight_enable?(item)
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ 商品の値段を取得
 
 -       #--------------------------------------------------------------------------
 
 -       def price(item)
 
 -         if MOO_HAVE_ITEM_WEIGHT::USE_RATE
 
 -           return Integer(item.price * $game_variables[MOO_HAVE_ITEM_WEIGHT::SELL_RATE] / 100)
 
 -         else
 
 -           return item.price
 
 -         end
 
 -       end
 
 -     end
 
 -      
 
 -     #==============================================================================
 
 -     # ■ Window_ShopNumber
 
 -     #------------------------------------------------------------------------------
 
 -     #  ショップ画面で、購入または売却するアイテムの個数を入力するウィンドウです。
 
 -     #==============================================================================
 
 -     class Window_ShopNumber < Window_Selectable
 
 -       #--------------------------------------------------------------------------
 
 -       # ● リフレッシュ
 
 -       #--------------------------------------------------------------------------
 
 -       def refresh
 
 -         contents.clear
 
 -         draw_item_name(@item, 0, item_y)
 
 -         draw_number
 
 -         draw_total_price
 
 -         draw_total_weight(@item)
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ 個数の総重量の描画
 
 -       #--------------------------------------------------------------------------
 
 -       def draw_total_weight(item)
 
 -         width = contents_width - 8
 
 -         cx = text_size(@currency_unit).width
 
 -         change_color(system_color)
 
 -         x_plus = 4
 
 -         if MOO_GENERAL_MODULE::WINDOW_SIZE == 1
 
 -           y_plus = 36
 
 -         elsif MOO_GENERAL_MODULE::WINDOW_SIZE == 2
 
 -           y_plus = 72
 
 -         end
 
 -         wd = MOO_HAVE_ITEM_WEIGHT::SUM_WEIGHT_WORD
 
 -         draw_text(4, y + 24 + y_plus, width, line_height, wd)
 
 -         change_color(normal_color)
 
 -         cn = 1
 
 -         cn = @number if MOO_HAVE_ITEM_WEIGHT::UNIT_WT
 
 -         wt = $game_party.weight_item(item) * cn #@number
 
 -         draw_text(x - cx - 2 + x_plus, y + 24 + y_plus, width, line_height, wt, 2)
 
 -       end
 
 -     end
 
 -      
 
 -     #==============================================================================
 
 -     # ■ Window_ShopStatus
 
 -     #------------------------------------------------------------------------------
 
 -     #  ショップ画面で、アイテムの所持数やアクターの装備を表示するウィンドウです。
 
 -     #==============================================================================
 
 -     class Window_ShopStatus < Window_Base
 
 -       #--------------------------------------------------------------------------
 
 -       # ● リフレッシュ
 
 -       #--------------------------------------------------------------------------
 
 -       def refresh
 
 -         contents.clear
 
 -         draw_possession(4, 0)
 
 -         draw_weight_possession(4, 24)
 
 -         y_plus = 0
 
 -         y_plus = 24 if MOO_GENERAL_MODULE::WINDOW_SIZE == 2
 
 -         draw_equip_info(4, line_height * 2 + y_plus) if @item.is_a?(RPG::EquipItem)
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ 総重量の描画
 
 -       #--------------------------------------------------------------------------
 
 -       def draw_weight_possession(x, y)
 
 -         rect = Rect.new(x, y, contents.width - 4 - x, line_height)
 
 -         change_color(system_color)
 
 -         draw_text(rect, MOO_HAVE_ITEM_WEIGHT::SUM_WEIGHT_WORD)
 
 -         change_color(normal_color)
 
 -         str =  $game_party.weight_sum.to_s + "/" + $game_variables[MOO_HAVE_ITEM_WEIGHT::MAX_WT].to_s
 
 -         draw_text(rect, str, 2)
 
 -       end
 
 -     end
 
 -      
 
 -     #==============================================================================
 
 -     # ■ Window_Weight_Sum_Menu
 
 -     #------------------------------------------------------------------------------
 
 -     #  メニューウィンドウで総重量を表示するクラスです。
 
 -     #==============================================================================
 
 -     class Window_Weight_Sum_Menu < Window_Base
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ オブジェクト初期化
 
 -       #--------------------------------------------------------------------------
 
 -       def initialize(x, y, width, height)
 
 -         super(x, y, width, height)
 
 -         refresh
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ リフレッシュ
 
 -       #--------------------------------------------------------------------------
 
 -       def refresh
 
 -         contents.clear
 
 -         rect = Rect.new(0, 0, width - 28, line_height)
 
 -         change_color(system_color)
 
 -         draw_text(rect, MOO_HAVE_ITEM_WEIGHT::SUM_WEIGHT_WORD)
 
 -         change_color(normal_color)
 
 -         str =  $game_party.weight_sum.to_s + "/" + $game_variables[MOO_HAVE_ITEM_WEIGHT::MAX_WT].to_s
 
 -         draw_text(rect, str, 2)
 
 -       end
 
 -     end
 
 -      
 
 -     #==============================================================================
 
 -     # ■ Window_Weight_Sum_item
 
 -     #------------------------------------------------------------------------------
 
 -     #  アイテム一覧で総重量を表示するクラスです。
 
 -     #==============================================================================
 
 -     class Window_Weight_Sum_item < Window_ItemList
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ オブジェクト初期化
 
 -       #--------------------------------------------------------------------------
 
 -       def initialize(x, y, width, height)
 
 -         super(x, y, width, height)
 
 -         refresh
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ リフレッシュ
 
 -       #--------------------------------------------------------------------------
 
 -       def refresh
 
 -         contents.clear
 
 -         rect = Rect.new(0, 0, width - 28, line_height)
 
 -         change_color(system_color)
 
 -         draw_text(rect, MOO_HAVE_ITEM_WEIGHT::SUM_WEIGHT_WORD)
 
 -         change_color(normal_color)
 
 -         str =  $game_party.weight_sum.to_s + "/" + $game_variables[MOO_HAVE_ITEM_WEIGHT::MAX_WT].to_s
 
 -         draw_text(rect, str, 2)
 
 -       end
 
 -     end
 
 -      
 
 -     #==============================================================================
 
 -     # ■ Window_Weight_Sum_Shop
 
 -     #------------------------------------------------------------------------------
 
 -     #  ショップの売却画面で総重量を表示するクラスです。
 
 -     #==============================================================================
 
 -     class Window_Weight_Sum_Shop < Window_ItemList
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ オブジェクト初期化
 
 -       #--------------------------------------------------------------------------
 
 -       def initialize(x, y, width, height)
 
 -         super(x, y, width, height)
 
 -         refresh
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ リフレッシュ
 
 -       #--------------------------------------------------------------------------
 
 -       def refresh
 
 -         contents.clear
 
 -         rect = Rect.new(0, 0, width - 28, line_height)
 
 -         change_color(system_color)
 
 -         draw_text(rect, MOO_HAVE_ITEM_WEIGHT::SUM_WEIGHT_WORD)
 
 -         change_color(normal_color)
 
 -         str =  $game_party.weight_sum.to_s + "/" + $game_variables[MOO_HAVE_ITEM_WEIGHT::MAX_WT].to_s
 
 -         draw_text(rect, str, 2)
 
 -       end
 
 -     end
 
 -      
 
 -     #==============================================================================
 
 -     # ■ Scene_Menu
 
 -     #------------------------------------------------------------------------------
 
 -     #  メニュー画面の処理を行うクラスです。
 
 -     #==============================================================================
 
 -     class Scene_Menu < Scene_MenuBase
 
 -       include MOO_GENERAL_MODULE
 
 -       #--------------------------------------------------------------------------
 
 -       # ● 開始処理
 
 -       #--------------------------------------------------------------------------
 
 -       def start
 
 -         super
 
 -         create_command_window
 
 -         create_gold_window
 
 -         create_status_window
 
 -         @wt_x = 0
 
 -         @wt_y = Graphics.height - @gold_window.height - weight_item_window_h
 
 -         @wt_w = weight_item_window_w
 
 -         @wt_h = @gold_window.height
 
 -         create_weight_sum_window(@wt_x, @wt_y, @wt_w, @wt_h)
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ 総重量ウィンドウの作成
 
 -       #--------------------------------------------------------------------------
 
 -       def create_weight_sum_window(x, y, width, height)
 
 -         @weight_sum_window = Window_Weight_Sum_Menu.new(x, y, width, height)
 
 -         @weight_sum_window.viewport = @viewport
 
 -       end
 
 -     end
 
 -      
 
 -     #==============================================================================
 
 -     # ■ Scene_Item
 
 -     #------------------------------------------------------------------------------
 
 -     #  アイテム画面の処理を行うクラスです。
 
 -     #==============================================================================
 
 -     class Scene_Item < Scene_ItemBase
 
 -       include MOO_GENERAL_MODULE
 
 -       #--------------------------------------------------------------------------
 
 -       # ● 開始処理
 
 -       #--------------------------------------------------------------------------
 
 -       def start
 
 -         super
 
 -         create_help_window
 
 -         create_category_window
 
 -         create_item_window
 
 -         @wt_x = weight_item_window_x
 
 -         @wt_y = weight_item_window_y
 
 -         @wt_w = weight_item_window_w
 
 -         @wt_h = weight_item_window_h
 
 -         create_weight_sum_window(@wt_x, @wt_y, @wt_w, @wt_h)
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ 総重量ウィンドウの作成
 
 -       #--------------------------------------------------------------------------
 
 -       def create_weight_sum_window(x, y, width, height)
 
 -         @weight_sum_window = Window_Weight_Sum_item.new(x, y, width, height)
 
 -         @weight_sum_window.viewport = @viewport
 
 -         @weight_sum_window.y = @help_window.height
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● アイテムの使用
 
 -       #--------------------------------------------------------------------------
 
 -       def use_item
 
 -         super
 
 -         @item_window.redraw_current_item
 
 -         @weight_sum_window.refresh
 
 -       end
 
 -     end
 
 -      
 
 -     #==============================================================================
 
 -     # ■ Scene_Shop
 
 -     #------------------------------------------------------------------------------
 
 -     #  ショップ画面の処理を行うクラスです。
 
 -     #==============================================================================
 
 -     class Scene_Shop < Scene_MenuBase
 
 -       include MOO_GENERAL_MODULE
 
 -       #--------------------------------------------------------------------------
 
 -       # ● 開始処理
 
 -       #--------------------------------------------------------------------------
 
 -       def start
 
 -         super
 
 -         create_help_window
 
 -         create_gold_window
 
 -         create_command_window
 
 -         create_dummy_window
 
 -         create_category_window
 
 -         create_number_window
 
 -         create_status_window
 
 -         create_buy_window
 
 -         @wt_x = weight_item_window_x
 
 -         @wt_y = weight_item_window_y + 48
 
 -         @wt_w = weight_item_window_w
 
 -         @wt_h = weight_item_window_h
 
 -         create_weight_sum_window(@wt_x, @wt_y, @wt_w, @wt_h)
 
 -         create_sell_window
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ○ 総重量ウィンドウの作成
 
 -       #--------------------------------------------------------------------------
 
 -       def create_weight_sum_window(x, y, width, height)
 
 -         @weight_sum_window = Window_Weight_Sum_Shop.new(x, y, width, height)
 
 -         @weight_sum_window.viewport = @viewport
 
 -         @weight_sum_window.y = @help_window.height
 
 -         @weight_sum_window.y = @dummy_window.y
 
 -         @weight_sum_window.hide.deactivate
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● 個数入力[決定]
 
 -       #--------------------------------------------------------------------------
 
 -       def on_number_ok
 
 -         case @command_window.current_symbol
 
 -         when :buy
 
 -           do_buy(@number_window.number)
 
 -           @weight_sum_window.refresh
 
 -           @weight_sum_window.hide
 
 -         when :sell
 
 -           do_sell(@number_window.number)
 
 -           @weight_sum_window.refresh
 
 -         end
 
 -         end_number_input
 
 -         @gold_window.refresh
 
 -         @status_window.refresh
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● 購入の実行
 
 -       #--------------------------------------------------------------------------
 
 -       def do_buy(number)
 
 -         if $game_party.gain_item_failed?(@item, number) == false
 
 -           Sound.play_buzzer
 
 -           return
 
 -         end
 
 -         Sound.play_shop
 
 -         $game_party.lose_gold(number * buying_price)
 
 -         $game_party.moo_gain_item(@item, number)
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● 売却ウィンドウのアクティブ化
 
 -       #--------------------------------------------------------------------------
 
 -       def activate_sell_window
 
 -         @category_window.show
 
 -         @weight_sum_window.show
 
 -         @sell_window.refresh
 
 -         @sell_window.show.activate
 
 -         @status_window.hide
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● 購入ウィンドウのアクティブ化
 
 -       #--------------------------------------------------------------------------
 
 -       def activate_buy_window
 
 -         @buy_window.money = money
 
 -         @buy_window.show.activate
 
 -         @status_window.show
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● コマンド[購入する]
 
 -       #--------------------------------------------------------------------------
 
 -       def command_buy
 
 -         @dummy_window.hide
 
 -         activate_buy_window
 
 -         @buy_window.select(0)
 
 -         @buy_window.refresh
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● コマンド[売却する]
 
 -       #--------------------------------------------------------------------------
 
 -       def command_sell
 
 -         @dummy_window.hide
 
 -         @category_window.show.activate
 
 -         @weight_sum_window.show
 
 -         @sell_window.show
 
 -         @sell_window.unselect
 
 -         @sell_window.refresh
 
 -         @weight_sum_window.show
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● カテゴリ[キャンセル]
 
 -       #--------------------------------------------------------------------------
 
 -       def on_category_cancel
 
 -         @command_window.activate
 
 -         @dummy_window.show
 
 -         @category_window.hide
 
 -         @weight_sum_window.hide
 
 -         @sell_window.hide
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● 売却[決定]
 
 -       #--------------------------------------------------------------------------
 
 -       def on_sell_ok
 
 -         @item = @sell_window.item
 
 -         @status_window.item = @item
 
 -         @category_window.hide
 
 -         @weight_sum_window.hide
 
 -         @sell_window.hide
 
 -         @number_window.set(@item, max_sell, selling_price, currency_unit)
 
 -         @number_window.show.activate
 
 -         @status_window.show
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● 売却[キャンセル]
 
 -       #--------------------------------------------------------------------------
 
 -       def on_sell_cancel
 
 -         @sell_window.unselect
 
 -         @category_window.activate
 
 -         @weight_sum_window.activate
 
 -         @status_window.item = nil
 
 -         @help_window.clear
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● 売却の実行
 
 -       #--------------------------------------------------------------------------
 
 -       def do_sell(number)
 
 -         Sound.play_shop
 
 -         $game_party.gain_gold(number * selling_price)
 
 -         $game_party.lose_item(@item, number)
 
 -       end
 
 -       #--------------------------------------------------------------------------
 
 -       # ● 売値の取得
 
 -       #--------------------------------------------------------------------------
 
 -       def selling_price
 
 -         @sell_window.price(@item)
 
 -       end
 
 -     end
 
  复制代码 アイテム預かり所 
 
- #==============================================================================
 
 - # ■ RGSS3 アイテム預かり所 Ver1.03 by 星潟
 
 - #------------------------------------------------------------------------------
 
 - # アイテムを預ける事が出来るようになります。
 
 - # 莫大な数のアイテムが登場する作品におすすめです。
 
 - # 
 
 - # 最大所持数を越える量のアイテムを引き出せないようにする機能や
 
 - # 預けられないアイテムの作成、預けられる数の限界設定の他、
 
 - # アイテムの預かり・引き出しに関わるイベントコマンドをいくつか実装します。
 
 - # 
 
 - # アイテム・武器・防具のメモ欄に以下のように書き込む事で
 
 - # それぞれ特殊な設定が行われます。
 
 - # 
 
 - # <保存禁止>……このアイテムは預かり所で預ける事が出来ません。
 
 - # 
 
 - # <保存制限:20>……このアイテムは預かり所にも20個までしか預ける事が出来ません。
 
 - # 
 
 - # 以下、イベントコマンドです。(全て、スクリプトを用います)
 
 - #
 
 - # SceneManager.call(Scene_Item_Keep)
 
 - # アイテム預かり所画面を呼び出します。
 
 - # 
 
 - # item_keep_all(data_a)
 
 - # data_aが0の時……預けられるアイテムを預けられるだけ預けます。
 
 - # data_aが1の時……アイテムを全て引き出せるだけ引き出します。
 
 - # 
 
 - # weapon_keep_all(data_a)
 
 - # data_aが0の時……預けられる武器を預けられるだけ預けます。
 
 - # data_aが1の時……武器を全て引き出せるだけ引き出します。
 
 - # 
 
 - # armor_keep_all(data_a)
 
 - # data_aが0の時……預けられる防具を預けられるだけ預けます。
 
 - # data_aが1の時……防具を全て引き出せるだけ引き出します。
 
 - #
 
 - # item_keep(data_a, data_b)
 
 - # data_aが0の時……data_bで指定したIDのアイテムを預けられるだけ預けます。
 
 - # data_aが1の時……data_bで指定したIDのアイテムを引き出せるだけ引き出します。
 
 - #
 
 - # weapon_keep(data_a, data_b)
 
 - # data_aが0の時……data_bで指定したIDの武器を預けられるだけ預けます。
 
 - # data_aが1の時……data_bで指定したIDの武器を引き出せるだけ引き出します。
 
 - #
 
 - # armor_keep(data_a, data_b)
 
 - # data_aが0の時……data_bで指定したIDの防具を預けられるだけ預けます。
 
 - # data_aが1の時……data_bで指定したIDの防具を引き出せるだけ引き出します。
 
 - # 
 
 - # word_keep_all(data_a, data_b)
 
 - # 
 
 - # data_aが0の時……
 
 - # data_bで指定した言葉がメモ欄に含まれる
 
 - # アイテム・武器・防具を預けられるだけ預けます。
 
 - #
 
 - # data_aが1の時……
 
 - # data_bで指定した言葉がメモ欄に含まれる
 
 - # アイテム・武器・防具を引き出せるだけ引き出します。
 
 - #
 
 - # word_keep_allで、data_bで設定する言葉は、前後を""で囲んでください。
 
 - # 【例.word_keep_all(1, "回復")】
 
 - # この場合、回復という言葉をメモ欄に含んだアイテム・武器・防具を
 
 - # 預かり所から全て引き出します。
 
 - #------------------------------------------------------------------------------
 
 - # Ver1.01 導入前のセーブデータを使用した場合に正常に機能しなくなる不具合を修正。
 
 - #         軽量化スクリプトと統合し、軽量化モード切替機能を追加。
 
 - #         説明ウィンドウ機能を追加。
 
 - #
 
 - # Ver1.02 一部機能を更に軽量化。
 
 - #         Scene_Shop及び継承しているシーンクラスにおいて
 
 - #         買った物を直接預かり所へ送る機能を追加。
 
 - #         所持限界数を超えてアイテムを入手した際に
 
 - #         自動的に預かり所に送る機能を追加。
 
 - #
 
 - # Ver1.03 ロード時に更に一部軽量化。
 
 - #==============================================================================
 
 - module ITEM_KEEPER
 
 -   
 
 -   #ショップ画面で預かり所への売買機能を付与するかを設定できます。
 
 -   
 
 -   SHOP      = true
 
 -   
 
 -   #ショップ画面で預かり所モードへの切り替えボタンを設定できます。
 
 -   
 
 -   KEY       = :Z
 
 -   
 
 -   #預かり所モードから所持品モードに切り替えた際のメッセージを設定します。
 
 -   
 
 -   TEXT1     = "所持品モードに切り替えます"
 
 -   
 
 -   #所持品モードから預かり所モードに切り替えた際のメッセージを設定します。
 
 -   
 
 -   TEXT2     = "預かり所モードに切り替えます"
 
 -   
 
 -   #モードに切り替え時のSEを設定します。
 
 -   #配列内は、名前、音量、ピッチの順に設定して下さい。
 
 -   
 
 -   SE        = ["Decision3",80,100]
 
 -   
 
 -   #ショップでの預けている数の項目名を設定します。
 
 -   
 
 -   SHOP_POS  = "預けている数"
 
 -   
 
 -   #預かり所モードの際の数字入力幅の増加値を設定します。(3桁以上の入力を考慮)
 
 -   
 
 -   SHOP_FIG  = 1
 
 -   
 
 -   #ショップでの預り所への売買機能を無効化する為のスイッチを指定します。
 
 -   
 
 -   SWITCH1   = 201
 
 -   
 
 -   #保存禁止アイテムについて、預かり所で表示しないようにするかを設定できます。
 
 -   #true 表示しない false 表示する 
 
 -   
 
 -   UNVISIBLE = false
 
 -   
 
 -   #保存禁止アイテムについて、預かり所で表示しないようにするかを設定できます。
 
 -   #true 表示しない false 表示する
 
 -   
 
 -   WORD1     = "保存禁止"
 
 -   
 
 -   #保存に個数制限を設ける為の設定用キーワードです。
 
 -   
 
 -   WORD2     = "保存制限"
 
 -   
 
 -   #保存制限のないアイテムについていくつまで預けられるかを設定します。
 
 -   
 
 -   LIMIT     = 888
 
 -   
 
 -   #所持数を超えて入手したアイテムが自動で預かり所に送られるかどうかを設定します。
 
 -   
 
 -   AUTOKEEP  = true
 
 -   
 
 -   #所持数を超えて入手したアイテムが自動で預かり所に送られる機能を
 
 -   #一時的に封印するスイッチを指定します。
 
 -   
 
 -   SWITCH2   = 202
 
 -   
 
 -   #説明ウィンドウを表示するかどうかを設定します。
 
 -   
 
 -   DESCRIPT  = true
 
 -   
 
 -   #数量ウィンドウと説明ウィンドウの背景透明度を変更します。
 
 -   
 
 -   B_OPACITY = 255
 
 -   
 
 -   #軽量化フラグ。
 
 -   
 
 -   FLAG      = true
 
 -   
 
 -   #説明ウィンドウに表示する項目を設定します。
 
 -   #(基本的にこの部分を変更する必要はありません)
 
 -   
 
 -   D         = [
 
 -   ["下キー",":1個引き出す"],
 
 -   ["上キー",":1個預ける"],
 
 -   ["左キー",":10個引き出す"],
 
 -   ["右キー",":10個預ける"],
 
 -   ["CTRLキー",":100個引き出す"],
 
 -   ["SHIFTキー",":100個預ける"]
 
 -   ]
 
 -   
 
 - end
 
 - class RPG::BaseItem
 
 -   #--------------------------------------------------------------------------
 
 -   # 保存禁止のフラグ
 
 -   #--------------------------------------------------------------------------
 
 -   def keep_seal_flag
 
 -     
 
 -     #キャッシュがある場合はキャッシュを返す。
 
 -     
 
 -     return @keep_seal_flag if @keep_seal_flag != nil
 
 -     
 
 -     #データを取得。
 
 -     
 
 -     @keep_seal_flag = self.note.include?("<" + ITEM_KEEPER::WORD1 + ">") ? true : false
 
 -     
 
 -     #データを返す。
 
 -     
 
 -     @keep_seal_flag
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 最大保管数を取得
 
 -   #--------------------------------------------------------------------------
 
 -   def max_item_keep_number
 
 -     
 
 -     #キャッシュが存在する場合はキャッシュを返す。
 
 -     
 
 -     return @max_item_keep_number if @max_item_keep_number != nil
 
 -     
 
 -     #メモ欄からデータを取得し、取得できない場合はデフォルト数を返す。
 
 -     
 
 -     memo = self.note.scan(/<#{ITEM_KEEPER::WORD2}[::](\S+)>/).flatten
 
 -     @max_item_keep_number = memo != nil && !memo.empty? ? memo[0].to_i : ITEM_KEEPER::LIMIT
 
 -     
 
 -     #データを返す。
 
 -     
 
 -     @max_item_keep_number
 
 -   end
 
 - end
 
 - class Game_Party < Game_Unit
 
 -   #--------------------------------------------------------------------------
 
 -   # オブジェクト初期化
 
 -   #--------------------------------------------------------------------------
 
 -   alias initialize_ik initialize
 
 -   def initialize
 
 -     
 
 -     #本来の処理を実行。
 
 -     
 
 -     initialize_ik
 
 -     
 
 -     #パーティー外全アイテムリストを初期化。
 
 -     
 
 -     init_all_items_ik
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # パーティー外全アイテムリストの初期化(強制)
 
 -   #--------------------------------------------------------------------------
 
 -   def init_all_items_ik
 
 -     
 
 -     #それぞれ、空のハッシュを生成。
 
 -     
 
 -     @items_k = {}
 
 -     @weapons_k = {}
 
 -     @armors_k = {}
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # パーティー外全アイテムリストの初期化(nilの場合)
 
 -   #--------------------------------------------------------------------------
 
 -   def init_all_items_ik_un_nil
 
 -     
 
 -     #それぞれ、存在しない場合のみハッシュを生成。
 
 -     
 
 -     @items_k = {} if @items_k == nil
 
 -     @weapons_k = {} if @weapons_k == nil
 
 -     @armors_k = {} if @armors_k == nil
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテムの最大保管数取得
 
 -   #--------------------------------------------------------------------------
 
 -   def max_item_keep_number(item)
 
 -     
 
 -     #アイテムが存在しない場合はfalseを返す。
 
 -     
 
 -     return false if item == nil
 
 -     
 
 -     #アイテムの最大保管数を返す。
 
 -     
 
 -     item.max_item_keep_number
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテムの保管数取得
 
 -   #--------------------------------------------------------------------------
 
 -   def item_keep_number(item)
 
 -     
 
 -     #コンテナを取得。
 
 -     
 
 -     container = item_keep_container(item.class)
 
 -     
 
 -     #コンテナにデータが存在しない場合は0を返す。
 
 -     
 
 -     container ? container[item.id] || 0 : 0
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテムの保管
 
 -   #--------------------------------------------------------------------------
 
 -   def item_keep(item, number, get = false)
 
 -     
 
 -     #数量データを取得。
 
 -     
 
 -     number_data = number
 
 -     
 
 -     #アイテム保管を実行。
 
 -     
 
 -     item_keep_execute(item, number_data)
 
 -     
 
 -     #所持アイテムを減らす。
 
 -     
 
 -     gain_item(item, -number_data) if get == false
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 預けているアイテムのクラスに対応するコンテナオブジェクトを取得
 
 -   #--------------------------------------------------------------------------
 
 -   def item_keep_container(item_class)
 
 -     
 
 -     #アイテムの種類に応じてコンテナを取得。
 
 -     
 
 -     return @items_k   if item_class == RPG::Item
 
 -     return @weapons_k if item_class == RPG::Weapon
 
 -     return @armors_k  if item_class == RPG::Armor
 
 -     return nil
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテムの増加(減少)
 
 -   #--------------------------------------------------------------------------
 
 -   def item_keep_execute(item, amount)
 
 -     
 
 -     #コンテナを取得。
 
 -     
 
 -     container = item_keep_container(item.class)
 
 -     
 
 -     #コンテナが存在しない場合は処理をしない。
 
 -     
 
 -     return if container == nil
 
 -     
 
 -     #処理前の保管数を取得。
 
 -     
 
 -     last_number = item_keep_number(item)
 
 -     
 
 -     #処理後の保管数を取得。
 
 -     
 
 -     new_number = last_number + amount
 
 -     
 
 -     #保管数を変更する。
 
 -     
 
 -     container[item.id] = new_number
 
 -     
 
 -     #保管数が0となった場合はハッシュから削除する。
 
 -     
 
 -     container.delete(item.id) if container[item.id] == 0
 
 -     
 
 -     #マップのリフレッシュフラグを立てる。
 
 -     
 
 -     $game_map.need_refresh = true
 
 -   end
 
 -   
 
 -   #自動倉庫送りが有効な場合のみ変更
 
 -   
 
 -   if ITEM_KEEPER::AUTOKEEP
 
 -     
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテムの増加(減少)
 
 -   #--------------------------------------------------------------------------
 
 -   alias gain_item_ik gain_item
 
 -   def gain_item(item, amount, include_equip = false)
 
 -       
 
 -     #自動倉庫送りスイッチが無効もしくは、スイッチがOFFの時で
 
 -     #なおかつアイテムが存在し、それが預かり所禁止出ない場合
 
 -     
 
 -     if (ITEM_KEEPER::SWITCH2 == 0 or !$game_switches[ITEM_KEEPER::SWITCH2]) && (item != nil && !item.keep_seal_flag)
 
 -       
 
 -       #アイテムコンテナを取得。
 
 -       
 
 -       container = item_container(item.class)
 
 -       
 
 -       #アイテムコンテナが存在しない場合は処理を飛ばす。
 
 -       
 
 -       return unless container
 
 -       
 
 -       #所持数と入手数の合計値を取得。
 
 -       
 
 -       ex_amount = item_number(item) + amount
 
 -       
 
 -       #合計値が最大所持数を上回る場合
 
 -       
 
 -       if ex_amount > max_item_number(item)
 
 -         
 
 -         #合計値から最大所持数を引いた値を取得。
 
 -         
 
 -         data = ex_amount - max_item_number(item)
 
 -         
 
 -         #倉庫アイテムコンテナを取得。
 
 -         
 
 -         ik_container = item_keep_container(item.class)
 
 -         
 
 -         #倉庫アイテムの数を変更する。
 
 -         
 
 -         ik_container[item.id] = [item_keep_number(item) + data, max_item_keep_number(item)].min
 
 -         
 
 -         #入手数を減らす。
 
 -         
 
 -         amount -= data
 
 -       end
 
 -     end
 
 -     
 
 -     #本来の処理を実行。
 
 -     
 
 -     gain_item_ik(item, amount, include_equip)
 
 -   end
 
 -   
 
 -   end
 
 - end
 
 - class Scene_Load < Scene_File
 
 -   #--------------------------------------------------------------------------
 
 -   # ロード成功時の処理
 
 -   #--------------------------------------------------------------------------
 
 -   alias on_load_success_ik on_load_success
 
 -   def on_load_success
 
 -     $game_party.init_all_items_ik_un_nil
 
 -     on_load_success_ik
 
 -   end
 
 - end
 
 - class Scene_Item_Keep < Scene_Item
 
 -   #--------------------------------------------------------------------------
 
 -   # 開始処理
 
 -   #--------------------------------------------------------------------------
 
 -   def start
 
 -     
 
 -     #スーパークラスの処理を実行。
 
 -     
 
 -     super
 
 -     
 
 -     #説明ウィンドウの作成
 
 -     
 
 -     create_description_window
 
 -     
 
 -     #個数入力ウィンドウの作成
 
 -     
 
 -     create_number_window
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # カテゴリウィンドウの作成
 
 -   #--------------------------------------------------------------------------
 
 -   def create_category_window
 
 -     @category_window = Window_ItemCategory.new
 
 -     @category_window.viewport = @viewport
 
 -     @category_window.help_window = @help_window
 
 -     @category_window.y = @help_window.height
 
 -     @category_window.set_handler(:ok,     method(:on_category_ok))
 
 -     @category_window.set_handler(:cancel, method(:return_scene))
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテムウィンドウの作成
 
 -   #--------------------------------------------------------------------------
 
 -   def create_item_window
 
 -     wy = @category_window.y + @category_window.height
 
 -     wh = Graphics.height - wy
 
 -     @item_window = Window_PTItemList.new(0, wy, Graphics.width, wh)
 
 -     @item_window.viewport = @viewport
 
 -     @item_window.help_window = @help_window
 
 -     @item_window.set_handler(:ok,     method(:on_item_ok))
 
 -     @item_window.set_handler(:cancel, method(:on_item_cancel))
 
 -     @category_window.item_window = @item_window
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 説明ウィンドウの作成
 
 -   #--------------------------------------------------------------------------
 
 -   def create_description_window
 
 -     
 
 -     #説明ウィンドウを作成しない場合は処理を行わない。
 
 -     
 
 -     return unless ITEM_KEEPER::DESCRIPT
 
 -     
 
 -     @description_window = Window_IKDescription.new
 
 -     @description_window.z = 100
 
 -     @description_window.viewport = @viewport
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 個数入力ウィンドウの作成
 
 -   #--------------------------------------------------------------------------
 
 -   def create_number_window
 
 -     @number_window = Window_IKInput.new
 
 -     @number_window.z = 100
 
 -     @number_window.item_window = @item_window
 
 -     @number_window.description_window = @description_window if ITEM_KEEPER::DESCRIPT
 
 -     @number_window.viewport = @viewport
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # カテゴリ[決定]
 
 -   #--------------------------------------------------------------------------
 
 -   def on_category_ok
 
 -     @item_window.activate
 
 -     @item_window.select_last
 
 -     @category_window.deactivate
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテム[決定]
 
 -   #--------------------------------------------------------------------------
 
 -   def on_item_ok
 
 -     $game_party.last_item.object = item
 
 -     item == nil ? @item_window.activate : determine_item
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテムの決定
 
 -   #--------------------------------------------------------------------------
 
 -   def determine_item
 
 -     @number_window.number = 0
 
 -     item = @item_window.item
 
 -     @number_window.show
 
 -     @number_window.refresh
 
 -     @description_window.show if ITEM_KEEPER::DESCRIPT
 
 -     @item_window.deactivate
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテム[キャンセル]
 
 -   #--------------------------------------------------------------------------
 
 -   def on_item_cancel
 
 -     @item_window.unselect
 
 -     @category_window.activate
 
 -   end
 
 - end
 
 - #==============================================================================
 
 - # ■ Window_PTItemList
 
 - #------------------------------------------------------------------------------
 
 - #  アイテム画面で、所持アイテムの一覧を表示するウィンドウです。
 
 - #==============================================================================
 
  
- class Window_PTItemList < Window_ItemList
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテムをリストに含めるかどうか
 
 -   #--------------------------------------------------------------------------
 
 -   alias include_ik? include?
 
 -   def include?(item)
 
 -     
 
 -     #アイテムが存在しない場合、ウィンドウが不可視の場合
 
 -     #保管禁止アイテムを非表示にする場合は表示しない。
 
 -     
 
 -     return false if item == nil
 
 -     return false if self.visible == false
 
 -     return false if ITEM_KEEPER::UNVISIBLE == true && item.keep_seal_flag
 
 -     
 
 -     #本来の処理を実行。
 
 -     
 
 -     include_ik?(item)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテムを許可状態で表示するかどうか
 
 -   #--------------------------------------------------------------------------
 
 -   def enable?(item)
 
 -     
 
 -     #アイテムが存在しない場合、もしくは保管禁止アイテムの場合はfalseを返す。
 
 -     
 
 -     return false if item == nil
 
 -     return false if item.keep_seal_flag
 
 -     return true
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテムリストの作成
 
 -   #--------------------------------------------------------------------------
 
 -   def make_item_list
 
 -     
 
 -     #全ての中から、所持アイテムか倉庫アイテムとして存在する物のみ取得する。
 
 -     
 
 -     item_data = $data_items + $data_weapons + $data_armors
 
 -     @data = item_data.select {|item| include?(item) && ($game_party.item_number(item) > 0 or $game_party.item_keep_number(item) > 0)}
 
 -     @data.push(nil) if include?(nil)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 選択項目の有効状態を取得
 
 -   #--------------------------------------------------------------------------
 
 -   def current_item_enabled?
 
 -     enable?(@data[index])
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 桁数の取得
 
 -   #--------------------------------------------------------------------------
 
 -   def col_max
 
 -     return 1
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # フレーム更新
 
 -   #--------------------------------------------------------------------------
 
 -   def update
 
 -     super
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 項目の描画
 
 -   #--------------------------------------------------------------------------
 
 -   def draw_item(index, flag = false)
 
 -     
 
 -     #データからアイテムを取得し、各種データを記述する。
 
 -     
 
 -     item = @data[index]
 
 -     
 
 -     #アイテムが存在しない場合は処理を行わない。
 
 -     
 
 -     return unless item
 
 -     
 
 -     rect = item_rect(index)
 
 -     contents.clear_rect(rect) if flag
 
 -     rect.width -= 4
 
 -     draw_item_name(item, rect.x, rect.y, enable?(item))
 
 -     change_color(text_color(5))
 
 -     draw_text(180, rect.y, 100, line_height, "所持", 2)
 
 -     change_color(text_color(0))
 
 -     draw_text(220, rect.y, 100, line_height, $game_party.item_number(item), 2)
 
 -     draw_text(240, rect.y, 100, line_height,"/", 2)
 
 -     draw_text(270, rect.y, 100, line_height, $game_party.max_item_number(item), 2)
 
 -     change_color(text_color(5))
 
 -     draw_text(330, rect.y, 100, line_height, "倉庫", 2)
 
 -     change_color(text_color(0))
 
 -     draw_text(370, rect.y, 100, line_height, $game_party.item_keep_number(item), 2)
 
 -     draw_text(390, rect.y, 100, line_height, "/", 2)
 
 -     draw_text(420, rect.y, 100, line_height, $game_party.max_item_keep_number(item), 2)
 
 -     
 
 -   end
 
 - end
 
 - class Window_IKInput < Window_Selectable
 
 -   #--------------------------------------------------------------------------
 
 -   # 公開インスタンス変数
 
 -   #--------------------------------------------------------------------------
 
 -   attr_accessor   :item_window
 
 -   attr_accessor   :number
 
 -   attr_accessor   :description_window
 
 -   #--------------------------------------------------------------------------
 
 -   # オブジェクト初期化
 
 -   #--------------------------------------------------------------------------
 
 -   def initialize
 
 -     
 
 -     #ウィンドウを生成する。
 
 -     
 
 -     super(Graphics.width / 2 - 122, Graphics.height / 2 - 50, 244, 100)
 
 -     
 
 -     #設定に応じて背景透明度を変更する。
 
 -     
 
 -     self.back_opacity = ITEM_KEEPER::B_OPACITY
 
 -     
 
 -     #一旦隠す。
 
 -     
 
 -     hide
 
 -     
 
 -     #非アクティブにする。
 
 -     
 
 -     deactivate
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 数字の変更処理
 
 -   #--------------------------------------------------------------------------
 
 -   def update
 
 -     
 
 -     #見えない場合は更新しない。
 
 -     
 
 -     return unless self.visible
 
 -     
 
 -     #入力関連の各種処理を実行。
 
 -     
 
 -     if Input.press?(:UP) or Input.press?(:DOWN) or Input.press?(:RIGHT) or Input.press?(:LEFT) or Input.press?(Input::SHIFT) or Input.press?(Input::CTRL)
 
 -       if Input.press?(Input::SHIFT)   #100個預ける
 
 -         keep_exe(@item_window.item, 100)
 
 -       elsif Input.press?(Input::CTRL) #100個引き出す
 
 -         get_exe(@item_window.item, 100)
 
 -       elsif Input.repeat?(:RIGHT)     #10個預ける
 
 -         keep_exe(@item_window.item, 10)
 
 -       elsif Input.repeat?(:LEFT)      #10個引き出す
 
 -         get_exe(@item_window.item, 10)
 
 -       elsif Input.repeat?(:UP)        #1個預ける
 
 -         keep_exe(@item_window.item, 1)
 
 -       elsif Input.repeat?(:DOWN)      #1個引き出す
 
 -         get_exe(@item_window.item, 1)
 
 -       end
 
 -       refresh_number
 
 -     end
 
 -     if Input.trigger?(:C)
 
 -       
 
 -       #決定音を鳴らす。
 
 -       
 
 -       Sound.play_ok
 
 -       
 
 -       #数に応じてアイテム数を変更。
 
 -       
 
 -       $game_party.item_keep(@item_window.item, @number)
 
 -       
 
 -       #ウィンドウを隠す。
 
 -       
 
 -       self.hide
 
 -       
 
 -       #ウィンドウを非アクティブにする。
 
 -       
 
 -       self.deactivate
 
 -       
 
 -       #説明ウィンドウが存在する場合、説明ウィンドウを隠す。
 
 -       
 
 -       @description_window.hide if ITEM_KEEPER::DESCRIPT
 
 -       
 
 -       #条件に応じてアイテムウィンドウを変更する。
 
 -       
 
 -       ITEM_KEEPER::FLAG ? @item_window.draw_item(@item_window.index, true) : @item_window.refresh
 
 -       
 
 -       #アイテムウィンドウをアクティブにする。
 
 -       
 
 -       @item_window.activate
 
 -     elsif Input.trigger?(:B)
 
 -       
 
 -       #決定音を鳴らす。
 
 -       
 
 -       Sound.play_cancel
 
 -       
 
 -       #ウィンドウを隠す。
 
 -       
 
 -       self.hide
 
 -       
 
 -       #ウィンドウを非アクティブにする。
 
 -       
 
 -       self.deactivate
 
 -       
 
 -       #説明ウィンドウが存在する場合、説明ウィンドウを隠す。
 
 -       
 
 -       @description_window.hide if ITEM_KEEPER::DESCRIPT
 
 -       
 
 -       #アイテムウィンドウをアクティブにする。
 
 -       
 
 -       @item_window.activate
 
 -       
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 預けられる限界をチェック
 
 -   #--------------------------------------------------------------------------
 
 -   def limitcheck1
 
 -     
 
 -     #所持数が既に0、もしくは預ける限界に達している場合はfalseを返す。
 
 -     
 
 -     return false if $game_party.item_number(@item_window.item) - @number == 0
 
 -     return false if $game_party.item_keep_number(@item_window.item) + @number == $game_party.max_item_keep_number(@item_window.item)
 
 -     return true
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 引き出せる限界をチェック
 
 -   #--------------------------------------------------------------------------
 
 -   def limitcheck2
 
 -     
 
 -     #所持数が既に限界に達している場合、もしくは預けている数が0の場合はfalseを返す。
 
 -     
 
 -     return false if $game_party.item_number(@item_window.item) - @number == $game_party.max_item_number(@item_window.item)
 
 -     return false if $game_party.item_keep_number(@item_window.item) + @number == 0
 
 -     return true
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 預ける
 
 -   #--------------------------------------------------------------------------
 
 -   def keep_exe(item, amount)
 
 -     
 
 -     #数量分処理する。
 
 -     
 
 -     amount.times do
 
 -       @number += 1 if limitcheck1
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 引き出す
 
 -   #--------------------------------------------------------------------------
 
 -   def get_exe(item, amount)
 
 -     
 
 -     #数量分処理する。
 
 -     
 
 -     amount.times do
 
 -       @number -= 1 if limitcheck2
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # リフレッシュ
 
 -   #--------------------------------------------------------------------------
 
 -   def refresh
 
 -     
 
 -     #不可視状態の場合はリフレッシュしない。
 
 -     
 
 -     return false unless self.visible
 
 -     
 
 -     #数量を更新する。
 
 -     
 
 -     @last_number = @number
 
 -     
 
 -     #ウィンドウの内容を消去する。
 
 -     
 
 -     contents.clear
 
 -     create_contents
 
 -         
 
 -     #アイテム名を描写。
 
 -     
 
 -     draw_item_name(@item_window.item, 0, 0)
 
 -     change_color(system_color)
 
 -     draw_text(0, line_height * 1, 80, line_height, "所持", 1)
 
 -     draw_text(self.contents.width - 80, line_height * 1, 80, line_height, "倉庫", 1)
 
 -     draw_text(0, line_height * 1, self.contents.width, line_height, "→", 1)
 
 -     draw_text(0, line_height * 2, self.contents.width, line_height, "←", 1)
 
 -     
 
 -     #所持数データを描写。
 
 -     
 
 -     $game_party.item_number(@item_window.item) + @number == $game_party.max_item_number(@item_window.item) ? change_color(text_color(3)) : change_color(normal_color)
 
 -     draw_text(0, line_height * 2, 80, line_height, $game_party.item_number(@item_window.item) - @number, 1)
 
 -     $game_party.item_keep_number(@item_window.item) + @number == $game_party.max_item_keep_number(@item_window.item) ? change_color(text_color(3)) : change_color(normal_color)
 
 -     draw_text(self.contents.width - 80, line_height * 2, 80, line_height, $game_party.item_keep_number(@item_window.item) + @number, 1)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 数量のみリフレッシュ
 
 -   #--------------------------------------------------------------------------
 
 -   def refresh_number
 
 -     
 
 -     #不可視状態の場合はリフレッシュしない。
 
 -     
 
 -     return false unless self.visible
 
 -     
 
 -     #最後の数量と現在の数量が異なる場合は数量を更新する。
 
 -     
 
 -     if @last_number != @number
 
 -       Sound.play_cursor
 
 -       @last_number = @number
 
 -     end
 
 -     
 
 -     #ウィンドウの内容を消去する。
 
 -     
 
 -     contents.clear_rect(0, line_height * 2, 80, line_height)
 
 -     contents.clear_rect(self.contents.width - 80, line_height * 2, 80, line_height)
 
 -     
 
 -     #所持数データを描写。
 
 -     
 
 -     $game_party.item_number(@item_window.item) + @number == $game_party.max_item_number(@item_window.item) ? change_color(text_color(3)) : change_color(normal_color)
 
 -     draw_text(0, line_height * 2, 80, line_height, $game_party.item_number(@item_window.item) - @number, 1)
 
 -     $game_party.item_keep_number(@item_window.item) + @number == $game_party.max_item_keep_number(@item_window.item) ? change_color(text_color(3)) : change_color(normal_color)
 
 -     draw_text(self.contents.width - 80, line_height * 2, 80, line_height, $game_party.item_keep_number(@item_window.item) + @number, 1)
 
 -   end
 
 - end
 
 - class Window_IKDescription < Window_Base
 
 -   def initialize
 
 -     
 
 -     #ウィンドウを生成する。
 
 -     
 
 -     super(Graphics.width / 2 - 240, Graphics.height / 3 * 2, 480, 96)
 
 -     
 
 -     #設定に応じて背景透明度を変更する。
 
 -     
 
 -     self.back_opacity = ITEM_KEEPER::B_OPACITY
 
 -     
 
 -     #システムカラーで項目部分を描画する。
 
 -     
 
 -     change_color(system_color)
 
 -     
 
 -     draw_text(0, 0, self.contents.width / 2, line_height, ITEM_KEEPER::D[0][0], 0)
 
 -     draw_text(self.contents.width / 2, 0, self.contents.width / 2, line_height, ITEM_KEEPER::D[1][0], 0)
 
 -     draw_text(0, line_height * 1, self.contents.width / 2, line_height, ITEM_KEEPER::D[2][0], 0)
 
 -     draw_text(self.contents.width / 2, line_height * 1, self.contents.width / 2, line_height, ITEM_KEEPER::D[3][0], 0)
 
 -     draw_text(0, line_height * 2, self.contents.width / 2, line_height, ITEM_KEEPER::D[4][0], 0)
 
 -     draw_text(self.contents.width / 2, line_height * 2, self.contents.width / 2, line_height, ITEM_KEEPER::D[5][0], 0)
 
  
-     #通常カラーで項目部分を描画する。
 
 -     
 
 -     change_color(normal_color)
 
 -     
 
 -     draw_text(90, 0, self.contents.width / 2, line_height, ITEM_KEEPER::D[0][1], 0)
 
 -     draw_text(self.contents.width / 2 + 90, 0, self.contents.width / 2, line_height, ITEM_KEEPER::D[1][1], 0)
 
 -     draw_text(90, line_height * 1, self.contents.width / 2, line_height, ITEM_KEEPER::D[2][1], 0)
 
 -     draw_text(self.contents.width / 2 + 90, line_height * 1, self.contents.width / 2, line_height, ITEM_KEEPER::D[3][1], 0)
 
 -     draw_text(90, line_height * 2, self.contents.width / 2, line_height, ITEM_KEEPER::D[4][1], 0)
 
 -     draw_text(self.contents.width / 2 + 90, line_height * 2, self.contents.width / 2, line_height, ITEM_KEEPER::D[5][1], 0)
 
 -     
 
 -     hide
 
 -   end
 
 - end
 
 - class Game_Interpreter
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテムを全て預ける/引き出す
 
 -   #--------------------------------------------------------------------------
 
 -   def item_keep_all(data)
 
 -     
 
 -     #種類をアイテムとする。
 
 -     
 
 -     item_data = $data_items
 
 -     
 
 -     #共通処理を実行。
 
 -     
 
 -     common_keep_all(item_data, data)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 武器を全て預ける/引き出す
 
 -   #--------------------------------------------------------------------------
 
 -   def weapon_keep_all(data)
 
 -     
 
 -     #種類を武器とする。
 
 -     
 
 -     item_data = $data_weapons
 
 -     
 
 -     #共通処理を実行。
 
 -     
 
 -     common_keep_all(item_data, data)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 防具を全て預ける/引き出す
 
 -   #--------------------------------------------------------------------------
 
 -   def armor_keep_all(data)
 
 -     
 
 -     #種類を防具とする。
 
 -     
 
 -     item_data = $data_armors
 
 -     
 
 -     #共通処理を実行。
 
 -     
 
 -     common_keep_all(item_data, data)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 全て預ける/引き出す場合の共通処理を実行
 
 -   #--------------------------------------------------------------------------
 
 -   def common_keep_all(item_data, data)
 
 -     
 
 -     #存在するオブジェクトの数分だけ処理。
 
 -     
 
 -     item_data.each do |i|
 
 -       
 
 -       #nilの場合は処理しない。
 
 -       
 
 -       next if i == nil
 
 -       
 
 -       #預けられないアイテムの場合は処理しない。
 
 -       
 
 -       next if i.keep_seal_flag
 
 -       
 
 -       #各種データを取得。
 
 -       
 
 -       data1 = $game_party.item_number(i)
 
 -       data2 = $game_party.max_item_number(i)
 
 -       data3 = $game_party.item_keep_number(i)
 
 -       data4 = $game_party.max_item_keep_number(i)
 
 -       
 
 -       #追加で所持できる数と、追加で預けられる数を計算。
 
 -       
 
 -       data5 = data4 - data3
 
 -       data6 = data2 - data1
 
 -       
 
 -       #処理内容に応じて、預ける場合と引き出す場合とをそれぞれ処理。
 
 -       
 
 -       amount = data == 0 ? (data5 < data1 ? data5 : data1) : (data6 < data3 ? -data6 : -data3)
 
 -       $game_party.item_keep(i, amount)
 
 -       
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテムを一定個数預ける/引き出す
 
 -   #--------------------------------------------------------------------------
 
 -   def item_keep(data_a, data_b)
 
 -     
 
 -     #種類をアイテムとする。
 
 -     
 
 -     item_data = $data_items
 
 -     
 
 -     #共通処理を実行。
 
 -     
 
 -     common_keep(item_data, data_a, data_b)
 
 -     
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 武器を一定個数預ける/引き出す
 
 -   #--------------------------------------------------------------------------
 
 -   def weapon_keep(data_a, data_b)
 
 -     
 
 -     #種類を武器とする。
 
 -     
 
 -     item_data = $data_weapons
 
 -     
 
 -     #共通処理を実行。
 
 -     
 
 -     common_keep(item_data, data_a, data_b)
 
 -     
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 防具を一定個数預ける/引き出す
 
 -   #--------------------------------------------------------------------------
 
 -   def armor_keep(data_a, data_b)
 
 -     
 
 -     #種類を防具とする。
 
 -     
 
 -     item_data = $data_armors
 
 -     
 
 -     #共通処理を実行。
 
 -     
 
 -     common_keep(item_data, data_a, data_b)
 
 -     
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 一定個数預ける/引き出す場合の共通処理を実行します。
 
 -   #--------------------------------------------------------------------------
 
 -   def common_keep(item_data, data_a, data_b)
 
 -       
 
 -     #nilの場合は処理しない。
 
 -       
 
 -     return if item_data[data_b] == nil
 
 -       
 
 -     #預けられないアイテムの場合は処理しない。
 
 -     
 
 -     return if item_data[data_b].keep_seal_flag
 
 -       
 
 -     #各種データを取得。
 
 -     
 
 -     data1 = $game_party.item_number(item_data[data_b])
 
 -     data2 = $game_party.max_item_number(item_data[data_b])
 
 -     data3 = $game_party.item_keep_number(item_data[data_b])
 
 -     data4 = $game_party.max_item_keep_number(item_data[data_b])
 
 -       
 
 -     #追加で所持できる数と、追加で預けられる数を計算。
 
 -       
 
 -     data5 = data4 - data3
 
 -     data6 = data2 - data1
 
 -     
 
 -     #処理内容に応じて、預ける場合と引き出す場合とをそれぞれ処理。
 
 -     
 
 -     amount = data_a == 0 ? (data5 < data1 ? data5 : data1) : (data6 < data3 ? -data6 : -data3)
 
 -     $game_party.item_keep(item_data[data_b], amount)
 
 -     
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 特定ワードを含む単語を全て預ける/引き出す場合の処理を行う。
 
 -   #--------------------------------------------------------------------------
 
 -   def word_keep_all(data_a, data_b)
 
 -     
 
 -     #アイテム・武器・防具全てを含める配列を生成。
 
 -     
 
 -     item_data = $data_items + $data_weapons + $data_armors
 
 -     
 
 -     #存在するオブジェクトの数分だけ処理。
 
 -     
 
 -     item_data.each do |i|
 
 -       
 
 -       #nilの場合は処理しない。
 
 -       
 
 -       next if i == nil
 
 -       
 
 -       #預けられないアイテムの場合は処理しない。
 
 -       
 
 -       next if i.keep_seal_flag
 
 -       
 
 -       #指定されたワードがメモ欄に含まれていない場合は処理しない。
 
 -       
 
 -       next unless i.note.include?(data_b)
 
 -       
 
 -       #各種データを取得。
 
 -       
 
 -       data1 = $game_party.item_number(i)
 
 -       data2 = $game_party.max_item_number(i)
 
 -       data3 = $game_party.item_keep_number(i)
 
 -       data4 = $game_party.max_item_keep_number(i)
 
 -       
 
 -       #追加で所持できる数と、追加で預けられる数を計算。
 
 -       
 
 -       data5 = data4 - data3
 
 -       data6 = data2 - data1
 
 -       
 
 -       #処理内容に応じて、預ける場合と引き出す場合とをそれぞれ処理。
 
 -       
 
 -       amount = data_a == 0 ? (data5 < data1 ? data5 : data1) : (data6 < data3 ? -data6 : -data3)
 
 -       $game_party.item_keep(i, amount)
 
 -       
 
 -     end
 
 -   end
 
 - end
 
 - if ITEM_KEEPER::SHOP
 
 - class Game_Party < Game_Unit
 
 -   attr_accessor :shop_ik
 
 -   #--------------------------------------------------------------------------
 
 -   # 預かり所モードかどうかを確認
 
 -   #--------------------------------------------------------------------------
 
 -   def shop_ik?
 
 -     @shop_ik
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # 全てのアイテムオブジェクトの配列取得
 
 -   #--------------------------------------------------------------------------
 
 -   alias all_items_ik all_items
 
 -   def all_items
 
 -     
 
 -     #預かり所モードでなければ、本来の処理を行う。
 
 -     
 
 -     return all_items_ik unless $game_party.shop_ik?
 
 -     
 
 -     #アイテム・武器・防具の預かり所データを取得し、まとめる。
 
 -     
 
 -     data1 = @items_k.keys.sort.collect {|id| $data_items[id] }
 
 -     data2 = @weapons_k.keys.sort.collect {|id| $data_weapons[id] }
 
 -     data3 = @armors_k.keys.sort.collect {|id| $data_armors[id] }
 
 -     data1 + data2 + data3
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテムのクラスに対応するコンテナオブジェクトを取得
 
 -   #--------------------------------------------------------------------------
 
 -   alias item_container_ik item_container
 
 -   def item_container(item_class)
 
 -     
 
 -     #預かり所モードでなければ、本来の処理を行う。
 
 -     
 
 -     return item_container_ik(item_class) unless $game_party.shop_ik?
 
 -     
 
 -     #預かり所モードの場合に限り、預かり所データを返す。
 
 -     
 
 -     return @items_k   if item_class == RPG::Item
 
 -     return @weapons_k if item_class == RPG::Weapon
 
 -     return @armors_k  if item_class == RPG::Armor
 
 -     return nil
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテムの所持数取得
 
 -   #--------------------------------------------------------------------------
 
 -   alias item_number_ik item_number
 
 -   def item_number(item)
 
 -     
 
 -     #預かり所モードでなければ、本来の処理を行う。
 
 -     
 
 -     return item_number_ik(item) unless $game_party.shop_ik?
 
 -     
 
 -     #預かり所のデータを返す。
 
 -     
 
 -     item_keep_number(item)
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテムの最大所持数取得
 
 -   #--------------------------------------------------------------------------
 
 -   alias max_item_number_ik max_item_number
 
 -   def max_item_number(item)
 
 -     
 
 -     #預かり所モードでなければ、本来の処理を行う。
 
 -     
 
 -     return max_item_number_ik(item) unless $game_party.shop_ik?
 
 -     
 
 -     #預かり所のデータを返す。
 
 -     
 
 -     max_item_keep_number(item)
 
 -   end
 
 - end
 
 - class Scene_Shop < Scene_MenuBase
 
 -   #--------------------------------------------------------------------------
 
 -   # モードチェンジ
 
 -   #--------------------------------------------------------------------------
 
 -   def item_keep_mode_change
 
 -     
 
 -     #ナンバーウィンドウがアクティブの場合は実行しない。
 
 -     
 
 -     return if @number_window.active
 
 -     
 
 -     #指定スイッチのIDが0より大きく、そのスイッチがONの場合は実行しない。
 
 -     
 
 -     return if ITEM_KEEPER::SWITCH1 > 0 && $game_switches[ITEM_KEEPER::SWITCH1]
 
 -     
 
 -     #預かり所フラグを切り替える。
 
 -     
 
 -     $game_party.shop_ik = $game_party.shop_ik? ? false : true
 
 -     
 
 -     #切り替えを示すウィンドウを表示。
 
 -     
 
 -     w = 400
 
 -     h = 48
 
 -     x = (Graphics.width - w) / 2
 
 -     y = (Graphics.height - h) / 2
 
 -     RPG::SE.new(ITEM_KEEPER::SE[0],ITEM_KEEPER::SE[1],ITEM_KEEPER::SE[2]).play
 
 -     @mode_change_window = Window_Base.new(x, y, w, h)
 
 -     @mode_change_window.back_opacity = 255
 
 -     @mode_change_window.z = 10000
 
 -     text = $game_party.shop_ik ? ITEM_KEEPER::TEXT2 : ITEM_KEEPER::TEXT1
 
 -     @mode_change_window.draw_text(0, 0, w - 32, 24, text, 1)
 
 -     60.times {Graphics.update}
 
 -     @mode_change_window.dispose
 
 -     @mode_change_window = nil
 
 -     
 
 -     #各ウィンドウをリフレッシュする。
 
 -     
 
 -     @status_window.refresh
 
 -     @buy_window.refresh
 
 -     @sell_window.refresh
 
 -     @sell_window.index = 0 if @sell_window.active
 
 -     @number_window.refresh
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # フレーム更新
 
 -   #--------------------------------------------------------------------------
 
 -   alias update_ik update
 
 -   def update
 
 -     
 
 -     #本来の処理を実行。
 
 -     
 
 -     update_ik
 
 -     
 
 -     #指定したキーが押された場合、モードチェンジ実行。
 
 -     
 
 -     item_keep_mode_change if Input.trigger?(ITEM_KEEPER::KEY)
 
 -   end
 
 - end
 
 - class Window_ShopBuy < Window_Selectable
 
 -   #--------------------------------------------------------------------------
 
 -   # アイテムを許可状態で表示するかどうか
 
 -   #--------------------------------------------------------------------------
 
 -   alias enable_ik? enable?
 
 -   def enable?(item)
 
 -     
 
 -     #本来の処理を実行。
 
 -     
 
 -     flag1 = enable_ik?(item)
 
 -     
 
 -     #預かり所モードの場合、預かり所禁止アイテムは購入不可。
 
 -     
 
 -     flag2 = $game_party.shop_ik? ? !item.keep_seal_flag : true
 
 -     
 
 -     #どちらの条件も満たす場合のみ表示。
 
 -     
 
 -     flag1 && flag2
 
 -   end
 
 - end
 
 - class Window_ShopStatus < Window_Base
 
 -   #--------------------------------------------------------------------------
 
 -   # 所持数の描画
 
 -   #--------------------------------------------------------------------------
 
 -   alias draw_possession_ik draw_possession
 
 -   def draw_possession(x, y)
 
 -     
 
 -     #預かり所モードでなければ、本来の処理を行う。
 
 -     
 
 -     return draw_possession_ik(x, y) unless $game_party.shop_ik?
 
 -     
 
 -     #本来の処理を少し改変した物を実行。
 
 -     
 
 -     rect = Rect.new(x, y, contents.width - 4 - x, line_height)
 
 -     change_color(system_color)
 
 -     draw_text(rect, ITEM_KEEPER::SHOP_POS)
 
 -     change_color(normal_color)
 
 -     draw_text(rect, $game_party.item_keep_number(@item), 2)
 
 -   end
 
 - end
 
 - class Window_ShopNumber < Window_Selectable
 
 -   #--------------------------------------------------------------------------
 
 -   # 個数表示の最大桁数を取得
 
 -   #--------------------------------------------------------------------------
 
 -   alias figures_ik figures
 
 -   def figures
 
 -     
 
 -     #3桁以上を考慮して預かり所モードの場合は補正をかける。
 
 -     
 
 -     figures_ik + ($game_party.shop_ik? ? ITEM_KEEPER::SHOP_FIG : 0)
 
 -   end
 
 - end
 
 - class Scene_MenuBase < Scene_Base
 
 -   #--------------------------------------------------------------------------
 
 -   # 終了処理
 
 -   #--------------------------------------------------------------------------
 
 -   alias terminate_ik terminate
 
 -   def terminate
 
 -     
 
 -     #預かり所モードフラグを消去。
 
 -     
 
 -     $game_party.shop_ik = nil
 
 -     
 
 -     #本来の処理を実行。
 
 -     
 
 -     terminate_ik
 
 -   end
 
 - end
 
 - end
 
  复制代码 |   
 
评分
- 
查看全部评分
 
 
 
 
 
 |