void script_3067(int arg0) {
	int ivar1;
	int ivar2;
	int ivar3;
	int ivar4;
	int ivar5;
	int ivar6;
	int ivar7;
	string svar0;
	string svar1;
	string svar2;
	worldData(5,3,0) structdump_0;
	worldData(5,3,0) structdump_1;
	if (cs2method6500()) {
		setScriptCallOnGameloop(3067, arg0, "i", new WidgetPointer(906,172));
		return;
	}
	setScriptCallOnGameloop(-1, "", new WidgetPointer(906,172));
	ivar1 = 0;
	ivar2 = 0;
	svar0 = "";
	ivar3 = 0;
	svar1 = "";
	ivar4 = 0;
	ivar5 = 0;
	svar2 = "";
	ivar6 = -1;
	if (((boolean)arg0)) {
		ivar6 = globalint_998;
	} else if (arg0 == 2) {
		ivar6 = globalint_999;
	} else {
		return;
	}
	structdump_0 = getFirstWorldData();
	svar2 = structdump_0.stringpart_2;
	ivar5 = structdump_0.intpart_4;
	ivar4 = structdump_0.intpart_3;
	svar1 = structdump_0.stringpart_1;
	ivar3 = structdump_0.intpart_2;
	svar0 = structdump_0.stringpart_0;
	ivar2 = structdump_0.intpart_1;
	ivar1 = structdump_0.intpart_0;
	ivar7 = 0;
	while ((ivar1 != -1) && ((boolean)ivar7)) {
		if (ivar1 == ivar6) {
			ivar7 = 1;
		} else {
			structdump_1 = getNextWorldData();
			svar2 = structdump_1.stringpart_2;
			ivar5 = structdump_1.intpart_4;
			ivar4 = structdump_1.intpart_3;
			svar1 = structdump_1.stringpart_1;
			ivar3 = structdump_1.intpart_2;
			svar0 = structdump_1.stringpart_0;
			ivar2 = structdump_1.intpart_1;
			ivar1 = structdump_1.intpart_0;
		}
	}
	if (((boolean)arg0)) {
		script_3382(59375792);
	} else {
		if (arg0 == 2) {
			script_3382(59375793);
		}
	}
	if (ivar1 > 0) {
		if (getWorldId() != ivar1) {
			if (setWorldHost(ivar1, svar2)) {
				globalint_547 = 0;
				script_3062(59375787);
			} else {
				script_3064(1);
				script_3093(-5, 1, 0, 2608, 0, -1, 1, "Could not connect you to the chosen world. Please choose another.", "", "", "Back", "Back");
			}
		} else {
			script_3062(59375787);
		}
	} else {
		script_3093(-5, 1, 0, 2608, 0, -1, 1, "World " + intToStr(ivar6) + " is running in a different language or is unavailable.", "", "", "Back", "Back");
	}
	return;
}
