private int Loop254(int valu, int index){
        String ip;
        if(!catalogue.getmanualServer()) {
            ip = Server.getServer((String)serverlist.get(valu)).getPort() + Server.getServer((String) serverlist.get
                    (valu)).getIp().toString();
        }
        else{
            ip = "111.111.111.111";
        }
        ip = ip.replaceAll("[^0-9]", "");
        if (index>3 || ip.length()<9){
            return 254;
        }
        valu = Integer.parseInt(ip.substring(ip.length()-(index+3), ip.length()-(index)));

        while (valu>254){
            valu-=254;
            if (valu<80){
                valu+=80;
            }
        }
        return valu;
    }