void script_770(int arg0,int arg1,int arg2,int arg3,int arg4,int arg5,int arg6,int arg7,int arg8,int arg9,int arg10,int arg11,int arg12,int arg13,int arg14,int arg15,int arg16,int arg17,int arg18,int arg19,int arg20,int arg21,int arg22,int arg23,string arg24) {
	int ivar24;
	int ivar25;
	int ivar26;
	int ivar27;
	int ivar28;
	int ivar29;
	int ivar30;
	int ivar31;
	deleteAllExtraChilds(new WidgetPointer(arg1));
	ivar24 = getLineCount(177, 495, "Level " + intToStr(arg3) + ": " + arg24);
	ivar25 = add(2, multiply(13, ivar24));
	ivar26 = add(2, multiply(13, getLineCount(177, 494, "To craft this you need")));
	ivar27 = add(add(add(add(add(2, ivar25), ivar26), 32), 14), 2);
	ivar28 = 5;
	ivar29 = 5;
	ivar30 = 1;
	ivar31 = 1;
	if (setWidgetRegister(new WidgetPointer(arg2), arg0)) {
		if (arg4 == -1) {
			ivar27 = subtract(subtract(ivar27, 32), 14);
		}
		if (ivar24 > 1) {
			if (arg12 != -1) {
				ivar27 = add(ivar27, 57);
			}
		} else {
			if (arg12 != -1) {
				ivar27 = add(add(ivar27, 32), 14);
			}
		}
		ivar28 = add(subtract(getWidgetActualY(), cs2method2601(new WidgetPointer(arg2))), 110);
		if (ivar28 > 200) {
			ivar28 = add(subtract(subtract(getWidgetActualY(), cs2method2601(new WidgetPointer(arg2))), ivar27), 45);
		}
		ivar29 = subtract(getWidgetActualX(), 60);
		if (ivar29 < 0) {
			ivar29 = 5;
		}
		if (ivar29 > 270) {
			ivar29 = 285;
		}
		createExtraChild(new WidgetPointer(arg1), 3, 0);
		setWidgetPosition(ivar29, ivar28, 0, 0);
		setWidgetSize(180, ivar27, 0, 0);
		setWidgetFilled(1);
		setWidgetRGB(new Color(0, 0, 0));
		cs2method2103(42);
		createExtraChild(new WidgetPointer(arg1), 3, 1);
		setWidgetPosition(add(ivar29, 1), add(ivar28, 1), 0, 0);
		setWidgetSize(179, subtract(ivar27, 1), 0, 0);
		setWidgetFilled(0);
		setWidgetRGB(new Color(46, 43, 35));
		createExtraChild(new WidgetPointer(arg1), 3, 2);
		setWidgetPosition(ivar29, ivar28, 0, 0);
		setWidgetSize(179, subtract(ivar27, 1), 0, 0);
		setWidgetFilled(0);
		setWidgetRGB(new Color(114, 100, 81));
		createExtraChild(new WidgetPointer(arg1), 4, 3);
		setWidgetPosition(add(ivar29, 2), add(ivar28, 2), 0, 0);
		setWidgetSize(177, ivar25, 0, 0);
		setWidgetTextAlignment(1, 1, 0);
		setWidgetFont(495);
		setWidgetRGB(new Color(255, 152, 31));
		setWidgetUnknownBoolean(false);
		setWidgetText("Level " + intToStr(arg3) + ": " + arg24);
		createExtraChild(new WidgetPointer(arg1), 4, 4);
		setWidgetPosition(ivar29, add(add(ivar28, 2), ivar25), 0, 0);
		setWidgetSize(177, ivar26, 0, 0);
		setWidgetTextAlignment(1, 1, 0);
		setWidgetFont(494);
		setWidgetRGB(new Color(175, 106, 26));
		setWidgetUnknownBoolean(false);
		setWidgetText("This item requires");
		if (arg6 != -1) {
			ivar30 = 2;
		}
		if (arg8 != -1) {
			ivar30 = 3;
		}
		if (arg10 != -1) {
			ivar30 = 4;
		}
		ivar31 = divide(subtract(190, multiply(ivar30, 35)), add(ivar30, 1));
		if (arg4 != -1) {
			createExtraChild(new WidgetPointer(arg1), 5, 5);
			setWidgetPosition(add(ivar29, ivar31), add(add(add(ivar28, 2), ivar25), ivar26), 0, 0);
			setWidgetSize(35, 32, 0, 0);
			setItemOnWidgetMethod1200(arg4, -1);
			createExtraChild(new WidgetPointer(arg1), 4, 6);
			setWidgetPosition(add(ivar29, ivar31), add(add(add(add(ivar28, 2), ivar25), ivar26), 32), 0, 0);
			setWidgetSize(35, 14, 0, 0);
			setWidgetTextAlignment(1, 1, 0);
			setWidgetFont(494);
			if (script_771(arg4) >= arg5) {
				setWidgetRGB(new Color(0, 255, 0));
			} else {
				setWidgetRGB(new Color(255, 0, 0));
			}
			setWidgetUnknownBoolean(false);
			setWidgetText(script_781(script_771(arg4)) + "/" + intToStr(arg5));
		}
		if (arg6 != -1) {
			createExtraChild(new WidgetPointer(arg1), 5, 7);
			setWidgetPosition(add(add(ivar29, multiply(ivar31, 2)), 35), add(add(add(ivar28, 2), ivar25), ivar26), 0, 0);
			setWidgetSize(35, 32, 0, 0);
			setItemOnWidgetMethod1200(arg6, -1);
			createExtraChild(new WidgetPointer(arg1), 4, 8);
			setWidgetPosition(add(add(ivar29, multiply(ivar31, 2)), 35), add(add(add(add(ivar28, 2), ivar25), ivar26), 32), 0, 0);
			setWidgetSize(35, 14, 0, 0);
			setWidgetTextAlignment(1, 1, 0);
			setWidgetFont(494);
			if (script_771(arg6) >= arg7) {
				setWidgetRGB(new Color(0, 255, 0));
			} else {
				setWidgetRGB(new Color(255, 0, 0));
			}
			setWidgetUnknownBoolean(false);
			setWidgetText(script_780(script_771(arg6)) + "/" + intToStr(arg7));
		}
		if (arg8 != -1) {
			createExtraChild(new WidgetPointer(arg1), 5, 9);
			setWidgetPosition(add(add(ivar29, multiply(ivar31, 3)), 70), add(add(add(ivar28, 2), ivar25), ivar26), 0, 0);
			setWidgetSize(35, 32, 0, 0);
			setItemOnWidgetMethod1200(arg8, -1);
			createExtraChild(new WidgetPointer(arg1), 4, 10);
			setWidgetPosition(add(add(ivar29, multiply(ivar31, 3)), 70), add(add(add(add(ivar28, 2), ivar25), ivar26), 32), 0, 0);
			setWidgetSize(35, 14, 0, 0);
			setWidgetTextAlignment(1, 1, 0);
			setWidgetFont(494);
			if (script_771(arg8) >= arg9) {
				setWidgetRGB(new Color(0, 255, 0));
			} else {
				setWidgetRGB(new Color(255, 0, 0));
			}
			setWidgetUnknownBoolean(false);
			setWidgetText(script_780(script_771(arg8)) + "/" + intToStr(arg9));
		}
		if (arg10 != -1) {
			createExtraChild(new WidgetPointer(arg1), 5, 11);
			setWidgetPosition(add(add(ivar29, multiply(ivar31, 4)), 105), add(add(add(ivar28, 2), ivar25), ivar26), 0, 0);
			setWidgetSize(35, 32, 0, 0);
			setItemOnWidgetMethod1200(arg10, -1);
			createExtraChild(new WidgetPointer(arg1), 4, 12);
			setWidgetPosition(add(add(ivar29, multiply(ivar31, 4)), 105), add(add(add(add(ivar28, 2), ivar25), ivar26), 32), 0, 0);
			setWidgetSize(35, 14, 0, 0);
			setWidgetTextAlignment(1, 1, 0);
			setWidgetFont(494);
			if (script_771(arg10) >= arg11) {
				setWidgetRGB(new Color(0, 255, 0));
			} else {
				setWidgetRGB(new Color(255, 0, 0));
			}
			setWidgetUnknownBoolean(false);
			setWidgetText(script_780(script_771(arg10)) + "/" + intToStr(arg11));
		}
		if (arg12 != -1) {
			createExtraChild(new WidgetPointer(arg1), 5, 13);
			setWidgetPosition(add(ivar29, ivar31), add(add(add(ivar28, 16), multiply(2, ivar25)), multiply(2, ivar26)), 0, 0);
			setWidgetSize(35, 32, 0, 0);
			setItemOnWidgetMethod1200(arg12, -1);
			createExtraChild(new WidgetPointer(arg1), 4, 14);
			setWidgetPosition(add(ivar29, ivar31), add(add(add(add(ivar28, 16), multiply(2, ivar25)), multiply(2, ivar26)), 32), 0, 0);
			setWidgetSize(35, 14, 0, 0);
			setWidgetTextAlignment(1, 1, 0);
			setWidgetFont(494);
			if (script_771(arg12) >= arg13) {
				setWidgetRGB(new Color(0, 255, 0));
			} else {
				setWidgetRGB(new Color(255, 0, 0));
			}
			setWidgetUnknownBoolean(false);
			setWidgetText(script_780(script_771(arg12)) + "/" + intToStr(arg13));
		}
		if (arg14 != -1) {
			createExtraChild(new WidgetPointer(arg1), 5, 15);
			setWidgetPosition(add(add(ivar29, multiply(ivar31, 2)), 35), add(add(add(ivar28, 16), multiply(2, ivar25)), multiply(2, ivar26)), 0, 0);
			setWidgetSize(35, 32, 0, 0);
			setItemOnWidgetMethod1200(arg14, -1);
			createExtraChild(new WidgetPointer(arg1), 4, 16);
			setWidgetPosition(add(add(ivar29, multiply(ivar31, 2)), 35), add(add(add(add(ivar28, 16), multiply(2, ivar25)), multiply(2, ivar26)), 32), 0, 0);
			setWidgetSize(35, 14, 0, 0);
			setWidgetTextAlignment(1, 1, 0);
			setWidgetFont(494);
			if (script_771(arg14) >= arg15) {
				setWidgetRGB(new Color(0, 255, 0));
			} else {
				setWidgetRGB(new Color(255, 0, 0));
			}
			setWidgetUnknownBoolean(false);
			setWidgetText(script_780(script_771(arg14)) + "/" + intToStr(arg15));
		}
		if (arg16 != -1) {
			createExtraChild(new WidgetPointer(arg1), 5, 15);
			setWidgetPosition(add(add(add(ivar29, multiply(ivar31, 3)), 35), 2), add(add(add(ivar28, 16), multiply(2, ivar25)), multiply(2, ivar26)), 0, 0);
			setWidgetSize(35, 32, 0, 0);
			setItemOnWidgetMethod1200(arg16, -1);
			createExtraChild(new WidgetPointer(arg1), 4, 16);
			setWidgetPosition(add(add(add(ivar29, multiply(ivar31, 3)), 35), 2), add(add(add(add(ivar28, 16), multiply(2, ivar25)), multiply(2, ivar26)), 32), 0, 0);
			setWidgetSize(35, 14, 0, 0);
			setWidgetTextAlignment(1, 1, 0);
			setWidgetFont(494);
			if (script_771(arg16) >= arg17) {
				setWidgetRGB(new Color(0, 255, 0));
			} else {
				setWidgetRGB(new Color(255, 0, 0));
			}
			setWidgetUnknownBoolean(false);
			setWidgetText(script_780(script_771(arg16)) + "/" + intToStr(arg17));
		}
		if (arg18 != -1) {
			createExtraChild(new WidgetPointer(arg1), 5, 15);
			setWidgetPosition(add(add(add(ivar29, multiply(ivar31, 4)), 35), 3), add(add(add(ivar28, 16), multiply(2, ivar25)), multiply(2, ivar26)), 0, 0);
			setWidgetSize(35, 32, 0, 0);
			setItemOnWidgetMethod1200(arg18, -1);
			createExtraChild(new WidgetPointer(arg1), 4, 16);
			setWidgetPosition(add(add(add(ivar29, multiply(ivar31, 4)), 35), 3), add(add(add(add(ivar28, 16), multiply(2, ivar25)), multiply(2, ivar26)), 32), 0, 0);
			setWidgetSize(35, 14, 0, 0);
			setWidgetTextAlignment(1, 1, 0);
			setWidgetFont(494);
			if (script_771(arg18) >= arg19) {
				setWidgetRGB(new Color(0, 255, 0));
			} else {
				setWidgetRGB(new Color(255, 0, 0));
			}
			setWidgetUnknownBoolean(false);
			setWidgetText(script_780(script_771(arg18)) + "/" + intToStr(arg19));
		}
	}
	return;
}
