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


void script_9417(int a0,int a1,int a2,int a3,int a4,int a5,int a6,int a7,int a8) {
	object v0 = "";
	if (client_configs['cfg3980'] < a4) {
		v0 = "You cannot afford this reward." + "<br>";
	}
	if (cs2method_10461(client_configs['cfg3950'].bitcfg21034, 1) < a5) {
		v0 = cs2method_10427(v0, "You need a higher-level faction token to purchase this reward." + "<br>");
	}
	if (a0 == 0 && cs2method_10684(93) == 0) {
		v0 = cs2method_10427(v0, "You do not have space in your inventory for this reward." + "<br>");
	}
	if (a3 == 1) {
		if (a6 == 1) {
			if (script_9414(a1) == 1) {
				v0 = "You already have this reward in your inventory, bank or house.";
			}
		} else {
			switch (a1) {
				case 25082:
				case 25080:
				case 25081:
				case 25079:
					v0 = "You must use or destroy the lamp you own before purchasing another.";
					break;
				default:
					v0 = "You have already purchased this reward.";
			}
		}
	}
	script_8800(a2, -1, v0);
	return;
}
