public Packet buy(int id)
    {
        int price = item.getBuy(id);
        if (price == -1) {
            return getErrorPacket(noitem,head_buy);
        }
        int cgigas = bot.getGigas();
        if (cgigas < price) {
            return getErrorPacket(nogigas,head_buy);
        }
        int slot = slotAvaible();
        if(slot == -1) {
            return getErrorPacket(noslot,head_buy);
        }
        bot.setGigas(cgigas-price);
        bot.setInvent(id, slot);
        return bot.getInventPacket(head_buy);
    }