def pbPokemonFound(item,quantity = 1,message = "")
return false if !$PokemonGlobal.follower_hold_item
pokename = $Trainer.first_able_pokemon.name
message = "{1} seems to be holding something..." if nil_or_empty?(message)
pbMessage(_INTL(message,pokename))
item = GameData::Item.get(item)
return false if !item || quantity<1
itemname = (quantity>1) ? item.name_plural : item.name
pocket = item.pocket
move = item.move
if $PokemonBag.pbStoreItem(item,quantity) # If item can be picked up
meName = (item.is_key_item?) ? "Key item get" : "Item get"
if item == :LEFTOVERS
pbMessage(_INTL("\\me[{1}]#{pokename} found some \\c[1]{2}\\c[0]!\\wtnp[30]",meName,itemname))
elsif item.is_machine? # TM or HM
pbMessage(_INTL("\\me[{1}]#{pokename} found \\c[1]{2} {3}\\c[0]!\\wtnp[30]",meName,itemname,GameData::Move.get(move).name))
elsif quantity>1
pbMessage(_INTL("\\me[{1}]#{pokename} found {2} \\c[1]{3}\\c[0]!\\wtnp[30]",meName,quantity,itemname))
elsif itemname.starts_with_vowel?
pbMessage(_INTL("\\me[{1}]#{pokename} found an \\c[1]{2}\\c[0]!\\wtnp[30]",meName,itemname))
else
pbMessage(_INTL("\\me[{1}]#{pokename} found a \\c[1]{2}\\c[0]!\\wtnp[30]",meName,itemname))
end
pbMessage(_INTL("#{pokename} put the {1} away\\nin the <icon=bagPocket{2}>\\c[1]{3} Pocket\\c[0].",
itemname,pocket,PokemonBag.pocketNames()[pocket]))
$PokemonGlobal.follower_hold_item = false
$PokemonGlobal.time_taken = 0
return true
end
# Can't add the item
if item == :LEFTOVERS
pbMessage(_INTL("#{pokename} found some \\c[1]{1}\\c[0]!\\wtnp[30]",itemname))
elsif item.is_machine? # TM or HM
pbMessage(_INTL("#{pokename} found \\c[1]{1} {2}\\c[0]!\\wtnp[30]",itemname,GameData::Move.get(move).name))
elsif quantity>1
pbMessage(_INTL("#{pokename} found {1} \\c[1]{2}\\c[0]!\\wtnp[30]",quantity,itemname))
elsif itemname.starts_with_vowel?
pbMessage(_INTL("#{pokename} found an \\c[1]{1}\\c[0]!\\wtnp[30]",itemname))
else
pbMessage(_INTL("#{pokename} found a \\c[1]{1}\\c[0]!\\wtnp[30]",itemname))
end
pbMessage(_INTL("But your Bag is full..."))
return false
end