Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  2. #
  3. #How to use
  4. #
  5. #In the Note box for the item you want to limit
  6. #<ITEM_LIMIT_n>          (n is the maximum number)
  7. #
  8. #★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
  9.  
  10. #--------------------------------------------------------------------------
  11. # ★ Number of possession
  12. #--------------------------------------------------------------------------
  13.   class RPG::BaseItem
  14.     def item_limitation
  15.       /<ITEM_LIMIT_(\d+)>/ =~ note ? $1.to_i : 99
  16.     end
  17.   end
  18.  
  19. #==============================================================================
  20. # ■ Game_Party
  21. #------------------------------------------------------------------------------
  22. # This class handles parties. Includes information such as money and items.
  23. # Instance of this class are referenced in $game_party.
  24. #==============================================================================
  25. class Game_Party < Game_Unit
  26.   #--------------------------------------------------------------------------
  27.   # ● Maximum number of items
  28.   #--------------------------------------------------------------------------
  29.   alias maru0075_max_item_number max_item_number
  30.   def max_item_number(item)
  31.    item.item_limitation
  32.   end
  33. end