Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LOST READ THIS: https://developers.google.com/web/tools/chrome-devtools/console/
- CREATED BY CODEFAG.
- /*
- colors
- white: 0
- lightgray: 1
- gray: 2
- black: 3
- pink: 4
- red: 5
- orange: 6
- brown: 7
- yellow: 8
- lime: 9
- green: 10
- light blue: 11
- navy blue: 12
- blue: 13
- pink: 14
- purple: 15
- */
- ///THIS IS WHERE YOU MAKE THE SCRIPT INTO ANYTHING
- ///THIS IS WHERE YOU MAKE THE SCRIPT INTO ANYTHING
- ///THIS IS WHERE YOU MAKE THE SCRIPT INTO ANYTHING
- ///THIS IS WHERE YOU MAKE THE SCRIPT INTO ANYTHING
- ///THIS IS WHERE YOU MAKE THE SCRIPT INTO ANYTHING
- var imageData = [ //CREATE A ARRAY OF THE COLORS LISTED ABOVE.
- [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 ],
- [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 ],
- [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 ],
- [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 ]
- ];
- var x = 367; //STARTING POSITION X
- var y = 958; //STARTING POSITION Y
- ///THIS IS NOT WHERE YOU MAKE THE SCRIPT INTO ANYTHING
- ///THIS IS NOT WHERE YOU MAKE THE SCRIPT INTO ANYTHING
- ///THIS IS NOT WHERE YOU MAKE THE SCRIPT INTO ANYTHING
- ///THIS IS NOT WHERE YOU MAKE THE SCRIPT INTO ANYTHING
- ///THIS IS NOT WHERE YOU MAKE THE SCRIPT INTO ANYTHING
- var taskQueue = [];
- var taskIndex = 0;
- for(var rowIndex = 0; rowIndex < imageData.length; rowIndex++){
- var row = imageData[rowIndex];
- for(var columnIndex = 0; columnIndex < row.length; columnIndex++){
- taskQueue.push(
- (function(a, b, c) { return function() {
- var array = new ArrayBuffer(5);
- var dv = new DataView(array);
- dv.setUint16(0, x + b);
- dv.setUint16(2, y + a);
- dv.setUint8(4, c);
- out = array;
- console.log(a, b, c);
- connection.send(array);} }(rowIndex, columnIndex, row[columnIndex])));
- }
- }
- setInterval(function(){
- if(taskQueue.length > 0){
- var task = taskQueue[taskIndex];
- if(typeof task == "function"){
- task();
- }
- taskIndex++;
- if(taskIndex > taskQueue.length){
- taskIndex = 0;
- }
- }
- }, 5000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement