Advertisement
Underworld1337

Untitled

Oct 15th, 2015
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                         // walls
  2.                         function vloc(game, tile) {
  3.                           return overlays.buildOverlay[tile[0]][tile[1]]
  4.                         }
  5.                        
  6.                         if(game.state.p.f[0].cd <= game.state.t){
  7.                             /*for(var x = 6; x > -1; x--){
  8.                               if (x == 2){ continue; }
  9.                               for(var y = 0; y < 15; y++){
  10.                                 if(y == 0 && x > 1){ continue; }
  11.                                 game.input.action = 'build';
  12.                                 game.input.id = 0;
  13.                                 overlays.updateBuildOverlay(game);
  14.                                 var t = [x,y];
  15.                                 if(vloc(game, t)){
  16.                                   socket.emit('input', {'tile':t,'action':'build','fid':0});
  17.                                   game.resetInput();
  18.                                   break;
  19.                                 }else{
  20.                                   game.resetInput();
  21.                                   continue;
  22.                                 }
  23.                               }
  24.                             }*/
  25.                            
  26.                             var tres = game.state.t % 50;
  27.                             if(game.state.s == 'g' && tres == 0){
  28.                              var mace = [
  29.                                             [[6,1],[5,1],[4,1],[3,1],[1,0],[1,1],
  30.                                             [1,2],[3,2],[5,2],[4,2],[6,2],[3,3],
  31.                                             [4,3],[5,3],[6,3],[3,4],[4,4],[5,4],
  32.                                             [6,4],[3,5],[3,6],[0,0],[0,1],[0,2],
  33.                                             [1,3],[1,4],[0,3],[0,4],[0,5],[1,5],
  34.                                             [0,6],[1,6],[4,5],[4,6],[5,5],[5,6],
  35.                                             [6,5],[6,6],[0,7],[1,7],[3,7],[4,7],
  36.                                             [5,7],[6,7],[0,8],[1,8],[3,8],[4,8],
  37.                                             [5,8],[6,8],[0,9],[1,9],[3,9],[4,9],
  38.                                             [5,9],[6,9],[0,10],[1,10],[3,10],
  39.                                             [4,10],[5,10],[6,10],[0,11],[1,11],
  40.                                             [3,11],[4,11],[5,11],[6,11],[0,12],
  41.                                             [1,12],[3,12],[4,12],[5,12],[6,12],
  42.                                             [0,13],[1,13],[3,13],[4,13],[5,13],
  43.                                             [6,13],[3,14],[4,14],[5,14],[6,14]],
  44.                                            
  45.                                             [[0,13],[1,13],[2,13],[3,13],[5,14],
  46.                                             [5,13],[3,12],[5,12],[0,12],[1,12],
  47.                                             [2,12],[6,14],[6,13],[6,12],[0,11],
  48.                                             [1,11],[2,11],[3,11],[5,11],[6,11],
  49.                                             [0,10],[1,10],[2,10],[3,10],[5,10],
  50.                                             [6,10],[0,9],[1,9],[2,9],[3,9],[5,9],
  51.                                             [6,9],[0,8],[1,8],[2,8],[3,8],[5,8],
  52.                                             [6,8],[0,7],[1,7],[2,7],[3,7],[5,7],
  53.                                             [6,7],[0,6],[1,6],[2,6],[3,6],[5,6],
  54.                                             [6,6],[0,5],[1,5],[2,5],[3,5],[5,5],
  55.                                             [6,5],[0,3],[1,3],[2,3],[3,3],[5,3],
  56.                                             [6,3],[0,2],[1,2],[3,2],[5,2],[6,2],
  57.                                             [0,1],[1,1],[2,1],[3,1],[5,1],[6,1],
  58.                                             [0,0],[1,0],[2,0],[3,0]]
  59.                                         ];
  60.                               for (var i = 0; i <= mace[game.state.p.pid].length; i++){
  61.                                 if(mace[game.state.p.pid][i] == undefined){break;}
  62.                                 game.input.action = 'build';
  63.                                 game.input.id = 0;
  64.                                 overlays.updateBuildOverlay(game);
  65.                                 if(vloc(game, mace[game.state.p.pid][i])){
  66.                                   socket.emit('input', {'tile':mace[game.state.p.pid][i],'action':'build','fid':0});
  67.                                   game.resetInput();
  68.                                   break;
  69.                                 }else{
  70.                                   game.resetInput();
  71.                                   continue;
  72.                                 }
  73.                               }
  74.                             }
  75.                         }
  76.                         // eof walls
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement