MCsephiroth13
Member
Hi guys. I've been trying to make this script myself but it didn't go too well. What I would like is a scene script that can be called in an event. The scene would be a window with a list of specified items that can be selected with a selector and the player can choose which item, weapon, or armor he/she wants from a chest. If you have played Oblivion, you would know what I mean. The player would click on a chest and a window would appear with a list of items that were in the chest.
One thing I would like to specify is that the scene should handle arrays when called, and should be able to handle weapon, armor, and item arrays. Keep in mind that the script would obviouslt be used more than once in the game, and I would prefer it to be called by using a code such as $scene = Scene_Chest.new([1, 2, 3]).
I have this so far:
It's the code for the Scene's Window (Window_Chest).
Thanks a lot to anyone who can make this for me! If you have any questions, feel free to ask.
One thing I would like to specify is that the scene should handle arrays when called, and should be able to handle weapon, armor, and item arrays. Keep in mind that the script would obviouslt be used more than once in the game, and I would prefer it to be called by using a code such as $scene = Scene_Chest.new([1, 2, 3]).
I have this so far:
Code:
#==============================================================================
# ** Window_Chest
#------------------------------------------------------------------------------
# This window displays a choice of items to pick from in a chest
#==============================================================================
class Window_Chest < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
# items : list of items to pick from
#--------------------------------------------------------------------------
def initialize(items)
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@item_max = items.size
@items = items
self.index = 0
refresh
end
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
It's the code for the Scene's Window (Window_Chest).
Thanks a lot to anyone who can make this for me! If you have any questions, feel free to ask.