[code#===================================================================
===========
# ** Night_Runner's Item Memory Script
#------------------------------------------------------------------------------
# History:
# Date Created: 25/July/2011
# Created for: superafroboy
# @>
http://www.rpgrevolution.com/forums/index....showtopic=51842#
# Description:
# This script is designed to keep track of the last highlited item in the
# inventory screen.
#
# How to Install:
# Select and copy this entire peice of code.
# In your game, select Tools >> Script Editor
# Along the left hand side, scroll all the way to the bottom, right
# click on 'Main', and select 'Insert'.
# Paste the code in the blank window on the right.
#
# How to Use:
# Below on lines 46 & 48 you will find the code:
# $game_variables[10]
# change the 10 to the index of the variable that you would like to use
# to keep track of the last item highlited in the inventory screen
#==============================================================================
#==============================================================================
# ** Window_Item
#------------------------------------------------------------------------------
# Edited to keep track of the item highlited last
#==============================================================================
class Window_Item
#--------------------------------------------------------------------------
# * Alias Methods
#--------------------------------------------------------------------------
alias nr_itemHighlightedMemory_dispose dispose unless $@
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose(*args)
# Keep track of the item
if @data[self.index].is_a?(RPG::Item)
$game_variables[10] = @data[self.index].id
else
$game_variables[10] = -1
end
# Run the original code
nr_itemHighlightedMemory_dispose(*args)
end
end[/code]