void script_5355(int arg0,int arg1) {
	int ivar2;
	int ivar3;
	int ivar4;
	int ivar5;
	int ivar6;
	int ivar7;
	int ivar8;
	int ivar9;
	int ivar10;
	int ivar11;
	string svar0;
	flow_0:
		ivar2 = 0;
		ivar3 = 0;
		ivar4 = 0;
		ivar5 = 0;
		ivar6 = 0;
		ivar7 = 0;
		ivar8 = 0;
		ivar9 = 0;
		ivar10 = 0;
		ivar11 = -1;
		svar0 = getOtherCommonData(arg0, 1930);
		IF ((getOtherCommonData(arg0, 1937) == 4) && (ivar9 < getCommonDefinitionSize(5184))) 
			GOTO	flow_2
		GOTO	flow_9
	flow_1:
	flow_2:
		IF (((boolean)ivar10)) 
			GOTO	flow_3
		GOTO	flow_9
	flow_3:
		if (cs2method_3408(105, 74, 5184, ivar9) == arg0) {
			if (IsFemale()) {
				svar0 = cs2method_3408(105, 115, 5187, ivar9);
			} else {
				svar0 = cs2method_3408(105, 115, 5186, ivar9);
			}
			ivar10 = 1;
		}
		ivar9 = add(ivar9, 1);
		GOTO	flow_1
	flow_9:
		setWidgetText(new WidgetPointer(1143,25), svar0);
		if (((boolean)arg1)) {
			setWidgetIsHidden(true, new WidgetPointer(1143,26));
			setWidgetIsHidden(true, new WidgetPointer(1143,27));
			setWidgetIsHidden(true, new WidgetPointer(1143,19));
			setWidgetPosition(0, 186, 1, 0, new WidgetPointer(1143,28));
			setWidgetPosition(0, 228, 1, 0, new WidgetPointer(1143,32));
			setWidgetText(new WidgetPointer(1143,186), "Reclaim");
			setWidgetContextMenuOption(1, new WidgetPointer(1143,186), "Reclaim");
		} else if (getOtherCommonData(arg0, 1933) > 0) {
			setWidgetText(new WidgetPointer(1143,27), concat("Item Cost: ", formatNumber(getOtherCommonData(arg0, 1933), 1)));
		} else {
			setWidgetText(new WidgetPointer(1143,27), concat("Item Cost: ", formatNumber(getOtherCommonData(arg0, 1932), 1)));
		}
		setWidgetIsHidden(false, new WidgetPointer(1143,26));
		setWidgetIsHidden(false, new WidgetPointer(1143,27));
		setWidgetIsHidden(false, new WidgetPointer(1143,19));
		setWidgetPosition(0, 239, 1, 0, new WidgetPointer(1143,28));
		setWidgetPosition(0, 266, 1, 0, new WidgetPointer(1143,32));
		setWidgetText(new WidgetPointer(1143,186), "Buy");
		setWidgetContextMenuOption(1, new WidgetPointer(1143,186), "Buy");
		setWidgetText(new WidgetPointer(1143,26), concat("My Points: ", formatNumber(globalint_1648, 1)));
		setWidgetIsHidden(false, new WidgetPointer(1143,28));
		setWidgetIsHidden(false, new WidgetPointer(1143,29));
		if (getOtherCommonData(arg0, 1950) != -1) {
			ivar2 = 5;
		} else if (getOtherCommonData(arg0, 1949) != -1) {
			ivar2 = 4;
		} else if (getOtherCommonData(arg0, 1948) != -1) {
			ivar2 = 3;
		} else if (getOtherCommonData(arg0, 1947) != -1) {
			ivar2 = 2;
		} else {
			ivar2 = 1;
			setWidgetIsHidden(true, new WidgetPointer(1143,28));
			setWidgetIsHidden(true, new WidgetPointer(1143,29));
			setWidgetPosition(0, 260, 1, 0, new WidgetPointer(1143,32));
		}
		ivar6 = 63;
		ivar7 = 57;
		ivar5 = divide(subtract(getWidgetActualWidth(new WidgetPointer(1143,32)), multiply(ivar2, ivar6)), add(ivar2, 1));
		ivar8 = ivar5;
		deleteAllExtraChilds(new WidgetPointer(1143,32));
		deleteAllExtraChilds(new WidgetPointer(1143,20));
		ivar9 = 0;
		while (ivar9 < ivar2) {
			switch (ivar9) {
				case 0:
					ivar11 = arg0;
					break;
				case 1:
					ivar11 = getOtherCommonData(arg0, 1947);
					break;
				case 2:
					ivar11 = getOtherCommonData(arg0, 1948);
					break;
				case 3:
					ivar11 = getOtherCommonData(arg0, 1949);
					break;
				case 4:
					ivar11 = getOtherCommonData(arg0, 1950);
			}
			createExtraChild(new WidgetPointer(1143,32), 3, ivar3);
			ivar3 = add(ivar3, 1);
			setWidgetRGB(new Color(0, 0, 0));
			setWidgetSize(ivar6, ivar7, 0, 0);
			setWidgetPosition(ivar8, 0, 0, 0);
			cs2method2103(100);
			setWidgetFilled(1);
			if (ivar2 > 1) {
				createExtraChild(new WidgetPointer(1143,20), 4, ivar4);
				setWidgetSize(ivar6, ivar7, 0, 0);
				setWidgetPosition(ivar8, 0, 0, 0);
				setWidgetContextMenuOption(1, "Select");
				setScriptCallOnClickContextMenu(5358, ivar4, new WidgetPointer(1143,32), "iI");
				ivar4 = add(ivar4, 1);
			}
			createExtraChild(new WidgetPointer(1143,32), 5, ivar3);
			setWidgetSprite(7766);
			setWidgetSize(ivar6, ivar7, 0, 0);
			setWidgetPosition(ivar8, 0, 0, 0);
			if (ivar2 > 1) {
				setScriptCallOnMouseEntered(5356, ivar3, new WidgetPointer(1143,32), ivar11, "iIJ");
				setScriptCallOnMouseExit(5357, ivar3, new WidgetPointer(1143,32), "iI");
			}
			ivar3 = add(ivar3, 1);
			createExtraChild(new WidgetPointer(1143,32), 5, ivar3);
			ivar3 = add(ivar3, 1);
			if (((boolean)getOtherCommonData(ivar11, 1937))) {
				setWidgetSize(36, 32, 0, 0);
				setWidgetPosition(add(add(ivar8, divide(subtract(ivar6, getWidgetActualWidth()), 2)), 2), add(divide(subtract(ivar7, getWidgetActualHeight()), 2), 1), 0, 0);
				setItemOnWidgetMethod1200(getOtherCommonData(ivar11, 1935), -1);
			} else if (getOtherCommonData(ivar11, 1937) == 2) {
				setWidgetSprite(getOtherCommonData(ivar11, 1420));
				setWidgetSize(48, 48, 0, 0);
				setWidgetPosition(add(ivar8, divide(subtract(ivar6, getWidgetActualWidth()), 2)), divide(subtract(ivar7, getWidgetActualHeight()), 2), 0, 0);
			} else if (getOtherCommonData(ivar11, 1937) == 3) {
				setWidgetSprite(getOtherCommonData(ivar11, 1441));
				setWidgetSize(40, 50, 0, 0);
				setWidgetPosition(add(ivar8, divide(subtract(ivar6, getWidgetActualWidth()), 2)), divide(subtract(ivar7, getWidgetActualHeight()), 2), 0, 0);
			} else if (getOtherCommonData(ivar11, 1937) == 4) {
				setWidgetSprite(7883);
				setWidgetSize(42, 42, 0, 0);
				setWidgetPosition(add(add(ivar8, divide(subtract(ivar6, getWidgetActualWidth()), 2)), 1), add(divide(subtract(ivar7, getWidgetActualHeight()), 2), 1), 0, 0);
			} else {
				if (getOtherCommonData(ivar11, 1937) == 5) {
					setWidgetSize(36, 32, 0, 0);
					setWidgetPosition(add(ivar8, divide(subtract(ivar6, getWidgetActualWidth()), 2)), divide(subtract(ivar7, getWidgetActualHeight()), 2), 0, 0);
					setItemOnWidgetMethod1200(getOtherCommonData(ivar11, 1935), -1);
				}
			}
			ivar8 = add(add(ivar8, ivar6), ivar5);
			ivar9 = add(ivar9, 1);
		}
		return;
}
