Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Enable All Symbols by MTP3!*/
- /*
- Usage:
- 1. Make a new bookmark
- 2. Paste in this code into the URL field:
- javascript:$.getScript('https://pastebin.com/raw/B42UNcGu');
- 3. Click, you should hear a success bling!
- 4. ???
- 5. Profit
- */
- var mlCode = ""; /* Stores all of Manyland's JS for future variable name extraction. */
- var speechVar; /* Speech userdata crap. */
- var typableKeys; /* Shift+Character thing, we're gonna mess with it a little. */
- var typableKeysMapping; /* Another Shift+Character thing, this is the part where it tells Manyland which key to type. */
- var noShiftChars; /* Some characters that have SHIFT disabled for whatever reason. */
- var talkFunction; /* Function that sends stuff to the function that says stuff */
- var sayFunction; /* Function says stuff */
- var getMLcode = function () { /* Get Manyland's code! */
- return new Promise((res, rej) => {
- a = $.get("manyland.js?v=" + v), a.always(function() { /* JQuery that code! */
- mlCode = a.responseText; /* Store it too! */
- res(); /* Resolve. */
- });
- })
- };
- var findFind = (begin, end) => { /* Find the text between 2 literal strings */
- var pos1 = mlCode.indexOf(begin) + begin.length;
- var pos2 = mlCode.indexOf(end, pos1);
- return mlCode.substring(pos1, pos2);
- };
- var findMatch = (begin, end) => { /* Find the text between a literal string and a regex. */
- var pos1 = mlCode.indexOf(begin) + begin.length;
- var pos2 = mlCode.search(end, pos1);
- return mlCode.substring(pos1, pos2);
- };
- (async () => {
- await getMLcode(); /* Wait until we've dumped the code. */
- /* Find a couple obfuscated variable names that we're required to use. */
- speechVar = findMatch(
- "new MapPlacementValidation;ig.game.",
- /=new O[0-9]{1,4};ig\.game\.O[0-9]{1,4}=new BoostManager;/
- );
- typableKeys = findFind(
- "eight:\"8\",nine:\"9\",zero:\"0\"},",
- ":\"one"
- );
- noShiftChars = findFind(
- "\"abcdefghijklmnopqrstuvwxyz\".split(\"\"),",
- ":\",.-+?'\".split(\"\")"
- );
- talkFunction = findFind(
- "this.symbolPos.y+=20},draw:function(){},",
- ":function(){if((!ig.game.instrumentDialog||"
- );
- sayFunction = findFind(
- "ig.input.pressed(\"forwardslash\")&&this.",
- "(\"/\")}},O"
- );
- /* Helpfully tell you what they currently are! */
- consoleref.log("speechVar = ig.game." + speechVar);
- consoleref.log("typableKeys = ig.game." + speechVar + "." + typableKeys);
- consoleref.log("typableKeysMapping = ig.game." + speechVar + "." + typableKeys + "Mapping");
- consoleref.log("noShiftChars = ig.game." + speechVar + "." + noShiftChars);
- /* Make everything just a little easier to access. */
- speechVar = ig.game[speechVar];
- typableKeysMapping = speechVar[typableKeys + "Mapping"];
- typableKeys = speechVar[typableKeys];
- /* Quickly check if we've already done this. */
- if (typableKeys[2] == "three") {
- ig.game.sounds.success.play();
- consoleref.log("Already added symbols! Exiting.");
- return;
- };
- /* Add the grave to the list of keys that exist. */
- ig.KEY.GRAVE = 192;
- ig.input.bind(ig.KEY.GRAVE, "grave");
- /* Weird funky string math */
- var funcString = "" + speechVar[talkFunction];
- var getThisLength = ":ig.input.pressed(\"forwardslash\")&&this." + sayFunction + "(\"/\")}}";
- funcString = funcString.substring(11, funcString.length - getThisLength.length);
- funcString += ":ig.input.pressed(\"forwardslash\")?this." + sayFunction + "(\"/\")";
- funcString += ":ig.input.pressed(\"backwardslash\")?this." + sayFunction + "(\"\\\\\")";
- funcString += ":ig.input.pressed(\"grave\")?this." + sayFunction + "(\"`\")";
- funcString += ":ig.input.pressed(\",\")?this." + sayFunction + "(\",\")";
- funcString += ":ig.input.pressed(\".\")?this." + sayFunction + "(\".\")";
- funcString += ":ig.input.pressed(\"-\")&&this." + sayFunction + "(\"-\")";
- funcString += "}";
- speechVar[talkFunction] = new Function(funcString);
- /* Add a couple entries to the allowed keys.. */
- typableKeys.splice(2, 0, "three");
- typableKeys.splice(3, 0, "four");
- typableKeys.splice(5, 0, "six");
- typableKeys.splice(6, 0, "seven");
- typableKeys.push("grave");
- typableKeys.push(",");
- typableKeys.push(".");
- typableKeys.push("-");
- speechVar[noShiftChars] = "+?'".split("");
- /* Replace Shift+2 to @, and set everything else to normal stuff. */
- typableKeysMapping.two = "@";
- typableKeysMapping.three = "#";
- typableKeysMapping.four = "$";
- typableKeysMapping.six = "^";
- typableKeysMapping.seven = "&";
- typableKeysMapping.grave = "~";
- typableKeysMapping[","] = "<";
- typableKeysMapping["."] = ">";
- typableKeysMapping["-"] = "_";
- ig.game.sounds.success.play();
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement