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


void script_8536(int a0) {
	if (a0 == 1) {
		if (cs2_configs['cfg5'] == 0 || cs2method_10397(92930050, 1469) == 0 || cs2method_10609(92930051) == 1) {
			script_8841(10, 0);
		} else {
			cs2_configs['cfg2873'] = 10;
			cs2method_20380(new function<script_112>(int a0,int a1) {
				if (cs2_configs['cfg2873'] != 10) {
					return;
				}
				switch (a0) {
					case 84:
						script_8841(10, 0);
						if (cs2_configs['cfg5'] == 7 && cs2method_10265(cs2_configs['cfg2506']) <= 0) {
							return;
						}
						if (cs2_configs['cfg5'] == 12) {
							script_1806(cs2_configs['cfg2506']);
							return;
						}
						if (cs2_configs['cfg5'] == 13) {
							cs2method_11148(cs2_configs['cfg2506']);
							script_1548(13);
							return;
						}
						if (cs2method_10265(cs2_configs['cfg2506']) > 0) {
							if (cs2_configs['cfg5'] == 4 || cs2_configs['cfg5'] == 5) {
								if (cs2method_10260() < 0) {
									cs2method_10810("Unable to update Ignore List: system busy");
								} else if (cs2_configs['cfg5'] == 4) {
									cs2method_10290(cs2_configs['cfg2506']);
								} else {
									if (cs2_configs['cfg5'] == 5) {
										if (cs2method_10654(script_4591(cs2_configs['cfg2506'])) == 1) {
											cs2method_10762(script_4591(cs2_configs['cfg2506']));
										} else {
											cs2method_10810("That player is not on your ignore list.");
										}
									}
								}
								script_1548(cs2_configs['cfg5']);
							} else if (cs2_configs['cfg5'] < 7) {
								if (cs2method_10193() < 0) {
									cs2method_10810("Unable to complete action - system busy");
									script_1548(cs2_configs['cfg5']);
								} else if (cs2_configs['cfg5'] == 2) {
									script_1548(2);
									cs2method_11133(cs2_configs['cfg2506']);
								} else if (cs2_configs['cfg5'] == 3) {
									if (cs2method_10563(script_4591(cs2_configs['cfg2506'])) == 1) {
										cs2_configs['cfg3936'] = (string)script_4591(cs2_configs['cfg2506']);
										script_9961(8);
									} else {
										cs2method_10810("That player is not on your friends list.");
									}
									script_1548(3);
								} else {
									if (cs2_configs['cfg5'] == 6) {
										if (cs2method_10149() == 2) {
											cs2method_10841(0, 1, cs2method_10610());
										}
										cs2method_10365(cs2_configs['cfg2367'], cs2_configs['cfg2506']);
										script_1548(6);
									}
								}
							} else if (cs2_configs['cfg5'] == 11) {
								script_1478();
							} else if (cs2_configs['cfg5'] == 7) {
								cs2_configs['cfg2506'] = (string)script_2332(cs2_configs['cfg2506'], "K", "000");
								cs2_configs['cfg2506'] = (string)script_2332(cs2_configs['cfg2506'], "k", "000");
								cs2_configs['cfg2506'] = (string)script_2332(cs2_configs['cfg2506'], "M", "000000");
								cs2_configs['cfg2506'] = (string)script_2332(cs2_configs['cfg2506'], "m", "000000");
								if (cs2method_10262() == 1) {
									cs2_configs['cfg2506'] = (string)script_2332(cs2_configs['cfg2506'], "T", "000");
									cs2_configs['cfg2506'] = (string)script_2332(cs2_configs['cfg2506'], "t", "000");
								}
								cs2method_11068(script_5390(cs2_configs['cfg2506']));
							} else if (cs2_configs['cfg5'] == 8) {
								cs2_configs['cfg2507'] = (string)cs2method_11053(cs2_configs['cfg2506']);
								cs2_configs['cfg1026'] = 1;
								cs2method_10207(cs2_configs['cfg2506']);
							} else if (cs2_configs['cfg5'] == 9) {
								if (cs2method_10846(cs2method_10181(cs2_configs['cfg2506']), cs2method_10181(cs2_configs['cfg2577'])) != 0) {
									cs2method_11148(cs2_configs['cfg2506']);
								} else {
									cs2method_10810("Please do not enter your password here!");
								}
							} else if (cs2_configs['cfg5'] == 10) {
								cs2_configs['cfg2508'] = (string)cs2method_11053(cs2_configs['cfg2506']);
								cs2_configs['cfg1027'] = 1;
								cs2method_10160(cs2_configs['cfg2506']);
							} else if (cs2_configs['cfg5'] == 15) {
								script_1633(cs2_configs['cfg2506']);
							} else {
								if (cs2_configs['cfg5'] == 16) {
									script_4465(cs2_configs['cfg2506']);
								}
							}
						} else {
							if (cs2_configs['cfg5'] == 14) {
								script_7751();
								return;
							}
						}
						script_1548(0);
						return;
					case 13:
						if (script_9666() == 1) {
							return;
						}
						if (cs2_configs['cfg5'] == 12) {
							script_1806(cs2_configs['cfg2409']);
							script_9726(0);
						} else if (cs2_configs['cfg5'] == 14) {
							script_7751();
						} else {
							script_9726(cs2_configs['cfg5']);
						}
						return;
					case 102:
					case 103:
					case 98:
					case 99:
					case 96:
					case 97:
						if (cs2method_10862() == 0) {
							return;
						}
						cs2_configs['cfg1029'] = script_1553(a0, cs2_configs['cfg2506'], cs2_configs['cfg1029']);
						break;
					default:
						switch (cs2_configs['cfg5']) {
							case 1:
								if (a0 == 83) {
									script_1548(1);
								}
								return;
							case 6:
							case 9:
							case 11:
								int v32 = cs2_configs['cfg1029'];
								int v28 = 0;
								int v19 = a0;
								int v9 = a1;
								object v31 = cs2_configs['cfg2506'];
								script_802_struct(1,1,0) v1 = script_802(v32, v31, v28, v19, v9);
								object v18 = v1.objectpart_0;
								cs2_configs['cfg1029'] = v1.intpart_0;
								cs2_configs['cfg2506'] = (string)v18;
								break;
							case 7:
								int v24 = cs2_configs['cfg1029'];
								int v0 = 6;
								int v2 = a0;
								int v14 = a1;
								object v21 = cs2_configs['cfg2506'];
								script_802_struct(1,1,0) v26 = script_802(v24, v21, v0, v2, v14);
								object v22 = v26.objectpart_0;
								cs2_configs['cfg1029'] = v26.intpart_0;
								cs2_configs['cfg2506'] = (string)v22;
								break;
							case 13:
								int v25 = cs2_configs['cfg1029'];
								int v8 = 5;
								int v11 = a0;
								int v4 = a1;
								object v5 = cs2_configs['cfg2506'];
								script_802_struct(1,1,0) v3 = script_802(v25, v5, v8, v11, v4);
								object v34 = v3.objectpart_0;
								cs2_configs['cfg1029'] = v3.intpart_0;
								cs2_configs['cfg2506'] = (string)v34;
								break;
							case 14:
								int v13 = cs2_configs['cfg1029'];
								int v17 = 4;
								int v27 = a0;
								int v7 = a1;
								object v20 = cs2_configs['cfg2506'];
								script_802_struct(1,1,0) v10 = script_802(v13, v20, v17, v27, v7);
								object v6 = v10.objectpart_0;
								cs2_configs['cfg1029'] = v10.intpart_0;
								cs2_configs['cfg2506'] = (string)v6;
								break;
						}
						int v15 = cs2_configs['cfg1029'];
						int v29 = 2;
						int v12 = a0;
						int v30 = a1;
						object v23 = cs2_configs['cfg2506'];
						script_802_struct(1,1,0) v33 = script_802(v15, v23, v29, v12, v30);
						object v16 = v33.objectpart_0;
						cs2_configs['cfg1029'] = v33.intpart_0;
						cs2_configs['cfg2506'] = (string)v16;
				}
				cs2method_10026(96272387, cs2method_11053(cs2_configs['cfg2506']));
				script_1557();
				if (cs2_configs['cfg5'] == 11) {
					script_1475();
				} else {
					if (cs2_configs['cfg5'] == 14) {
						cs2_configs['cfg2249'] = (string)cs2method_10181(cs2_configs['cfg2506']);
						cs2_configs['cfg89'] = 1;
						script_7746();
					}
				}
				return;
			}, -2147483640, false, "iz", new WidgetPointer(1469,3));
		}
	} else {
		if (cs2_configs['cfg2873'] == 10) {
			cs2_configs['cfg2873'] = 0;
		}
		cs2method_20380(new function<none>() {
		}, "", new WidgetPointer(1469,3));
	}
	return;
}
