Group: Local Mod
Posts: 1,346
Type: Scripter
RM Skill: Skilled
Rev Points: 5
Custom Item Screen
Version 1.1 The Law G14 and Night_Runner 9/18/09
Introduction This script allows you to organize what type of item you want to see such as equipment, items, or all. When you open up the item screen, a command window opens up that shows the choices that you can choose from, let it be items, equipment or both. This script was made by me AND Night_Runner so be sure to credit both of us.
Features Allows the user to choose between what type of item they would like to see in the item screen.
"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!
If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One
Nice Item script, keep up the good work in scripting man. Oh ya is there way to go back to the Item, Equip, all list without going all the way back to the menu.
__________________________
Use Dropbox to upload your files. Much simpler than other upload sites, you can simply place a folder on your desktop that will sync with your DropBox account.
QUOTE ('Exiled One')
"If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others."
Group: Local Mod
Posts: 1,346
Type: Scripter
RM Skill: Skilled
Rev Points: 5
Thanks for the comments Bigace
QUOTE
Oh ya is there way to go back to the Item, Equip, all list without going all the way back to the menu.
Yeah, I was thinking about that, but I didn't implement it, I'll be sure to do that right away, that would be better then having to go all the way back to the menu.
Also, be sure sure credit Night_Runner as well since he helped me out with this script.
EDIT: Alright, finished the edit, the script is now in version 1.1.
"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!
If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One
cool thats alot better and I also will give credit to Night_Runner.
__________________________
Use Dropbox to upload your files. Much simpler than other upload sites, you can simply place a folder on your desktop that will sync with your DropBox account.
QUOTE ('Exiled One')
"If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others."
"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!
If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One
Hey, Law I have an Ideal to add. Can you add where instead of saying Items. Can it say
Usable Items Key Items(Only if its under Never under Occasion in the Database) Equipment All
So you won't have a Huge list of Items espciall when its not usable ever. Is that possible.
__________________________
Use Dropbox to upload your files. Much simpler than other upload sites, you can simply place a folder on your desktop that will sync with your DropBox account.
QUOTE ('Exiled One')
"If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others."
Group: Local Mod
Posts: 1,346
Type: Scripter
RM Skill: Skilled
Rev Points: 5
Hey Bigace
So what you're saying is that you would like the commamd window to allow the user to have a selection for usable items and a selection for non-usable items so that they're are under two different catgories?
"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!
If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One
So what you're saying is that you would like the commamd window to allow the user to have a selection for usable items and a selection for non-usable items so that they're are under two different catgories?
Correct,
__________________________
Use Dropbox to upload your files. Much simpler than other upload sites, you can simply place a folder on your desktop that will sync with your DropBox account.
QUOTE ('Exiled One')
"If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others."
"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!
If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One
Alright, I'll try to get this script into you by tomorrow.
Alright Dawg, good looks.
__________________________
Use Dropbox to upload your files. Much simpler than other upload sites, you can simply place a folder on your desktop that will sync with your DropBox account.
QUOTE ('Exiled One')
"If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others."
Group: Local Mod
Posts: 1,346
Type: Scripter
RM Skill: Skilled
Rev Points: 5
It's all done now, Night_Runner basically did the edit since I had trouble sorting out the array of key items. To choose what key items you want to have, go to line 299 of the script and type in their ID. Example:
#------------------------------------------------------------------------------ #============================================================================== #============================================================================== #=============================*Custom Item Screen*============================= #=====================Authors: The Law G14 and Night_Runner==================== #=================================Version 1.1================================== #============================================================================== #------------------------------------------------------------------------------
#============================================================================== # ** Scene_Item #------------------------------------------------------------------------------ # This class performs item screen processing. #==============================================================================
class Scene_Item #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(nr = 3) @nr = nr end #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # Make help window, item window @help_window = Window_Help.new @item_window = Window_Item.new(@nr) @item_window.active = false # Associate help window @item_window.help_window = @help_window # Make target window (set to invisible / inactive) @target_window = Window_Target.new @target_window.visible = false @target_window.active = false # Make pop-up window to filter items. s1 = "Items" s2 = "Key Items" s3 = "Equipment" s4 = "All" @nr_window = Window_Command.new(160, [s1, s2, s3, s4]) @nr_window.x = 280 @nr_window.y = 200 @nr_window.z = 998 # Execute transition Graphics.transition # Main loop loop do # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end end # Prepare for transition Graphics.freeze # Dispose of windows @help_window.dispose @item_window.dispose @target_window.dispose @nr_window.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Update windows @help_window.update @item_window.update @target_window.update @nr_window.update # If item window is active: call update_item if @item_window.active update_item return end # If target window is active: call update_target if @target_window.active update_target return end # If the filter window is active: call nr_update if @nr_window.active nr_update return end end #-------------------------------------------------------------------------- # * Frame Update (when item window is active) #-------------------------------------------------------------------------- def update_item # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to filtering window @nr_window.active = true @nr_window.visible = true @item_window.active = false return end # If C button was pressed if Input.trigger?(Input::C) # Get currently selected data on the item window @item = @item_window.item # If not a use item unless @item.is_a?(RPG::Item) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If it can't be used unless $game_party.item_can_use?(@item.id) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # If effect scope is an ally if @item.scope >= 3 # Activate target window @item_window.active = false @target_window.x = (@item_window.index + 1) % 2 * 304 @target_window.visible = true @target_window.active = true # Set cursor position to effect scope (single / all) if @item.scope == 4 || @item.scope == 6 @target_window.index = -1 else @target_window.index = 0 end # If effect scope is other than an ally else # If command event ID is valid if @item.common_event_id > 0 # Command event call reservation $game_temp.common_event_id = @item.common_event_id # Play item use SE $game_system.se_play(@item.menu_se) # If consumable if @item.consumable # Decrease used items by 1 $game_party.lose_item(@item.id, 1) # Draw item window item @item_window.draw_item(@item_window.index) end # Switch to map screen $scene = Scene_Map.new return end end return end end #-------------------------------------------------------------------------- # * Frame Update (when target window is active) #-------------------------------------------------------------------------- def update_target # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # If unable to use because items ran out unless $game_party.item_can_use?(@item.id) # Remake item window contents @item_window.refresh end # Erase target window @item_window.active = true @target_window.visible = false @target_window.active = false return end # If C button was pressed if Input.trigger?(Input::C) # If items are used up if $game_party.item_number(@item.id) == 0 # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If target is all if @target_window.index == -1 # Apply item effects to entire party used = false for i in $game_party.actors used |= i.item_effect(@item) end end # If single target if @target_window.index >= 0 # Apply item use effects to target actor target = $game_party.actors[@target_window.index] used = target.item_effect(@item) end # If an item was used if used # Play item use SE $game_system.se_play(@item.menu_se) # If consumable if @item.consumable # Decrease used items by 1 $game_party.lose_item(@item.id, 1) # Redraw item window item @item_window.draw_item(@item_window.index) end # Remake target window contents @target_window.refresh # If all party members are dead if $game_party.all_dead? # Switch to game over screen $scene = Scene_Gameover.new return end # If common event ID is valid if @item.common_event_id > 0 # Common event call reservation $game_temp.common_event_id = @item.common_event_id # Switch to map screen $scene = Scene_Map.new return end end # If item wasn't used unless used # Play buzzer SE $game_system.se_play($data_system.buzzer_se) end return end end #-------------------------------------------------------------------------- # * Frame Update (when command window is active) #-------------------------------------------------------------------------- def nr_update # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Go back to the Menu $scene = Scene_Menu.new(0) return end # If C button was pressed if Input.trigger?(Input::C) # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to status screen @nr_window.active = false @nr_window.visible = false @item_window.dispose @item_window = Window_Item.new(@nr_window.index) return end end end
#============================================================================== # ** Window_Item #------------------------------------------------------------------------------ # This window displays items in possession on the item and battle screens. #==============================================================================
class Window_Item < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(nr = 3) super(0, 64, 640, 416) @column_max = 2 @nr = nr refresh self.index = 0 # If in battle, move window to center of screen # and make it semi-transparent if $game_temp.in_battle self.y = 64 self.height = 256 self.back_opacity = 160 end end #-------------------------------------------------------------------------- # * Get Item #-------------------------------------------------------------------------- def item return @data[self.index] end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh key_items = [2] if self.contents != nil self.contents.dispose self.contents = nil end @data = [] # Add item if @nr == 0 # Items only for i in 1...$data_items.size if ($game_party.item_number(i) > 0) @data.push($data_items[i]) end end elsif @nr == 1 # Key items only for i in key_items if ($game_party.item_number(i) > 0) @data.push($data_items[i]) end end elsif @nr == 2 # Equipment Only # Show Weapons for i in 1...$data_weapons.size if ($game_party.weapon_number(i) > 0) @data.push($data_weapons[i]) end end # Show Armors for i in 1...$data_armors.size if ($game_party.armor_number(i) > 0) && (@nr>1) @data.push($data_armors[i]) end end elsif @nr == 3 # Show all # Show items for i in 1...$data_items.size if ($game_party.item_number(i) > 0) @data.push($data_items[i]) end end # Show Weapons for i in 1...$data_weapons.size if ($game_party.weapon_number(i) > 0) @data.push($data_weapons[i]) end end # Show Armors for i in 1...$data_armors.size if ($game_party.armor_number(i) > 0) && (@nr>1) @data.push($data_armors[i]) end end end # If item count is not 0, make a bitmap 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 #-------------------------------------------------------------------------- # * Draw Item # index : item number #-------------------------------------------------------------------------- def draw_item(index) item = @data[index] case item when RPG::Item number = $game_party.item_number(item.id) when RPG::Weapon number = $game_party.weapon_number(item.id) when RPG::Armor number = $game_party.armor_number(item.id) end if item.is_a?(RPG::Item) and $game_party.item_can_use?(item.id) self.contents.font.color = normal_color else self.contents.font.color = disabled_color end x = 4 + index % 2 * (288 + 32) y = index / 2 * 32 rect = Rect.new(x, y, self.width / @column_max - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) bitmap = RPG::Cache.icon(item.icon_name) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x + 28, y, 212, 32, item.name, 0) self.contents.draw_text(x + 240, y, 16, 32, ":", 1) self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2) end #-------------------------------------------------------------------------- # * Help Text Update #-------------------------------------------------------------------------- def update_help @help_window.set_text(self.item == nil ? "" : self.item.description) end end
"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!
If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One
It's all done now, Night_Runner basically did the edit since I had trouble sorting out the array of key items. To choose what key items you want to have, go to line 299 of the script and type in their ID. Example:
#------------------------------------------------------------------------------ #============================================================================== #============================================================================== #=============================*Custom Item Screen*============================= #=====================Authors: The Law G14 and Night_Runner==================== #=================================Version 1.1================================== #============================================================================== #------------------------------------------------------------------------------
#============================================================================== # ** Scene_Item #------------------------------------------------------------------------------ # This class performs item screen processing. #==============================================================================
class Scene_Item #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(nr = 3) @nr = nr end #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # Make help window, item window @help_window = Window_Help.new @item_window = Window_Item.new(@nr) @item_window.active = false # Associate help window @item_window.help_window = @help_window # Make target window (set to invisible / inactive) @target_window = Window_Target.new @target_window.visible = false @target_window.active = false # Make pop-up window to filter items. s1 = "Items" s2 = "Key Items" s3 = "Equipment" s4 = "All" @nr_window = Window_Command.new(160, [s1, s2, s3, s4]) @nr_window.x = 280 @nr_window.y = 200 @nr_window.z = 998 # Execute transition Graphics.transition # Main loop loop do # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end end # Prepare for transition Graphics.freeze # Dispose of windows @help_window.dispose @item_window.dispose @target_window.dispose @nr_window.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Update windows @help_window.update @item_window.update @target_window.update @nr_window.update # If item window is active: call update_item if @item_window.active update_item return end # If target window is active: call update_target if @target_window.active update_target return end # If the filter window is active: call nr_update if @nr_window.active nr_update return end end #-------------------------------------------------------------------------- # * Frame Update (when item window is active) #-------------------------------------------------------------------------- def update_item # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to filtering window @nr_window.active = true @nr_window.visible = true @item_window.active = false return end # If C button was pressed if Input.trigger?(Input::C) # Get currently selected data on the item window @item = @item_window.item # If not a use item unless @item.is_a?(RPG::Item) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If it can't be used unless $game_party.item_can_use?(@item.id) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # If effect scope is an ally if @item.scope >= 3 # Activate target window @item_window.active = false @target_window.x = (@item_window.index + 1) % 2 * 304 @target_window.visible = true @target_window.active = true # Set cursor position to effect scope (single / all) if @item.scope == 4 || @item.scope == 6 @target_window.index = -1 else @target_window.index = 0 end # If effect scope is other than an ally else # If command event ID is valid if @item.common_event_id > 0 # Command event call reservation $game_temp.common_event_id = @item.common_event_id # Play item use SE $game_system.se_play(@item.menu_se) # If consumable if @item.consumable # Decrease used items by 1 $game_party.lose_item(@item.id, 1) # Draw item window item @item_window.draw_item(@item_window.index) end # Switch to map screen $scene = Scene_Map.new return end end return end end #-------------------------------------------------------------------------- # * Frame Update (when target window is active) #-------------------------------------------------------------------------- def update_target # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # If unable to use because items ran out unless $game_party.item_can_use?(@item.id) # Remake item window contents @item_window.refresh end # Erase target window @item_window.active = true @target_window.visible = false @target_window.active = false return end # If C button was pressed if Input.trigger?(Input::C) # If items are used up if $game_party.item_number(@item.id) == 0 # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If target is all if @target_window.index == -1 # Apply item effects to entire party used = false for i in $game_party.actors used |= i.item_effect(@item) end end # If single target if @target_window.index >= 0 # Apply item use effects to target actor target = $game_party.actors[@target_window.index] used = target.item_effect(@item) end # If an item was used if used # Play item use SE $game_system.se_play(@item.menu_se) # If consumable if @item.consumable # Decrease used items by 1 $game_party.lose_item(@item.id, 1) # Redraw item window item @item_window.draw_item(@item_window.index) end # Remake target window contents @target_window.refresh # If all party members are dead if $game_party.all_dead? # Switch to game over screen $scene = Scene_Gameover.new return end # If common event ID is valid if @item.common_event_id > 0 # Common event call reservation $game_temp.common_event_id = @item.common_event_id # Switch to map screen $scene = Scene_Map.new return end end # If item wasn't used unless used # Play buzzer SE $game_system.se_play($data_system.buzzer_se) end return end end #-------------------------------------------------------------------------- # * Frame Update (when command window is active) #-------------------------------------------------------------------------- def nr_update # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Go back to the Menu $scene = Scene_Menu.new(0) return end # If C button was pressed if Input.trigger?(Input::C) # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to status screen @nr_window.active = false @nr_window.visible = false @item_window.dispose @item_window = Window_Item.new(@nr_window.index) return end end end
#============================================================================== # ** Window_Item #------------------------------------------------------------------------------ # This window displays items in possession on the item and battle screens. #==============================================================================
class Window_Item < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(nr = 3) super(0, 64, 640, 416) @column_max = 2 @nr = nr refresh self.index = 0 # If in battle, move window to center of screen # and make it semi-transparent if $game_temp.in_battle self.y = 64 self.height = 256 self.back_opacity = 160 end end #-------------------------------------------------------------------------- # * Get Item #-------------------------------------------------------------------------- def item return @data[self.index] end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh key_items = [2] if self.contents != nil self.contents.dispose self.contents = nil end @data = [] # Add item if @nr == 0 # Items only for i in 1...$data_items.size if ($game_party.item_number(i) > 0) @data.push($data_items[i]) end end elsif @nr == 1 # Key items only for i in key_items if ($game_party.item_number(i) > 0) @data.push($data_items[i]) end end elsif @nr == 2 # Equipment Only # Show Weapons for i in 1...$data_weapons.size if ($game_party.weapon_number(i) > 0) @data.push($data_weapons[i]) end end # Show Armors for i in 1...$data_armors.size if ($game_party.armor_number(i) > 0) && (@nr>1) @data.push($data_armors[i]) end end elsif @nr == 3 # Show all # Show items for i in 1...$data_items.size if ($game_party.item_number(i) > 0) @data.push($data_items[i]) end end # Show Weapons for i in 1...$data_weapons.size if ($game_party.weapon_number(i) > 0) @data.push($data_weapons[i]) end end # Show Armors for i in 1...$data_armors.size if ($game_party.armor_number(i) > 0) && (@nr>1) @data.push($data_armors[i]) end end end # If item count is not 0, make a bitmap 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 #-------------------------------------------------------------------------- # * Draw Item # index : item number #-------------------------------------------------------------------------- def draw_item(index) item = @data[index] case item when RPG::Item number = $game_party.item_number(item.id) when RPG::Weapon number = $game_party.weapon_number(item.id) when RPG::Armor number = $game_party.armor_number(item.id) end if item.is_a?(RPG::Item) and $game_party.item_can_use?(item.id) self.contents.font.color = normal_color else self.contents.font.color = disabled_color end x = 4 + index % 2 * (288 + 32) y = index / 2 * 32 rect = Rect.new(x, y, self.width / @column_max - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) bitmap = RPG::Cache.icon(item.icon_name) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x + 28, y, 212, 32, item.name, 0) self.contents.draw_text(x + 240, y, 16, 32, ":", 1) self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2) end #-------------------------------------------------------------------------- # * Help Text Update #-------------------------------------------------------------------------- def update_help @help_window.set_text(self.item == nil ? "" : self.item.description) end end
Wait but woundn't it just be easier if it says everything under 'Occasional' that says 'never' be a Key Item instead of having to put every ID number of in there. Just seems like a lot of work, but thanks though.
__________________________
Use Dropbox to upload your files. Much simpler than other upload sites, you can simply place a folder on your desktop that will sync with your DropBox account.
QUOTE ('Exiled One')
"If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others."
#------------------------------------------------------------------------------ #============================================================================== #============================================================================== #=============================*Custom Item Screen*============================= #=====================Authors: The Law G14 and Night_Runner==================== #=================================Version 1.2a================================= #============================================================================== #------------------------------------------------------------------------------
#============================================================================== # ** Scene_Item #------------------------------------------------------------------------------ # This class performs item screen processing. #==============================================================================
class Scene_Item #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(nr = 3) @nr = nr end #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # Make help window, item window @help_window = Window_Help.new @item_window = Window_Item.new(@nr) @item_window.active = false # Associate help window @item_window.help_window = @help_window # Make target window (set to invisible / inactive) @target_window = Window_Target.new @target_window.visible = false @target_window.active = false # Make pop-up window to filter items. s1 = "Items" s2 = "Key Items" s3 = "Equipment" s4 = "All" @nr_window = Window_Command.new(160, [s1, s2, s3, s4]) @nr_window.x = 280 @nr_window.y = 200 @nr_window.z = 998 # Execute transition Graphics.transition # Main loop loop do # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end end # Prepare for transition Graphics.freeze # Dispose of windows @help_window.dispose @item_window.dispose @target_window.dispose @nr_window.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Update windows @help_window.update @item_window.update @target_window.update @nr_window.update # If item window is active: call update_item if @item_window.active update_item return end # If target window is active: call update_target if @target_window.active update_target return end # If the filter window is active: call nr_update if @nr_window.active nr_update return end end #-------------------------------------------------------------------------- # * Frame Update (when item window is active) #-------------------------------------------------------------------------- def update_item # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to filtering window @nr_window.active = true @nr_window.visible = true @item_window.active = false return end # If C button was pressed if Input.trigger?(Input::C) # Get currently selected data on the item window @item = @item_window.item # If not a use item unless @item.is_a?(RPG::Item) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If it can't be used unless $game_party.item_can_use?(@item.id) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # If effect scope is an ally if @item.scope >= 3 # Activate target window @item_window.active = false @target_window.x = (@item_window.index + 1) % 2 * 304 @target_window.visible = true @target_window.active = true # Set cursor position to effect scope (single / all) if @item.scope == 4 || @item.scope == 6 @target_window.index = -1 else @target_window.index = 0 end # If effect scope is other than an ally else # If command event ID is valid if @item.common_event_id > 0 # Command event call reservation $game_temp.common_event_id = @item.common_event_id # Play item use SE $game_system.se_play(@item.menu_se) # If consumable if @item.consumable # Decrease used items by 1 $game_party.lose_item(@item.id, 1) # Draw item window item @item_window.draw_item(@item_window.index) end # Switch to map screen $scene = Scene_Map.new return end end return end end #-------------------------------------------------------------------------- # * Frame Update (when target window is active) #-------------------------------------------------------------------------- def update_target # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # If unable to use because items ran out unless $game_party.item_can_use?(@item.id) # Remake item window contents @item_window.refresh end # Erase target window @item_window.active = true @target_window.visible = false @target_window.active = false return end # If C button was pressed if Input.trigger?(Input::C) # If items are used up if $game_party.item_number(@item.id) == 0 # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If target is all if @target_window.index == -1 # Apply item effects to entire party used = false for i in $game_party.actors used |= i.item_effect(@item) end end # If single target if @target_window.index >= 0 # Apply item use effects to target actor target = $game_party.actors[@target_window.index] used = target.item_effect(@item) end # If an item was used if used # Play item use SE $game_system.se_play(@item.menu_se) # If consumable if @item.consumable # Decrease used items by 1 $game_party.lose_item(@item.id, 1) # Redraw item window item @item_window.draw_item(@item_window.index) end # Remake target window contents @target_window.refresh # If all party members are dead if $game_party.all_dead? # Switch to game over screen $scene = Scene_Gameover.new return end # If common event ID is valid if @item.common_event_id > 0 # Common event call reservation $game_temp.common_event_id = @item.common_event_id # Switch to map screen $scene = Scene_Map.new return end end # If item wasn't used unless used # Play buzzer SE $game_system.se_play($data_system.buzzer_se) end return end end #-------------------------------------------------------------------------- # * Frame Update (when command window is active) #-------------------------------------------------------------------------- def nr_update # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Go back to the Menu $scene = Scene_Menu.new(0) return end # If C button was pressed if Input.trigger?(Input::C) # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to status screen @nr_window.active = false @nr_window.visible = false @item_window.dispose @item_window = Window_Item.new(@nr_window.index) return end end end
#============================================================================== # ** Window_Item #------------------------------------------------------------------------------ # This window displays items in possession on the item and battle screens. #==============================================================================
class Window_Item < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(nr = 3) super(0, 64, 640, 416) @column_max = 2 @nr = nr refresh self.index = 0 # If in battle, move window to center of screen # and make it semi-transparent if $game_temp.in_battle self.y = 64 self.height = 256 self.back_opacity = 160 end end #-------------------------------------------------------------------------- # * Get Item #-------------------------------------------------------------------------- def item return @data[self.index] end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end # Only show items if in battle. @nr = 0 if $game_temp.in_battle # Initialize data array @data = [] # Add item if @nr == 0 # Items only for i in 1...$data_items.size if ($game_party.item_number(i) > 0) @data.push($data_items[i]) end end elsif @nr == 1 # Key items only for i in 1...$data_items.size if ($game_party.item_number(i) > 0) @data.push($data_items[i]) if $data_items[i].occasion == 3 end end elsif @nr == 2 # Equipment Only # Show Weapons for i in 1...$data_weapons.size if ($game_party.weapon_number(i) > 0) @data.push($data_weapons[i]) end end # Show Armors for i in 1...$data_armors.size if ($game_party.armor_number(i) > 0) && (@nr>1) @data.push($data_armors[i]) end end elsif @nr == 3 # Show all # Show items for i in 1...$data_items.size if ($game_party.item_number(i) > 0) @data.push($data_items[i]) end end # Show Weapons for i in 1...$data_weapons.size if ($game_party.weapon_number(i) > 0) @data.push($data_weapons[i]) end end # Show Armors for i in 1...$data_armors.size if ($game_party.armor_number(i) > 0) && (@nr>1) @data.push($data_armors[i]) end end end # If item count is not 0, make a bitmap 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 #-------------------------------------------------------------------------- # * Draw Item # index : item number #-------------------------------------------------------------------------- def draw_item(index) item = @data[index] case item when RPG::Item number = $game_party.item_number(item.id) when RPG::Weapon number = $game_party.weapon_number(item.id) when RPG::Armor number = $game_party.armor_number(item.id) end if item.is_a?(RPG::Item) and $game_party.item_can_use?(item.id) self.contents.font.color = normal_color else self.contents.font.color = disabled_color end x = 4 + index % 2 * (288 + 32) y = index / 2 * 32 rect = Rect.new(x, y, self.width / @column_max - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) bitmap = RPG::Cache.icon(item.icon_name) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x + 28, y, 212, 32, item.name, 0) self.contents.draw_text(x + 240, y, 16, 32, ":", 1) self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2) end #-------------------------------------------------------------------------- # * Help Text Update #-------------------------------------------------------------------------- def update_help @help_window.set_text(self.item == nil ? "" : self.item.description) end end
__________________________
K.I.S.S. Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.
#------------------------------------------------------------------------------ #============================================================================== #============================================================================== #=============================*Custom Item Screen*============================= #=====================Authors: The Law G14 and Night_Runner==================== #=================================Version 1.2a================================= #============================================================================== #------------------------------------------------------------------------------
#============================================================================== # ** Scene_Item #------------------------------------------------------------------------------ # This class performs item screen processing. #==============================================================================
class Scene_Item #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(nr = 3) @nr = nr end #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # Make help window, item window @help_window = Window_Help.new @item_window = Window_Item.new(@nr) @item_window.active = false # Associate help window @item_window.help_window = @help_window # Make target window (set to invisible / inactive) @target_window = Window_Target.new @target_window.visible = false @target_window.active = false # Make pop-up window to filter items. s1 = "Items" s2 = "Key Items" s3 = "Equipment" s4 = "All" @nr_window = Window_Command.new(160, [s1, s2, s3, s4]) @nr_window.x = 280 @nr_window.y = 200 @nr_window.z = 998 # Execute transition Graphics.transition # Main loop loop do # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end end # Prepare for transition Graphics.freeze # Dispose of windows @help_window.dispose @item_window.dispose @target_window.dispose @nr_window.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Update windows @help_window.update @item_window.update @target_window.update @nr_window.update # If item window is active: call update_item if @item_window.active update_item return end # If target window is active: call update_target if @target_window.active update_target return end # If the filter window is active: call nr_update if @nr_window.active nr_update return end end #-------------------------------------------------------------------------- # * Frame Update (when item window is active) #-------------------------------------------------------------------------- def update_item # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to filtering window @nr_window.active = true @nr_window.visible = true @item_window.active = false return end # If C button was pressed if Input.trigger?(Input::C) # Get currently selected data on the item window @item = @item_window.item # If not a use item unless @item.is_a?(RPG::Item) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If it can't be used unless $game_party.item_can_use?(@item.id) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # If effect scope is an ally if @item.scope >= 3 # Activate target window @item_window.active = false @target_window.x = (@item_window.index + 1) % 2 * 304 @target_window.visible = true @target_window.active = true # Set cursor position to effect scope (single / all) if @item.scope == 4 || @item.scope == 6 @target_window.index = -1 else @target_window.index = 0 end # If effect scope is other than an ally else # If command event ID is valid if @item.common_event_id > 0 # Command event call reservation $game_temp.common_event_id = @item.common_event_id # Play item use SE $game_system.se_play(@item.menu_se) # If consumable if @item.consumable # Decrease used items by 1 $game_party.lose_item(@item.id, 1) # Draw item window item @item_window.draw_item(@item_window.index) end # Switch to map screen $scene = Scene_Map.new return end end return end end #-------------------------------------------------------------------------- # * Frame Update (when target window is active) #-------------------------------------------------------------------------- def update_target # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # If unable to use because items ran out unless $game_party.item_can_use?(@item.id) # Remake item window contents @item_window.refresh end # Erase target window @item_window.active = true @target_window.visible = false @target_window.active = false return end # If C button was pressed if Input.trigger?(Input::C) # If items are used up if $game_party.item_number(@item.id) == 0 # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If target is all if @target_window.index == -1 # Apply item effects to entire party used = false for i in $game_party.actors used |= i.item_effect(@item) end end # If single target if @target_window.index >= 0 # Apply item use effects to target actor target = $game_party.actors[@target_window.index] used = target.item_effect(@item) end # If an item was used if used # Play item use SE $game_system.se_play(@item.menu_se) # If consumable if @item.consumable # Decrease used items by 1 $game_party.lose_item(@item.id, 1) # Redraw item window item @item_window.draw_item(@item_window.index) end # Remake target window contents @target_window.refresh # If all party members are dead if $game_party.all_dead? # Switch to game over screen $scene = Scene_Gameover.new return end # If common event ID is valid if @item.common_event_id > 0 # Common event call reservation $game_temp.common_event_id = @item.common_event_id # Switch to map screen $scene = Scene_Map.new return end end # If item wasn't used unless used # Play buzzer SE $game_system.se_play($data_system.buzzer_se) end return end end #-------------------------------------------------------------------------- # * Frame Update (when command window is active) #-------------------------------------------------------------------------- def nr_update # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Go back to the Menu $scene = Scene_Menu.new(0) return end # If C button was pressed if Input.trigger?(Input::C) # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to status screen @nr_window.active = false @nr_window.visible = false @item_window.dispose @item_window = Window_Item.new(@nr_window.index) return end end end
#============================================================================== # ** Window_Item #------------------------------------------------------------------------------ # This window displays items in possession on the item and battle screens. #==============================================================================
class Window_Item < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(nr = 3) super(0, 64, 640, 416) @column_max = 2 @nr = nr refresh self.index = 0 # If in battle, move window to center of screen # and make it semi-transparent if $game_temp.in_battle self.y = 64 self.height = 256 self.back_opacity = 160 end end #-------------------------------------------------------------------------- # * Get Item #-------------------------------------------------------------------------- def item return @data[self.index] end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end # Only show items if in battle. @nr = 0 if $game_temp.in_battle # Initialize data array @data = [] # Add item if @nr == 0 # Items only for i in 1...$data_items.size if ($game_party.item_number(i) > 0) @data.push($data_items[i]) end end elsif @nr == 1 # Key items only for i in 1...$data_items.size if ($game_party.item_number(i) > 0) @data.push($data_items[i]) if $data_items[i].occasion == 3 end end elsif @nr == 2 # Equipment Only # Show Weapons for i in 1...$data_weapons.size if ($game_party.weapon_number(i) > 0) @data.push($data_weapons[i]) end end # Show Armors for i in 1...$data_armors.size if ($game_party.armor_number(i) > 0) && (@nr>1) @data.push($data_armors[i]) end end elsif @nr == 3 # Show all # Show items for i in 1...$data_items.size if ($game_party.item_number(i) > 0) @data.push($data_items[i]) end end # Show Weapons for i in 1...$data_weapons.size if ($game_party.weapon_number(i) > 0) @data.push($data_weapons[i]) end end # Show Armors for i in 1...$data_armors.size if ($game_party.armor_number(i) > 0) && (@nr>1) @data.push($data_armors[i]) end end end # If item count is not 0, make a bitmap 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 #-------------------------------------------------------------------------- # * Draw Item # index : item number #-------------------------------------------------------------------------- def draw_item(index) item = @data[index] case item when RPG::Item number = $game_party.item_number(item.id) when RPG::Weapon number = $game_party.weapon_number(item.id) when RPG::Armor number = $game_party.armor_number(item.id) end if item.is_a?(RPG::Item) and $game_party.item_can_use?(item.id) self.contents.font.color = normal_color else self.contents.font.color = disabled_color end x = 4 + index % 2 * (288 + 32) y = index / 2 * 32 rect = Rect.new(x, y, self.width / @column_max - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) bitmap = RPG::Cache.icon(item.icon_name) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x + 28, y, 212, 32, item.name, 0) self.contents.draw_text(x + 240, y, 16, 32, ":", 1) self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2) end #-------------------------------------------------------------------------- # * Help Text Update #-------------------------------------------------------------------------- def update_help @help_window.set_text(self.item == nil ? "" : self.item.description) end end
Okay cool night runner, after that fix I figured it out and twiked with it a little. At lines 317 where you added:
CODE
@data.push($data_items[i]) if $data_items[i].occasion == 3
Yes that makes it so the and extra slot says Key Items. But in Items (I don't know if you meant to or not) It still shows the key Items. So then I added these lines under 'Items':
CODE
@data.push($data_items[i]) if $data_items[i].occasion == 0 @data.push($data_items[i]) if $data_items[i].occasion == 1 @data.push($data_items[i]) if $data_items[i].occasion == 2
Now it shows every item that isn't a key Item in the Item catagory. Thanks for modding the script for me.
__________________________
Use Dropbox to upload your files. Much simpler than other upload sites, you can simply place a folder on your desktop that will sync with your DropBox account.
QUOTE ('Exiled One')
"If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others."
Hey Law, I didn't notice until now, but nothing appears in the help window when your cursor appears over an item. I even but in a new project see if it was my game and nothing still didn't appear.
__________________________
Use Dropbox to upload your files. Much simpler than other upload sites, you can simply place a folder on your desktop that will sync with your DropBox account.
QUOTE ('Exiled One')
"If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others."
#------------------------------------------------------------------------------ #============================================================================== #============================================================================== #=============================*Custom Item Screen*============================= #=====================Authors: The Law G14 and Night_Runner==================== #=================================Version 1.1================================== #============================================================================== #------------------------------------------------------------------------------
#============================================================================== # ** Scene_Item #------------------------------------------------------------------------------ # This class performs item screen processing. #==============================================================================
class Scene_Item #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(nr = 3) @nr = nr end #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # Make help window, item window @help_window = Window_Help.new @item_window = Window_Item.new(@nr) @item_window.active = false # Associate help window @item_window.help_window = @help_window # Make target window (set to invisible / inactive) @target_window = Window_Target.new @target_window.visible = false @target_window.active = false # Make pop-up window to filter items. s1 = "Items" s2 = "Key Items" s3 = "Equipment" s4 = "All" @nr_window = Window_Command.new(160, [s1, s2, s3, s4]) @nr_window.x = 280 @nr_window.y = 200 @nr_window.z = 998 # Execute transition Graphics.transition # Main loop loop do # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end end # Prepare for transition Graphics.freeze # Dispose of windows @help_window.dispose @item_window.dispose @target_window.dispose @nr_window.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Update windows @help_window.update @item_window.update @target_window.update @nr_window.update # If item window is active: call update_item if @item_window.active update_item return end # If target window is active: call update_target if @target_window.active update_target return end # If the filter window is active: call nr_update if @nr_window.active nr_update return end end #-------------------------------------------------------------------------- # * Frame Update (when item window is active) #-------------------------------------------------------------------------- def update_item # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to filtering window @nr_window.active = true @nr_window.visible = true @item_window.active = false return end # If C button was pressed if Input.trigger?(Input::C) # Get currently selected data on the item window @item = @item_window.item # If not a use item unless @item.is_a?(RPG::Item) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If it can't be used unless $game_party.item_can_use?(@item.id) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # If effect scope is an ally if @item.scope >= 3 # Activate target window @item_window.active = false @target_window.x = (@item_window.index + 1) % 2 * 304 @target_window.visible = true @target_window.active = true # Set cursor position to effect scope (single / all) if @item.scope == 4 || @item.scope == 6 @target_window.index = -1 else @target_window.index = 0 end # If effect scope is other than an ally else # If command event ID is valid if @item.common_event_id > 0 # Command event call reservation $game_temp.common_event_id = @item.common_event_id # Play item use SE $game_system.se_play(@item.menu_se) # If consumable if @item.consumable # Decrease used items by 1 $game_party.lose_item(@item.id, 1) # Draw item window item @item_window.draw_item(@item_window.index) end # Switch to map screen $scene = Scene_Map.new return end end return end end #-------------------------------------------------------------------------- # * Frame Update (when target window is active) #-------------------------------------------------------------------------- def update_target # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # If unable to use because items ran out unless $game_party.item_can_use?(@item.id) # Remake item window contents @item_window.refresh end # Erase target window @item_window.active = true @target_window.visible = false @target_window.active = false return end # If C button was pressed if Input.trigger?(Input::C) # If items are used up if $game_party.item_number(@item.id) == 0 # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If target is all if @target_window.index == -1 # Apply item effects to entire party used = false for i in $game_party.actors used |= i.item_effect(@item) end end # If single target if @target_window.index >= 0 # Apply item use effects to target actor target = $game_party.actors[@target_window.index] used = target.item_effect(@item) end # If an item was used if used # Play item use SE $game_system.se_play(@item.menu_se) # If consumable if @item.consumable # Decrease used items by 1 $game_party.lose_item(@item.id, 1) # Redraw item window item @item_window.draw_item(@item_window.index) end # Remake target window contents @target_window.refresh # If all party members are dead if $game_party.all_dead? # Switch to game over screen $scene = Scene_Gameover.new return end # If common event ID is valid if @item.common_event_id > 0 # Common event call reservation $game_temp.common_event_id = @item.common_event_id # Switch to map screen $scene = Scene_Map.new return end end # If item wasn't used unless used # Play buzzer SE $game_system.se_play($data_system.buzzer_se) end return end end #-------------------------------------------------------------------------- # * Frame Update (when command window is active) #-------------------------------------------------------------------------- def nr_update # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Go back to the Menu $scene = Scene_Menu.new(0) return end # If C button was pressed if Input.trigger?(Input::C) # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to status screen @nr_window.active = false @nr_window.visible = false @item_window.dispose @help_window.dispose @item_window = Window_Item.new(@nr_window.index) @help_window = Window_Help.new @item_window.help_window = @help_window return end end end
#============================================================================== # ** Window_Item #------------------------------------------------------------------------------ # This window displays items in possession on the item and battle screens. #==============================================================================
class Window_Item < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(nr = 3) super(0, 64, 640, 416) @column_max = 2 @nr = nr refresh self.index = 0 # If in battle, move window to center of screen # and make it semi-transparent if $game_temp.in_battle self.y = 64 self.height = 256 self.back_opacity = 160 end end #-------------------------------------------------------------------------- # * Get Item #-------------------------------------------------------------------------- def item return @data[self.index] end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh key_items = [2] if self.contents != nil self.contents.dispose self.contents = nil end @data = [] # Add item if @nr == 0 # Items only for i in 1...$data_items.size if ($game_party.item_number(i) > 0) @data.push($data_items[i]) end end elsif @nr == 1 # Key items only for i in key_items if ($game_party.item_number(i) > 0) @data.push($data_items[i]) end end elsif @nr == 2 # Equipment Only # Show Weapons for i in 1...$data_weapons.size if ($game_party.weapon_number(i) > 0) @data.push($data_weapons[i]) end end # Show Armors for i in 1...$data_armors.size if ($game_party.armor_number(i) > 0) && (@nr>1) @data.push($data_armors[i]) end end elsif @nr == 3 # Show all # Show items for i in 1...$data_items.size if ($game_party.item_number(i) > 0) @data.push($data_items[i]) end end # Show Weapons for i in 1...$data_weapons.size if ($game_party.weapon_number(i) > 0) @data.push($data_weapons[i]) end end # Show Armors for i in 1...$data_armors.size if ($game_party.armor_number(i) > 0) && (@nr>1) @data.push($data_armors[i]) end end end # If item count is not 0, make a bitmap 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 #-------------------------------------------------------------------------- # * Draw Item # index : item number #-------------------------------------------------------------------------- def draw_item(index) item = @data[index] case item when RPG::Item number = $game_party.item_number(item.id) when RPG::Weapon number = $game_party.weapon_number(item.id) when RPG::Armor number = $game_party.armor_number(item.id) end if item.is_a?(RPG::Item) and $game_party.item_can_use?(item.id) self.contents.font.color = normal_color else self.contents.font.color = disabled_color end x = 4 + index % 2 * (288 + 32) y = index / 2 * 32 rect = Rect.new(x, y, self.width / @column_max - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) bitmap = RPG::Cache.icon(item.icon_name) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x + 28, y, 212, 32, item.name, 0) self.contents.draw_text(x + 240, y, 16, 32, ":", 1) self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2) end #-------------------------------------------------------------------------- # * Help Text Update #-------------------------------------------------------------------------- def update_help @help_window.set_text(self.item == nil ? "" : self.item.description) end end
"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!
If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One
Use Dropbox to upload your files. Much simpler than other upload sites, you can simply place a folder on your desktop that will sync with your DropBox account.
QUOTE ('Exiled One')
"If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others."
Group: Member
Posts: 37
Type: Writer
RM Skill: Skilled
Hi.
I am using a blacksmith script I found (I'm not sure wether I'm allowed to post a link to it here, so I'll hold back on that and only do that on demand) and while being in the smithery, deconstucting a wepon I get an error from the custom item script.