protected Room getRoom(String thisName, Room imHere)
	{
		if(thisName.length()==0)
			return null;
		if((imHere!=null)&&(imHere.roomID().equalsIgnoreCase(thisName)))
			return imHere;
		if((imHere!=null)&&(thisName.startsWith("#"))&&(CMath.isLong(thisName.substring(1))))
			return CMLib.map().getRoom(imHere.getArea().Name()+thisName);
		final Room room=CMLib.map().getRoom(thisName);
		if((room!=null)&&(room.roomID().equalsIgnoreCase(thisName)))
		{
			if(CMath.bset(room.getArea().flags(),Area.FLAG_INSTANCE_PARENT)
			&&(imHere!=null)
			&&(CMath.bset(imHere.getArea().flags(),Area.FLAG_INSTANCE_CHILD))
			&&(imHere.getArea().Name().endsWith("_"+room.getArea().Name()))
			&&(thisName.indexOf('#')>=0))
			{
				final Room otherRoom=CMLib.map().getRoom(imHere.getArea().Name()+thisName.substring(thisName.indexOf('#')));
				if((otherRoom!=null)&&(otherRoom.roomID().endsWith(thisName)))
					return otherRoom;
			}
			return room;
		}

		List<Room> rooms=new Vector<Room>(1);
		if((imHere!=null)&&(imHere.getArea()!=null))
			rooms=CMLib.map().findAreaRoomsLiberally(null, imHere.getArea(), thisName, "RIEPM",100);
		if(rooms.size()==0)
		{
			if(debugBadScripts)
				Log.debugOut("ScriptingEngine","World room search called for: "+thisName);
			rooms=CMLib.map().findWorldRoomsLiberally(null,thisName, "RIEPM",100,2000);
		}
		if(rooms.size()>0)
			return rooms.get(CMLib.dice().roll(1,rooms.size(),-1));
		if(room == null)
		{
			final int x=thisName.indexOf('@');
			if(x>0)
			{
				Room R=CMLib.map().getRoom(thisName.substring(x+1));
				if((R==null)||(R==imHere))
				{
					final Area A=CMLib.map().getArea(thisName.substring(x+1));
					R=(A!=null)?A.getRandomMetroRoom():null;
				}
				if((R!=null)&&(R!=imHere))
					return getRoom(thisName.substring(0,x),R);
			}
		}
		return room;
	}