public static Item getSomething(MOB mob, boolean cursedOnly)
	{
		final Vector<Item> good=new Vector<Item>();
		final Vector<Item> great=new Vector<Item>();
		Item target=null;
		for(int i=0;i<mob.numItems();i++)
		{
			final Item I=mob.getItem(i);
			if((I.container()==null)&&((!cursedOnly)||(isCursed(I))))
				if(I.amWearingAt(Wearable.IN_INVENTORY))
					good.addElement(I);
				else
					great.addElement(I);
		}
		if(great.size()>0)
			target=great.elementAt(CMLib.dice().roll(1,great.size(),-1));
		else
		if(good.size()>0)
			target=good.elementAt(CMLib.dice().roll(1,good.size(),-1));
		return target;
	}