/* 
 * Script decompiled by jagdecs2 v3.2
 * Decompiler opts:
 * --------------
 * t1LocalAnalyzer:true
 * t2LocalAnalyzer:true
 * beautifier:true
 * --------------
 * Made by mgi125 ;)
 */


void script_3678(int a0,int a1,int a2,int a3) {
	cs2method_10026(65994760, "Take your statue pieces to the statue in the Varrock Museum.");
	cs2method_10273(a3);
	cs2method_10273(a1);
	cs2method_10273(a2);
	cs2method_10273(a0);
	for (int v1 = 0, int v9 = 5, int v8 = 0, int v2 = 36, int v10 = 32, int v0 = 0, int v3 = 0, int v7 = 0, int v5 = 0, object v4 = "You have added this skill's pieces to the statue."; v1 < 30; v1 = cs2method_10060(v1, 1)) {
		int v6 = cs2method_10051(v0, cs2method_10060(v8, 35));
		cs2method_10606(a3, 5, v1);
		cs2method_10013(v2, v10, 0, 0);
		cs2method_10903(idx17mapData('i', 'o', 3272, v1), cs2method_10441(cs2_configs['cfg1352'], v1));
		if (cs2method_10038(v1, 2) == 0) {
			cs2method_10606(a2, 5, v7);
			cs2method_10013(35, 35, 0, 0);
			if (v1 < 16) {
				cs2method_10063(0, v6, 0, 0);
			} else {
				cs2method_10063(cs2method_10060(v9, cs2method_10968(cs2method_10236(a2), 2)), v6, 0, 0);
			}
			int v12 = cs2method_10878();
			cs2method_10310(idx17mapData('i', 'd', 8283, v7));
			cs2method_10606(a1, 4, v7);
			cs2method_10013(90, 35, 0, 0);
			cs2method_10063(cs2method_10060(cs2method_10060(v12, v8), 35), v6, 0, 0);
			int v11 = cs2method_10878();
			cs2method_10797(idx17mapData('i', 's', 8284, v7));
			cs2method_10692(20452);
			cs2method_10811(7705248);
			cs2method_11105(0, 1, 0);
			cs2method_10063(cs2method_10060(v11, cs2method_10488()), v6, 0, 0);
			v5 = cs2method_10878();
			cs2method_10606(a0, 5, v7);
			cs2method_10013(25, 25, 0, 0);
			cs2method_10063(cs2method_10060(cs2method_10060(v5, cs2method_10051(2, cs2method_10488())), v9), cs2method_10060(v6, 5), 0, 0);
			if (script_9555(itemDefsAttribute(idx17mapData('i', 'o', 3272, v1), 25)) == 1) {
				object v13 = "You have added this skill's pieces to the statue.";
				cs2method_10310(19713);
				cs2method_20353(new function<script_8799>(object a0,int a1,int a2) {
					script_8800(a1, a2, a0);
					return;
				}, (string)v13, new WidgetPointer(a0), v7, "sIi");
			} else {
				object v13 = "You have not added this skill's pieces to the statue.";
				cs2method_10310(19712);
				cs2method_20353(new function<script_8799>(int a0,int a1,object a2) {
					script_8800(a1, a0, a2);
					return;
				}, (string)v13, new WidgetPointer(a0), v7, "sIi");
			}
			v7 = cs2method_10060(v7, 1);
		} else {
			cs2method_10063(cs2method_10060(v5, v2), v6, 0, 0);
			v0 = cs2method_10060(v0, 1);
			if (v0 == 8) {
				v0 = 0;
			}
		}
		if (cs2method_10441(cs2_configs['cfg1352'], v1) == 1) {
			cs2method_10057(1, "Take" + "<col=ff9040>");
			cs2method_10356(2);
			cs2method_10012(1, 45);
		} else {
			cs2method_10002(100);
		}
		cs2method_10057(5, "Examine" + "<col=ff9040>");
		cs2method_10200("<col=ff981f>" + idx17mapData('i', 's', 3274, v1) + " Piece");
		cs2method_20703(new function<script_3679>(int a0,int a1) {
			cs2method_10495(a1);
			cs2method_11127(5, a1, "Examine" + "<col=ff9040>");
			cs2method_10316(a1, "<col=ff981f>" + idx17mapData('i', 's', 3274, a0) + " Piece");
			return;
		}, new WidgetPointer(-32768,3), v1, "Ii");
	}
	return;
}
