if (activeChar.getInventory().getAdena() >= 1000000) {
activeChar.getInventory().destroyItemByItemId("Delevel manager", 57, 1000000, activeChar, activeChar);
activeChar.getInventory().addItem ("Delevel manager", itemApigaId, itemApigaAmount, activeChar, activeChar);
activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.EARNED_S2_S1_S).addItemName(itemApigaId).addInt(itemApigaAmount));
activeChar.sendPacket(new ItemList(activeChar, true));
} else {
activeChar.sendMessage("You don't have enought Adena");
}
Just as this does not give me errors in the acis, I would only have to replace itemApigaId by the identification of that item and itemApigaAmount by the quantity.