pinv = player.getInventory();

if(pinv.getSlotContainingItem(270) != -1)
{
	sound.playSoundUI("sound.get item");
	pinv.consumeItem(270);
	pinv.addItem(Item(322));		 
}
else
{
	pinv.addItem(Item(266,10));
	chat.print("You need an empty bottle to buy this potion.");
}	