diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 9dbbb4a3b..16c76dcd9 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,20 +2,17 @@ + - - - - - - - - - - - - - + + + + + + + + + + + + + + - + + + diff --git a/Client/src/org/runite/Client.java b/Client/src/org/runite/Client.java new file mode 100644 index 000000000..77a08a1b3 --- /dev/null +++ b/Client/src/org/runite/Client.java @@ -0,0 +1,50 @@ +package org.runite; + +import org.runite.jagex.GameShell; + +/** + * Handles the launching of our Game Client. + * @author Keldagrim Development Team + * + */ + +/* + +NOTICE: THIS IS THE LIVESERVER CLIENT. For development purposes, use GameLaunch.java instead!!! + + */ +public class Client { + + /** + * The game settings. + */ + public static GameSetting SETTINGS = new GameSetting("2009Scape", "34.74.91.45", 1, "live", false, false); + + /** + * The main method. + * @param args the arguments casted on runtime. + */ + public static void main(String[]args) { + for (int i = 0; i < args.length; i++) { + String[] cmd = args[i].split("="); + switch (cmd[0]) { + case "ip": + SETTINGS.setIp(cmd[1]); + break; + case "world": + SETTINGS.setWorld(Integer.parseInt(cmd[1])); + break; + } + } + launch(false); + } + + /** + * Launches the client in a determined mode. + * @param swiftkit If we're launching swift kit. + */ + public static void launch(boolean swiftkit) { + GameShell.launchDesktop(); + } + +} diff --git a/CompiledServer/production/09Scape/.gitignore b/CompiledServer/production/09Scape/.gitignore index 0e567a58a..17a06722d 100644 --- a/CompiledServer/production/09Scape/.gitignore +++ b/CompiledServer/production/09Scape/.gitignore @@ -10,6 +10,7 @@ data/profile/** .class** /bin/ /out/ +data/cache/ *.iml *.eml *.userlibraries diff --git a/CompiledServer/production/09Scape/.settings/org.eclipse.jdt.core.prefs b/CompiledServer/production/09Scape/.settings/org.eclipse.jdt.core.prefs index 2a251fdc2..a698e5967 100644 --- a/CompiledServer/production/09Scape/.settings/org.eclipse.jdt.core.prefs +++ b/CompiledServer/production/09Scape/.settings/org.eclipse.jdt.core.prefs @@ -10,288 +10,3 @@ org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.source=1.8 -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=48 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=48 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 -org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=48 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 -org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_after_package=1 -org.eclipse.jdt.core.formatter.blank_lines_before_field=0 -org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 -org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 -org.eclipse.jdt.core.formatter.blank_lines_before_method=1 -org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 -org.eclipse.jdt.core.formatter.blank_lines_before_package=0 -org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 -org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 -org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false -org.eclipse.jdt.core.formatter.comment.format_block_comments=true -org.eclipse.jdt.core.formatter.comment.format_header=false -org.eclipse.jdt.core.formatter.comment.format_html=true -org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.comment.format_line_comments=true -org.eclipse.jdt.core.formatter.comment.format_source_code=true -org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true -org.eclipse.jdt.core.formatter.comment.indent_root_tags=true -org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert -org.eclipse.jdt.core.formatter.comment.line_length=80 -org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true -org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true -org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false -org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=2 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 -org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off -org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on -org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true -org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_empty_lines=false -org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true -org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false -org.eclipse.jdt.core.formatter.indentation.size=4 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert -org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert -org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert -org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.join_lines_in_comments=true -org.eclipse.jdt.core.formatter.join_wrapped_lines=true -org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false -org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false -org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=9999 -org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 -org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 -org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true -org.eclipse.jdt.core.formatter.tabulation.char=tab -org.eclipse.jdt.core.formatter.tabulation.size=4 -org.eclipse.jdt.core.formatter.use_on_off_tags=false -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true -org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true -org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true -org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/CompiledServer/production/09Scape/org/crandor/game/world/GameSettings.class b/CompiledServer/production/09Scape/org/crandor/game/world/GameSettings.class index 11572702f..a4baed404 100644 Binary files a/CompiledServer/production/09Scape/org/crandor/game/world/GameSettings.class and b/CompiledServer/production/09Scape/org/crandor/game/world/GameSettings.class differ diff --git a/CompiledServer/production/09Scape/runManagement.sh b/CompiledServer/production/09Scape/runManagement.sh index 71fc39c9c..29115cc01 100755 --- a/CompiledServer/production/09Scape/runManagement.sh +++ b/CompiledServer/production/09Scape/runManagement.sh @@ -1,3 +1,3 @@ rm -rf org cp -r ../CompiledServer/production/09Scape/org . -java -server -cp ".:./bin;.:./lib/*" org.keldagrim.Management false true false true true +java -server -cp ".:./bin;.:./lib/*" org.crandor.Management false true false true true diff --git a/CompiledServer/production/09Scape/runServer.sh b/CompiledServer/production/09Scape/runServer.sh index c3f3a3d4d..bb4d94c3e 100755 --- a/CompiledServer/production/09Scape/runServer.sh +++ b/CompiledServer/production/09Scape/runServer.sh @@ -1,3 +1,3 @@ rm -rf org cp -r ../CompiledServer/production/09Scape/org . -java -server -cp ".:./bin;.:./lib/*" org.keldagrim.Server false true false true true +java -server -cp ".:./bin;.:./lib/*" org.crandor.Server false true false true true diff --git a/Management-Server/runManagement.sh b/Management-Server/runManagement.sh index 71fc39c9c..29115cc01 100755 --- a/Management-Server/runManagement.sh +++ b/Management-Server/runManagement.sh @@ -1,3 +1,3 @@ rm -rf org cp -r ../CompiledServer/production/09Scape/org . -java -server -cp ".:./bin;.:./lib/*" org.keldagrim.Management false true false true true +java -server -cp ".:./bin;.:./lib/*" org.crandor.Management false true false true true diff --git a/README.md b/README.md index 09a3ea980..e53cc7c6d 100644 --- a/README.md +++ b/README.md @@ -27,13 +27,14 @@ At any point, if you need help, you are free to join our Discord server at: http ## Step 3: Setting up the Database Since this portion of the guide is operating-system specific, you will either need basic database knowledge or a bit of help. Below are the things that need to be configured. ### General: -- Configure root@localhost to have a blank password +- Configure root@localhost to have the password "password123" - Create a table in root named `server` and another named `global` - Import `09HDscape-server/server.sql` and `09HDscape-server/global.sql` into their respective tables - Start the database ### Windows: - Download and install [xampp](https://www.apachefriends.org/download.html) +- IMPORTANT TODO: Make the Windows guide include adding the password "password123" - Start the `Apache` and `MySQL` modules - Navigate to http://localhost/phpmyadmin/ - Create 2 new tables named `server` and `global` diff --git a/Server/org/crandor/cache/def/impl/test.txt b/Server/org/crandor/cache/def/impl/test.txt new file mode 100644 index 000000000..2cd6e87a9 --- /dev/null +++ b/Server/org/crandor/cache/def/impl/test.txt @@ -0,0 +1,365 @@ +private void readValues(int i, InputStream stream, int opcode) { + if (opcode != 1 && opcode != 5) { + if (opcode != 2) { + if (opcode != 14) { + if (opcode != 15) { + if (opcode == 17) { + projectileCliped = false; + clipType = 0; + } else if (opcode != 18) { + if (opcode == 19) + secondInt = stream.readUnsignedByte(); + else if (opcode == 21) + aByte3912 = (byte) 1; + else if (opcode != 22) { + if (opcode != 23) { + if (opcode != 24) { + if (opcode == 27) + clipType = 1; + else if (opcode == 28) + anInt3892 = (stream + .readUnsignedByte() << 2); + else if (opcode != 29) { + if (opcode != 39) { + if (opcode < 30 || opcode >= 35) { + if (opcode == 40) { + int i_53_ = (stream + .readUnsignedByte()); + originalColors = new short[i_53_]; + modifiedColors = new short[i_53_]; + for (int i_54_ = 0; i_53_ > i_54_; i_54_++) { + originalColors[i_54_] = (short) (stream + .readUnsignedShort()); + modifiedColors[i_54_] = (short) (stream + .readUnsignedShort()); + } + } else if (opcode != 41) { + if (opcode != 42) { + if (opcode != 62) { + if (opcode != 64) { + if (opcode == 65) + anInt3902 = stream + .readUnsignedShort(); + else if (opcode != 66) { + if (opcode != 67) { + if (opcode == 69) + anInt3925 = stream + .readUnsignedByte(); + else if (opcode != 70) { + if (opcode == 71) + anInt3889 = stream + .readShort() << 2; + else if (opcode != 72) { + if (opcode == 73) + secondBool = true; + else if (opcode == 74) + notCliped = true; + else if (opcode != 75) { + if (opcode != 77 + && opcode != 92) { + if (opcode == 78) { + anInt3860 = stream + .readUnsignedShort(); + anInt3904 = stream + .readUnsignedByte(); + } else if (opcode != 79) { + if (opcode == 81) { + aByte3912 = (byte) 2; + anInt3882 = 256 * stream + .readUnsignedByte(); + } else if (opcode != 82) { + if (opcode == 88) + aBoolean3853 = false; + else if (opcode != 89) { + if (opcode == 90) + aBoolean3870 = true; + else if (opcode != 91) { + if (opcode != 93) { + if (opcode == 94) + aByte3912 = (byte) 4; + else if (opcode != 95) { + if (opcode != 96) { + if (opcode == 97) + aBoolean3866 = true; + else if (opcode == 98) + aBoolean3923 = true; + else if (opcode == 99) { + anInt3857 = stream + .readUnsignedByte(); + anInt3835 = stream + .readUnsignedShort(); + } else if (opcode == 100) { + anInt3844 = stream + .readUnsignedByte(); + anInt3913 = stream + .readUnsignedShort(); + } else if (opcode != 101) { + if (opcode == 102) + anInt3838 = stream + .readUnsignedShort(); + else if (opcode == 103) + thirdInt = 0; + else if (opcode != 104) { + if (opcode == 105) + aBoolean3906 = true; + else if (opcode == 106) { + int i_55_ = stream + .readUnsignedByte(); + anIntArray3869 = new int[i_55_]; + anIntArray3833 = new int[i_55_]; + for (int i_56_ = 0; i_56_ < i_55_; i_56_++) { + anIntArray3833[i_56_] = stream + .readUnsignedShort(); + int i_57_ = stream + .readUnsignedByte(); + anIntArray3869[i_56_] = i_57_; + anInt3881 += i_57_; + } + } else if (opcode == 107) + anInt3851 = stream + .readUnsignedShort(); + else if (opcode >= 150 + && opcode < 155) { + options[opcode + + -150] = stream + .readString(); + /*if (!loader.showOptions) + options[opcode + -150] = null;*/ + } else if (opcode != 160) { + if (opcode == 162) { + aByte3912 = (byte) 3; + anInt3882 = stream + .readInt(); + } else if (opcode == 163) { + aByte3847 = (byte) stream + .readByte(); + aByte3849 = (byte) stream + .readByte(); + aByte3837 = (byte) stream + .readByte(); + aByte3914 = (byte) stream + .readByte(); + } else if (opcode != 164) { + if (opcode != 165) { + if (opcode != 166) { + if (opcode == 167) + anInt3921 = stream + .readUnsignedShort(); + else if (opcode != 168) { + if (opcode == 169) { + aBoolean3845 = true; + //added opcode + }else if (opcode == 170) { + int anInt3383 = stream.readUnsignedSmart(); + //added opcode + }else if (opcode == 171) { + int anInt3362 = stream.readUnsignedSmart(); + //added opcode + }else if (opcode == 173) { + int anInt3302 = stream.readUnsignedShort(); + int anInt3336 = stream.readUnsignedShort(); + //added opcode + }else if (opcode == 177) { + boolean ub = true; + //added opcode + }else if (opcode == 178) { + int db = stream.readUnsignedByte(); + } else if (opcode == 249) { + int i_58_ = stream + .readUnsignedByte(); + if (aClass194_3922 == null) { + /*int i_59_ = Class307 + .method3331( + (byte) -117, + i_58_); + aClass194_3922 = new HashTable( + i_59_);*/ + } + for (int i_60_ = 0; i_60_ < i_58_; i_60_++) { + boolean bool = stream + .readUnsignedByte() == 1; + int i_61_ = stream.read24BitInt(); + Object class279; + if (!bool) + /*class279 = new IntegerNode(*/ + stream + .readInt();//); + else + /*class279 = new Class279_Sub4(*/ + stream + .readString();//); + /*aClass194_3922 + .method1598( + (long) i_61_, + -125, + class279);*/ + } + } + } else + aBoolean3894 = true; + } else + anInt3877 = stream + .readShort(); + } else + anInt3875 = stream + .readShort(); + } else + anInt3834 = stream + .readShort(); + } else { + int i_62_ = stream + .readUnsignedByte(); + anIntArray3908 = new int[i_62_]; + for (int i_63_ = 0; i_62_ > i_63_; i_63_++) + anIntArray3908[i_63_] = stream + .readUnsignedShort(); + } + } else + anInt3865 = stream + .readUnsignedByte(); + } else + anInt3850 = stream + .readUnsignedByte(); + } else + aBoolean3924 = true; + } else { + aByte3912 = (byte) 5; + anInt3882 = stream + .readShort(); + } + } else { + aByte3912 = (byte) 3; + anInt3882 = stream + .readUnsignedShort(); + } + } else + aBoolean3873 = true; + } else + aBoolean3895 = false; + } else + aBoolean3891 = true; + } else { + anInt3900 = stream + .readUnsignedShort(); + anInt3905 = stream + .readUnsignedShort(); + anInt3904 = stream + .readUnsignedByte(); + int i_64_ = stream + .readUnsignedByte(); + anIntArray3859 = new int[i_64_]; + for (int i_65_ = 0; i_65_ < i_64_; i_65_++) + anIntArray3859[i_65_] = stream + .readUnsignedShort(); + } + } else { + configFileId = stream + .readUnsignedShort(); + if (configFileId == 65535) + configFileId = -1; + configId = stream + .readUnsignedShort(); + if (configId == 65535) + configId = -1; + int i_66_ = -1; + if (opcode == 92) { + i_66_ = stream + .readUnsignedShort(); + if (i_66_ == 65535) + i_66_ = -1; + } + int i_67_ = stream + .readUnsignedByte(); + childrenIds = new int[i_67_ + - -2]; + for (int i_68_ = 0; i_67_ >= i_68_; i_68_++) { + childrenIds[i_68_] = stream + .readUnsignedShort(); + if (childrenIds[i_68_] == 65535) + childrenIds[i_68_] = -1; + } + childrenIds[i_67_ + 1] = i_66_; + } + } else + anInt3855 = stream + .readUnsignedByte(); + } else + anInt3915 = stream + .readShort() << 2; + } else + anInt3883 = stream + .readShort() << 2; + } else + anInt3917 = stream + .readUnsignedShort(); + } else + anInt3841 = stream + .readUnsignedShort(); + } else + aBoolean3872 = false; + } else + aBoolean3839 = true; + } else { + int i_69_ = (stream + .readUnsignedByte()); + aByteArray3858 = (new byte[i_69_]); + for (int i_70_ = 0; i_70_ < i_69_; i_70_++) + aByteArray3858[i_70_] = (byte) (stream + .readByte()); + } + } else { + int i_71_ = (stream + .readUnsignedByte()); + aShortArray3920 = new short[i_71_]; + aShortArray3919 = new short[i_71_]; + for (int i_72_ = 0; i_71_ > i_72_; i_72_++) { + aShortArray3920[i_72_] = (short) (stream + .readUnsignedShort()); + aShortArray3919[i_72_] = (short) (stream + .readUnsignedShort()); + } + } + } else + options[-30 + + opcode] = (stream + .readString()); + } else + anInt3840 = (stream.readByte() * 5); + } else + anInt3878 = stream.readByte(); + } else { + anInt3876 = stream.readUnsignedShort(); + if (anInt3876 == 65535) + anInt3876 = -1; + } + } else + thirdInt = 1; + } else + aBoolean3867 = true; + } else + projectileCliped = false; + } else + sizeY = stream.readUnsignedByte(); + } else + sizeX = stream.readUnsignedByte(); + } else + name = stream.readString(); + } else { + boolean aBoolean1162 = false; + if (opcode == 5 && aBoolean1162) + method3297(stream); + int i_73_ = stream.readUnsignedByte(); + anIntArrayArray3916 = new int[i_73_][]; + aByteArray3899 = new byte[i_73_]; + for (int i_74_ = 0; i_74_ < i_73_; i_74_++) { + aByteArray3899[i_74_] = (byte) stream.readByte(); + int i_75_ = stream.readUnsignedByte(); + anIntArrayArray3916[i_74_] = new int[i_75_]; + for (int i_76_ = 0; i_75_ > i_76_; i_76_++) + anIntArrayArray3916[i_74_][i_76_] = stream + .readUnsignedShort(); + } + if (opcode == 5 && !aBoolean1162) + method3297(stream); + } + } \ No newline at end of file diff --git a/Server/runServer.sh b/Server/runServer.sh index c3f3a3d4d..9797a838a 100755 --- a/Server/runServer.sh +++ b/Server/runServer.sh @@ -1,3 +1,3 @@ rm -rf org cp -r ../CompiledServer/production/09Scape/org . -java -server -cp ".:./bin;.:./lib/*" org.keldagrim.Server false true false true true +java -server -cp ".:./bin;.:./lib/*" org.crandor.Server diff --git a/Server/src/org/crandor/ServerConstants.java b/Server/src/org/crandor/ServerConstants.java index 5c0cc854d..a74227b2f 100644 --- a/Server/src/org/crandor/ServerConstants.java +++ b/Server/src/org/crandor/ServerConstants.java @@ -75,10 +75,14 @@ public final class ServerConstants { }; public static final Database[] DATABASES = { - new Database((SQLManager.LOCAL ? "localhost" : "keldagrim.org"), (SQLManager.LOCAL ? "server" : DATABASE_NAMES[0]), (SQLManager.LOCAL ? "root" : "keldagr1_user"), (SQLManager.LOCAL ? "" : "2jf4wkz$")), - new Database((SQLManager.LOCAL ? "localhost" : "keldagrim.org"), (SQLManager.LOCAL ? "global" : DATABASE_NAMES[1]), (SQLManager.LOCAL ? "root" : "keldagr1_user"), (SQLManager.LOCAL ? "" : "2jf4wkz$")) + new Database((SQLManager.LOCAL ? "localhost" : "keldagrim.org"), (SQLManager.LOCAL ? "server" : DATABASE_NAMES[0]), (SQLManager.LOCAL ? "root" : "keldagr1_user"), (SQLManager.LOCAL ? getDatabasePassword() : "2jf4wkz$")), + new Database((SQLManager.LOCAL ? "localhost" : "keldagrim.org"), (SQLManager.LOCAL ? "global" : DATABASE_NAMES[1]), (SQLManager.LOCAL ? "root" : "keldagr1_user"), (SQLManager.LOCAL ? getDatabasePassword() : "2jf4wkz$")) }; - + + private static String getDatabasePassword() { + return "password123"; + } + /** * If MySQL is enabled. */ diff --git a/Server/src/org/crandor/game/world/GameSettings.java b/Server/src/org/crandor/game/world/GameSettings.java index 742a24da8..bca23b055 100644 --- a/Server/src/org/crandor/game/world/GameSettings.java +++ b/Server/src/org/crandor/game/world/GameSettings.java @@ -144,6 +144,7 @@ public final class GameSettings { file = new FileInputStream(path); properties.load(file); } catch (IOException e) { + System.out.println("Warning: Could not find file in " + System.getProperty("user.dir") + path); e.printStackTrace(); } return properties;