icefireAlan6

script of q1k [icefireAlan6 upgrade]­

Jan 19th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         cursors.io hack --working-- (2019)
  3. // @namespace    q1k
  4. // @version      1.1.0
  5. // @description  cursorsio hack - drawing, texting, player ids, & more
  6. // @author       q1k
  7. // @match        http://cursors.io/
  8. // @grant        none
  9. // @run-at       document-idle
  10. // ==/UserScript==
  11.  
  12.  
  13. /*
  14.    ___ _   _ _ __ ___  ___  _ __ ___   _  ___
  15.   / __| | | | `__/ __|/ _ \| `__/ __| | |/ _ \
  16.  | (__| |_| | |  \__ \ (_) | |  \__ \_| | (_) |
  17.   \___|\__,_|_|  |___/\___/|_|  |___(_)_|\___/
  18.  
  19. hello people,today me upgrade script of q1k
  20. i sorry you,q1k
  21. here was guide
  22.  
  23. */
  24. /*  How to use:
  25.     1.  Go to cursors.io, open console (ctrl + shift + j or F12)
  26.         and paste this entire script into the console, then hit enter
  27.         -if you experience problems running the script, make sure to block "cursors.io/client_out.js"
  28.     2.  To type: type message and hit enter (shift+enter for new row)
  29.         -all ascii characters are available
  30.     3.  To move your cursor only when clicking: press numpad . OR delete
  31.         -Pathfinder will be active in this mode. (CTRL+click to ignore pathfinder)
  32.         -try not to use a too low value of the delay, or you may get disconnected on some levels
  33.         --make sure 'no cursor lock' is marked so pathfinder works correctly
  34.         To move your cursor normally: press numpad . again
  35.     4.  To draw a circle: press numpad 0 OR insert
  36.         To stop drawing a circle: press numpad 0 again
  37.     5.  To draw arrows, use the arrow keys
  38.     6.  To draw different images press numpad 1 - numpad 9 keys
  39.     7.  To make drawings bigger/smaller use numpad + and -
  40.     8.  Reset drawing size with numpad *
  41.     9.  To show/hide cursors ids: press F8
  42.     10. Change ids position with: F9
  43.     11. To show this help: press F1
  44. */
  45.  
  46. var _tempOnClose;
  47. var _tempChangeCanvasID = undefined;
  48. var canvas = document.getElementById("canvas"),
  49.     _tempEvt = function() {
  50.         _tempOnClose();
  51.     };
  52. if (_tempChangeCanvasID != undefined) canvas.setAttribute("id", _tempChangeCanvasID);
  53. if (canvas.style.cursor == "none") {
  54.     var _tempWSSend = WebSocket.prototype.send;
  55.     WebSocket.prototype.send = function(send) {
  56.         return function(data) {
  57.             if (this.readyState == 1) {
  58.                 this.onclose = _tempEvt;
  59.                 this.close();
  60.             }
  61.             if (this.readyState > 0) {
  62.                 clearInterval(_tempInterval);
  63.                 WebSocket.prototype.send = _tempWSSend;
  64.             }
  65.             return {}
  66.         }
  67.     }(WebSocket.prototype.send);
  68.     var _tempCanvasEvent = function(_mevt) {
  69.         var _tempMouseEvent;
  70.         if (document.createEvent) {
  71.             _tempMouseEvent = document.createEvent("HTMLEvents");
  72.             _tempMouseEvent.initEvent(_mevt, true, true);
  73.         } else {
  74.             _tempMouseEvent = document.createEventObject();
  75.             _tempMouseEvent.eventType = _mevt;
  76.         }
  77.         _tempMouseEvent.eventName = _mevt;
  78.         if (document.createEvent) {
  79.             canvas.dispatchEvent(_tempMouseEvent);
  80.         } else {
  81.             canvas.fireEvent("on" + _tempMouseEvent.eventType, _tempMouseEvent);
  82.         }
  83.     };
  84.     var _tempInterval = setInterval(function() {
  85.         _tempCanvasEvent("mousedown");
  86.         _tempCanvasEvent("mousedown");
  87.     }, 100)
  88. } else {
  89.     setTimeout(_tempEvt, 0);
  90. }
  91. _tempOnClose = function() {
  92. var A = window;
  93. var E = document;
  94. var posX, posY;
  95. var lastX, lastY;
  96. var serverPosX, serverPosY;
  97. var initialLoad = true;
  98. var clicksCount = 3;
  99. var auraEnabled = false;
  100. var auraTime = 0;
  101. var auraRadius = 10;
  102. var movementEnabled = true;
  103. var imgSizeShow = false;
  104. var showcursorsid = false;
  105. var hideExtraInfo = false;
  106.  
  107. var fontnarrow = false;
  108. var fontSize = 2;
  109. var kerning = 3;
  110. var alphabet = {
  111.     33:[[0,1,1.5,1],[2,1,2.5,1]],//!
  112.     34:[[0,0.5,1,0.5],[0,1.25,1,1.25]],//"
  113.     35:[[0.5,-0.25,0.5,2.3],[1.5,-0.25,1.5,2.3],[-0.25,0.5,2.3,0.5],[-0.25,1.5,2.3,1.5]],//#
  114.     36:[[0,0,0,2],[1,0,1,2],[2,0,2,2],[0,0,1,0],[1,2,2,2],[-0.5,1,0,1],[2,1,2.5,1]],//$
  115.     37:[[1,0,0,0],[0,0,0,1],[0,1,2,1],[2,1,2,2],[2,2,1,2],[1,2,1,0],[2,0,0,2]],//% v1
  116.     //37:[[0,0,0,0.75],[0,0.75,0.75,0.75],[0.75,0.75,0.75,0],[0.75,0,0,0],[2,0,0,2],[1.25,1.25,1.25,2],[1.25,2,2,2],[2,2,2,1.25],[2,1.25,1.25,1.25]],//% v2
  117.     //37:[[1,0.5,0.5,0],[0.5,0,0,0.5],[0,0.5,0.5,1],[0.5,1,1,0.5],[2,0,0,2],[2,1.5,1.5,1],[1.5,1,1,1.5],[1,1.5,1.5,2],[1.5,2,2,1.5]],//% v3
  118.     38:[[0.5,1,0,1],[0,1,0,0],[0,0,2,0],[2,0,2,0.5],[2,0.5,1,1.5],[1,0,1,0.5],[1,0.5,2,1.5]],//&
  119.     39:[[0,0.5,1,0.5]], // '
  120.     40:[[0,2,0.5,1],[0.5,1,1.5,1],[1.5,1,2,2]],//(
  121.     41:[[0,0,0.5,1],[0.5,1,1.5,1],[1.5,1,2,0]],//)
  122.     42:[[0.5,0,1.5,2],[1.5,0,0.5,2],[0,1,2,1]],//*
  123.     43:[[0,1,2,1],[1,0,1,2]],//+
  124.     44:[[2,0,3,0]],//,
  125.     45:[[0.6,0.3,0.6,1.7]],//-
  126.     46:[[1.5,0,2,0]],//.
  127.     47:[[2,0.4,0,1.6]],//  /
  128.     48:[[2,0,0,0],[0,0,0,2],[0,2,2,2],[2,2,2,0],[2,0,0,2]],//0
  129.     49:[[0,1,2,1],[1,0,0,1],[2,0,2,2]],//1
  130.     50:[[0,0,0,2],[0,2,1,2],[1,2,1,0],[1,0,2,0],[2,0,2,2]],//2
  131.     51:[[0,0,0,2],[0,2,2,2],[2,2,2,0],[1,0,1,2]],
  132.     52:[[0,0,1,0],[1,0,1,2],[0,2,2,2]],
  133.     53:[[0,2,0,0],[0,0,1,0],[1,0,1,2],[1,2,2,2],[2,2,2,0]],
  134.     54:[[0,2,0,0],[0,0,2,0],[2,0,2,2],[2,2,1,2],[1,2,1,0]],
  135.     55:[[0,0,0,2],[0,2,2,0]],
  136.     56:[[0,0,0,2],[0,2,2,2],[2,2,2,0],[2,0,0,0],[1,0,1,2]],
  137.     57:[[0,0,1,0],[1,0,1,2],[0,2,2,2],[0,0,0,2],[2,0,2,2]],//9
  138.     58:[[0,1,0.5,1],[1.5,1,2,1]],//:
  139.     59:[[0,1,0.5,1],[2,1,3,1]],//;
  140.     60:[[0,2,1,0],[1,0,2,2]],//<
  141.     61:[[0.5,0,0.5,2],[1.5,0,1.5,2]],//=
  142.     62:[[0,0,1,2],[1,2,2,0]],//>
  143.     63:[[1,0,0,0],[0,0,0,2],[0,2,1,2],[1,2,1,1],[1,1,1.5,1],[2,1,2.5,1]  ],//?
  144.     64:[[2.5,2,2.5,0],[2.5,0,-0.5,0],[-0.5,0,-0.5,2],[-0.5,2,1.5,2],[1.5,2,1.5,1],[1.5,1,0.5,1],[0.5,1,0.5,2]],//@
  145.     91:[[0,1.5,0,0.5],[0,0.5,2,0.5],[2,0.5,2,1.5]],// [
  146.     92:[[0,0.4,2,1.6]],// backslash
  147.     93:[[0,0.5,0,1.5],[0,1.5,2,1.5],[2,1.5,2,0.5]],// ]
  148.     94:[[1.5,0,0,1],[0,1,1.5,2]],//^
  149.     95:[[2,0,2,2] ],//_
  150.     96:[[0,0.5,1,0.5]], // ` display same as 39
  151.     97:[[2,0,0,0],[0,2,0,0],[0,2,2,2],[1,0,1,2]],//a
  152.     98:[[2,0,0,0],[0,0,0,1],[1,0,1,1],[2,0,2,1],[0,1,0.5,2],[0.5,2,1,1],[1,1,1.5,2],[1.5,2,2,1]],//b
  153.     99:[[2,2,2,0],[2,0,0,0],[0,0,0,2]],//c
  154.     100:[[2,0,0,0],[0,0,0,1],[0,1,1,2],[1,2,2,1],[2,1,2,0]],
  155.     101:[[2,2,2,0],[2,0,0,0],[0,0,0,2],[1,0,1,2]],
  156.     102:[[2,0,0,0],[0,0,0,2],[1,0,1,2]],
  157.     103:[[1,1,1,2],[1,2,2,2],[2,2,2,0],[2,0,0,0],[0,0,0,2]],
  158.     104:[[0,0,2,0],[0,2,2,2],[1,0,1,2]],
  159.     105:[[0,0,0,2],[0,1,2,1],[2,0,2,2]],
  160.     //106:[[0,0,0,2],[0,1,2,1],[2,0,2,1]], //j v1
  161.     106:[[1.5,0,2,0],[2,0,2,1.5],[0,1.5,2,1.5],[0,0.85,0,2.25]], //j v2
  162.     107:[[0,0,2,0],[1,0,0,2],[1,0,2,2]],
  163.     108:[[0,0,2,0],[2,0,2,2]],
  164.     109:[[0,0,2,0],[0,0,2,1],[2,1,0,2],[0,2,2,2]],
  165.     110:[[0,0,2,0],[0,0,2,2],[0,2,2,2]],
  166.     111:[[2,0,0,0],[0,0,0,2],[0,2,2,2],[2,2,2,0]],
  167.     112:[[2,0,0,0],[0,0,0,2],[0,2,1,2],[1,2,1,0]],
  168.     113:[[2,0,0,0],[0,0,0,2],[0,2,2,2],[2,2,2,0],[1,1,2,2]],
  169.     114:[[2,0,0,0],[0,0,0,2],[0,2,1,2],[1,2,1,0],[1,1,2,2]],
  170.     115:[[0,0,0,2],[1,0,1,2],[2,0,2,2],[0,0,1,0],[1,2,2,2]],
  171.     116:[[0,0,0,2],[0,1,2,1]],
  172.     117:[[0,0,2,0],[0,2,2,2],[2,0,2,2]],
  173.     118:[[0,0,2,1],[0,2,2,1]],
  174.     119:[[0,0,2,0],[0,2,2,2],[2,0,1,1],[2,2,1,1]],
  175.     120:[[0,0,2,2],[2,0,0,2]],
  176.     121:[[0,0,1,1],[0,2,1,1],[2,1,1,1]],
  177.     122:[[0,0,0,2],[0,2,2,0],[2,0,2,2]],//z
  178.     123:[[0,1.5,0,0.5],[0,0.5,0.5,0.5],[0.5,0.5,1,0],[1,0,1.5,0.5],[1.5,0.5,2,0.5],[2,0.5,2,1.5]],// {
  179.     124:[[0,1,2,1]],// |
  180.     125:[[0,0.5,0,1.5],[0,1.5,0.5,1.5],[0.5,1.5,1,2],[1,2,1.5,1.5],[1.5,1.5,2,1.5],[2,1.5,2,0.5]],// }
  181.     126:[[0.5,0,0,0.75],[0,0.75,0.5,1.5],[0.5,1.5,0,2.25]],// ~
  182. };
  183.  
  184. var imageScale = 1.0;
  185. var imgData = [
  186.     /* arrow left */
  187.     [[0,0,0,9],[0,0,-3,3],[0,0,3,3]],
  188.  
  189.     /* arrow up */
  190.     [[0,0,9,0],[0,0,3,-3],[0,0,3,3]],
  191.  
  192.     /* arrow right */
  193.     [[0,0,0,-9],[0,0,-3,-3],[0,0,3,-3]],
  194.  
  195.     /* arrow down */
  196.     [[0,0,-9,0],[0,0,-3,-3],[0,0,-3,3]],
  197.  
  198.     /*star 5*/
  199.     [[8,0,8,24],[8,24,24,4],[24,4,0,12],[0,12,24,20],[24,20,8,0]],
  200.  
  201.     /* reversed star */
  202.     [[0,4,24,12],[24,12,0,20],[0,20,16,0],[16,0,16,24],[16,24,0,4]],
  203.  
  204.     /*tictactoe*/
  205.     [[72,24,0,24],[0,48,72,48],[24,0,24,72],[48,0,48,72],[0,0,0,72],[0,72,72,72],[72,72,72,0],[72,0,0,0]],
  206.  
  207.     /*triforce*/
  208.     [[20,0,0,10],[0,10,20,20],[20,20,20,0],[10,5,10,15],[10,15,20,10],[20,10,10,5],[2,9,2,11],[3,9,3,11],[4,8,4,12],[5,8,5,12],[6,7,6,13],[7,7,7,13],[8,6,8,14],[9,6,9,14],[12,4,12,6],[12,14,12,16],[13,4,13,6],[13,14,13,16],[14,3,14,7],[14,13,14,17],[15,3,15,7],[15,13,15,17],[16,2,16,8],[16,12,16,18],[17,2,17,8],[17,12,17,18],[18,1,18,9],[18,11,18,19],[19,1,19,9],[19,11,19,19]],
  209.  
  210.     /*pentashot*/
  211.     [[50,16,66,17],[66,17,65,32],[51,26,72,36],[65,32,65,33],[72,36,64,52],[49,35,69,58],[69,58,54,71],[54,71,35,48],[49,65,33,70],[33,70,25,49],[16,46,16,63],[16,63,30,63],[50,16,51,19],[51,19,51,26],[51,26,49,35],[49,35,46,40],[46,40,43,43],[43,43,38,47],[38,47,32,49],[32,49,27,49],[27,49,24,49],[24,49,21,48],[21,48,16,46],[16,46,13,44],[13,44,10,41],[10,41,8,38],[8,38,5,32],[5,32,4,24],[4,24,5,18],[5,18,8,11],[8,11,12,7],[12,7,16,4],[16,4,21,2],[21,2,25,1],[25,1,31,1],[31,1,35,2],[35,2,40,4],[40,4,45,8],[45,8,48,13],[48,13,50,16]],
  212.  
  213.     /*heart*/
  214.     [[9,5,4,0],[4,0,2,0],[2,0,1,1],[4,10,9,5],[1,1,1,3],[1,3,3,5],[3,5,1,7],[1,7,1,9],[1,9,2,10],[2,10,4,10]],
  215.  
  216.     /*penrose*/
  217.     [[33,34,42,40],[36,36,27,42],[33,38,33,26],[27,22,48,36],[48,36,27,50],[27,50,27,22],[42,40,42,52],[48,36,48,56],[48,56,39,50],[42,48,33,54],[33,54,54,68],[54,68,46,72],[48,28,39,22],[42,20,33,26],[42,24,42,12],[42,12,27,22],[48,28,48,0],[48,0,54,4],[54,4,54,68],[27,42,18,36],[21,38,21,26],[21,34,12,40],[27,50,12,40],[21,26,0,40],[0,40,0,32],[0,32,48,0],[0,40,46,72]],
  218.  
  219.     /*boxception*/
  220.     [[60,0,0,0],[0,0,0,60],[0,60,60,60],[60,60,60,0],[60,0,0,3],[0,3,3,60],[3,60,60,57],[60,57,57,0],[57,0,0,6],[0,6,6,60],[6,60,60,54],[60,54,54,0],[54,0,0,9],[0,9,9,60],[9,60,60,51],[60,51,51,0],[51,0,0,12],[0,12,12,60],[12,60,60,48],[60,48,48,0],[48,0,0,15],[0,15,15,60],[15,60,60,45],[60,45,45,0],[45,0,0,18],[0,18,18,60],[18,60,60,42],[60,42,42,0],[42,0,0,21],[0,21,21,60],[21,60,60,39],[60,39,39,0],[39,0,0,24],[0,24,24,60],[24,60,60,36],[60,36,36,0],[36,0,0,27],[0,27,27,60],[27,60,60,33],[60,33,33,0],[33,0,0,30],[0,30,30,60],[30,60,60,30],[60,30,30,0],[30,0,0,33],[0,33,33,60],[33,60,60,27],[60,27,27,0],[27,0,0,36],[0,36,36,60],[36,60,60,24],[60,24,24,0],[24,0,0,39],[0,39,39,60],[39,60,60,21],[60,21,21,0],[21,0,0,42],[0,42,42,60],[42,60,60,18],[60,18,18,0],[18,0,0,45],[0,45,45,60],[45,60,60,15],[60,15,15,0],[15,0,0,48],[0,48,48,60],[48,60,60,12],[60,12,12,0],[12,0,0,51],[0,51,51,60],[51,60,60,9],[60,9,9,0],[9,0,0,54],[0,54,54,60],[54,60,60,6],[60,6,6,0],[6,0,0,57],[0,57,57,60],[57,60,60,3],[60,3,3,0],[3,0,0,60]],
  221.  
  222.     /*cursor*/
  223.     [[0,0,7,7],[7,7,7,3],[7,3,9.5,0],[9.5,0,0,0]],
  224.  
  225.     /*dickbutt*/
  226.     [[105,27,81,12],[81,12,45,5],[45,5,39,2],[39,2,29,8],[29,8,30,15],[30,15,35,19],[35,19,43,15],[43,15,45,5],[45,5,40,12],[40,12,34,13],[34,13,29,8],[22,38,33,32],[33,32,39,35],[39,35,37,47],[37,47,29,50],[29,50,24,46],[24,46,22,38],[22,38,28,43],[28,43,35,40],[35,40,39,35],[33,24,46,17],[46,17,49,20],[49,20,46,28],[41,52,60,8],[29,8,14,14],[14,14,6,23],[6,23,3,37],[3,37,5,47],[5,47,15,55],[15,55,48,63],[48,63,71,74],[71,74,63,81],[63,81,58,91],[58,91,59,99],[59,99,29,103],[29,103,27,109],[27,109,31,115],[31,115,60,114],[60,114,55,123],[55,123,57,127],[57,127,63,127],[63,127,65,120],[63,127,66,132],[66,132,73,132],[73,132,78,121],[78,121,69,116],[69,116,66,105],[66,105,67,96],[67,96,59,99],[67,96,70,89],[70,89,68,83],[70,89,77,84],[78,121,86,122],[86,122,103,114],[103,114,110,104],[110,104,111,97],[111,97,138,103],[138,103,132,85],[132,85,125,81],[125,81,127,94],[127,94,113,91],[113,91,120,79],[120,79,122,64],[122,64,152,62],[152,62,144,46],[144,46,138,44],[138,44,141,57],[141,57,122,58],[122,58,119,43],[119,43,105,27],[61,50,91,59],[91,59,96,57],[96,57,102,58],[102,58,102,62],[102,62,95,61],[95,61,102,65],[102,65,101,68],[101,68,94,66],[94,66,94,75],[94,75,91,75],[91,75,88,64],[88,64,60,56],[73,82,74,80],[79,97,82,95],[92,96,94,94],[96,100,98,98],[100,105,101,104],[48,111,49,109],[52,111,53,109]],
  227.  
  228.  
  229. ];
  230.  
  231. function sa(f) {
  232.     return f << 1;
  233. }
  234.  
  235. function ta(f) {
  236.     return f << 1;
  237. }
  238.  
  239. function U() {
  240.     return E.pointerLockElement === y || E.mozPointerLockElement === y || E.webkitPointerLockElement === y;
  241. }
  242.  
  243. function ba() {
  244.     a.fillStyle = "#000000";
  245.     a.font = "35px NovaSquare";
  246.     a.fillText("Please do not embed our website, thank you.", 400 - a.measureText("Please do not embed our website, thank you.").width / 2, 300);
  247.     a.font = "16px NovaSquare";
  248.     a.fillText("Play http://cursors.io/", 400 - a.measureText("Play http://cursors.io/").width /
  249.         2, 330);
  250.     top.location = "http://cursors.io";
  251.     throw "Please do not embed our website, thank you.";
  252. }
  253.  
  254. function ua(f) {
  255.     V(f);
  256. }
  257.  
  258. function W(f, b) {
  259.     J = f;
  260.     K = b;
  261.     posX = k = v = f;
  262.     posY = q = w = b;
  263.     B = v << 1;
  264.     C = w << 1;
  265. }
  266.  
  267. function unfocus() {
  268.     elm.forEach(function(i) { i.blur() });
  269. }
  270.  
  271. window.changedelay = function(d) {
  272.     d = Math.floor(parseInt(d));
  273.     var dd = document.getElementById('delay');
  274.     if (d >= 0) {dd.value = delay = d;}
  275.     else dd.value = delay = 0;
  276. }
  277.  
  278. window.changefontsize = function(d) {
  279.     d = parseFloat(d);
  280.     var dd = document.getElementById('fontsize');
  281.     if (d >0) {dd.value = fontSize = d;}
  282.     else dd.value = fontSize = 2;
  283. }
  284.  
  285. window.changefontwidth = function(d) {
  286.     if (d.checked) { textwidth=2/3; fontnarrow=true; d.blur(); }
  287.     else { textwidth=1; fontnarrow=false; d.blur(); }
  288. }
  289.  
  290. window.cmessage = "by q1k";
  291. window.changecmessage = function(d) {
  292.     var dd = document.getElementById('cmessage');
  293.     cmessage = d;
  294. }
  295.  
  296. window.changeImgSize = function(d) {
  297.     d = Math.floor(parseInt(d));
  298.     var tmp = d/100;
  299.     var dd = document.getElementById('imgsize');
  300.     if (d > 0) {
  301.         dd.value = d;
  302.         imageScale = tmp;
  303.         imgSizeDisplay();
  304.     }
  305.     else {
  306.         dd.value = 10;
  307.         imageScale = 0.1;
  308.         imgSizeDisplay();
  309.     }
  310. }
  311.  
  312. window.disablemovement = function(d) {
  313.     if (d.checked) { movementEnabled = false; d.blur() }
  314.     else { movementEnabled = true; d.blur() }
  315. }
  316.  
  317. window.changeextrainfo = function(d) {
  318.     if (d.checked) { hideExtraInfo = true; d.blur(); }
  319.     else { hideExtraInfo = false; d.blur(); }
  320. }
  321.  
  322. window.toggler = function() {
  323.     var dd = document.getElementById('toggle');
  324.     dd.classList.toggle('open');
  325.     if (dd.classList.contains('open')) dd.innerHTML = "hide advanced options <span></span>";
  326.     else dd.innerHTML = "show advanced options <span></span>";
  327. }
  328.  
  329. var elm=[];
  330. function Ma() {
  331.     var el1 = document.querySelectorAll("a[href='https://m28.studio/']");
  332.     var par = el1[0].parentElement;
  333.     var add = "<label id='help' title='Press F1 for help' onclick='showHelp=!showHelp'><span></span></label>"
  334.         +"<div id='options-cont'><label id='toggle' onclick='toggler()'>show advanced options <span></span></label><div id='options'>"
  335.         +"<div><label title='Pathfinder delay for each move (in miliseconds)'>delay: <input id='delay' type='number' step='5' min='0' value='"+delay+"' onchange='changedelay(this.value)'></label>"
  336.         +"<input id='pathfinder' type='checkbox' title='Pathfinder/Movement (numpad . OR delete)' onclick='disablemovement(this)'><span class='info pf'></span></div>"
  337.         +"<div><label title='Size of font (default = 2)'>font size: <input id='fontsize' type='number' step='any' value='"+fontSize+"' onchange='changefontsize(this.value)'></label>"
  338.         +"<input id='fontwidth' type='checkbox' title='Narrow text (F10)' onclick='changefontwidth(this)'><span class='info font'></span></div>"
  339.         +"<div><label title='Custom message on pressing Page Up'>message: <input id='cmessage' type='text' value='"+cmessage+"' onchange='changecmessage(this.value)'></label><span class='info msg'></span></div>"
  340.         +"<div><label title='Image size in %'>image size: <input id='imgsize' type='number' step='10' min='0' value='"+imgSizePrcnt+"' onchange='changeImgSize(this.value)'></label><span class='info img'></span></div>"
  341.         +"<div><label title='On-screen extra information (F11)'>always hide extra labels: <input id='extrainfo' type='checkbox' onclick='changeextrainfo(this)'></label><span class='info einfo'></span></div>"
  342.         +"</div></div>";
  343.  
  344.     par.appendChild(document.createElement('div')).setAttribute('id','h-options');
  345.     document.getElementById('h-options').innerHTML = add;
  346.     elm = Array.from(document.querySelectorAll("input"));
  347. }
  348.  
  349. var css = "<style>#options,#options>div{margin-top:.5em;position:relative}#help,#toggle{cursor:pointer}#options,#options>div,#toggle span{position:relative}#help span,#toggle span::after{background-size:100% 100%;width:100%}#options>div span.info::before,#toggle span::after{content:'';background-repeat:no-repeat}a[href*=m28],a[href*=m28]~br,div[style*='height: 90px']{display:none}*{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{opacity:1}#h-options{float:right;margin-bottom:1em}#help{float:right;width:1.75em;height:1.75em}#help span{display:block;background-color:#bfeaf8;background-image:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTAwMCAxMDAwIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxMDAwIDEwMDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwYXRoIGQ9Ik01MDAsOTkwQzIyOS44LDk5MCwxMCw3NzAuMiwxMCw1MDBDMTAsMjI5LjgsMjI5LjgsMTAsNTAwLDEwYzI3MC4yLDAsNDkwLDIxOS44LDQ5MCw0OTBDOTkwLDc3MC4yLDc3MC4yLDk5MCw1MDAsOTkweiBNNTAwLDYwLjRDMjU3LjYsNjAuNCw2MC40LDI1Ny42LDYwLjQsNTAwYzAsMjQyLjQsMTk3LjIsNDM5LjYsNDM5LjYsNDM5LjZjMjQyLjQsMCw0MzkuNi0xOTcuMSw0MzkuNi00MzkuNkM5MzkuNiwyNTcuNiw3NDIuNCw2MC40LDUwMCw2MC40eiIvPjxwYXRoIGQ9Ik00NTAuMyw2NTIuNHYtMzIuM2MwLTEzLjYsMS0yNS44LDMtMzYuNWMyLTEwLjcsNS0yMC45LDkuMy0zMC41YzQuMy05LjYsOS45LTE5LDE3LTI4YzcuMS05LjEsMTYtMTguNywyNi43LTI4LjlsMzguMi0zNi41YzEwLjctOS42LDE5LjktMjAuNCwyNy42LTMyLjNjNy43LTExLjksMTEuNS0yNi4zLDExLjUtNDMuM2MwLTIyLjEtNy00MC42LTIwLjgtNTUuNmMtMTMuOS0xNS0zMy42LTIyLjUtNTkuMS0yMi41Yy0xMywwLTI0LjcsMi40LTM1LjIsNy4yYy0xMC40LDQuOC0xOS41LDExLjMtMjcuMSwxOS41Yy03LjcsOC4yLTEzLjUsMTcuNy0xNy40LDI4LjRjLTMuOSwxMC44LTYuMiwyMS44LTYuOCwzMy4xTDMxMi45LDM4NWMzLjMtMjcuMiwxMC42LTUxLjQsMjEuNi03Mi42YzExLTIxLjIsMjUuMy0zOS4yLDQyLjgtNTMuOWMxNy42LTE0LjcsMzcuNy0yNS45LDYwLjMtMzMuNWMyMi42LTcuNyw0Ny0xMS40LDczLTExLjRjMjQuMywwLDQ3LjQsMy42LDY5LjIsMTAuNmMyMS44LDcuMSw0MSwxNy42LDU3LjcsMzEuNGMxNi43LDEzLjgsMjkuOCwzMSwzOS40LDUxLjRjOS42LDIwLjMsMTQuNCw0My45LDE0LjQsNzAuNGMwLDE4LjEtMiwzMy45LTUuOSw0Ny41Yy0zLjksMTMuNi05LjYsMjYtMTcsMzcuNGMtNy4zLDExLjMtMTYuMiwyMi4yLTI2LjcsMzIuNmMtMTAuNCwxMC40LTIyLjIsMjEuNC0zNS4yLDMyLjZjLTExLjMsOS42LTIwLjUsMTguMi0yNy42LDI1LjVjLTcuMSw3LjMtMTIuNywxNC43LTE3LDIyLjFjLTQuMyw3LjMtNy4yLDE1LjItOC45LDIzLjdjLTEuNyw4LjUtMi42LDE4LjktMi42LDMxLjR2MjIuMUg0NTAuM3ogTTQzMy4zLDc3MC4zYzAtMTgsNi42LTMzLjYsMjAtNDYuNmMxMy4yLTEzLDI5LjMtMTkuNSw0Ny45LTE5LjVjMTguMSwwLDM0LDYuMiw0Ny41LDE4LjdjMTMuNiwxMi40LDIwLjQsMjcuNywyMC40LDQ1LjhjMCwxOC4xLTYuNywzMy43LTIwLDQ2LjdjLTEzLjMsMTMtMjkuMywxOS41LTQ4LDE5LjVjLTkuMSwwLTE3LjctMS44LTI1LjktNS4xYy04LjEtMy40LTE1LjQtNy45LTIxLjUtMTMuNmMtNi4yLTUuNi0xMS4yLTEyLjQtMTQuOS0yMC4zQzQzNS4xLDc4Ny44LDQzMy4zLDc3OS4zLDQzMy4zLDc3MC4zeiIvPjwvZz48L3N2Zz4=);border-radius:100%;height:100%}#options,#options::after{border:1px solid #AAA;background-color:#FCFCFC}#options-cont{float:right;text-align:right;margin-right:1.5em}#options{visibility:hidden;opacity:0;transition:all 250ms;text-align:right;display:flex;flex-direction:column;width:auto}#options>div,#toggle,#toggle span{display:inline-block}#options::after{content:'';border-width:1px 0 0 1px;border-radius:0 0 100%;width:8px;height:8px;position:absolute;right:.75em;top:-5px;transform:rotate(45deg)}#options>div{padding-right:1.75em}#options>:first-child{margin-top:0}#options label input:not([type=checkbox]){width:10em}#options #delay,#options #fontsize{width:8.5em}#options #fontwidth,#options #pathfinder{padding:0;margin:0 .1em 0 .4em;width:1em}#toggle.open~#options::after{opacity:1}#toggle.open~#options{visibility:visible;padding:.5em;opacity:1}#toggle{-webkit-appearance:button;-moz-appearance:button;-ms-appearance:button;appearance:button;height:1.25em;line-height:1.25em;padding:.25em .5em}#toggle span{margin-left:.25em;height:0;width:1.125em}#toggle span::after{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMSAzMSI+PHBvbHlnb24gZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2Utd2lkdGg9IjEuNSIgcG9pbnRzPSIxIDEsMTYgMzAsMzAgMSwxNiAxMCwxIDEiLz48L3N2Zz4=);position:absolute;height:1em;bottom:0;right:0;margin-bottom:-.25em}#toggle.open span::after{transform:rotate(180deg)}#options>div span.info{display:inline-block;position:absolute;width:1.25em;right:0;top:0}#options>div span.info::before{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYwIiB3aWR0aD0iMTYwIiB2ZXJzaW9uPSIxLjAiPjxnIGZpbGw9IiM0YjRiNGIiPjxwYXRoIGQ9Im04MCAxNWMtMzUuODggMC02NSAyOS4xMi02NSA2NXMyOS4xMiA2NSA2NSA2NSA2NS0yOS4xMiA2NS02NS0yOS4xMi02NS02NS02NXptMCAxMGMzMC4zNiAwIDU1IDI0LjY0IDU1IDU1cy0yNC42NCA1NS01NSA1NS01NS0yNC42NC01NS01NSAyNC42NC01NSA1NS01NXoiLz48cGF0aCBkPSJtNTcuMzczIDE4LjIzMWE5LjM4MzQgOS4xMTUzIDAgMSAxIC0xOC43NjcgMCA5LjM4MzQgOS4xMTUzIDAgMSAxIDE4Ljc2NyAweiIgdHJhbnNmb3JtPSJtYXRyaXgoMS4xOTg5IDAgMCAxLjIzNDIgMjEuMjE0IDI4Ljc1KSIvPjxwYXRoIGQ9Im05MC42NjUgMTEwLjk2Yy0wLjA2OSAyLjczIDEuMjExIDMuNSA0LjMyNyAzLjgybDUuMDA4IDAuMXY1LjEyaC0zOS4wNzN2LTUuMTJsNS41MDMtMC4xYzMuMjkxLTAuMSA0LjA4Mi0xLjM4IDQuMzI3LTMuODJ2LTMwLjgxM2MwLjAzNS00Ljg3OS02LjI5Ni00LjExMy0xMC43NTctMy45Njh2LTUuMDc0bDMwLjY2NS0xLjEwNSIvPjwvZz48L3N2Zz4=);background-size:contain;background-position:center right;width:100%;padding-top:80%;position:absolute;top:0;right:0;cursor:help}span.info::after{pointer-events:none;text-align:center;white-space:pre;font-size:85%;font-family:Arial,sans-serif;background-color:#FCFCFC;border:1px solid #AAA;box-shadow:0 0 10px 1px #AAA;padding:.35em;position:absolute;bottom:0;left:50%;transform:translateX(calc(-50% + .125em));z-index:2;display:none}span.info:hover::after{display:block}span.info.pf::after{content:'Enter your prefered delay for the pathfinder.\\A But beware of using too small values,\\A the server may kick you on some levels\\A if you pass a large distance too quickly.\\A\\A Use CTRL+click to ignore pathfinder.\\A Toggle with numpad dot OR delete'}span.info.font::after{content:'Enter font size for writing.\\A\\A Mark the checkbox for narrow text\\A Hotkey: F10'}span.info.msg::after{content:'Enter your own message to spam.\\A\\A Hotkey: Page Up'}span.info.img::after{content:'Enter image size (%).\\A\\A Draw images with numpad 1 to 9\\A\\A Increase img size: numpad +\\A Descrease img size: numpad -\\A Reset img size: numpad *'}span.info.einfo::after{content:'Hide the top corners indicators\\A of movement/pathfinder and aura\\A\\A Hotkey: F11'}</style>";
  350.  
  351. function va(f) {
  352.     if (D) return L = !1, V(f), !1;
  353.     U() ? X || (X = !0, W(k, q)) : (X = !1, D || M.checked || y.requestPointerLock && y.requestPointerLock());
  354.     if (L) L = !1, Q();
  355.     else if (V(f), (f.ctrlKey || f.shiftKey) && !H.checked) Y = !0, R = k, S = q;
  356.     else if (100 < t - ca && v == k && w == q) {
  357.         ca = t;
  358.         I.push([v << 1, w << 1, t]);
  359.         wa(v, w, clicksCount);
  360.         var b = [v, w];
  361.         N.push(b);
  362.         setTimeout(function() {
  363.             N.remove(b);
  364.         }, 1E3);
  365.     }
  366.     return !1;
  367. }
  368.  
  369. function xa(f) {
  370.     Y = !1;
  371. }
  372.  
  373. function ya() {
  374.     A.localStorage && M && (A.localStorage.setItem("noCursorLock", M.checked ? "1" : "0"), A.localStorage.setItem("noDrawings", H.checked ? "1" : "0"));
  375. }
  376.  
  377. function V(f) {
  378.     if (U()) {
  379.         var b = f.webkitMovementX || f.mozMovementX || f.movementX || 0;
  380.         f = f.webkitMovementY || f.mozMovementY || f.movementY || 0;
  381.         300 > Math.abs(b) + Math.abs(f) && (B += b, C += f, v = B >> 1, w = C >> 1);
  382.     } else f.offsetX ? (B = f.offsetX, C = f.offsetY) : f.layerX && (B = f.layerX, C = f.layerY), v = B >> 1, w = C >> 1;
  383.     lastX = posX;
  384.     lastY = posY;
  385.     posX = k;
  386.     posY = q;
  387.     if (Z(), !U() || v == k && w == q || (f = b = 0, v > k && (b = 1),
  388.             w > q && (f = 1), v = k, w = q, B = (v << 1) + b, C = (w << 1) + f), Y && (R != k || S != q) && 50 < t - da) {
  389.         b = R;
  390.         f = S;
  391.         var a = k,
  392.             d = q;
  393.         if (!D && null != u && u.readyState == WebSocket.OPEN) {
  394.             var g = new ArrayBuffer(9),
  395.                 e = new DataView(g);
  396.             e.setUint8(0, 3);
  397.             e.setUint16(1, b, !0);
  398.             e.setUint16(3, f, !0);
  399.             e.setUint16(5, a, !0);
  400.             e.setUint16(7, d, !0);
  401.             u.Send(g);
  402.         }
  403.         R = k;
  404.         S = q;
  405.         da = t;
  406.     }
  407. }
  408.  
  409. function Z() {
  410.     ea(k, q) && Q();
  411.     if (z(k, q)) {
  412.         var a;
  413.         a: {
  414.             a = k;
  415.             var b = q,
  416.                 c = [],
  417.                 d = new Uint8Array(12E4);
  418.             c.push([a, b]);
  419.             d[a + 400 * b] = 1;
  420.             do {
  421.                 var g = c.shift(),
  422.                     e = g[0],
  423.                     g = g[1];
  424.                 if (!(0 > e || 0 > g || 400 <= e || 300 <= g)) {
  425.                     if (!z(e, g)) {
  426.                         a = {
  427.                             x: e,
  428.                             y: g
  429.                         };
  430.                         break a;
  431.                     }
  432.                     d[e - 1 + 400 * g] || (c.push([e - 1, g]), d[e - 1 + 400 * g] = 1);
  433.                     d[e + 1 + 400 * g] || (c.push([e + 1, g]), d[e + 1 + 400 * g] = 1);
  434.                     d[e + 400 * (g - 1)] || (c.push([e, g - 1]), d[e + 400 * (g - 1)] = 1);
  435.                     d[e + 400 * (g + 1)] || (c.push([e, g + 1]), d[e + 400 * (g + 1)] = 1);
  436.                 }
  437.             } while (0 < c.length);
  438.             a = {
  439.                 x: a,
  440.                 y: b
  441.             };
  442.         }
  443.         k = a.x;
  444.         q = a.y;
  445.     }
  446.     if (k != v || q != w) a = fa(k, q, v, w), k = a.x, q = a.y;
  447.     ea(k, q) && Q();
  448. }
  449.  
  450. var countlevels=-2;
  451. function next() {
  452.     console.log("Next map");
  453.     initialLoad = true;
  454.     T.set(za);
  455.     r = [];
  456.     I = [];
  457.     O = [];
  458.     countlevels+=1;
  459. }
  460.  
  461. function ga(f) {
  462.     a.imageSmoothingEnabled = f;
  463.     a.mozImageSmoothingEnabled = f;
  464.     a.oImageSmoothingEnabled = f;
  465.     a.webkitImageSmoothingEnabled = f;
  466. }
  467.  
  468. function Aa() {
  469.     next();
  470.     console.log("Connected!");
  471. }
  472.  
  473. function Ba(a) {
  474.     next();
  475.     console.log("Socket closed: " + a.reason);
  476. }
  477.  
  478. function Ca(a) {
  479.     console.log("Socket error");
  480. }
  481.  
  482. function Da(a, b) {
  483.     for (var c = "", d = 0, g = 0; 0 != (g = a.getUint8(b)); ++b) d <<= 8, d |= g, g & 128 || (c += String.fromCharCode(d), d = 0);
  484.     0 != d && (c += String.fromCharCode(d));
  485.     return [c, b + 1];
  486. }
  487.  
  488. function Ea(a, b) {
  489.     setTimeout(function() {
  490.         var c = a.getUint16(b, !0),
  491.             d = 0;
  492.         a: for (; d < c; d++) {
  493.             for (var g = a.getUint16(b + 2 + 4 * d, !0), e = a.getUint16(b + 4 + 4 * d, !0), n = 0; n < N.length; n++) {
  494.                 var l = N[n];
  495.                 if (l[0] == g && l[1] == e) {
  496.                     N.splice(n, 1);
  497.                     continue a;
  498.                 }
  499.             }
  500.             I.push([g << 1, e << 1, t]);
  501.         }
  502.     }, 100);
  503.     return b + 2 + 4 * a.getUint16(b, !0);
  504. }
  505.  
  506. function Fa(a, b) {
  507.     !H.checked && setTimeout(function() {
  508.         for (var c = a.getUint16(b, !0), d = 0; d < c; d++) {
  509.             var g = a.getUint16(b + 2 + 8 * d, !0),
  510.                 e = a.getUint16(b + 4 + 8 * d, !0),
  511.                 n = a.getUint16(b + 6 + 8 * d, !0),
  512.                 l = a.getUint16(b + 8 + 8 * d, !0);
  513.             O.push([g << 1, e << 1, n << 1, l << 1, t]);
  514.         }
  515.     }, 50);
  516.     return b + 2 + 8 * a.getUint16(b, !0);
  517. }
  518.  
  519. function Ga(a) {
  520.     buttonIndex = 0;
  521.     initialLoad = false;
  522.     a = a.data;
  523.     var b = new DataView(a);
  524.     switch (b.getUint8(0)) {
  525.         case 0:
  526.             ha = b.getUint32(1, !0);
  527.             break;
  528.         case 1:
  529.             var c;
  530.             ia = c = b.getUint16(1, !0);
  531.             ja = 100 <= c;
  532.             var d = [],
  533.                 g;
  534.             for (g in F) F.hasOwnProperty(g) && d.push(g);
  535.  
  536.             for (var e =
  537.                     0; e < c; e++) {
  538.                 g = b.getUint32(3 + 8 * e, !0);
  539.                 var n = b.getUint16(7 + 8 * e, !0),
  540.                     l = b.getUint16(9 + 8 * e, !0);
  541.                 if (g != ha) {
  542.                     if (null != F[g]) {
  543.                         for (var p = 0; p < d.length; p++)
  544.                             if (d[p] == g) {
  545.                                 d.splice(p, 1);
  546.                                 break;
  547.                             }
  548.                         g = F[g];
  549.                         g.oldX = g.getX();
  550.                         g.oldY = g.getY();
  551.                         g.newX = n;
  552.                         g.newY = l;
  553.                         g.time = t;
  554.                     } else F[g] = new ka(n, l);
  555.                 } else {
  556.                     serverPosX = n;
  557.                     serverPosY = l;
  558.                 }
  559.             }
  560.             for (e = 0; e < d.length; e++) delete F[d[e]];
  561.             c = Ea(b, 3 + 8 * c);
  562.             g = b.getUint16(c, !0);
  563.             c += 2;
  564.             for (d = 0; d < g; d++) {
  565.                 a: for (n = b.getUint32(c, !0), e = 0; e < r.length; e++)
  566.                     if (r[e].id == n) {
  567.                         var k = r[e];
  568.                         if (1 == k.type)
  569.                             for (var n = k.x | 0, l = k.y | 0, p = k.width | 0, k = k.height | 0, m = l; m < l + k; ++m)
  570.                                 for (var h =
  571.                                         n; h < n + p; ++h) --T[h + 400 * m];
  572.                         r.splice(e, 1);
  573.                         break a;
  574.                     }c += 4;
  575.             }
  576.             g = b.getUint16(c, !0);
  577.             c += 2;
  578.             for (d = 0; d < g; d++) {
  579.                 a: {
  580.                     e = b.getUint32(c, !0);
  581.                     for (n = 0; n < r.length; n++)
  582.                         if (r[n].id == e) {
  583.                             e = r[n];
  584.                             break a;
  585.                         }
  586.                     e = {
  587.                         id: e
  588.                     };
  589.                     r.push(e);
  590.                 }
  591.                 c += 4;c = la(b, c, e);
  592.             }
  593.             c = Fa(b, c);
  594.             if (a.byteLength < c + 4) break;
  595.             aa = b.getUint32(c, !0);
  596.             break;
  597.         case 4:
  598.             next();
  599.             W(b.getUint16(1, !0), b.getUint16(3, !0));
  600.             g = b.getUint16(5, !0);
  601.             c = 7;
  602.             for (d = 0; d < g; d++) e = {}, e.id = b.getUint32(c, !0), c += 4, c = la(b, c, e), r.push(e);
  603.             a.byteLength >= c + 4 ? G = Math.max(G, b.getUint32(c, !0)) : a.byteLength >= c + 2 && (G = Math.max(G, b.getUint16(c, !0)));
  604.             Z();
  605.             break;
  606.         case 5:
  607.             W(b.getUint16(1, !0), b.getUint16(3, !0)), 9 <= b.byteLength ? G = Math.max(G, b.getUint32(5, !0)) : 7 <= b.byteLength && (G = Math.max(G, b.getUint16(5, !0))), Z();
  608.     }
  609. }
  610.  
  611. function Q() {
  612.     if (!(D || L || null == u || u.readyState != WebSocket.OPEN || k == J && q == K) && movementEnabled) {
  613.         var a = new ArrayBuffer(9);
  614.             b = new DataView(a);
  615.         b.setUint8(0, 1);
  616.         b.setUint16(1, k, !0);
  617.         b.setUint16(3, q, !0);
  618.         b.setUint32(5, G, !0);
  619.         u.send(a);
  620.         J = k;
  621.         K = q;
  622.     }
  623.  
  624. }
  625.  
  626. function Au() {
  627.     Throttler.sendOut();
  628.     if (auraEnabled) drawAura(J, K);
  629. }
  630.  
  631. function wa(a, b, numClicks) {
  632.     if (!D && null != u && u.readyState == WebSocket.OPEN) {
  633.         var c = new ArrayBuffer(9),
  634.             d = new DataView(c);
  635.         d.setUint8(0, 2);
  636.         d.setUint16(1, a, !0);
  637.         d.setUint16(3, b, !0);
  638.         d.setUint32(5, G, !0);
  639.         for (var i = 0; i < numClicks; i++) { u.Send(c); }
  640.     }
  641. }
  642.  
  643. function la(f, b, c) {
  644.     function d() {
  645.         c.x = f.getUint16(b, !0);
  646.         b += 2;
  647.         c.y = f.getUint16(b, !0);
  648.         b += 2;
  649.         c.width = f.getUint16(b, !0);
  650.         b += 2;
  651.         c.height = f.getUint16(b, !0);
  652.         b += 2;
  653.     }
  654.     function g() {
  655.         for (var a = f.getUint32(b, !0).toString(16); 6 > a.length;) a = "0" + a;
  656.         b += 4;
  657.         c.color = "#" + a;
  658.     }
  659.     var e = f.getUint8(b);
  660.     b += 1;
  661.     c.type = e;
  662.     switch (e) {
  663.         case 255:
  664.             break;
  665.         case 0:
  666.             c.x = f.getUint16(b, !0);
  667.             b += 2;
  668.             c.y = f.getUint16(b, !0);
  669.             b += 2;
  670.             c.size = f.getUint8(b);
  671.             b += 1;
  672.             c.isCentered = !!f.getUint8(b);
  673.             b += 1;
  674.             e = Da(f, b);
  675.             c.text = e[0];
  676.             b = e[1];
  677.             break;
  678.         case 1:
  679.             d();
  680.             var n = !c.color;
  681.             g();
  682.             var e = c.x | 0,
  683.                 l = c.y | 0,
  684.                 p = c.width | 0,
  685.                 k = c.height | 0;
  686.             if (n)
  687.                 for (n = l; n < l + k; ++n)
  688.                     for (var m = e; m < e + p; ++m) ++T[m + 400 * n];
  689.             break;
  690.         case 2:
  691.             d();
  692.             c.isBad = !!f.getUint8(b);
  693.             b += 1;
  694.             break;
  695.         case 3:
  696.             d();
  697.             c.count = f.getUint16(b, !0);
  698.             b += 2;
  699.             g();
  700.             break;
  701.         case 4:
  702.             d();
  703.             c.count ? c.count > f.getUint16(b, !0) && (c.lastClickAt = t) : c.lastClickAt = 0;
  704.             c.count = f.getUint16(b, !0);
  705.             b += 2;
  706.             g();
  707.             break;
  708.         case 5:
  709.             c.x = f.getUint16(b, !0);
  710.             b += 2;
  711.             c.y = f.getUint16(b, !0);
  712.             b += 2;
  713.             c.queue = [ [0, c.x, c.y]];
  714.             c.potentialQueue = [];
  715.             c.explored = new Uint8Array(12E4);
  716.             c.img = a.createImageData(400, 300);
  717.             e = E.createElement("canvas");
  718.             e.width = 400;
  719.             e.height = 300;
  720.             c.canvas = e;
  721.             c.ctx = c.canvas.getContext("2d");
  722.             break;
  723.         default:
  724.             throw Error("Unknown object type " + e);
  725.     }
  726.     return b;
  727. }
  728.  
  729. function ea(a, b) {
  730.     if (-1 != J && -1 != K) {
  731.         var c = fa(J, K, a, b);
  732.         if (c.x != a || c.y != b) return !0;
  733.     }
  734.     for (c = 0; c < r.length; c++) {
  735.         var d = r[c];
  736.         if (2 == d.type && !(k < d.x || q < d.y || k >= d.x + d.width || q >= d.y + d.height)) return !0;
  737.     }
  738.     return !1;
  739. }
  740.  
  741. //var cursorsonline=0;
  742. window.showHelp = false;
  743. function ma() {
  744.     a.clearRect(0, 0, a.canvas.width, a.canvas.height);
  745.     a.save();
  746.     if (null != u && u.readyState != WebSocket.OPEN || L) {
  747.         var f;
  748.         if (null == u) f = "Click to begin";
  749.         else switch (u.readyState) {
  750.             case WebSocket.CONNECTING:
  751.                 f = "Connecting";
  752.                 break;
  753.             case WebSocket.CLOSING:
  754.             case WebSocket.CLOSED:
  755.                 f = "Lost connection to server";
  756.                 break;
  757.             default:
  758.                 f = "Click to begin";
  759.         }
  760.         a.font = 60 + "px NovaSquare";
  761.         a.fillText(f, 400 - a.measureText(f).width / 2, 300);
  762.         a.font = 20 + "px NovaSquare";
  763.         f = "-> script remastered by q1k <-";
  764.         a.fillText(f, 400 - a.measureText(f).width / 2, 345);
  765.         na();
  766.         oa(!1);
  767.     } else {
  768.         a.fillStyle = "#000000";
  769.         a.save();
  770.         a.globalAlpha = 1;
  771.         var typeZeroCount = 0;
  772.         var typeOneCount = 0;
  773.         var typeTwoCount = 0;
  774.         var typeThreeCount = 0;
  775.         var typeFourCount = 0;
  776.         for (f = 0; f < r.length; f++) {
  777.             var b = r[f];
  778.             if (0 == b.type) {
  779.                 a.font = b.size + "px NovaSquare";
  780.                 var c = b.x << 1,
  781.                     d = b.y << 1;
  782.                 b.isCentered && (c -= a.measureText(b.text).width / 2);
  783.                 a.fillStyle = "#000000";
  784.                 a.fillText(b.text, c, d);
  785.                 typeZeroCount++;
  786.             } else if (1 == b.type) {
  787.                 a.fillStyle = b.color, a.fillRect(b.x << 1, b.y << 1, b.width << 1, b.height << 1);
  788.                 a.strokeStyle = "#000000", a.globalAlpha = .2, a.lineWidth = 2;
  789.                 a.strokeRect((b.x << 1) + 1, (b.y << 1) + 1, (b.width << 1) - 2, (b.height << 1) - 2);
  790.                 a.globalAlpha = 1;
  791.                 typeOneCount++;
  792.             } else if (2 == b.type) {
  793.                 a.fillStyle = b.isBad ? "#FF0000" : "#00FF00", a.globalAlpha = .2;
  794.                 a.fillRect(b.x << 1, b.y << 1, b.width << 1, b.height << 1);
  795.                 a.globalAlpha = 1;
  796.                 typeTwoCount++;
  797.             } else if (3 == b.type) {
  798.                 var c = b.x << 1,
  799.                     d = b.y << 1,
  800.                     g = b.width << 1,
  801.                     e = b.height << 1;
  802.                 a.fillStyle = b.color;
  803.                 a.globalAlpha = .2;
  804.                 a.fillRect(c, d, g, e);
  805.                 a.globalAlpha = .5;
  806.                 a.fillStyle = "#000000";
  807.                 if (40 > b.width || 40 > b.height) {
  808.                     a.font = 30 + "px NovaSquare", a.fillText(b.count,  c + g / 2 - a.measureText(b.count).width / 2,  d + e / 2 + 10);
  809.                 } else {
  810.                     a.font = 60 + "px NovaSquare", a.fillText(b.count,  c + g / 2 - a.measureText(b.count).width / 2,  d + e / 2 + 20);
  811.                 };
  812.                 a.globalAlpha = 1;
  813.                 typeThreeCount++;
  814.             } else if (4 == b.type) {
  815.                 c = b.x << 1;
  816.                 d = b.y << 1;
  817.                 g = b.width << 1;
  818.                 e = b.height << 1;
  819.                 a.fillStyle = b.color;
  820.                 a.strokeStyle = b.color;
  821.                 a.globalAlpha = 1;
  822.                 a.fillRect(c, d, g, e);
  823.                 a.globalAlpha = .2;
  824.                 a.fillStyle = "#000000";
  825.                 a.fillRect(c, d, g, e);
  826.                 a.globalAlpha = 1;
  827.                 a.fillStyle = b.color;
  828.                 var n = 150 > t - b.lastClickAt, l = n ? 8 : 12;
  829.                 a.fillRect(c + l, d + l, g - 2 * l, e - 2 * l);
  830.                 a.strokeStyle = "#000000";
  831.                 a.globalAlpha = .1;
  832.                 a.beginPath();
  833.                 a.moveTo(c, d);
  834.                 a.lineTo(c + l, d + l);
  835.                 a.moveTo(c + g, d);
  836.                 a.lineTo(c + g - l, d + l);
  837.                 a.moveTo(c, d + e);
  838.                 a.lineTo(c + l, d + e - l);
  839.                 a.moveTo(c + g, d + e);
  840.                 a.lineTo(c + g - l, d + e - l);
  841.                 a.moveTo(c, d);
  842.                 a.rect(c, d, g, e);
  843.                 a.rect(c + l, d + l, g - 2 * l, e - 2 * l);
  844.                 a.stroke();
  845.                 a.fillStyle = "#000000";
  846.                 a.globalAlpha = .5;
  847.                 if (50 > b.width || 50 > b.height) {
  848.                     a.font = 35 + "px NovaSquare", a.fillText(b.count, c + g / 2 - a.measureText(b.count).width / 2, d + e / 2 + 13);
  849.                 } else {
  850.                     a.font = 45 + "px NovaSquare", a.fillText(b.count, c + g / 2 - a.measureText(b.count).width / 2, d + e / 2 + 16);
  851.                 }
  852.                 n && (a.fillStyle = "#000000", a.globalAlpha = .15, a.fillRect(c + l, d + l, g - 2 * l, e - 2 * l));
  853.                 a.globalAlpha = 1;
  854.                 typeFourCount++;
  855.             } else 5 == b.type && (ga(!1), a.drawImage(b.canvas, 0, 0, 400, 300, 0, 0, 800, 600, ga(!0)));
  856.         }
  857.         if (r.length == 8 && typeZeroCount == 4 && typeOneCount == 3 && typeTwoCount == 1 && typeThreeCount == 0 && typeFourCount == 0) {
  858.             a.globalAlpha = 1;
  859.             f = "(Or just play cursors.io)", a.font = 15 + "px NovaSquare", a.fillStyle = "#000000";
  860.             a.fillText(f, 400 - a.measureText(f).width / 2, 408);
  861.         }
  862.         a.restore();
  863.         if (!D) {
  864.             a.font = 12 + "px NovaSquare", a.strokeStyle = "#000000", a.fillStyle = "#FFFFFF", a.lineWidth = 2.5;
  865.             f = ja ? "Area too full, not all cursors are shown" : 30 < ia ? "Area too full, drawing is disabled" : "Use shift+click to draw";
  866.             a.globalAlpha = .5, a.strokeText(f, 10, 590), a.globalAlpha = 1;
  867.             a.fillText(f, 10, 590);
  868.             if (aa != 0) {
  869.                 //f = (cursorsonline+1) + "/" +
  870.                 f = aa + " players online", b = a.measureText(f).width, a.globalAlpha = .5, a.strokeText(f, 790 - b, 590), a.globalAlpha = 1;
  871.                 a.fillText(f, 790 - b, 590);
  872.             };
  873.             if (!movementEnabled && !hideExtraInfo) {
  874.                 f = "movement disabled / pathfinder enabled";
  875.                 a.globalAlpha = .5, a.strokeText(f, 10, 15), a.globalAlpha = 1;
  876.                 a.fillText(f, 10, 15);
  877.                 f = "press numpad . OR delete to toggle";
  878.                 a.globalAlpha = .5, a.strokeText(f, 10, 30), a.globalAlpha = 1;
  879.                 a.fillText(f, 10, 30);
  880.             }
  881.             if (auraEnabled && !hideExtraInfo) {
  882.                 f = "aura enabled", b = a.measureText(f).width, a.globalAlpha = .5, a.strokeText(f, 790 - b, 15), a.globalAlpha = 1;
  883.                 a.fillText(f, 790 - b, 15);
  884.                 f = "press numpad 0 OR insert to disable", b = a.measureText(f).width, a.globalAlpha = .5, a.strokeText(f, 790 - b, 30), a.globalAlpha = 1;
  885.                 a.fillText(f, 790 - b, 30);
  886.             }
  887.             if (imgSizeShow) {
  888.                 f = "image size: " + imgSizePrcnt + "%"; a.globalAlpha = .5, a.strokeText(f, 10, 560), a.globalAlpha = 1;
  889.                 a.fillText(f, 10, 560);
  890.                 //f = "image size: " + imgSizePrcnt + "%", b = a.measureText(f).width, a.globalAlpha = .5, a.strokeText(f, 790 - b, 560), a.globalAlpha = 1;
  891.                 //a.fillText(f, 790 - b, 560);
  892.             }
  893.             if (countlevels>0) {
  894.                 f = "level: "+countlevels, b = a.measureText(f).width, a.globalAlpha = .5, a.strokeText(f, 790 - b, 560), a.globalAlpha = 1;
  895.                 a.fillText(f, 790 - b, 560);
  896.             }
  897.         }
  898.         na();
  899.         if (!H.checked) {
  900.             a.save();
  901.             a.strokeStyle = "#000000";
  902.             a.lineWidth = 1;
  903.             t = +new Date;
  904.             a.beginPath();
  905.             for (f = 0; f < O.length; f++) {
  906.                 b = O[f];
  907.                 c = 10 - (t - b[4]) / 1E3;
  908.                 if (c <= 0) {
  909.                     O.splice(f, 1),
  910.                     --f;
  911.                 } else {
  912.                     1 < c && (c = 1), a.globalAlpha = .3 * c;
  913.                     a.moveTo(b[0] - .5, b[1] - .5);
  914.                     a.lineTo(b[2] - .5, b[3] - .5);
  915.                 }
  916.             }
  917.             a.stroke();
  918.             a.restore();
  919.         }
  920.         a.save();
  921.         //for (var p in F) F.hasOwnProperty(p) && a.drawImage(P, scale(sa(F[p].getX()) - 6), scale(ta(F[p].getY()) - 6), scale(P.width), scale(P.height));
  922.         //cursorsonline=0;
  923.         for (var p in F) {
  924.             F.hasOwnProperty(p) && a.drawImage(P, sa(F[p].getX()) - 6, ta(F[p].getY()) - 6);
  925.             //cursorsonline+=1;
  926.             // show ids?
  927.             if (showcursorsid) {
  928.                 if(cursorIDPos==2) {
  929.                     cp=a.measureText(p).width;
  930.                     a.globalAlpha = .5; a.strokeText( p, sa(F[p].getX()) - cp + cursorIDX, ta(F[p].getY()) + cursorIDY );
  931.                     a.globalAlpha= 1; a.fillText( p, sa(F[p].getX()) - cp + cursorIDX, ta(F[p].getY()) + cursorIDY );
  932.                 }
  933.                 else{
  934.                     a.globalAlpha = .5; a.strokeText( p, sa(F[p].getX()) + cursorIDX, ta(F[p].getY()) + cursorIDY );
  935.                     a.globalAlpha= 1; a.fillText( p, sa(F[p].getX()) + cursorIDX, ta(F[p].getY()) + cursorIDY );
  936.                 }
  937.             }
  938.         }
  939.         if (showcursorsid) {
  940.             if(cursorIDPos==2) {
  941.                 cp=a.measureText(ha).width;
  942.                 a.globalAlpha = .5; a.strokeText( ha, sa(k) - cp + cursorIDX, ta(q) + cursorIDY ) ;
  943.                 a.globalAlpha= 1; a.fillText( ha, sa(k) - cp + cursorIDX, ta(q) + cursorIDY ) ;
  944.             }
  945.             else{
  946.                 a.globalAlpha = .5; a.strokeText( ha, sa(k) + cursorIDX, ta(q) + cursorIDY ) ;
  947.                 a.globalAlpha= 1; a.fillText( ha, sa(k) + cursorIDX, ta(q) + cursorIDY ) ;
  948.             }
  949.         }
  950.  
  951.         a.restore();
  952.         oa(!0);
  953.         if (!D) {
  954.             a.font = 15 + "px NovaSquare", a.strokeStyle = "#000000", a.fillStyle = "#FFFFFF", a.lineWidth = 2.5;
  955.             if (message.length>0) {
  956.                 b = a.measureText(message).width/2;
  957.                 a.globalAlpha = .5, a.strokeText(message, 400 - b, 580), a.globalAlpha = 1;
  958.                 a.fillText(message, 400 - b, 580);
  959.             }
  960.             for (var i=0; i < messages.length; i++) {
  961.                 b = a.measureText(messages[i]).width/2;
  962.                 a.globalAlpha = .5, a.strokeText(messages[i], 400 - b, 580 - messages.length*15 + i*15 ), a.globalAlpha = 1;
  963.                 a.fillText(messages[i], 400 - b, 580 - messages.length*15 + i*15);
  964.             }
  965.             if (showHelp) {
  966.                 var oo = a.measureText("->").width;
  967.                 a.font = 12 + "px NovaSquare";
  968.                 f = "How to use (press F1 to hide):",                                    a.globalAlpha = .5, a.strokeText(f, 10, 45), a.globalAlpha = 1, a.fillText(f, 10, 45);
  969.                 f = "-> To type: type message and hit enter (shift+enter for new row)",  a.globalAlpha = .5, a.strokeText(f, 10, 60), a.globalAlpha = 1, a.fillText(f, 10, 60);
  970.                 f = "-> To enable or disable movement: press numpad . OR delete",        a.globalAlpha = .5, a.strokeText(f, 10, 75), a.globalAlpha = 1, a.fillText(f, 10, 75);
  971.                 f =    "pathfiner will be active in this mode",                          a.globalAlpha = .5, a.strokeText(f, 10+oo, 90), a.globalAlpha = 1, a.fillText(f, 10+oo, 90);
  972.                 f = "-> To start/stop drawing circle: press numpad 0 OR insert",         a.globalAlpha = .5, a.strokeText(f, 10, 105), a.globalAlpha = 1, a.fillText(f, 10, 105);
  973.                 f = "-> To draw arrows, use the arrow keys",                             a.globalAlpha = .5, a.strokeText(f, 10, 120), a.globalAlpha = 1, a.fillText(f, 10, 120);
  974.                 f = "-> To draw images: press numpad 1 - numpad 9",                      a.globalAlpha = .5, a.strokeText(f, 10, 135), a.globalAlpha = 1, a.fillText(f, 10, 135);
  975.                 f = "-> To make images bigger/smaller use numpad + and -",               a.globalAlpha = .5, a.strokeText(f, 10, 150), a.globalAlpha = 1, a.fillText(f, 10, 150);
  976.                 f = "-> To reset image size press numpad *",                             a.globalAlpha = .5, a.strokeText(f, 10, 165), a.globalAlpha = 1, a.fillText(f, 10, 165);
  977.                 f = "-> To show/hide cursors ids: press F8",                             a.globalAlpha = .5, a.strokeText(f, 10, 180), a.globalAlpha = 1, a.fillText(f, 10, 180);
  978.                 f = "-> Change ids position: press F9",                                  a.globalAlpha = .5, a.strokeText(f, 10, 195), a.globalAlpha = 1, a.fillText(f, 10, 195);
  979.             }
  980.         }
  981.     }
  982.     a.restore();
  983.     A.requestAnimationFrame(ma)
  984. }
  985.  
  986. function scale(z) {
  987.     return Math.round(z/600*a.canvas.height);
  988. }
  989.  
  990. function na() {
  991.     a.save();
  992.     a.strokeStyle = "#000000";
  993.     t = +new Date;
  994.     for (var f = 0; f < I.length; f++) {
  995.         var b = I[f],
  996.             c = (t - b[2]) / 1E3,
  997.             d = 1 - 2 * c;
  998.         0 >= d ? (I.splice(f, 1), --f) : (c *= 50, a.beginPath(), a.globalAlpha = .3 * d, a.arc(b[0], b[1], c, 0, 2 * Math.PI, !1), a.stroke());
  999.     }
  1000.     a.restore()
  1001. }
  1002.  
  1003. function oa(f) {
  1004.     if (D) a.save(), a.globalAlpha = 1, a.drawImage(P, B - 5, C - 5, P.width, P.height);
  1005.     else {
  1006.         var b = 0,
  1007.             c = 0;
  1008.         if (v != k || w != q) {
  1009.             a.save();
  1010.             if (f) {
  1011.                 a.globalAlpha = .2, a.fillStyle = "#FF0000", a.beginPath();
  1012.                 a.arc(B + 2, C + 8, 20, 0, 2 * Math.PI, !1);
  1013.                 a.fill();
  1014.             }
  1015.             a.globalAlpha = .5;
  1016.             a.drawImage(P, B - 5, C - 5, P.width, P.height);
  1017.             a.restore();
  1018.         } else {
  1019.             b = B & 1, c = C & 1;
  1020.         }
  1021.         a.save();
  1022.         if (f) {
  1023.             a.globalAlpha = .2, a.fillStyle = "#FFFF00", a.beginPath();
  1024.             a.arc((k << 1) + b + 2, (q << 1) + c + 8, 20, 0, 2 * Math.PI, !1);
  1025.             a.fill();
  1026.         }
  1027.         a.globalAlpha = 1;
  1028.         a.drawImage(Ia, (k << 1) + b - 5, (q << 1) + c - 5, Ia.width, Ia.height);
  1029.         if (!movementEnabled) {
  1030.             a.strokeStyle = "#DD4444", a.lineWidth = 1;
  1031.             a.beginPath();
  1032.             a.arc(serverPosX << 1, serverPosY << 1, 4, 0, 2*Math.PI);
  1033.             a.stroke();
  1034.         }
  1035.     }
  1036.     a.restore();
  1037. }
  1038.  
  1039. function ka(a, b) {
  1040.     this.oldX = this.newX = a;
  1041.     this.oldY = this.newY = b;
  1042.     this.time = t
  1043. }
  1044.  
  1045. function pa(a) {
  1046.     return a * a * (3 - 2 * a)
  1047. }
  1048.  
  1049. function fa(a, b, c, d) {
  1050.     a |= 0;
  1051.     b |= 0;
  1052.     c |= 0;
  1053.     d |= 0;
  1054.     if (z(a, b)) return {
  1055.         x: a,
  1056.         y: b
  1057.     };
  1058.     if (a == c && b == d) return {
  1059.         x: c,
  1060.         y: d
  1061.     };
  1062.     var g = a,
  1063.         e = b;
  1064.     c = c - a | 0;
  1065.     d = d - b | 0;
  1066.     var n =
  1067.         0,
  1068.         l = 0,
  1069.         p = 0,
  1070.         k = 0;
  1071.     0 > c ? n = -1 : 0 < c && (n = 1);
  1072.     0 > d ? l = -1 : 0 < d && (l = 1);
  1073.     0 > c ? p = -1 : 0 < c && (p = 1);
  1074.     var m = Math.abs(c) | 0,
  1075.         h = Math.abs(d) | 0;
  1076.     m <= h && (m = Math.abs(d) | 0, h = Math.abs(c) | 0, 0 > d ? k = -1 : 0 < d && (k = 1), p = 0);
  1077.     c = m >> 1;
  1078.     for (d = 0; d <= m && !z(a, b); d++) g = a, e = b, c += h, c >= m ? (c -= m, a += n, b += l) : (a += p, b += k);
  1079.     return {
  1080.         x: g,
  1081.         y: e
  1082.     }
  1083. }
  1084.  
  1085. function z(a, b) {
  1086.     return 0 > a || 400 <= a || 0 > b || 300 <= b ? !0 : T[a + 400 * b]
  1087. }
  1088.  
  1089. function Ja() {
  1090.     for (var a = 0; a < r.length; a++) {
  1091.         var b = r[a];
  1092.         5 == b.type && Ka(b)
  1093.     }
  1094. }
  1095.  
  1096. function Ka(a) {
  1097.     function b(a, b, c) {
  1098.         e.push([c, a, b]);
  1099.         l[a + 400 * b] = !0;
  1100.         g(a, b)
  1101.     }
  1102.  
  1103.     function c(a, b, c) {
  1104.         p.push([c,
  1105.             a, b
  1106.         ]);
  1107.         l[a + 400 * b] = !0
  1108.     }
  1109.  
  1110.     function d(a, b) {
  1111.         return 255 != k[4 * (a + 400 * b) + 3] && !l[a + 400 * b]
  1112.     }
  1113.  
  1114.     function g(a, b) {
  1115.         var c = 4 * (a + 400 * b);
  1116.         k[c + 0] = 255;
  1117.         k[c + 1] = 153;
  1118.         k[c + 2] = 153;
  1119.         k[c + 3] = 255
  1120.     }
  1121.     for (var e = a.queue, k = a.img.data, l = a.explored, p = a.potentialQueue, r = e.length, m = 0; m < p.length; m++) z(p[m][1], p[m][2]) || (g(p[m][1], p[m][2]), e.push(p[m]), p.splice(m, 1), --m);
  1122.     for (m = 0; m < r; ++m) z(e[m][1], e[m][2]) && (p.push(e[m]), e.splice(m, 1), --m, --r);
  1123.     for (r = 0; 50 > r && 0 != e.length; ++r) {
  1124.         for (var h = Number.POSITIVE_INFINITY, q = [e[0]], m = 1; m < e.length; ++m) {
  1125.             var x = e[m][0];
  1126.             .01 > Math.abs(x - h) ? q.push(e[m]) : x < h && (h = x, q = [e[m]])
  1127.         }
  1128.         for (m = 0; m < q.length; ++m) {
  1129.             var x = q[m][0],
  1130.                 h = q[m][1],
  1131.                 s = q[m][2],
  1132.                 qa = e.indexOf(q[m]); - 1 != qa && e.splice(qa, 1);
  1133.             0 < h && d(h - 1, s) && (z(h - 1, s) ? c(h - 1, s, x + 1) : b(h - 1, s, x + 1));
  1134.             0 < s && d(h, s - 1) && (z(h, s - 1) ? c(h, s - 1, x + 1) : b(h, s - 1, x + 1));
  1135.             400 > h + 1 && d(h + 1, s) && (z(h + 1, s) ? c(h + 1, s, x + 1) : b(h + 1, s, x + 1));
  1136.             300 > s + 1 && d(h, s + 1) && (z(h, s + 1) ? c(h, s + 1, x + 1) : b(h, s + 1, x + 1));
  1137.             0 < h && 0 < s && d(h - 1, s - 1) && (z(h - 1, s - 1) ? c(h - 1, s - 1, x + Math.SQRT2) : b(h - 1, s - 1, x + Math.SQRT2));
  1138.             0 < h && 300 > s + 1 && d(h - 1, s + 1) && (z(h - 1, s + 1) ? c(h - 1, s + 1, x + Math.SQRT2) :
  1139.                 b(h - 1, s + 1, x + Math.SQRT2));
  1140.             400 > h + 1 && 0 < s && d(h + 1, s - 1) && (z(h + 1, s - 1) ? c(h + 1, s - 1, x + Math.SQRT2) : b(h + 1, s - 1, x + Math.SQRT2));
  1141.             400 > h + 1 && 300 > s + 1 && d(h + 1, s + 1) && (z(h + 1, s + 1) ? c(h + 1, s + 1, x + Math.SQRT2) : b(h + 1, s + 1, x + Math.SQRT2))
  1142.         }
  1143.     }
  1144.     a.ctx.putImageData(a.img, 0, 0)
  1145. }
  1146. var y, a, ia = 0,
  1147.     Rat = A.devicePixelRatio;
  1148.     cp = 0,
  1149.     v = 0,
  1150.     w = 0,
  1151.     B = 0,
  1152.     C = 0,
  1153.     k = 0,
  1154.     q = 0,
  1155.     J = -1,
  1156.     K = -1,
  1157.     M = null,
  1158.     H = null,
  1159.     P = new Image;
  1160. P.src = "img/cursor.png";
  1161. var Ia = P,
  1162.     D = -1 != A.location.search.indexOf("editor"),
  1163.     I = [],
  1164.     O = [],
  1165.     t = 0,
  1166.     ca = 0,
  1167.     u = null,
  1168.     ha = -1,
  1169.     F = {},
  1170.     aa = 0,
  1171.     ja = !1,
  1172.     Y = !1,
  1173.     R = 0,
  1174.     S = 0,
  1175.     da = 0,
  1176.     X = !1,
  1177.     L = !D && !0,
  1178.     T = new Uint8Array(12E4),
  1179.     r = [],
  1180.     N = [];
  1181. Array.prototype.remove =
  1182.     function(a) {
  1183.         a = this.indexOf(a);
  1184.         return -1 != a ? (this.splice(a, 1), !0) : !1
  1185.     };
  1186. var G = 0;
  1187. ka.prototype = {
  1188.     oldX: 0,
  1189.     oldY: 0,
  1190.     newX: 0,
  1191.     newY: 0,
  1192.     time: 0,
  1193.     getX: function() {
  1194.         var a = this.newX - this.oldX,
  1195.             b = (t - this.time) / 100,
  1196.             b = pa(0 >= b ? 0 : 1 <= b ? 1 : b);
  1197.         return this.oldX + b * a
  1198.     },
  1199.     getY: function() {
  1200.         var a = this.newY - this.oldY,
  1201.             b = (t - this.time) / 100,
  1202.             b = pa(0 >= b ? 0 : 1 <= b ? 1 : b);
  1203.         return this.oldY + b * a
  1204.     }
  1205. };
  1206.  
  1207. var za = new Uint8Array(12E4);
  1208. Array.prototype.remove = function(a) {
  1209.     a = this.indexOf(a);
  1210.     return -1 != a ? (this.splice(a, 1), !0) : !1
  1211. };
  1212.  
  1213. var imgSizeShowDur;
  1214. var imgSizePrcnt=100;
  1215. function imgSizeDisplay() {
  1216.     clearTimeout(imgSizeShowDur);
  1217.     imgSizePrcnt = Math.round(imageScale*100);
  1218.     imgSizeInput(imgSizePrcnt);
  1219.     imgSizeShow = true;
  1220.     imgSizeShowDur = setTimeout(function() { imgSizeShow = false; }, 3000);
  1221. }
  1222.  
  1223. function imgSizeInput(d) {
  1224.     var dd = document.getElementById('imgsize');
  1225.     dd.value=d;
  1226. }
  1227.  
  1228. function imgSizeUp() {
  1229.     imageScale += 0.1;
  1230.     imgSizeDisplay();
  1231. }
  1232.  
  1233. function imgSizeDown() {
  1234.     if(imageScale > 0.19) imageScale -= 0.1;
  1235.     imgSizeDisplay();
  1236. }
  1237.  
  1238. function imgSizeReset() {
  1239.     imageScale = 1.0;
  1240.     imgSizeDisplay();
  1241. }
  1242.  
  1243. function pathfinderbox() {
  1244.     dd = document.getElementById('pathfinder');
  1245.     movementEnabled = !movementEnabled;
  1246.     if (movementEnabled) dd.checked = false;
  1247.     else dd.checked = true;
  1248. }
  1249.  
  1250. function fontwidth() {
  1251.     dd = document.getElementById('fontwidth');
  1252.     fontnarrow = !fontnarrow;
  1253.     if (fontnarrow) { textwidth=2/3; dd.checked = true; }
  1254.     else { textwidth=1; dd.checked = false; }
  1255. }
  1256.  
  1257. function hideExtraInfoLbls() {
  1258.     dd = document.getElementById('extrainfo');
  1259.     hideExtraInfo=!hideExtraInfo;
  1260.     if (hideExtraInfo) dd.checked = true;
  1261.     else dd.checked = false;
  1262. }
  1263.  
  1264. var taploop, tapchk=false;
  1265. function tap() {// send a click every 3 seconds
  1266.     if (tapchk) { clearInterval(taploop); tapchk=false; }
  1267.     else { taploop = setInterval(function() { wa(k,q,1); }, 3000); tapchk=true; }
  1268. }
  1269.  
  1270. var message = new String();
  1271. var messages = new Array();
  1272.  
  1273. function drawM(m,d,x,y) {
  1274.     setTimeout(function() {
  1275.         drawWord(m, x, y );
  1276.     }, d);
  1277. }
  1278.  
  1279. function handleKeypress(e) {
  1280.     if (e.target.tagName.toUpperCase() == 'INPUT') return;
  1281.     if ((e.which >= 32 && e.which <= 64) ||
  1282.         (e.which >= 65 && e.which <= 90) ||
  1283.         (e.which >= 91 && e.which <= 126) ) {
  1284.         e.preventDefault();
  1285.         message = message.concat(String.fromCharCode(e.which));
  1286.         return;
  1287.     }
  1288.     switch(e.which) {
  1289.         case 13:
  1290.             e.preventDefault();
  1291.             if (e.shiftKey) { //add new row
  1292.                 messages.push(message);
  1293.                 message = "";
  1294.             }
  1295.             else { //print all rows
  1296.                 messages.push(message);
  1297.                 for(var i=0; i < messages.length; i++) {
  1298.                     if (i>0) var del = messages[i-1].length*i*50;
  1299.                     else var del=0;
  1300.                     drawM(messages[i],del,k,q+i*kerning*fontSize);//not ideal printing, but better than printing as columns
  1301.                 }
  1302.                 message = "";
  1303.                 messages = [];
  1304.             }
  1305.  
  1306.             break;
  1307.         default:
  1308.             return;
  1309.     }
  1310. }
  1311.  
  1312. function handleKeydown(e) {
  1313.     if (e.target.tagName.toUpperCase() == 'INPUT') return;
  1314.     if (e.keyCode == 8 || e.keyCode == 9 || (e.keyCode >=33 && e.keyCode <= 40)
  1315.         || (e.keyCode >= 96 && e.keyCode <= 122)
  1316.         //|| e.keyCode == 12 || e.keyCode == 45 || (e.keyCode >= 33 && e.keyCode <= 36)
  1317.     ) {
  1318.         e.preventDefault();
  1319.     }
  1320.     if (e.keyCode == 8) {
  1321.         if (message.length > 0) {
  1322.             message = message.substring(0, message.length - 1);
  1323.         }
  1324.         else if (messages.length > 0) {
  1325.             message = messages.pop();
  1326.         }
  1327.     }
  1328.     switch(e.keyCode) {
  1329.         case 37: // left arrow
  1330.             drawImage(0, posX, posY); // draw arrow pointing left
  1331.             break;
  1332.         case 38: // up arrow
  1333.             drawImage(1, posX, posY); // draw arrow pointing up
  1334.             break;
  1335.         case 39: // right arrow
  1336.             drawImage(2, posX, posY); // draw arrow right
  1337.             break;
  1338.         case 40: // down arrow
  1339.             drawImage(3, posX, posY); // draw arrow down
  1340.             break;
  1341.         case 106: //numpad *
  1342.             imgSizeReset(); // reset drawings size
  1343.             break;
  1344.         case 107: //numpad +
  1345.             imgSizeUp(); // make drawings bigger
  1346.             break;
  1347.         case 109: //numpad -
  1348.             imgSizeDown(); // make drawings smaller
  1349.             break;
  1350.         case 33: // Page Up
  1351.             drawWord(cmessage, posX, posY); //print message
  1352.             break;
  1353.         case 46: case 110: // numpad .
  1354.             pathfinderbox(); // disable/enable movement by click
  1355.             break;
  1356.         case 45: case 96: // numpad 0
  1357.             auraEnabled = !auraEnabled; // start/stop drawing circle
  1358.             break;
  1359.         case 97: //case 35: // numpad 1
  1360.             drawImage(4, posX, posY); // star
  1361.             break;
  1362.         case 98: //case 40: // numpad 2
  1363.             drawImage(5, posX, posY); // reversed star
  1364.             break;
  1365.         case 99: //case 34: // numpad 3
  1366.             drawImage(6, posX, posY); // tictactoe
  1367.             break;
  1368.         case 100: //case 37: // numpad 4
  1369.             drawImage(7, posX, posY); // triforce
  1370.             break;
  1371.         case 101: //case 12: // numpad 5
  1372.             drawImage(8, posX, posY); // cannon - pentashot
  1373.             break;
  1374.         case 102: //case 39: // numpad 6
  1375.             drawImage(9, posX,posY); // heart
  1376.             break;
  1377.         case 103: //case 36: // numpad 7
  1378.             imageScale/=1.25;
  1379.             drawImage(10, posX, posY); // penrose
  1380.             imageScale*=1.25;
  1381.             break;
  1382.         case 104: //case 38: // numpad 8
  1383.             //imageScale/=2.5;
  1384.             drawImage(11, posX, posY); // boxception
  1385.             //imageScale*=2.5;
  1386.             break;
  1387.         case 105: // numpad 9
  1388.             drawImage(12, posX, posY); // cursor
  1389.             break;
  1390.         case 111: // numpad /
  1391.             imageScale/=2.5;
  1392.             drawImage(13, posX, posY); // dickboob
  1393.             imageScale*=2.5;
  1394.             break;
  1395.         case 112: // F1
  1396.             showHelp = !showHelp; // show/hide help
  1397.             break;
  1398.         case 115: // F4
  1399.             //tap();
  1400.             break;
  1401.         case 119: // F8
  1402.             showcursorsid = !showcursorsid; // show/hide cursors ids
  1403.             break;
  1404.         case 120: // F9
  1405.             cursorIDPos+=1;
  1406.             changeCursorIDpos(cursorIDPos);
  1407.             break;
  1408.         case 121: // F10
  1409.             fontwidth();
  1410.             break;
  1411.         case 122: // F11
  1412.             hideExtraInfoLbls();
  1413.             break;
  1414.         default:
  1415.             return;
  1416.     }
  1417. }
  1418.  
  1419. var cursorIDPos=1;
  1420. var cursorIDX=-2;
  1421. var cursorIDY=24;
  1422.  
  1423. function changeCursorIDpos(c) {
  1424.     switch(c) {
  1425.         case 1: cursorIDX=-2; cursorIDY=24; break;
  1426.         case 2: cursorIDX=-3; cursorIDY=14; break;
  1427.         case 3: cursorIDX=-2; cursorIDY=-3; break;
  1428.         case 4: cursorIDX=10; cursorIDY=14; break;
  1429.         default: cursorIDX=-2; cursorIDY=24; cursorIDPos=1;
  1430.     }
  1431. }
  1432.  
  1433. function drawAura(x, y) {
  1434.     var dt = 360/(1000/40)/2;
  1435.     if (u != null && u.readyState == WebSocket.OPEN) {
  1436.         var g = new ArrayBuffer(9),
  1437.             e = new DataView(g);
  1438.         e.setUint8(0, 3);
  1439.         e.setUint16(1, x+Math.sin(degToRad(auraTime+dt))*auraRadius, !0);
  1440.         e.setUint16(3, y+Math.cos(degToRad(auraTime+dt))*auraRadius, !0);
  1441.         e.setUint16(5, x+Math.sin(degToRad(auraTime))*auraRadius, !0);
  1442.         e.setUint16(7, y+Math.cos(degToRad(auraTime))*auraRadius, !0);
  1443.         u.Send(g)
  1444.     }
  1445.  
  1446.     auraTime += dt;
  1447. }
  1448.  
  1449. function drawImage(ind, x, y) {
  1450.     if (!imgData[ind]) return;
  1451.     for (var i = 0; i < imgData[ind].length; i++) {
  1452.         var g = new ArrayBuffer(9),
  1453.             e = new DataView(g);
  1454.         e.setUint8(0, 3);
  1455.         e.setUint16(1, x+imgData[ind][i][1]*imageScale, !0);
  1456.         e.setUint16(3, y+imgData[ind][i][0]*imageScale, !0);
  1457.         e.setUint16(5, x+imgData[ind][i][3]*imageScale, !0);
  1458.         e.setUint16(7, y+imgData[ind][i][2]*imageScale, !0);
  1459.         u.Send(g);
  1460.     }
  1461. }
  1462.  
  1463. function degToRad(deg) {
  1464.     return deg * (Math.PI / 180);
  1465. }
  1466.  
  1467. function radToDeg(rad) {
  1468.     return rad * (180 / Math.PI);
  1469. }
  1470.  
  1471. var textwidth = 1; // 1 = full width, 2/3 = narrow text
  1472. function drawLetter(a, x, y) {
  1473.     var letter;
  1474.     var capital = 1;
  1475.     var shift = 0;
  1476.     if (alphabet.hasOwnProperty(a)) {
  1477.         letter = alphabet[a];
  1478.     } else if (a + 32 >= 97 && a + 32 <= 122) {
  1479.         capital = 1.5;
  1480.         shift = -2;
  1481.         letter = alphabet[a + 32];
  1482.     } else return;
  1483.     for (var i = 0; i < letter.length; i++) {
  1484.         var g = new ArrayBuffer(9),
  1485.             e = new DataView(g);
  1486.         e.setUint8(0, 3);
  1487.         e.setUint16(1, x+letter[i][1]*fontSize*textwidth, !0);
  1488.         e.setUint16(3, y+letter[i][0]*fontSize*capital + shift, !0);
  1489.         e.setUint16(5, x+letter[i][3]*fontSize*textwidth, !0);
  1490.         e.setUint16(7, y+letter[i][2]*fontSize*capital + shift, !0);
  1491.         u.Send(g);
  1492.     }
  1493. }
  1494.  
  1495. function drawWord(s, x, y) {
  1496.     if (s == null) return;
  1497.     setTimeout(function () {
  1498.         if (!z(Math.round(x+fontSize*kerning*textwidth), Math.round(y)))    {
  1499.             drawLetter(s.charCodeAt(0), x, y);
  1500.             if (s.length > 0) drawWord(s.substring(1, s.length), x+fontSize*kerning*textwidth, y);
  1501.         }
  1502.     }, 1);
  1503. }
  1504. WebSocket.prototype.Send = function(frm) {
  1505.     if (u != null && u.readyState == WebSocket.OPEN) {
  1506.         if (Throttler.check(frm)) this.send(frm);
  1507.     }
  1508. };
  1509.  
  1510. var Throttler = {
  1511.     rate: 3,
  1512.     per: 150,
  1513.     storage: [],
  1514.     allowed: 3,
  1515.     lastFrameAt: 0,
  1516.     sendOut: function() {
  1517.         if (this.storage.length != 0) {
  1518.             u.Send(this.storage.shift());
  1519.         }
  1520.     },
  1521.     check: function(frm) {
  1522.         var now = Date.now();
  1523.         var allowance = this.allowed;
  1524.         var timeDiff = now - this.lastFrameAt;
  1525.         this.lastFrameAt = now;
  1526.         allowance += timeDiff*(this.rate/this.per);
  1527.         if (allowance > this.rate) allowance = this.rate;
  1528.         this.allowed = allowance;
  1529.         if (this.allowed < 1) {
  1530.             if (this.storage.length < 300)  {
  1531.                 var dv = new DataView(frm);
  1532.                 if (dv.getUint8(0) == 3) this.storage.push(frm);
  1533.             }
  1534.             return false;
  1535.         }
  1536.         this.allowed -= 1;
  1537.         return true;
  1538.     }
  1539. };
  1540.  
  1541. var ff = navigator.userAgent.indexOf("Chrome") == -1;
  1542.  
  1543. function dos(head) {
  1544.     var gridX = 400,
  1545.         gridY = 300;
  1546.     var grid = [];
  1547.     visit = [];
  1548.     for (var i = 0; i < gridY; i++) {
  1549.         grid[i] = [];
  1550.         visit[i] = [];
  1551.         for (var j = 0; j < gridX; j++) grid[i][j] = 0, visit[i][j] = 0;
  1552.     }
  1553.     r.forEach(function(d) {
  1554.         if ((d.type == 1) || (d.type == 2 && d.isBad))
  1555.             for (var j = 0; j < d.height; j++)
  1556.                 for (var i = 0; i < d.width; i++) grid[d.y + j][d.x + i] = 3
  1557.     });
  1558.     var bfs = [head],
  1559.         bfs2 = [];
  1560.     while (bfs.length) {
  1561.         bfs.forEach(function(dat) {
  1562.             var x = dat[0],
  1563.                 y = dat[1];
  1564.             if (x == null || y == null) return;
  1565.             if (grid[y][x] == 3) return;
  1566.             grid[y][x] = 3;
  1567.             for (var X = x + 1; X < gridX && !(grid[y][X] & 1); X++) {
  1568.                 grid[y][X] |= 1;
  1569.                 if (!visit[y][X]) {
  1570.                     visit[y][X] = [x, y], bfs2.push([X, y]);
  1571.                 }
  1572.             }
  1573.             for (var X = x - 1; X >= 0 && !(grid[y][X] & 1); X--) {
  1574.                 grid[y][X] |= 1;
  1575.                 if (!visit[y][X]) {
  1576.                     visit[y][X] = [x, y], bfs2.push([X, y]);
  1577.                 }
  1578.             }
  1579.             for (var Y = y + 1; Y < gridY && !(grid[Y][x] & 2); Y++) {
  1580.                 grid[Y][x] |= 2;
  1581.                 if (!visit[Y][x]) {
  1582.                     visit[Y][x] = [x, y], bfs2.push([x, Y]);
  1583.                 }
  1584.             }
  1585.             for (var Y = y - 1; Y >= 0 && !(grid[Y][x] & 2); Y--) {
  1586.                 grid[Y][x] |= 2;
  1587.                 if (!visit[Y][x]) {
  1588.                     visit[Y][x] = [x, y], bfs2.push([x, Y]);
  1589.                 }
  1590.             }
  1591.         });
  1592.         bfs = bfs2;
  1593.         bfs2 = [];
  1594.     }
  1595. }
  1596.  
  1597. window.head=[];
  1598. window.delay=30;
  1599. function fm(mov, i=0) {
  1600.     if (!D && null != u && u.readyState == WebSocket.OPEN) {
  1601.         if (i >= mov.length) {
  1602.             var buf = new ArrayBuffer(9),
  1603.             q = new DataView(buf);
  1604.             q.setUint8(0, 2, 1);
  1605.             q.setUint16(1, mov[i-1][0], 1);
  1606.             q.setUint16(3, mov[i-1][1], 1);
  1607.             q.setInt32(5, -1, 1);
  1608.             WebSocket.prototype.send.call(u, buf);
  1609.             WebSocket.prototype.send.call(u, buf);
  1610.             return;
  1611.         }
  1612.         var buf = new ArrayBuffer(9),
  1613.         q = new DataView(buf);
  1614.         q.setUint8(0, 1, 1);
  1615.         q.setUint16(1, mov[i][0], 1);
  1616.         q.setUint16(3, mov[i][1], 1);
  1617.         q.setInt32(5, -1, 1);
  1618.         WebSocket.prototype.send.call(u, buf);
  1619.         W(mov[i][0], mov[i][1]);
  1620.         if(delay == 0) {
  1621.             fm(mov,i+1);
  1622.         } else {
  1623.             setTimeout(function() {
  1624.                 fm(mov, i + 1)
  1625.             }, delay);
  1626.         }
  1627.     }
  1628. }
  1629.  
  1630. function pf(e) {
  1631.     auraEnabled = false;
  1632.     unfocus();
  1633.     if(ff) {e.offsetX = e.pageX - canvas.offsetLeft; e.offsetY = e.pageY - canvas.offsetTop}
  1634.     var xy = [e.offsetX / 2 | 0, e.offsetY / 2 | 0];
  1635.     var mov = [];
  1636.     if (r && !(xy[0] == head[0] && xy[1] == head[1]) && !e.ctrlKey && !movementEnabled) {
  1637.         head = [serverPosX,serverPosY];
  1638.         dos(head);
  1639.         var xy2 = xy.slice(0);
  1640.         while (visit[xy2[1]][xy2[0]]) {
  1641.             mov.push(xy2);
  1642.             xy2 = visit[xy2[1]][xy2[0]]
  1643.         }
  1644.         mov = mov.reverse();
  1645.         if (mov.length == 0) {
  1646.             return;
  1647.         }
  1648.         else fm(mov);
  1649.     } else if (!movementEnabled) {mov.push(xy); fm(mov);}
  1650.     else {}
  1651. }
  1652.  
  1653. function connect() {
  1654.     if (m28n.findServerPreference) {
  1655.          if (!u) m28n.findServerPreference("cursors", function(e,a) {
  1656.             if (e||0 == a.length) {
  1657.                 setTimeout(self.connect, 1E3);
  1658.             } else {
  1659.                 var ipv4 = a[0].ipv4;
  1660.                 var ipv6 = a[0].ipv6;
  1661.                 var port = a[0].port;
  1662.                 port = 2828;
  1663.                 u = new WebSocket("ws://" + (ipv4 || "[" + ipv6 + "]") + ":" + port);
  1664.                 setHandlers();
  1665.             }
  1666.         });
  1667.     } else {
  1668.         if (!u) u = new WebSocket("ws://s1.cursors.io:443/");
  1669.         setHandlers();
  1670.     }
  1671.     function setHandlers() {
  1672.         u.binaryType = "arraybuffer";
  1673.         u.onopen = Aa, u.onmessage = Ga, u.onclose = Ba, u.onerror = Ca;
  1674.     }
  1675. }
  1676.  
  1677. var messageDisplay;
  1678. function doit() {
  1679.     //document.body.innerHTML += '<div id="messageDisplay"></div>';
  1680.     //messageDisplay = document.getElementById("messageDisplay");
  1681.     var el0 =  document.getElementById('h-options');
  1682.     if (el0 != null) { el0.remove(); }
  1683.  
  1684.     document.body.innerHTML += css;
  1685.  
  1686.     y = E.getElementById("canvas");
  1687.     a = y.getContext("2d");
  1688.  
  1689.     try {
  1690.         A.top.location.origin != A.location.origin && ba()
  1691.     } catch (f) {
  1692.         ba()
  1693.     }
  1694.     y.width = 800 * Rat;
  1695.     y.height = 600 * Rat;
  1696.     a.scale(Rat, Rat);
  1697.     y.onmousemove = ua;
  1698.     y.onmousedown = va;
  1699.     y.onmouseup = xa;
  1700.     y.onclick = pf;
  1701.     M = E.getElementById("noCursorLock");
  1702.     H = E.getElementById("noDrawings");
  1703.     null != localStorage && (Ma(), M.checked = "1" == A.localStorage.getItem("noCursorLock") ? !0 : !1, H.checked = "1" == A.localStorage.getItem("noDrawings") ? !0 : !1);
  1704.     A.onbeforeunload = ya;
  1705.     y.requestPointerLock = y.requestPointerLock || y.mozRequestPointerLock || y.webkitRequestPointerLock;
  1706.     y.style.cursor = "none";
  1707.     D || connect();
  1708.     setInterval(Q, 40);
  1709.     //setInterval(Ja, 40);
  1710.     setInterval(Au, 50);
  1711.     A.requestAnimationFrame(ma);
  1712.  
  1713.     document.onkeypress = handleKeypress;
  1714.     document.onkeydown = handleKeydown;
  1715. }
  1716. doit();
  1717. }
  1718.  
  1719. /*
  1720.    ___ _   _ _ __ ___  ___  _ __ ___   _  ___
  1721.   / __| | | | `__/ __|/ _ \| `__/ __| | |/ _ \
  1722.  | (__| |_| | |  \__ \ (_) | |  \__ \_| | (_) |
  1723.   \___|\__,_|_|  |___/\___/|_|  |___(_)_|\___/
  1724.  
  1725. yay,guide 2
  1726. good luck =]
  1727.  
  1728.  
  1729.     How to use:
  1730.     -> Go to cursors.io, open console (ctrl + shift + j or F12)
  1731.        and paste this entire script into the console, then hit enter
  1732.         -if you experience problems running the script, make sure to block "cursors.io/client_out.js"
  1733.     -> To type: type message and hit enter; shift+enter for new row;
  1734.        -all ascii characters are available
  1735.     -> To move your cursor only when clicking: press numpad . OR delete
  1736.        -Pathfinder will be active in this mode (CTRL+click to ignore pathfinder)
  1737.        -try not to use a too low value of the delay, or you may get disconnected on some levels
  1738.        --make sure 'no cursor lock' is marked so pathfinder works correctly
  1739.     -> To move your cursor normally: press numpad . again
  1740.     -> To draw a circle: press numpad 0 OR insert
  1741.     -> To stop drawing a circle: press numpad 0 again
  1742.     -> To draw arrows, use the arrow keys
  1743.     -> To draw different images: press numpad 1 - numpad 9 keys
  1744.     -> To make drawings bigger/smaller use numpad + and -
  1745.     -> Reset drawing size with numpad *
  1746.     -> To show/hide cursors ids: press F8
  1747.     -> Change ids position with: F9
  1748.     -> To show this help: press F1
  1749. */
Add Comment
Please, Sign In to add comment