Код:
	#==============================================================================
# PickUp Message
#------------------------------------------------------------------------------
# Написал: Urban.Wolfling
# Внёс исправления: DeadElf79
#------------------------------------------------------------------------------
#  For both commercial and non-commercial use as long as credit is given to
#  Urban.Wolfling.  Licensed under Creative Commons CC BY 4.0 -
#  http://creativecommons.org/licenses/by/4.0/
#==============================================================================
#  Для коммерческого и не коммерческого использования, при условии указания
#  авторства Urban.Wolfling. Лицензировано под Creative Commons CC BY 4.0 -
#  http://creativecommons.org/licenses/by/4.0/
#==============================================================================
 
class Game_System
#==============================================================================
#  Setting Section / Секция настроек
#==============================================================================
 
  TextShowTime = 240  # длительность показа строки о подборе предмета в кадрах
  SEName = nil        # название звука подбора (должен лежать в Audio\SE\)
  UseIcons = true     # отображать (true) или нет (false) иконки предметов
  TextSize = 24       # размер текста в окне
  TextFontColor = Color.new(255,255,255) # цвет текста
 
#==============================================================================
#  End Setting Section / Конец секции настроек
#==============================================================================
 
  attr_accessor :pickup_sound
  attr_accessor :pickup_list
 
  alias pum_initialize initialize
  def initialize
    pum_initialize
    @pickup_list = []
    Game_System::SEName ? (
      @pickup_sound = RPG::SE.new(Game_System::SEName, 10, 100)
    ) : (
      @pickup_sound = nil )
  end
 
end
 
class Game_Party < Game_Unit 
  def push_pickuped_item(icon, amount, name)
    $game_system.pickup_list.push({
    	:icon => icon,
    	:amount => amount,
    	:name => name,
    	:time => Game_System::TextShowTime
    })
  end
 
  def gain_item(item, amount, include_equip = false)
    container = item_container(item.class)
    return unless container
    last_number = item_number(item)
    new_number = last_number + amount
    container[item.id] = [[new_number, 0].max, max_item_number(item)].min
    push_pickuped_item(item.icon_index,amount,item.name)
    $game_system.pickup_sound.play unless $game_system.pickup_sound.nil?
    container.delete(item.id) if container[item.id] == 0
    if include_equip && new_number < 0
      discard_members_equip(item, -new_number)
    end
    $game_map.need_refresh = true
  end
end
 
class Window_NewItems < Sprite
  def initialize(x, y, width, height)
    super(nil)
    self.x, self.y = x, y
    self.z = 200
 
    @font_size = Game_System::TextSize
    @w_c = $data_system.window_tone
    @t_ui = Game_System::UseIcons
    @iconset = Cache.system("Iconset")
 
    @last_size = -1
 
    self.bitmap = Bitmap.new(width, height)
    self.bitmap.font.size = @font_size
    if Game_System::TextFontColor
      self.bitmap.font.color = Game_System::TextFontColor
    end
 
    redraw_back
    refresh
  end
 
  def draw_item_icon(icon_index, x, y)
    return unless icon_index != 0
    rect = Rect.new(icon_index % 16 * 24,
                    icon_index / 16 * 24,
                    24,
                    @font_size<=22 ? @font_size + 2 : 24)
    self.bitmap.blt(x, y, @iconset, rect)
  end
 
  def draw_text(x,y,text)
    self.bitmap.draw_text(x,y,width,@font_size,text)
  end
 
  def refresh
    self.bitmap.clear
    redraw_back
 
    $game_system.pickup_list.each do |pickup|
    	index = $game_system.pickup_list.index(pickup)
      if @t_ui
        draw_item_icon(pickup[:icon], 4, index * @font_size-1)
        tab = 32
      else
      	tab = 4
      end
      draw_text(
      	tab,
        index * @font_size,
        [ pickup[:amount], pickup[:name] ].join(" ")
      )
    end
  end
 
  def update
    plist = $game_system.pickup_list
 
    plist.each_index do |index|
    	pickup = plist[index]
    	pickup[:time] -= 1
    	if pickup[:time] <= 0
    		$game_system.pickup_list.delete_at(index)
    		$game_system.pickup_list.compact!
    	end
    end
 
    if @last_size != plist.size
      refresh
      @last_size = plist.size
    end
  end
 
  def dispose
    self.bitmap.dispose unless disposed?
    super
  end
  
  def redraw_back
  	rect = Rect.new(
  		0,
  		0,
  		self.bitmap.width,
  		$game_system.pickup_list.size * @font_size
  	)
    red =   ( @w_c.red   + 255 ) / 2
    green = ( @w_c.green + 255 ) / 2
    blue =  ( @w_c.blue  + 255 ) / 2
    bg0 = Color.new(red, green, blue, 255)
    bg1 = Color.new(red, green, blue, 0)
    self.bitmap.gradient_fill_rect(rect, bg0, bg1)
  end
end
 
class Scene_Map < Scene_Base
 
  alias pum_update_scene update_scene
  def update_scene
    pum_update_scene
    @new_items_window.update
  end
 
  alias pum_create_all_windows create_all_windows
  def create_all_windows
    pum_create_all_windows
    create_pum_window
  end
  
  alias pum_terminate terminate
  def terminate
    pum_terminate
    @new_items_window.dispose
  end
  
  def create_pum_window
    @new_items_window = Window_NewItems.new(
    	0,
      0,
      Graphics.width / 2,
      Graphics.height / 2
    )
  end
end
 
Социальные закладки