void script_5037(int arg0) {
	int ivar1;
	int ivar2;
	setWidgetIsHidden(false, new WidgetPointer(1111,9));
	setWidgetIsHidden(true, new WidgetPointer(1111,1));
	script_4510(72810501, 1736);
	script_4510(72810502, 1737);
	script_4211(72810504, 4040, 15458492, 5918266);
	setScriptCallOnCitadelConfigChange(5039, "", new WidgetPointer(arg0));
	setScriptCallOnMouseScroll(5042, new WidgetPointer(arg0), -2147483646, "Ii", new WidgetPointer(1111,15));
	setScriptCallOnClickContextMenu(5042, new WidgetPointer(arg0), 1, "Ii", new WidgetPointer(1111,46));
	setScriptCallOnClickContextMenu(5042, new WidgetPointer(arg0), -1, "Ii", new WidgetPointer(1111,53));
	setScriptCallOnMouseDragReleased(5043, new WidgetPointer(arg0), new WidgetPointer(-32768,3), -2147483647, "IIi", new WidgetPointer(1111,51));
	ivar1 = 0;
	ivar2 = pow(112, 2);
	while (ivar1 < ivar2) {
		createExtraChild(new WidgetPointer(1111,16), 3, ivar1);
		setWidgetRGB(new Color(31, 31, 38));
		setWidgetFilled(1);
		setWidgetContextMenuOption(1, "Set");
		setWidgetContextMenuOption(10, "Teleport");
		cs2method1304(5);
		cs2method1302(2);
		setScriptCallOnMouseDragged(5054, -2147483647, -2147483646, "ii");
		ivar1 = add(ivar1, 1);
	}
	script_5040();
	createExtraChild(new WidgetPointer(1111,19), 5, 0);
	createExtraChild(new WidgetPointer(1111,20), 5, 0);
	setWidgetPosition(0, 0, 1, 1);
	setWidgetPosition(0, 0, 1, 1);
	setWidgetSize(0, 32, 1, 1);
	setWidgetSize(32, 0, 1, 1);
	setWidgetSprite(5666);
	setWidgetSprite(7605);
	cs2method1107(1);
	cs2method1107(1);
	setScriptCallOnMousePressed(5052, new WidgetPointer(-32768,3), 1, "I1");
	setScriptCallOnMousePressed(5052, new WidgetPointer(-32768,3), 0, "I1");
	createExtraChild(new WidgetPointer(1111,19), 5, 1);
	createExtraChild(new WidgetPointer(1111,20), 5, 1);
	setWidgetPosition(0, 0, 1, 0);
	setWidgetPosition(0, 0, 0, 1);
	setWidgetSize(0, 16, 1, 0);
	setWidgetSize(16, 0, 0, 1);
	setWidgetSprite(5686);
	setWidgetSprite(5686);
	cs2method1106(16384);
	setScriptCallOnMouseDraggedOver(5049, -4, 1, 1, "ii1");
	setScriptCallOnMouseDraggedOver(5049, -4, 1, 0, "ii1");
	createExtraChild(new WidgetPointer(1111,19), 5, 2);
	createExtraChild(new WidgetPointer(1111,20), 5, 2);
	setWidgetPosition(0, 0, 1, 2);
	setWidgetPosition(0, 0, 2, 1);
	setWidgetSize(0, 16, 1, 0);
	setWidgetSize(16, 0, 0, 1);
	setWidgetSprite(5685);
	setWidgetSprite(5685);
	cs2method1106(16384);
	setScriptCallOnMouseDraggedOver(5049, 4, 1, 1, "ii1");
	setScriptCallOnMouseDraggedOver(5049, 4, 1, 0, "ii1");
	createExtraChild(new WidgetPointer(1111,19), 5, 3);
	createExtraChild(new WidgetPointer(1111,20), 5, 3);
	setWidgetSprite(5664);
	setWidgetSprite(7603);
	cs2method1107(1);
	cs2method1107(1);
	cs2method1301(72810515, 0);
	cs2method1301(72810516, 0);
	cs2method1302(1);
	cs2method1302(1);
	setScriptCallOnMouseDragged(5051, new WidgetPointer(-32768,3), -2147483646, 0, 1, "Ii11");
	setScriptCallOnMouseDragged(5051, new WidgetPointer(-32768,3), -2147483647, 0, 0, "Ii11");
	setScriptCallOnMouseDragReleased(5051, new WidgetPointer(-32768,3), -2147483646, 1, 1, "Ii11");
	setScriptCallOnMouseDragReleased(5051, new WidgetPointer(-32768,3), -2147483647, 1, 0, "Ii11");
	createExtraChild(new WidgetPointer(1111,19), 5, 4);
	createExtraChild(new WidgetPointer(1111,20), 5, 4);
	setWidgetSize(0, 5, 1, 0);
	setWidgetSize(5, 0, 0, 1);
	setWidgetSprite(5663);
	setWidgetSprite(7602);
	createExtraChild(new WidgetPointer(1111,19), 5, 5);
	createExtraChild(new WidgetPointer(1111,20), 5, 5);
	setWidgetSize(0, 5, 1, 0);
	setWidgetSize(5, 0, 0, 1);
	setWidgetSprite(5665);
	setWidgetSprite(7604);
	setScriptCallOnMouseScroll(5049, -2147483646, 20, 1, "ii1", new WidgetPointer(1111,19));
	setScriptCallOnMouseScroll(5049, -2147483646, 20, 0, "ii1", new WidgetPointer(1111,20));
	createExtraChild(new WidgetPointer(1111,15), 3, 0);
	setWidgetFilled(0);
	setWidgetHidden(1);
	setScriptCallOnGameloop(5074, new WidgetPointer(-32768,3), getWidgetCustomChildArrayIndex(), "Ii", new WidgetPointer(1111,15));
	setScriptCallOnGlobalConfigChange(5074, new WidgetPointer(-32768,3), getWidgetCustomChildArrayIndex(), 1065, 1, "IiY", new WidgetPointer(1111,15));
	setScriptCallOnClickContextMenu(5075, new WidgetPointer(1111,15), getWidgetCustomChildArrayIndex(), "Ii", new WidgetPointer(1111,54));
	if ((globalint_1396 < 3) || (globalint_1396 > 21)) {
		globalint_1396 = add(3, divide(subtract(21, 3), 4));
	}
	script_5047(globalint_1396, 0, 112, 0, 0);
	script_5048();
	script_5073(1);
	script_5055(1, 3944, 72810564, 72810553, 72810554, "Architecture");
	script_5055(2, 3945, 72810565, 72810556, 72810557, "Toys");
	script_5055(3, 3946, 72810566, 72810559, 72810560, "Hazards");
	script_5055(4, 3947, 72810567, 72810562, 72810563, "Monsters");
	globalint_768 = 1;
	script_5065(1);
	setScriptCallOnConfigChange(5066, 1736, 1, "Y", new WidgetPointer(arg0));
	script_5067();
	script_5076(72810511, 0);
	return;
}
