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


int script_2720(int a0) {
	if (a0 == -1) {
		return 0;
	}
	int v3 = cs2method_10480(a0);
	int v1 = idx17mapData('o', 'i', 731, v3);
	if (client_configs['cfg306'] == 6529 && v1 != -1 && v1 > 0) {
		return v1;
	}
	int v2 = idx17mapData('o', 'i', 8798, v3);
	if (client_configs['cfg306'] == 31238 && v2 != -1 && v2 > 0) {
		return v2;
	}
	int v4 = idx17mapData('o', 'i', 733, v3);
	if (v4 != -1 && v4 > 0) {
		return v4;
	}
	if (itemDefsAttribute(v3, 258) == 1 || itemDefsAttribute(v3, 259) == 1) {
		if (itemDefsAttribute(v3, 4239) == 1) {
			return 120000;
		}
		return 99000;
	}
	int v0 = cs2method_10340(v3);
	if (client_configs['cfg306'] == 6529) {
		v0 = cs2method_10122(3, 2, v0);
	}
	return cs2method_11048(v0, 1);
}
