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


void script_7280() {
	script_4542(client_configs['cfg3407'].bitcfg17126, 60031312, 60031317);
	object v1 = (string)cs2method_10379(client_configs['cfg3408']) + " / " + (string)cs2method_10379(client_configs['cfg3411']);
	cs2method_21121(new function<script_8799>(int a0,int a1,object a2) {
		script_8800(a1, a0, a2);
		return;
	}, (string)v1, new WidgetPointer(-32768,3), -1, "sIi", new WidgetPointer(916,331));
	script_4542(client_configs['cfg3407'].bitcfg17127, 60031324, 60031329);
	object v7 = (string)cs2method_10379(client_configs['cfg3409']) + " / " + (string)cs2method_10379(client_configs['cfg3412']);
	cs2method_21121(new function<script_8799>(object a0,int a1,int a2) {
		script_8800(a2, a1, a0);
		return;
	}, (string)v7, new WidgetPointer(-32768,3), -1, "sIi", new WidgetPointer(916,343));
	script_4542(client_configs['cfg3407'].bitcfg17128, 60031343, 60031348);
	object v4 = (string)cs2method_10379(client_configs['cfg3410']) + " / " + (string)cs2method_10379(client_configs['cfg3413']);
	cs2method_21121(new function<script_8799>(int a0,int a1,object a2) {
		script_8800(a1, a0, a2);
		return;
	}, (string)v4, new WidgetPointer(-32768,3), -1, "sIi", new WidgetPointer(916,355));
	int v2 = cs2method_10872(cs2method_10872(client_configs['cfg3407'].bitcfg17126, client_configs['cfg3407'].bitcfg17127), client_configs['cfg3407'].bitcfg17128);
	int v0 = cs2method_10122(10, 6, cs2method_10461(v2, 5));
	int v8 = cs2method_10122(200, 100, v0);
	int v9 = cs2method_10461(200, v8);
	int v3 = 20;
	cs2method_10026(60031334, (string)cs2method_10379(v2) + "%");
	cs2method_10520(script_693(v9, v8, v3), 60031334);
	int v6 = 0;
	if (client_configs['cfg3406'].bitcfg17129 == 1) {
		switch (client_configs['cfg3406'].bitcfg17130) {
			case 1:
				v6 = client_configs['cfg3401'].bitcfg17118;
				break;
			case 2:
				v6 = client_configs['cfg3402'].bitcfg17119;
				break;
			case 3:
				v6 = client_configs['cfg3402'].bitcfg17120;
		}
	} else {
		switch (client_configs['cfg3406'].bitcfg17130) {
			case 1:
				v6 = client_configs['cfg3400'].bitcfg17115;
				break;
			case 2:
				v6 = client_configs['cfg3400'].bitcfg17116;
				break;
			case 3:
				v6 = client_configs['cfg3401'].bitcfg17117;
		}
	}
	int v5 = idx17mapData('i', 'J', 1022, v6);
	if (v5 != -1 && idx22mapAttribute(v5, 2366) == 7) {
		if (script_1121(client_configs['cfg3390']) == 1) {
			cs2method_10467(0, 60031248);
			cs2method_10026(60031248, "Your captain already has four traits and cannot gain any more.");
			cs2method_10467(1, 60031247);
		} else if (v2 < 35) {
			cs2method_10467(0, 60031248);
			cs2method_10026(62259468, "Warning: Your chances of success are low. You risk harsher penalties if the voyage fails.");
			cs2method_10467(1, 60031247);
		} else {
			cs2method_10467(1, 60031248);
			cs2method_10467(0, 60031247);
		}
	} else if (v5 != -1 && idx22mapAttribute(v5, 2366) == 5) {
		if (script_9852() == 0) {
			cs2method_10467(0, 60031248);
			cs2method_10026(60031248, "Warning: The Scroll you have focused on is complete. Please view your Port Management page to change the scroll.");
			cs2method_10467(1, 60031247);
		} else if (v2 < 35) {
			cs2method_10467(0, 60031248);
			cs2method_10026(60031248, "Warning: Your chances of success are low. You risk harsher penalties if the voyage fails.");
			cs2method_10467(1, 60031247);
		} else {
			cs2method_10467(1, 60031248);
			cs2method_10467(0, 60031247);
		}
	} else if (v2 < 35) {
		cs2method_10467(0, 60031248);
		cs2method_10026(62259468, "Warning: Your chances of success are low. You risk harsher penalties if the voyage fails.");
		cs2method_10467(1, 60031247);
	} else {
		cs2method_10467(1, 60031248);
		cs2method_10467(0, 60031247);
	}
	if (script_7294(client_configs['cfg3390']) == -1) {
		cs2method_10467(0, 60031443);
	} else {
		cs2method_10467(1, 60031443);
	}
	script_7282();
	return;
}
