public static int invCheck(String name,TelnetService TN) throws InterruptedException, IOException{
		int cnt=0;
		int amt=0;
		TN.write("sys god "+name+" inv");
		String in=TN.readit("Wealth:", "Cannot find user");
		if (!in.equals("Cannot find user")&&!in.contains("You are carrying Nothing!")){
			String[] b=in.split(",");
			for (String value:b){
				value=value.replace("\n", "");
				value=value.replace("\r", " ");
				if (value.contains("")){
					int n=value.indexOf("");
					value=value.substring(1,n);
				}
				//GosLink2.dw.append(value.trim());
				if (value.contains("PVP")&&value.contains("token")){
					int pamt=1;
					value=value.trim();
					if (!value.startsWith("P")){
						String[] temp=value.split(" ");
						pamt=Integer.parseInt(temp[0]);
						value=value.substring(temp[0].length()+1);
					}
					cnt=cnt+pamt;
					String[] temp=value.split(" ");
					int type=Integer.parseInt(temp[temp.length-1]);
					amt=amt+(pamt*type);
					//GosLink2.dw.append("found: "+pamt+" "+value.trim()+" = "+amt);
				}
			}
			return amt/2;
		}
		return amt/2;

	}