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


void script_3063(int a0,int a1,int a2,int a3,int a4,int a5,int a6) {
	object v8;
	int v7 = cs2method_11152();
	if (v7 == -3) {
		script_3064(0);
		script_3093(v7, "Logging In - Please Wait", "", "", 0, 1, -1, "", 0, -1, "", 0);
		cs2_configs['cfg1100'] = -3;
		return;
	}
	if (cs2_configs['cfg1100'] == -3) {
		script_3097();
	}
	int v0 = 0;
	object v13 = "";
	int v22 = 0;
	object v6 = "";
	int v16 = 0;
	object v2 = "";
	int v9 = 0;
	int v10 = 0;
	object v18 = "";
	if (v7 == 21) {
		object v25;
		script_5874();
		cs2_configs['cfg1100'] = 21;
		script_3064(0);
		if (cs2_configs['cfg200'] == 0 && cs2_configs['cfg1745'] == 0) {
			cs2_configs['cfg200'] = cs2method_10541();
			if (cs2method_10210() == 0 && (int)/*dang!*/special5(6) == 1) {
				cs2_configs['cfg1745'] = 1;
			}
		}
		if (cs2_configs['cfg200'] > 0) {
			cs2_configs['cfg200'] = cs2method_10461(cs2_configs['cfg200'], 1);
			if (cs2_configs['cfg1745'] == 1 && cs2_configs['cfg200'] == 0 && cs2method_10343() == 0) {
				cs2method_10711();
			}
		}
		if (cs2_configs['cfg200'] <= 0 && (cs2_configs['cfg1745'] == 0 || cs2method_10343() == 1)) {
			if (cs2method_10164() == 0) {
				cs2_configs['cfg200'] = 1;
				return;
			}
			if (a2 > 0) {
				int v32 = a2;
				opc_struct10627(4,3,0) v30 = cs2method_10627(v32);
				object v33 = v30.objectpart_2;
				int v27 = v30.intpart_3;
				int v31 = v30.intpart_2;
				object v29 = v30.objectpart_1;
				int v35 = v30.intpart_1;
				object v34 = v30.objectpart_0;
				int v28 = v30.intpart_0;
				if (cs2method_10883(a2, v33) == 1) {
					int v27 = 0;
				}
			}
			cs2method_20162(new function<none>() {
			}, "", new WidgetPointer(a6));
			if (cs2_configs['cfg1745'] == 1) {
				cs2method_11107();
				cs2_configs['cfg1745'] = 0;
			}
			if (cs2_configs['cfg1745'] == 0 || cs2method_10343() == 1) {
				cs2method_11093(a5);
				cs2method_10150(a4);
				cs2method_10187(a1);
				cs2method_10656(a0);
			}
			int v26 = script_3062(a6);
			/* 
				java.lang.RuntimeException: Stack underflow
					at mgi.tools.jagdecs2.CS2Stack.pop(CS2Stack.java:46)
					at mgi.tools.jagdecs2.FlowBlocksGenerator.processFlowBlock(FlowBlocksGenerator.java:191)
					at mgi.tools.jagdecs2.FlowBlocksGenerator.processGeneration(FlowBlocksGenerator.java:52)
					at mgi.tools.jagdecs2.FlowBlocksGenerator.generate(FlowBlocksGenerator.java:35)
					at mgi.tools.jagdecs2.CS2Decompiler.decompile(CS2Decompiler.java:77)
					at tests.Main.main(Main.java:69)
				
			 */
		}
		int v24 = cs2method_10968(cs2_configs['cfg200'], 50);
		if (v24 == 1) {
			v25 = "You have only just left another world. Your profile will be transferred in" + "<br>" + "1 second.";
		} else {
			v25 = "You have only just left another world. Your profile will be transferred in" + "<br>" + (string)cs2method_10379(v24) + " seconds.";
		}
		if (cs2method_10609(59375662) == 1) {
			script_3093(v7, v25, "Abort Login", "Abort Login", 0, 0, 2611, "", 1, 1, "", 0);
		} else {
			script_1871(v25);
		}
		return;
	}
	if (v7 == 42) {
		cs2method_10467(0, 59375677);
		cs2method_10026(59375631, cs2method_10379(a2));
		cs2method_10026(59375632, cs2method_10379(cs2method_10361()));
		if (cs2_configs['cfg1100'] != 42) {
			script_3093(v7, "Beta World " + (string)cs2method_10379(a2) + " is currently full." + "<br>" + "You have been added to the" + "<br>" + "queue for this world." + "<br>" + "You can track your progress in the" + "<br>" + "queue from lower left corner of this" + "<br>" + "screen." + "<br>" + "You can continue playing RuneScape" + "<br>" + " in a different browser tab" + "<br>" + " while queuing.", "", "", 1, 0, 2611, "OK", 0, 0, "OK", 1);
		}
		cs2_configs['cfg1100'] = 42;
		return;
	}
	if (v7 == 43) {
		cs2method_10026(59375631, cs2method_10379(a2));
		cs2method_10026(59375632, cs2method_10379(cs2method_10361()));
		cs2_configs['cfg1100'] = 43;
		return;
	}
	cs2method_10467(1, 59375677);
	if (a6 == 59375625) {
		script_1299(1);
	}
	script_3097();
	script_3064(1);
	cs2method_20162(new function<none>() {
	}, "", new WidgetPointer(a6));
	object v19 = "";
	int v17 = 1;
	int v15 = 0;
	int v12 = 2608;
	int v14 = 0;
	int v5 = 0;
	object v3 = "";
	object v4 = "";
	int v23 = 1;
	object v20 = "Back";
	object v21 = "Back";
	int v11 = cs2method_10930();
	int v1 = cs2method_10463();
	switch (v7) {
		case -2:
			script_3097();
			return;
		case 29:
			switch (v11) {
				case 0:
					v8 = "You must have a Combat Level of at least 20 (not including Summoning) to enter a PvP world.";
					break;
				case 1:
					v8 = "You are currently carrying lent items and cannot enter a PvP world.";
					break;
				case 2:
					v8 = "You must be standing in the Wilderness or Edgeville to enter this bounty world.";
					break;
				case 3:
					v8 = "You must have a total skill level of 1,000 or greater to enter this world.";
					break;
				case 5:
					v8 = "You must have a total skill level of 1,500 or greater to enter this world.";
					break;
				case 6:
					v8 = "You must have a total skill level of 2,000 or greater to enter this world.";
					break;
				case 7:
					v8 = "You must have a total skill level of 2,400 or greater to enter this world.";
					break;
				case 4:
					v8 = "You must move to a safe area before you can log in to a PvP or bounty world.";
					break;
				case 8:
					v8 = "VIP server access is only available to Gold Premier Club members." + "<br>" + "Become a VIP today. On sale for a limited time only.";
					v17 = 0;
					v12 = 2607;
					v14 = 1;
					v3 = "Buy online";
					v4 = "Buy online";
					break;
				case 9:
					v8 = "This server is for staff only.";
					break;
				case 10:
					v8 = "You cannot enter a legacy world while in the tutorial.";
					break;
				default:
					v8 = "Unexpected server response. Please try using a different world.";
			}
			break;
		case 46:
			v8 = "This instance is marked for deletion/rebuild. Please try using a different world.";
			break;
		case 45:
			switch (v1) {
				case 0:
					switch (v11) {
						case 0:
							v8 = "You must be near the TzHaar Fight Pits entrance to enter a global match.";
							break;
						default:
							v8 = "Unable to log in. Please try using a different world.";
					}
					break;
				case 1:
					switch (v11) {
						case 1:
							v8 = "There was an error connecting to your meeting room. Please try again.";
							break;
						case 2:
							v8 = "You need a higher rank to enter that private tent.";
							break;
						case 3:
							v8 = "You need an invitation to enter that private room.";
							break;
						default:
							v8 = "Unable to log in. Please try using a different world.";
					}
					break;
				case 6:
					switch (v11) {
						case 0:
							v8 = "The instance you attempted to join is full.";
							break;
						case 1:
							v8 = "You can't join that instance as you or your follower are carrying items.";
							break;
						default:
							v8 = "Unable to log in. Please try using a different world.";
					}
					break;
				default:
					v8 = "Unable to log in. Please try using a different world.";
			}
			break;
		case -5:
			v8 = "Connection timed out. Please try using a different world.";
			break;
		case -4:
			v8 = "Error connecting to server.";
			break;
		case -1:
			v8 = "No response from server. Please try using a different world.";
			break;
		case 5:
			v8 = "Your account has not logged out from its last session or the server is too busy to handle your request. Please try again in a few minutes or try a different server.";
			break;
		case 7:
			v8 = "This world is full. Please use a different world.";
			break;
		case 8:
			v8 = "Unable to connect: login server offline.";
			break;
		case 9:
			v8 = "Login limit exceeded: too many connections from your address.";
			break;
		case 10:
			v8 = "Unable to connect: bad session id.";
			break;
		case 13:
			v8 = "Could not complete login. Please try using a different world.";
			break;
		case 16:
			v8 = "Too many incorrect logins from your address. Please wait 5 minutes before trying again.";
			break;
		case 17:
			v8 = "You are standing in a members-only area. To play on this world, move to a free area first.";
			break;
		case 20:
			v8 = "Invalid loginserver requested. Please try using a different world.";
			break;
		case 22:
			v8 = "Malformed login packet. Please try again.";
			break;
		case 23:
			v8 = "No reply from login server. Please wait a minute and try again.";
			break;
		case 24:
			v8 = "Error loading your profile. Please contact customer support.";
			break;
		case 25:
			v8 = "Unexpected loginserver response. Please try using a different world.";
			break;
		case 26:
			v8 = "This computer's address has been blocked, as it was used to break our rules.";
			break;
		case 27:
			v8 = "Service unavailable.";
			break;
		case 3:
			v8 = "Your password has been updated. Please leave the lobby and log in again.";
			break;
		case 36:
			v8 = "Unable to connect: authentication server offline.";
			break;
		case 37:
			v8 = "Your account is currently inaccessible. Please try again in a few minutes.";
			break;
		case 39:
			v8 = "The instance you tried to join no longer exists. Please try using a different world.";
			break;
		case 41:
			v8 = "The instance you tried to join is full. Please try back later or try using a different world.";
			break;
		case 44:
			v8 = "Our systems are currently unavailable. Please try again in a few minutes.";
			break;
		case 55:
			v8 = "Could not complete login. Access to this account is not authorised.";
			break;
		case 35:
			v8 = "Your session has expired. Please click 'Back' in your browser to renew it.";
			v20 = "Close";
			v21 = "Close";
			break;
		case 14:
			v17 = 0;
			v12 = 2610;
			v8 = "The server is being updated. Please wait a few minutes and try again.";
			break;
		case 6:
			v17 = 0;
			v12 = 2610;
			v8 = "RuneScape has been updated! Please reload this page.";
			break;
		case 4:
			v8 = "Your account has been disabled. Check your Message Centre for details.";
			v14 = 1;
			v3 = "Message Centre";
			v4 = "Message Centre";
			break;
		case 11:
			v8 = "Your password is an extremely common choice, and is not secure. You must change it before you can log in.";
			v14 = 1;
			v3 = "Change Password";
			v4 = "Change Password";
			break;
		case 18:
			v12 = 2612;
			v8 = "Your account has been locked. If you have not received an account recovery email, please select 'Recover Account'.";
			v14 = 1;
			v3 = "Recover Account";
			v4 = "Recover Account";
			break;
		case 31:
			v8 = "You must change your account's display name before you can log in.";
			v14 = 1;
			v3 = "Change Display Name";
			v4 = "Change Display Name";
			break;
		case 30:
			v8 = "This is not a member's account. Please choose a 'free' world from the website to play on this account.";
			v14 = 1;
			v3 = "Subscribe";
			v4 = "Subscribe";
			break;
		case 19:
			v8 = "Fullscreen is currently a members-only feature. To log in, either exit fullscreen via the options menu or use a member's account.";
			v14 = 1;
			v3 = "Subscribe";
			v4 = "Subscribe";
			break;
		case 12:
			v17 = 0;
			v12 = 2607;
			v8 = "You need a member's account to log in to this world. Please subscribe or use a different world.";
			v14 = 1;
			v3 = "Subscribe";
			v4 = "Subscribe";
			break;
		case 40:
			v17 = 0;
			v12 = 2607;
			v8 = "You need a member's account to log in to this instance. Please subscribe or use a different world.";
			v14 = 1;
			v3 = "Subscribe";
			v4 = "Subscribe";
			break;
		case 32:
			v8 = "Your attempt to log into your account was unsuccessful.  Don't worry, it's easy to sort this out quickly.";
			v14 = 1;
			v3 = "Click Here";
			v4 = "Click Here";
			v23 = 0;
			break;
		case 47:
		case 51:
			v8 = "You need to validate your email address to log in.";
			cs2method_10467(0, 59375655);
			break;
		case 48:
			v8 = "Your game session has now ended." + "<br>" + "<br>" + "To play again, please close your browser tab/window and wait 5 minutes before reloading the game. ";
			break;
		case 50:
			v8 = "The Jagex Account Guardian is protecting this account." + "<br>" + "<br>" + "This device is not recognised." + "<br>" + "<br>" + "No new devices can be added for up to 24 hours as too many failed attempts to answer the security questions have been made." + "<br>" + "<br>" + "During this time access will still be granted to any devices already trusted.";
			v14 = 1;
			v3 = "Back";
			v4 = "Back";
			v12 = 13105;
			break;
		case 52:
			v8 = "You need to validate this device to use with your account. Please follow the instructions in the window that will open shortly.";
			v14 = 1;
			v3 = "Back";
			v4 = "Back";
			v23 = 0;
			v12 = 13105;
			break;
		case 49:
			v8 = "The device you are doing is no longer valid. You should have received an email to validate the device. Please follow the instructions there. Be sure to check your spam folder.";
			v14 = 1;
			v3 = "Back";
			v4 = "Back";
			v23 = 0;
			v12 = 13105;
			break;
		case 54:
			v8 = "Activity on this account has been exceeded." + "<br>" + "<br>" + "Please try again tomorrow.";
			break;
		default:
			v8 = "Unexpected server response. Please try using a different world.";
	}
	script_3093(v7, v8, v3, v4, v17, v15, v12, v20, v14, v5, v21, v23);
	return;
}
