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


void script_6682(int a0,int a1) {
	int v1 = 0;
	if (cs2method_11038(a1, a0) == 1) {
		int v0 = cs2method_11048(cs2method_10461(cs2method_10699(), 15), 0);
		cs2method_10002(v0);
		if (cs2method_11038(a1, cs2method_10060(a0, 1)) == 1) {
			cs2method_10002(v0);
		}
		if (cs2method_11038(a1, cs2method_10060(a0, 2)) == 1) {
			cs2method_10002(v0);
		}
	}
	cs2method_20162(new function<script_6683>(int a0,int a1,int a2) {
		if (cs2method_10133() < a2) {
			return;
		}
		int v0 = 0;
		if (cs2method_11038(a1, a0) == 1) {
			int v1 = cs2method_10872(cs2method_10060(cs2method_10699(), 15), 255);
			cs2method_10002(v1);
			if (cs2method_11038(a1, cs2method_10060(a0, 1)) == 1) {
				cs2method_10002(v1);
			}
			if (cs2method_11038(a1, cs2method_10060(a0, 2)) == 1) {
				cs2method_10002(v1);
			}
			if (v1 >= 255) {
				cs2method_20162(new function<none>() {
				}, "", new WidgetPointer(a1));
			}
		} else {
			cs2method_20162(new function<none>() {
			}, "", new WidgetPointer(a1));
		}
		return;
	}, new WidgetPointer(-32768,3), a0, cs2method_10060(cs2method_10133(), 1), "Iii", new WidgetPointer(a1));
	return;
}
