void script_547(int arg0,int arg1,int arg2) {
	int ivar3;
	int ivar4;
	int ivar5;
	int ivar6;
	int ivar7;
	int ivar8;
	int ivar9;
	int ivar10;
	int ivar11;
	int ivar12;
	int ivar13;
	int ivar14;
	int ivar15;
	int ivar16;
	int ivar17;
	int ivar18;
	int ivar19;
	int ivar20;
	int ivar21;
	int ivar22;
	int ivar23;
	int ivar24;
	int ivar25;
	int ivar26;
	string svar0;
	string svar1;
	string svar2;
	string svar3;
	string svar4;
	string svar5;
	int stack_dump0;
	cs2func_script_4037_struct(3,0,0) structdump_1;
	svar0 = "";
	svar1 = "";
	ivar3 = 2;
	if ((getSkillActualLvl(arg1) < 99) || ((arg1 == 24) && (getSkillActualLvl(arg1) < 120))) {
		svar0 = script_46(cs2method_3408(105, 105, 716, add(getSkillActualLvl(arg1), 1)), ",");
		svar1 = script_46(subtract(cs2method_3408(105, 105, 716, add(getSkillActualLvl(arg1), 1)), getSkillXp(arg1)), ",");
		ivar3 = 4;
	}
	ivar4 = script_4036(cs2method_3408(83, 105, 1482, arg1));
	if (((boolean)ivar4)) {
		ivar3 = add(ivar3, 3);
	}
	ivar5 = 0;
	ivar6 = 0;
	ivar7 = 0;
	stack_dump0 = cs2method_3408(83, 105, 1482, arg1);
	structdump_1 = script_4037(stack_dump0);
	ivar6 = structdump_1.intpart_2;
	ivar5 = structdump_1.intpart_1;
	ivar7 = structdump_1.intpart_0;
	svar2 = script_46(ivar5, ",");
	svar3 = cs2method_3408(83, 115, 680, arg1) + ": " + intToStr(getSkillCurrentLvl(arg1)) + "/" + intToStr(getSkillActualLvl(arg1));
	svar4 = script_46(getSkillXp(arg1), ",");
	ivar8 = ivar5;
	if (((boolean)ivar7)) {
		ivar8 = cs2method_3408(105, 105, 716, ivar5);
	}
	ivar9 = max(0, subtract(ivar8, getSkillXp(arg1)));
	svar5 = script_46(ivar9, ",");
	if ((((boolean)getSkillActualLvl(arg1)) && (cs2method_3408(83, 83, 744, arg1) == -1)) && isSiteSettingsMembers()) {
		ivar3 = 1;
		svar3 = "Members' Skill";
	}
	ivar10 = add(getMaxLineWidth(190, 495, svar3), 10);
	ivar11 = getMaxLineWidth(190, 495, "Current Xp:");
	ivar12 = getMaxLineWidth(190, 495, svar4);
	ivar13 = add(add(ivar11, 10), ivar12);
	ivar14 = 0;
	ivar15 = 0;
	ivar10 = max(ivar10, ivar13);
	if ((getSkillActualLvl(arg1) < 99) || ((arg1 == 24) && (getSkillActualLvl(arg1) < 120))) {
		ivar11 = getMaxLineWidth(190, 495, "Next level:");
		ivar12 = getMaxLineWidth(190, 495, svar0);
		ivar13 = add(add(ivar11, 3), ivar12);
	} else {
		ivar13 = 0;
	}
	ivar10 = max(ivar10, ivar13);
	if ((getSkillActualLvl(arg1) < 99) || ((arg1 == 24) && (getSkillActualLvl(arg1) < 120))) {
		ivar11 = getMaxLineWidth(190, 495, "Remainder:");
		ivar12 = getMaxLineWidth(190, 495, svar1);
		ivar13 = add(add(ivar11, 3), ivar12);
	} else {
		ivar13 = 0;
	}
	ivar10 = max(ivar10, ivar13);
	if (((boolean)ivar4)) {
		if (((boolean)ivar7)) {
			ivar11 = getMaxLineWidth(190, 495, "Target lvl:");
			ivar12 = getMaxLineWidth(190, 495, svar2);
		} else {
			ivar11 = getMaxLineWidth(190, 495, "Target xp:");
			ivar12 = getMaxLineWidth(190, 495, svar2);
		}
		ivar13 = add(add(ivar11, 3), ivar12);
	} else {
		ivar13 = 0;
	}
	ivar10 = max(ivar10, ivar13);
	if (((boolean)ivar4)) {
		ivar11 = getMaxLineWidth(190, 495, "Remainder:");
		ivar12 = getMaxLineWidth(190, 495, svar5);
		ivar13 = add(add(ivar11, 3), ivar12);
	} else {
		ivar13 = 0;
	}
	ivar10 = max(ivar10, ivar13);
	ivar11 = add(script_3365(arg0), 40);
	ivar12 = add(script_3366(arg0), 50);
	if (add(add(ivar11, ivar10), 4) > 190) {
		ivar11 = subtract(190, add(ivar10, 4));
	}
	if (add(add(ivar12, multiply(ivar3, 14)), 4) > getWidgetActualHeight(new WidgetPointer(arg2))) {
		ivar12 = subtract(script_3366(arg0), add(multiply(ivar3, 14), 4));
	}
	if ((((boolean)getSkillActualLvl(arg1)) && (cs2method_3408(83, 83, 744, arg1) == -1)) && isSiteSettingsMembers()) {
		createExtraChild(new WidgetPointer(arg2), 3, 0);
		setWidgetSize(add(ivar10, 4), add(4, multiply(ivar3, 14)), 0, 0);
		setWidgetPosition(ivar11, ivar12, 0, 0);
		setWidgetFilled(1);
		setWidgetRGB(new Color(255, 255, 160));
		createExtraChild(new WidgetPointer(arg2), 3, 1);
		setWidgetSize(add(ivar10, 4), add(4, multiply(ivar3, 14)), 0, 0);
		setWidgetPosition(ivar11, ivar12, 0, 0);
		setWidgetFilled(0);
		setWidgetRGB(new Color(0, 0, 0));
		createExtraChild(new WidgetPointer(arg2), 4, 2);
		setWidgetPosition(add(ivar11, 2), add(ivar12, 2), 0, 0);
		setWidgetSize(ivar10, 16, 0, 0);
		setWidgetFont(495);
		setWidgetTextAlignment(0, 0, 0);
		setWidgetUnknownBoolean(false);
		setWidgetText(svar3);
		return;
	}
	ivar16 = 0;
	ivar17 = 2;
	ivar18 = 0;
	ivar19 = 0;
	ivar20 = 0;
	ivar21 = 0;
	ivar22 = 0;
	createExtraChild(new WidgetPointer(arg2), 3, ivar16);
	ivar23 = add(4, multiply(ivar3, 14));
	if (((boolean)ivar4)) {
		ivar23 = add(ivar23, 6);
	}
	setWidgetSize(add(ivar10, 4), ivar23, 0, 0);
	setWidgetPosition(ivar11, ivar12, 0, 0);
	setWidgetFilled(1);
	setWidgetRGB(new Color(255, 255, 160));
	ivar16 = add(ivar16, 1);
	createExtraChild(new WidgetPointer(arg2), 3, ivar16);
	setWidgetSize(add(ivar10, 4), ivar23, 0, 0);
	setWidgetPosition(ivar11, ivar12, 0, 0);
	setWidgetFilled(0);
	setWidgetRGB(new Color(0, 0, 0));
	ivar16 = add(ivar16, 1);
	createExtraChild(new WidgetPointer(arg2), 4, ivar16);
	ivar18 = ivar16;
	setWidgetPosition(add(ivar11, 2), add(ivar12, ivar17), 0, 0);
	setWidgetSize(ivar10, 16, 0, 0);
	setWidgetFont(495);
	setWidgetTextAlignment(0, 0, 0);
	setWidgetUnknownBoolean(false);
	setWidgetText(svar3);
	ivar16 = add(ivar16, 1);
	ivar17 = add(ivar17, 14);
	createExtraChild(new WidgetPointer(arg2), 4, ivar16);
	setWidgetPosition(add(ivar11, 2), add(ivar12, ivar17), 0, 0);
	setWidgetSize(ivar10, 16, 0, 0);
	setWidgetFont(495);
	setWidgetTextAlignment(0, 0, 0);
	setWidgetUnknownBoolean(false);
	setWidgetText("Current Xp:");
	ivar16 = add(ivar16, 1);
	createExtraChild(new WidgetPointer(arg2), 4, ivar16);
	ivar19 = ivar16;
	setWidgetPosition(add(ivar11, 2), add(ivar12, ivar17), 0, 0);
	setWidgetSize(ivar10, 16, 0, 0);
	setWidgetFont(495);
	setWidgetTextAlignment(2, 0, 0);
	setWidgetUnknownBoolean(false);
	setWidgetText(svar4);
	ivar16 = add(ivar16, 1);
	ivar17 = add(ivar17, 14);
	ivar24 = 0;
	ivar25 = 0;
	if ((getSkillActualLvl(arg1) < 99) || ((arg1 == 24) && (getSkillActualLvl(arg1) < 120))) {
		createExtraChild(new WidgetPointer(arg2), 4, ivar16);
		setWidgetPosition(add(ivar11, 2), add(ivar12, ivar17), 0, 0);
		setWidgetSize(ivar10, 16, 0, 0);
		setWidgetFont(495);
		setWidgetTextAlignment(0, 0, 0);
		setWidgetUnknownBoolean(false);
		setWidgetText("Next level:");
		ivar16 = add(ivar16, 1);
		createExtraChild(new WidgetPointer(arg2), 4, ivar16);
		setWidgetPosition(add(ivar11, 2), add(ivar12, ivar17), 0, 0);
		setWidgetSize(ivar10, 16, 0, 0);
		setWidgetFont(495);
		setWidgetTextAlignment(2, 0, 0);
		setWidgetUnknownBoolean(false);
		setWidgetText(svar0);
		ivar16 = add(ivar16, 1);
		ivar17 = add(ivar17, 14);
		createExtraChild(new WidgetPointer(arg2), 4, ivar16);
		setWidgetPosition(add(ivar11, 2), add(ivar12, ivar17), 0, 0);
		setWidgetSize(ivar10, 16, 0, 0);
		setWidgetFont(495);
		setWidgetTextAlignment(0, 0, 0);
		setWidgetUnknownBoolean(false);
		setWidgetText("Remainder:");
		ivar16 = add(ivar16, 1);
		createExtraChild(new WidgetPointer(arg2), 4, ivar16);
		ivar20 = ivar16;
		setWidgetPosition(add(ivar11, 2), add(ivar12, ivar17), 0, 0);
		setWidgetSize(ivar10, 16, 0, 0);
		setWidgetFont(495);
		setWidgetTextAlignment(2, 0, 0);
		setWidgetUnknownBoolean(false);
		setWidgetText(svar1);
		ivar16 = add(ivar16, 1);
		ivar17 = add(ivar17, 14);
	}
	ivar26 = 0;
	if (((boolean)ivar4)) {
		createExtraChild(new WidgetPointer(arg2), 4, ivar16);
		setWidgetPosition(add(ivar11, 2), add(ivar12, ivar17), 0, 0);
		setWidgetSize(ivar10, 16, 0, 0);
		setWidgetFont(495);
		setWidgetTextAlignment(0, 0, 0);
		setWidgetUnknownBoolean(false);
		if (((boolean)ivar7)) {
			setWidgetText("Target lvl:");
		} else {
			setWidgetText("Target XP:");
		}
		ivar16 = add(ivar16, 1);
		createExtraChild(new WidgetPointer(arg2), 4, ivar16);
		setWidgetPosition(add(ivar11, 2), add(ivar12, ivar17), 0, 0);
		setWidgetSize(ivar10, 16, 0, 0);
		setWidgetFont(495);
		setWidgetTextAlignment(2, 0, 0);
		setWidgetUnknownBoolean(false);
		if (((boolean)ivar7)) {
			setWidgetText(svar2);
		} else {
			setWidgetText(svar2);
		}
		ivar16 = add(ivar16, 1);
		ivar17 = add(ivar17, 14);
		createExtraChild(new WidgetPointer(arg2), 4, ivar16);
		setWidgetPosition(add(ivar11, 2), add(ivar12, ivar17), 0, 0);
		setWidgetSize(ivar10, 16, 0, 0);
		setWidgetFont(495);
		setWidgetTextAlignment(0, 0, 0);
		setWidgetUnknownBoolean(false);
		setWidgetText("Remainder:");
		ivar16 = add(ivar16, 1);
		createExtraChild(new WidgetPointer(arg2), 4, ivar16);
		setWidgetPosition(add(ivar11, 2), add(ivar12, ivar17), 0, 0);
		setWidgetSize(ivar10, 16, 0, 0);
		setWidgetFont(495);
		setWidgetTextAlignment(2, 0, 0);
		setWidgetUnknownBoolean(false);
		setWidgetText(svar5);
		ivar21 = ivar16;
		ivar16 = add(ivar16, 1);
		ivar17 = add(ivar17, 17);
		createExtraChild(new WidgetPointer(arg2), 3, ivar16);
		setWidgetPosition(add(ivar11, 4), add(ivar12, ivar17), 0, 0);
		setWidgetSize(subtract(ivar10, 4), 16, 0, 0);
		setWidgetFilled(1);
		setWidgetRGB(new Color(255, 0, 0));
		ivar16 = add(ivar16, 1);
		createExtraChild(new WidgetPointer(arg2), 3, ivar16);
		ivar26 = ivar16;
		setWidgetPosition(add(ivar11, 4), add(ivar12, ivar17), 0, 0);
		setWidgetFilled(1);
		setWidgetRGB(new Color(0, 255, 0));
		ivar16 = add(ivar16, 1);
		if (((boolean)ivar7)) {
			ivar24 = cs2method_3408(105, 105, 716, ivar6);
			ivar25 = cs2method_3408(105, 105, 716, ivar5);
			if (subtract(ivar25, ivar24) != 0) {
				ivar14 = multiplyDivide(subtract(getSkillXp(arg1), ivar24), subtract(ivar25, ivar24), 100);
			} else {
				ivar14 = -1;
			}
		} else if (subtract(ivar5, ivar6) != 0) {
			ivar14 = multiplyDivide(subtract(getSkillXp(arg1), ivar6), subtract(ivar5, ivar6), 100);
		} else {
			ivar14 = -1;
		}
		if (ivar14 > 100) {
			ivar14 = 100;
		}
		ivar14 = max(ivar14, 0);
		ivar15 = multiply(ivar14, add(4, ivar10));
		ivar15 = divide(ivar15, 100);
		setWidgetSize(ivar15, 16, 0, 0);
		createExtraChild(new WidgetPointer(arg2), 3, ivar16);
		setWidgetPosition(add(ivar11, 4), add(ivar12, ivar17), 0, 0);
		setWidgetSize(subtract(ivar10, 4), 16, 0, 0);
		ivar16 = add(ivar16, 1);
		createExtraChild(new WidgetPointer(arg2), 4, ivar16);
		setWidgetSize(getTextWidth(495, intToStr(ivar14) + "%"), 16, 0, 0);
		setWidgetPosition(add(subtract(add(ivar11, divide(ivar10, 2)), divide(getWidgetActualWidth(), 2)), 2), add(add(ivar12, ivar17), 1), 0, 0);
		setWidgetFont(495);
		setWidgetTextAlignment(1, 0, 0);
		setWidgetUnknownBoolean(false);
		setWidgetRGB(new Color(255, 255, 255));
		if (ivar14 > 47) {
			setWidgetRGB(new Color(0, 0, 0));
		}
		setWidgetText(intToStr(ivar14) + "%");
		ivar22 = ivar16;
		ivar16 = add(ivar16, 1);
	}
	if (setWidgetRegister(new WidgetPointer(arg2), 0)) {
		setScriptCallOnSkillChange(548, ivar18, ivar19, ivar20, ivar21, ivar22, ivar26, ivar10, arg1, new WidgetPointer(arg0), new WidgetPointer(arg2), arg1, 1, "iiiiiiiSIIY");
	}
	return;
}
