public int getQuestThingIndex(Iterator<? extends Environmental> i, String name, CMClass.CMObjectType type, int[] num)
	{
		if(i==null)
			return -1;
		Environmental E;
		for(;i.hasNext();)
		{
			E=i.next();
			if(CMClass.isType(E,type))
			{
				switch(type)
				{
				case LOCALE:
					if(CMLib.map().getExtendedRoomID((Room)E).equalsIgnoreCase(name))
						return num[0];
					break;
				default:
					if(E.Name().equalsIgnoreCase(name))
						return num[0];
					break;
				}
				num[0]++;
			}
		}
		return -1;
	}