Started by Yin, May 28, 2009, 11:14:39 pm
class Window_Item < Window_Selectable def refresh if self.contents != nil self.contents.dispose self.contents = nil end @data = []#+++++++++++++++++++++++++++++++++++++++++++++++++++++++#LOOK HERE#+++++++++++++++++++++++++++++++++++++++++++++++++++++++#insert item ID's you don't want to show into this array#ie [1, 4, 8] would not show Potion, Perfume, and Full Elixir by default@dont_show_items = []#insert armor ID's you don't want to show into this array@dont_show_armors = []#insert Weapon ID's you don't want to show into this array@dont_show_weapons = []#++++++++++++++++++++++++++++++++++++++++++++ # Add item for i in 1...$data_items.size if $game_party.item_number(i) > 0 @data.push($data_items[i]) unless @dont_show_items.include?(i) end end # Also add weapons and items if outside of battle unless $game_temp.in_battle for i in 1...$data_weapons.size if $game_party.weapon_number(i) > 0 @data.push($data_weapons[i]) unless @dont_show_weapons.include?(i) end end for i in 1...$data_armors.size if $game_party.armor_number(i) > 0 @data.push($data_armors[i]) unless @dont_show_armors.include?(i) end end end # If item count is not 0, make a bit map and draw all items @item_max = @data.size if @item_max > 0 self.contents = Bitmap.new(width - 32, row_max * 32) for i in 0...@item_max draw_item(i) end end endend