This should do the trick. :)
-
- #==============================================================================
- # [ Item Storage ]
- # by Drago del Fato
- # ----------------------------------------------------------------------------
- # Installation:
- # Place Above Main
- #==============================================================================
-
- class Game_Party
-
- alias new_initialize :initialize
-
- def initialize
- @item_storage = []
- new_initialize
- end
-
- # Store Items command
- def is_store_items(slot_number)
- while slot_number > @item_storage.size - 1
- @item_storage.push(nil)
- end
- return if slot_number < 0
-
- # Save items
- @item_storage[slot_number] = @items.clone
- end
-
- # Load Items Command
- def is_load_items(slot_number)
- return if slot_number > @item_storage.size - 1
- return if slot_number < 0
-
- # Load items
- # Loaded items will be added to the current items
- @item_storage[slot_number].each{|item_id, n|
- if item_id > 0
- @items[item_id] = [[item_number(item_id) + n, 0].max, 99].min
- end
- }
-
- end
-
- end
-
- class Interpreter
-
- # Use in event, just call script and write
- # save_items(slot number where your items will be saved)
- # load_items(slot number where you saved your items)
-
- def save_items(item_slot)
- $game_party.is_store_items(item_slot)
- end
-
- def load_items(item_slot)
- $game_party.is_load_items(item_slot)
- end
- end
-
Expand to see the code.
To use this script in event just use Script command and write:
- To save all items you currently have in a slot of your choice (you can have infinite amount of slots, or better to say, as much slots as your computer memory allows it) write:
-
- save_items(1) #1 - is the slot number of your choice, you can write 3,4, 0, 100, etc...
-
Expand to see the code.
- To load items from the slot and ADD them to current items list write:
-
- load_items(1) #1 - is the slot number where you SAVED the items with save_items
-
Expand to see the code.
You can use as many slots as you want, in whatever order you want but it would be a nice to practice using them from index 0 and so on...