diff --git a/.gitignore b/.gitignore
index 92d8c719..811a5981 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,7 +8,6 @@ scripts/pal_swap_*
*.wav
*.shader
\#backups
-datafiles
help.rtf
extensions
AM2R.exe
diff --git a/README.md b/README.md
index 3777fbea..0ed9b098 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,12 @@
# AM2R-Community-Updates
+## Co-op Changes
+The source code here has the same requirements as the original repo in order for it to work. Only the code and my changes have been included. Also, the string compression scripts are by Homunculus: https://marketplace.yoyogames.com/assets/4560/strict .
+Currently syncs all items, metroids, events, and power-ups.
+Currently, pressing F1 will make an attempt to connect to the server. F2 will disconnect from the server. DO NOT try to connect on the menu because the game will crash as the script that shows the connect/disconnect prompt can not run until you are in-game.
+Put the ip of the server you want to connect to into the ipaddress.txt. The server operates on port 64198 and cannot be changed at the moment.
+The server can be found here: https://github.com/lassiterm/AM2R-Server
+
## What is this?
The source code for the AM2R Community Updates 1.5.x branch, free of copyrighted assets and trademarks.
If you have not played the AM2R Community Updates before, this will be of no use to you!
diff --git a/datafiles/dictionary.json b/datafiles/dictionary.json
new file mode 100644
index 00000000..24b7fa55
--- /dev/null
+++ b/datafiles/dictionary.json
@@ -0,0 +1,259 @@
+{
+ "dictionary": {
+ "0": 157,
+ "1": 158,
+ "2": 159,
+ "3": 160,
+ "4": 161,
+ "5": 162,
+ "6": 163,
+ "7": 164,
+ "8": 165,
+ "9": 166,
+ "11": 169,
+ "111": 170,
+ "e": 1,
+ "t": 2,
+ "a": 3,
+ "o": 4,
+ "i": 5,
+ "n": 6,
+ "s": 7,
+ "r": 8,
+ "h": 9,
+ "l": 10,
+ "d": 11,
+ "c": 12,
+ "u": 13,
+ "m": 14,
+ "f": 15,
+ "p": 16,
+ "g": 17,
+ "w": 18,
+ "y": 19,
+ "b": 20,
+ "v": 21,
+ "k": 22,
+ "x": 23,
+ "j": 24,
+ "q": 25,
+ "z": 26,
+ "th": 27,
+ "he": 28,
+ "in": 29,
+ "er": 30,
+ "an": 31,
+ "re": 32,
+ "on": 33,
+ "at": 34,
+ "en": 35,
+ "nd": 36,
+ "ti": 37,
+ "es": 38,
+ "or": 39,
+ "te": 40,
+ "of": 41,
+ "ed": 42,
+ "is": 43,
+ "it": 44,
+ "al": 45,
+ "ar": 46,
+ "st": 47,
+ "to": 48,
+ "nt": 49,
+ "ng": 50,
+ "se": 51,
+ "ha": 52,
+ "id": 53,
+ "as": 54,
+ "ou": 55,
+ "io": 56,
+ "le": 57,
+ "ve": 58,
+ "co": 59,
+ "me": 60,
+ "de": 61,
+ "hi": 62,
+ "ri": 63,
+ "ro": 64,
+ "ic": 65,
+ "ne": 66,
+ "ea": 67,
+ "ra": 68,
+ "ce": 69,
+ "li": 70,
+ "ch": 71,
+ "ll": 72,
+ "be": 73,
+ "ma": 74,
+ "si": 75,
+ "om": 76,
+ "ur": 77,
+ "ss": 78,
+ "the": 79,
+ "and": 80,
+ "ing": 81,
+ "ion": 82,
+ "tio": 83,
+ "ent": 84,
+ "ati": 85,
+ "for": 86,
+ "her": 87,
+ "ter": 88,
+ "hat": 89,
+ "The": 90,
+ "tha": 91,
+ "ere": 92,
+ "ate": 93,
+ "his": 94,
+ "con": 95,
+ "res": 96,
+ "ver": 97,
+ "all": 98,
+ "ons": 99,
+ "nce": 100,
+ "men": 101,
+ "ith": 102,
+ "ted": 103,
+ "ers": 104,
+ "pro": 105,
+ "thi": 106,
+ "wit": 107,
+ "are": 108,
+ "ess": 109,
+ "not": 110,
+ "ive": 111,
+ "was": 112,
+ "ect": 113,
+ "rea": 114,
+ "com": 115,
+ "eve": 116,
+ "per": 117,
+ "int": 118,
+ "est": 119,
+ "sta": 120,
+ "cti": 121,
+ "ica": 122,
+ "ist": 123,
+ "ear": 124,
+ "ain": 125,
+ "one": 126,
+ "our": 127,
+ "iti": 128,
+ "rat": 129,
+ "tion": 130,
+ "atio": 131,
+ "that": 132,
+ "ther": 133,
+ "with": 134,
+ "ment": 135,
+ "ions": 136,
+ "this": 137,
+ "here": 138,
+ "from": 139,
+ "ould": 140,
+ "ting": 141,
+ "hich": 142,
+ "whic": 143,
+ "ctio": 144,
+ "ence": 145,
+ "have": 146,
+ "othe": 147,
+ "ight": 148,
+ "sion": 149,
+ "ation": 150,
+ "tions": 151,
+ "which": 152,
+ "ction": 153,
+ "other": 154,
+ "their": 155,
+ "http": 156,
+ "00": 167,
+ "000": 168,
+ " t": 171,
+ " o": 172,
+ " i": 173,
+ " s": 174,
+ " c": 175,
+ " w": 176,
+ " h": 177,
+ " b": 178,
+ " f": 179,
+ " m": 180,
+ "e ": 181,
+ "s ": 182,
+ "t ": 183,
+ "d ": 184,
+ "n ": 185,
+ "r ": 186,
+ "y ": 187,
+ "f ": 188,
+ "l ": 189,
+ "o ": 190,
+ " ": 191,
+ ".": 192,
+ ",": 193,
+ " ": 194,
+ ". ": 195,
+ ", ": 196,
+ " ": 197,
+ "/": 198,
+ "\\": 199,
+ ":": 200,
+ "{": 201,
+ "}": 202,
+ "[": 203,
+ "]": 204,
+ "\"": 205,
+ "e, ": 206,
+ "s, ": 207,
+ ", t": 208,
+ ", a": 209,
+ " a ": 210,
+ " th": 211,
+ "nd ": 212,
+ " in": 213,
+ " of": 214,
+ "of ": 215,
+ "on ": 216,
+ " an": 217,
+ "is ": 218,
+ " to": 219,
+ "to ": 220,
+ "t t": 221,
+ "e t": 222,
+ "s t": 223,
+ "e a": 224,
+ "s a": 225,
+ "E": 226,
+ "T": 227,
+ "A": 228,
+ "O": 229,
+ "I": 230,
+ "N": 231,
+ "S": 232,
+ "R": 233,
+ "H": 234,
+ "L": 235,
+ "D": 236,
+ "C": 237,
+ "U": 238,
+ "M": 239,
+ "F": 240,
+ "P": 241,
+ "G": 242,
+ "W": 243,
+ "Y": 244,
+ "B": 245,
+ "V": 246,
+ "K": 247,
+ "X": 248,
+ "J": 249,
+ "Q": 250,
+ "Z": 251,
+ "\",": 252,
+ "\":\"": 253
+},
+ "inv_dictionary": ["","e", "t", "a", "o", "i", "n", "s", "r", "h", "l", "d", "c", "u", "m", "f", "p", "g", "w", "y", "b", "v", "k", "x", "j", "q", "z", "th", "he", "in", "er", "an", "re", "on", "at", "en", "nd", "ti", "es", "or", "te", "of", "ed", "is", "it", "al", "ar", "st", "to", "nt", "ng", "se", "ha", "id", "as", "ou", "io", "le", "ve", "co", "me", "de", "hi", "ri", "ro", "ic", "ne", "ea", "ra", "ce", "li", "ch", "ll", "be", "ma", "si", "om", "ur", "ss", "the", "and", "ing", "ion", "tio", "ent", "ati", "for", "her", "ter", "hat", "The", "tha", "ere", "ate", "his", "con", "res", "ver", "all", "ons", "nce", "men", "ith", "ted", "ers", "pro", "thi", "wit", "are", "ess", "not", "ive", "was", "ect", "rea", "com", "eve", "per", "int", "est", "sta", "cti", "ica", "ist", "ear", "ain", "one", "our", "iti", "rat", "tion", "atio", "that", "ther", "with", "ment", "ions", "this", "here", "from", "ould", "ting", "hich", "whic", "ctio", "ence", "have", "othe", "ight", "sion", "ation", "tions", "which", "ction", "other", "their", "http", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "00", "000", "11", "111", " t", " o", " i", " s", " c", " w", " h", " b", " f", " m", "e ", "s ", "t ", "d ", "n ", "r ", "y ", "f ", "l ", "o ", " ", ".", ",", " ", ". ", ", ", " ", "/", "\\", ":", "{", "}", "[", "]", "\"", "e, ", "s, ", ", t", ", a", " a ", " th", "nd ", " in", " of", "of ", "on ", " an", "is ", " to", "to ", "t t", "e t", "s t", "e a", "s a", "E", "T", "A", "O", "I", "N", "S", "R", "H", "L", "D", "C", "U", "M", "F", "P", "G", "W", "Y", "B", "V", "K", "X", "J", "Q", "Z", "\",", "\":\""],
+ "max_length": 5
+}
\ No newline at end of file
diff --git a/datafiles/ipaddress.txt b/datafiles/ipaddress.txt
new file mode 100644
index 00000000..e56ea71e
--- /dev/null
+++ b/datafiles/ipaddress.txt
@@ -0,0 +1 @@
+127.0.0.1
\ No newline at end of file
diff --git a/objects/oClient.object.gmx b/objects/oClient.object.gmx
new file mode 100644
index 00000000..0fd2c2c5
--- /dev/null
+++ b/objects/oClient.object.gmx
@@ -0,0 +1,334 @@
+
+
diff --git a/objects/oControl.object.gmx b/objects/oControl.object.gmx
index 301d385a..7c7eeb0f 100644
--- a/objects/oControl.object.gmx
+++ b/objects/oControl.object.gmx
@@ -1,1771 +1,2163 @@
-
-
+
+
diff --git a/scripts/findIndex.gml b/scripts/findIndex.gml
new file mode 100644
index 00000000..1b7c89f7
--- /dev/null
+++ b/scripts/findIndex.gml
@@ -0,0 +1,7 @@
+var i, tempArray;
+tempArray = argument[0];
+for(i=0; i 0; c--) {
+ var code = ds_map_find_value(dict,string_copy(input,index,c));
+ if(!is_undefined(code)) {
+ q += chr(code);
+ encoded = true;
+ index += c;
+ break;
+ }
+ }
+
+ if(q == "") {
+ verb += string_char_at(input,index);
+ index++;
+ if(string_length(verb) == 255) {
+ q = strict_encode_verb(verb);
+ verb = "";
+ }
+ }
+ else {
+ if(verb != "") {
+ q = strict_encode_verb(verb) + q;
+ verb = "";
+ }
+ }
+
+ output += q;
+
+}
+
+if(verb != "") {
+ output += strict_encode_verb(verb);
+}
+
+return output;
diff --git a/scripts/strict_decompress.gml b/scripts/strict_decompress.gml
new file mode 100644
index 00000000..b8b9dc79
--- /dev/null
+++ b/scripts/strict_decompress.gml
@@ -0,0 +1,35 @@
+///strict_decompress(input)
+
+/*
+ Description: Returns a decompressed version of the provided input string
+ Arguments: input (string)
+ Returns: String
+*/
+
+var input, input_size, output, index, ml, inv_dict;
+
+input = argument0;
+input_size = string_length(input);
+output = "";
+index = 1;
+ml = _strict_data[? "max_length"];
+inv_dict = _strict_data[? "inv_dictionary"];
+
+while(index <= input_size) {
+ var char = string_ord_at(input,index);
+ if(char == 255) {
+ var n = string_ord_at(input,index+1);
+ output += string_copy(input,index+2,n);
+ index += n + 2;
+ }
+ else if(char == 254) {
+ output += string_char_at(input,index+1);
+ index += 2;
+ }
+ else {
+ output += inv_dict[| char];
+ index++;
+ }
+}
+
+return output;
diff --git a/scripts/strict_encode_verb.gml b/scripts/strict_encode_verb.gml
new file mode 100644
index 00000000..1cdbfeb9
--- /dev/null
+++ b/scripts/strict_encode_verb.gml
@@ -0,0 +1,17 @@
+///strict_encode_verb(verb)
+
+/*
+ Description: (called from strict_compress). Returns an encoded verb ready to be added to a compressed output
+ Arguments: verb (string)
+ Returns: String
+*/
+
+var verb = argument0;
+var verb_length = string_length(verb);
+
+if(verb_length > 1) {
+ return chr(255) + chr(verb_length) + verb;
+}
+else {
+ return chr(254) + verb;
+}
diff --git a/scripts/strict_init.gml b/scripts/strict_init.gml
new file mode 100644
index 00000000..e89cfa8e
--- /dev/null
+++ b/scripts/strict_init.gml
@@ -0,0 +1,18 @@
+///strict_init(data file)
+
+/*
+ Read dictionary file
+*/
+
+globalvar _strict_data;
+
+var json_data = "";
+
+var f = file_text_open_read(argument0);
+while (!file_text_eof(f)) {
+ json_data += file_text_read_string(f);
+ file_text_readln(f);
+}
+file_text_close(f);
+
+_strict_data = json_decode(json_data);
diff --git a/scripts/update_variables.gml b/scripts/update_variables.gml
new file mode 100644
index 00000000..19613954
--- /dev/null
+++ b/scripts/update_variables.gml
@@ -0,0 +1,262 @@
+/// update_variables
+switch(argument0){
+ case "prev":
+ global.itemPrev = array_clone(global.item);
+ global.itemstakenPrev = global.itemstaken;
+ global.metdeadPrev = array_clone(global.metdead);
+ global.eventPrev = array_clone(global.event);
+ global.monstersleftPrev = global.monstersleft;
+ global.maxmissilesPrev = global.maxmissiles;
+ global.maxsmissilesPrev = global.maxsmissiles;
+ global.maxpbombsPrev = global.maxpbombs;
+ global.maxhealthPrev = global.maxhealth;
+ global.playerhealthPrev = global.playerhealth;
+ global.morphballPrev = global.morphball;
+ global.jumpballPrev = global.jumpball;
+ global.powergripPrev = global.powergrip;
+ global.spacejumpPrev = global.spacejump;
+ global.screwattackPrev = global.screwattack;
+ global.hijumpPrev = global.hijump;
+ global.spiderballPrev = global.spiderball;
+ global.speedboosterPrev = global.speedbooster;
+ global.bombPrev = global.bomb;
+ global.ibeamPrev = global.ibeam;
+ global.wbeamPrev = global.wbeam;
+ global.pbeamPrev = global.pbeam;
+ global.sbeamPrev = global.sbeam;
+ global.cbeamPrev = global.cbeam;
+ global.missilesPrev = global.missiles;
+ global.smissilesPrev = global.smissiles;
+ global.pbombsPrev = global.pbombs;
+ global.etanksPrev = global.etanks;
+ global.mtanksPrev = global.mtanks;
+ global.stanksPrev = global.stanks;
+ global.ptanksPrev = global.ptanks;
+ global.currentsuitPrev = global.currentsuit;
+ global.monstersareaPrev = global.monstersarea;
+ break;
+ case "onlinevars":
+ ds_grid_set(global.onlineList, 0, 0, global.itemPrev);
+ ds_grid_set(global.onlineList, 1, 0, global.item);
+ ds_grid_set(global.onlineList, 0, 1, global.metdeadPrev);
+ ds_grid_set(global.onlineList, 1, 1, global.metdead);
+ ds_grid_set(global.onlineList, 0, 2, global.itemstakenPrev);
+ ds_grid_set(global.onlineList, 1, 2, global.itemstaken);
+ ds_grid_set(global.onlineList, 0, 3, global.eventPrev);
+ ds_grid_set(global.onlineList, 1, 3, global.event);
+ ds_grid_set(global.onlineList, 0, 4, global.monstersleftPrev);
+ ds_grid_set(global.onlineList, 1, 4, global.monstersleft);
+ ds_grid_set(global.onlineList, 0, 5, global.maxmissilesPrev);
+ ds_grid_set(global.onlineList, 1, 5, global.maxmissiles);
+ ds_grid_set(global.onlineList, 0, 6, global.maxsmissilesPrev);
+ ds_grid_set(global.onlineList, 1, 6, global.maxsmissiles);
+ ds_grid_set(global.onlineList, 0, 7, global.maxpbombsPrev);
+ ds_grid_set(global.onlineList, 1, 7, global.maxpbombs);
+ ds_grid_set(global.onlineList, 0, 8, global.maxhealthPrev);
+ ds_grid_set(global.onlineList, 1, 8, global.maxhealth);
+ ds_grid_set(global.onlineList, 0, 9, global.playerhealthPrev);
+ ds_grid_set(global.onlineList, 1, 9, global.playerhealth);
+ ds_grid_set(global.onlineList, 0, 10, global.morphballPrev);
+ ds_grid_set(global.onlineList, 1, 10, global.morphball);
+ ds_grid_set(global.onlineList, 0, 11, global.jumpballPrev);
+ ds_grid_set(global.onlineList, 1, 11, global.jumpball);
+ ds_grid_set(global.onlineList, 0, 12, global.powergripPrev);
+ ds_grid_set(global.onlineList, 1, 12, global.powergrip);
+ ds_grid_set(global.onlineList, 0, 13, global.spacejumpPrev);
+ ds_grid_set(global.onlineList, 1, 13, global.spacejump);
+ ds_grid_set(global.onlineList, 0, 14, global.screwattackPrev);
+ ds_grid_set(global.onlineList, 1, 14, global.screwattack);
+ ds_grid_set(global.onlineList, 0, 15, global.hijumpPrev);
+ ds_grid_set(global.onlineList, 1, 15, global.hijump);
+ ds_grid_set(global.onlineList, 0, 16, global.spiderballPrev);
+ ds_grid_set(global.onlineList, 1, 16, global.spiderball);
+ ds_grid_set(global.onlineList, 0, 17, global.speedboosterPrev);
+ ds_grid_set(global.onlineList, 1, 17, global.speedbooster);
+ ds_grid_set(global.onlineList, 0, 18, global.bombPrev);
+ ds_grid_set(global.onlineList, 1, 18, global.bomb);
+ ds_grid_set(global.onlineList, 0, 19, global.ibeamPrev);
+ ds_grid_set(global.onlineList, 1, 19, global.ibeam);
+ ds_grid_set(global.onlineList, 0, 20, global.wbeamPrev);
+ ds_grid_set(global.onlineList, 1, 20, global.wbeam);
+ ds_grid_set(global.onlineList, 0, 21, global.pbeamPrev);
+ ds_grid_set(global.onlineList, 1, 21, global.pbeam);
+ ds_grid_set(global.onlineList, 0, 22, global.sbeamPrev);
+ ds_grid_set(global.onlineList, 1, 22, global.sbeam);
+ ds_grid_set(global.onlineList, 0, 23, global.cbeamPrev);
+ ds_grid_set(global.onlineList, 1, 23, global.cbeam);
+ ds_grid_set(global.onlineList, 0, 24, global.missilesPrev);
+ ds_grid_set(global.onlineList, 1, 24, global.missiles);
+ ds_grid_set(global.onlineList, 0, 25, global.smissilesPrev);
+ ds_grid_set(global.onlineList, 1, 25, global.smissiles);
+ ds_grid_set(global.onlineList, 0, 26, global.pbombsPrev);
+ ds_grid_set(global.onlineList, 1, 26, global.pbombs);
+ ds_grid_set(global.onlineList, 0, 27, global.etanksPrev);
+ ds_grid_set(global.onlineList, 1, 27, global.etanks);
+ ds_grid_set(global.onlineList, 0, 28, global.mtanksPrev);
+ ds_grid_set(global.onlineList, 1, 28, global.mtanks);
+ ds_grid_set(global.onlineList, 0, 29, global.stanksPrev);
+ ds_grid_set(global.onlineList, 1, 29, global.stanks);
+ ds_grid_set(global.onlineList, 0, 30, global.ptanksPrev);
+ ds_grid_set(global.onlineList, 1, 30, global.ptanks);
+ ds_grid_set(global.onlineList, 0, 31, global.currentsuitPrev);
+ ds_grid_set(global.onlineList, 1, 31, global.currentsuit);
+ ds_grid_set(global.onlineList, 0, 32, global.monstersareaPrev);
+ ds_grid_set(global.onlineList, 1, 32, global.monstersarea);
+ break;
+ /*
+ case "onlinevarscurrent":
+ ds_grid_set(global.onlineList, 1, 0, global.item);
+ ds_grid_set(global.onlineList, 1, 1, global.metdead);
+ ds_grid_set(global.onlineList, 1, 2, global.itemstaken);
+ ds_grid_set(global.onlineList, 1, 3, global.event);
+ ds_grid_set(global.onlineList, 1, 4, global.monstersleft);
+ ds_grid_set(global.onlineList, 1, 5, global.maxmissiles);
+ ds_grid_set(global.onlineList, 1, 6, global.maxsmissiles);
+ ds_grid_set(global.onlineList, 1, 7, global.maxpbombs);
+ ds_grid_set(global.onlineList, 1, 8, global.maxhealth);
+ ds_grid_set(global.onlineList, 1, 9, global.playerhealth);
+ ds_grid_set(global.onlineList, 1, 10, global.morphball);
+ ds_grid_set(global.onlineList, 1, 11, global.jumpball);
+ ds_grid_set(global.onlineList, 1, 12, global.powergrip);
+ ds_grid_set(global.onlineList, 1, 13, global.spacejump);
+ ds_grid_set(global.onlineList, 1, 14, global.screwattack);
+ ds_grid_set(global.onlineList, 1, 15, global.hijump);
+ ds_grid_set(global.onlineList, 1, 16, global.spiderball);
+ ds_grid_set(global.onlineList, 1, 17, global.speedbooster);
+ ds_grid_set(global.onlineList, 1, 18, global.bomb);
+ ds_grid_set(global.onlineList, 1, 19, global.ibeam);
+ ds_grid_set(global.onlineList, 1, 20, global.wbeam);
+ ds_grid_set(global.onlineList, 1, 21, global.pbeam);
+ ds_grid_set(global.onlineList, 1, 22, global.sbeam);
+ ds_grid_set(global.onlineList, 1, 23, global.cbeam);
+ ds_grid_set(global.onlineList, 1, 24, global.missiles);
+ ds_grid_set(global.onlineList, 1, 25, global.smissiles);
+ ds_grid_set(global.onlineList, 1, 26, global.pbombs);
+ ds_grid_set(global.onlineList, 1, 27, global.etanks);
+ ds_grid_set(global.onlineList, 1, 28, global.mtanks);
+ ds_grid_set(global.onlineList, 1, 29, global.stanks);
+ ds_grid_set(global.onlineList, 1, 30, global.ptanks);
+ ds_grid_set(global.onlineList, 1, 31, global.currentsuit);
+ ds_grid_set(global.onlineList, 1, 32, global.monstersarea);
+ break;
+ case "onlinevarsprev":
+ ds_grid_set(global.onlineList, 0, 0, global.itemPrev);
+ ds_grid_set(global.onlineList, 0, 1, global.metdeadPrev);
+ ds_grid_set(global.onlineList, 0, 2, global.itemstakenPrev);
+ ds_grid_set(global.onlineList, 0, 3, global.eventPrev);
+ ds_grid_set(global.onlineList, 0, 4, global.monstersleftPrev);
+ ds_grid_set(global.onlineList, 0, 5, global.maxmissilesPrev);
+ ds_grid_set(global.onlineList, 0, 6, global.maxsmissilesPrev);
+ ds_grid_set(global.onlineList, 0, 7, global.maxpbombsPrev);
+ ds_grid_set(global.onlineList, 0, 8, global.maxhealthPrev);
+ ds_grid_set(global.onlineList, 0, 9, global.playerhealthPrev);
+ ds_grid_set(global.onlineList, 0, 10, global.morphballPrev);
+ ds_grid_set(global.onlineList, 0, 11, global.jumpballPrev);
+ ds_grid_set(global.onlineList, 0, 12, global.powergripPrev);
+ ds_grid_set(global.onlineList, 0, 13, global.spacejumpPrev);
+ ds_grid_set(global.onlineList, 0, 14, global.screwattackPrev);
+ ds_grid_set(global.onlineList, 0, 15, global.hijumpPrev);
+ ds_grid_set(global.onlineList, 0, 16, global.spiderballPrev);
+ ds_grid_set(global.onlineList, 0, 17, global.speedboosterPrev);
+ ds_grid_set(global.onlineList, 0, 18, global.bombPrev);
+ ds_grid_set(global.onlineList, 0, 19, global.ibeamPrev);
+ ds_grid_set(global.onlineList, 0, 20, global.wbeamPrev);
+ ds_grid_set(global.onlineList, 0, 21, global.pbeamPrev);
+ ds_grid_set(global.onlineList, 0, 22, global.sbeamPrev);
+ ds_grid_set(global.onlineList, 0, 23, global.cbeamPrev);
+ ds_grid_set(global.onlineList, 0, 24, global.missilesPrev);
+ ds_grid_set(global.onlineList, 0, 25, global.smissilesPrev);
+ ds_grid_set(global.onlineList, 0, 26, global.pbombsPrev);
+ ds_grid_set(global.onlineList, 0, 27, global.etanksPrev);
+ ds_grid_set(global.onlineList, 0, 28, global.mtanksPrev);
+ ds_grid_set(global.onlineList, 0, 29, global.stanksPrev);
+ ds_grid_set(global.onlineList, 0, 30, global.ptanksPrev);
+ ds_grid_set(global.onlineList, 0, 31, global.currentsuitPrev);
+ ds_grid_set(global.onlineList, 0, 32, global.monstersareaPrev);
+ break;
+ */
+ case "replaceglobalvars":
+ global.item = ds_grid_get(global.onlineList, 1, 0);
+ global.metdead = ds_grid_get(global.onlineList, 1, 1);
+ global.itemstaken = ds_grid_get(global.onlineList, 1, 2);
+ global.event = ds_grid_get(global.onlineList, 1, 3);
+ global.monstersleft = ds_grid_get(global.onlineList, 1, 4);
+ global.maxmissiles = ds_grid_get(global.onlineList, 1, 5);
+ global.maxsmissiles = ds_grid_get(global.onlineList, 1, 6);
+ global.maxpbombs = ds_grid_get(global.onlineList, 1, 7);
+ global.maxhealth = ds_grid_get(global.onlineList, 1, 8);
+ global.playerhealth = ds_grid_get(global.onlineList, 1, 9);
+ global.morphball = ds_grid_get(global.onlineList, 1, 10);
+ global.jumpball = ds_grid_get(global.onlineList, 1, 11);
+ global.powergrip = ds_grid_get(global.onlineList, 1, 12);
+ global.spacejump = ds_grid_get(global.onlineList, 1, 13);
+ global.screwattack = ds_grid_get(global.onlineList, 1, 14);
+ global.hijump = ds_grid_get(global.onlineList, 1, 15);
+ global.spiderball = ds_grid_get(global.onlineList, 1, 16);
+ global.speedbooster = ds_grid_get(global.onlineList, 1, 17);
+ global.bomb = ds_grid_get(global.onlineList, 1, 18);
+ global.ibeam = ds_grid_get(global.onlineList, 1, 19);
+ global.wbeam = ds_grid_get(global.onlineList, 1, 20);
+ global.pbeam = ds_grid_get(global.onlineList, 1, 21);
+ global.sbeam = ds_grid_get(global.onlineList, 1, 22);
+ global.cbeam = ds_grid_get(global.onlineList, 1, 23);
+ global.missiles = ds_grid_get(global.onlineList, 1, 24);
+ global.smissiles = ds_grid_get(global.onlineList, 1, 25);
+ global.pbombs = ds_grid_get(global.onlineList, 1, 26);
+ global.etanks = ds_grid_get(global.onlineList, 1, 27);
+ global.mtanks = ds_grid_get(global.onlineList, 1, 28);
+ global.stanks = ds_grid_get(global.onlineList, 1, 29);
+ global.ptanks = ds_grid_get(global.onlineList, 1, 30);
+ global.currentsuit = ds_grid_get(global.onlineList, 1, 31);
+ global.monstersarea = ds_grid_get(global.onlineList, 1, 32);
+ break;
+ case "disablesame":
+ for(var i=0; i