[Resolved]Making Items Not Show

Started by Yin, May 28, 2009, 11:14:39 pm

Previous topic - Next topic

Yin

May 28, 2009, 11:14:39 pm Last Edit: May 29, 2009, 12:41:51 am by Yin
How would I make certain items NOT show in the item menu even though I have them?
Newly formed MUGEN, RPG Maker, and BOR forum.
http://cavernofcreativity.com
Opening in September
My Partner in crime = TREXRELL

Ryex

May 28, 2009, 11:24:04 pm #1 Last Edit: May 29, 2009, 12:23:54 am by Ryexander
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
 end
end

I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

G_G

It doesnt work Ryex. I tried that exact way and it didnt work. I added the item id 1 in the not display items yet it still displays the item id 1.

Yin

I will test this out as well, thank you!
Newly formed MUGEN, RPG Maker, and BOR forum.
http://cavernofcreativity.com
Opening in September
My Partner in crime = TREXRELL

Yin

Yeah, I have the same results as game_guy. It still shows up in the menu.
Newly formed MUGEN, RPG Maker, and BOR forum.
http://cavernofcreativity.com
Opening in September
My Partner in crime = TREXRELL

Ryex

*slaps head*

silly me. I edited the post try it now
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Yin

Perfect! Works like a charm! Thank you so much for the quick responses guys!
Newly formed MUGEN, RPG Maker, and BOR forum.
http://cavernofcreativity.com
Opening in September
My Partner in crime = TREXRELL