protected int genPricing(MOB mob, TriadList<String,String,Integer> stats, int showNumber, int showFlag)
	throws IOException
	{
		final int pndex=stats.indexOfFirst("PRICEMASKS");
		final String priceStr=(pndex<0)?"":(String)stats.get(pndex).second;
		final List<String> priceV=CMParms.parseCommas(priceStr,true);
		for(int v=0;v<=priceV.size();v++)
		{
			if((showFlag>0)&&(showFlag!=showNumber))
			{
				if(v<priceV.size())
					showNumber++;
				continue;
			}
			if(v==priceV.size())
			{
				if((mob.session()!=null)&&(!mob.session().isStopped()))
				{
					if(((showFlag<=-999)&&CMLib.genEd().prompt(mob,false,showNumber,showFlag,L("Add new price factor")))
					||(showNumber==showFlag))
					{
						priceV.add("1.0");
						v-=1;
					}
					else
					if(showFlag==-1)
						mob.tell(L("@x1. Add new price factor.",""+showNumber));
				}
				continue;
			}
			final String priceLine=priceV.get(v);
			double priceFactor=0.0;
			String mask="";
			final int x=priceLine.indexOf(' ');
			if(x<0)
				priceFactor=CMath.s_double(priceLine);
			else
			{
				priceFactor=CMath.s_double(priceLine.substring(0,x));
				mask=priceLine.substring(x+1).trim();
			}
			mob.tell(L("@x1. Price Factor: @x2%: @x3",""+showNumber,""+Math.round(priceFactor*100.0),mask));
			if((showFlag==showNumber)||(showFlag<=-999))
			{
				priceFactor=CMLib.genEd().prompt(mob,priceFactor,showNumber,showFlag,L("Price Factor (enter 0 to delete)"));
				if(priceFactor==0.0)
				{
					priceV.remove(v);
					v--;
					if((showFlag==showNumber))
						break;
					showNumber--;
					continue;
				}
				mob.tell(L("@x1. Price Factor: @x2%: @x3",""+showNumber,""+Math.round(priceFactor*100.0),mask));
				mask=CMLib.genEd().prompt(mob,mask,showNumber,showFlag,L("Item mask for this price"),CMLib.masking().maskHelp("\n\r","disallow"));
				priceV.set(v,priceFactor+" "+mask);
			}
			showNumber++;
		}
		final String newVal=CMParms.toListString(priceV);
		if(pndex>=0)
			stats.get(pndex).second = newVal;
		else
			stats.add("PRICEMASKS",newVal,Integer.valueOf(stats.size()));
		return showNumber;
	}