Advertisement
Guest User

DingDonger

a guest
Apr 29th, 2019
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var baseShip = 605;
  2. var shipTree = [];
  3.  
  4. var Spectator_609 = '{"name":"Spectator","level":6,"model":9,"size":0.5,"specs":{"shield":{"capacity":[1000,1000],"reload":[1000,1000]},"generator":{"capacity":[1,1],"reload":[1,1]},"ship":{"mass":0,"speed":[150,150],"rotation":[200,200],"acceleration":[200,200]}},"bodies":{"main":{"section_segments":8,"offset":{"x":0,"y":35,"z":0},"position":{"x":[0,0,0,0,0,0],"y":[-100,-95,-20,0,30,25],"z":[0,0,0,0,0,0]},"width":[0,10,40,20,12,0],"height":[0,5,25,20,12,0],"texture":[10,11,4,13],"propeller":true},"cockpit":{"section_segments":8,"offset":{"x":0,"y":37,"z":10},"position":{"x":[0,0,0,0,0,0],"y":[-95,-40,-30],"z":[-8,-7,0,0,0,0]},"width":[9,30,10],"height":[0,25,10],"texture":[9],"propeller":false}},"typespec":{"name":"Spectator","level":6,"model":9,"code":609,"specs":{"shield":{"capacity":[1000,1000],"reload":[1000,1000]},"generator":{"capacity":[1,1],"reload":[1,1]},"ship":{"mass":0,"speed":[150,150],"rotation":[200,200],"acceleration":[200,200]}},"shape":[0.65,0.631,0.581,0.49,0.431,0.385,0.356,0.336,0.325,0.318,0.318,0.325,0.337,0.361,0.387,0.427,0.424,0.405,0.394,0.391,0.398,0.437,0.52,0.653,0.661,0.651,0.661,0.653,0.52,0.437,0.398,0.391,0.394,0.405,0.424,0.427,0.387,0.361,0.34,0.325,0.318,0.318,0.325,0.336,0.356,0.385,0.431,0.49,0.581,0.631],"lasers":[],"radius":20}}';shipTree.push(Spectator_609);
  5.  
  6. var vocabulary = [
  7.   { text: "Me", icon:"\u004f", key:"E" },
  8.   { text: "You", icon:"\u004e", key:"O" },
  9.   { text: "Winner", icon:"\u002e", key:"I" },
  10.   { text: "Loser", icon:"\u002d", key:"L" },
  11.  
  12.   { text: "Wait", icon:"\u0046", key:"T" },
  13.   { text: "Ready", icon:"\u0051", key:"R" },
  14.   { text: "Attack", icon:"\u002b", key:"A" },
  15.   { text: "GG", icon:"\u00a3", key:"G" },
  16.  
  17.   { text: "Duel", icon:"\u0059", key:"D" },
  18.   { text: "?", icon:"\u004b", key:"Q" },
  19.   { text: "Watch", icon:"\u00ae", key:"W" },
  20.   { text: "Fight", icon:"\u00af", key:"X" },
  21.  
  22.   { text: "Yes", icon:"\u004c", key:"Y" },
  23.   { text: "No", icon:"\u004d", key:"N" },
  24.   { text: "Follow", icon:"\u0050", key:"F" },
  25.   { text: "Begone", icon:"\u00a1", key:"B" }
  26. ] ;
  27.  
  28. this.options = {
  29.  
  30.   // MATCH SETTINGS :
  31.  
  32.   map_name: "Dueling",
  33.   //root_mode: "team",
  34.   starting_ship: baseShip,
  35.   starting_ship_maxed: true,
  36.   max_level: 6,
  37.   max_players: 200,
  38.   //friendly_colors: 3,
  39.   //survival_time: 999,
  40.   //survival_level: 8,
  41.   //mines_self_destroy: false,
  42.   //mines_destroy_delay: 0,
  43.   ships: shipTree,
  44.   //reset_tree: true,
  45.   weapons_store: false,
  46.   //station_crystal_capacity: 0.1,
  47.   vocabulary: vocabulary,
  48.   //choose_ship: [102,103],
  49.  
  50.   // MAP SETTINGS :
  51.  
  52.   //map_size: mapSize,
  53.   //map_id: 4971,
  54.   crystal_value: 1,
  55.   asteroids_strength: 1,
  56.   //weapon_drop: 0,
  57.   //friction_ratio: 1,
  58.   //speed_mod: 1,
  59.   //custom_map: initialMap,
  60.  
  61.   // SHIP SETTINGS :
  62.  
  63.   //shield_regen_factor: 1,
  64.   //power_regen_factor: 1,
  65.   //lives: 5,
  66.   //healing_enabled: true,
  67.   //healing_ratio: 1,
  68.   //rcs_toggle: true,
  69.   //radar_zoom: 1.2,
  70.  
  71. };
  72.  
  73. // me you winner loser
  74. // wait ready attack gg
  75. // duel hmm? watch fight
  76. // yes no follow begone
  77.  
  78.  
  79. // V C
  80.  
  81. var toggle = {
  82.  
  83.   id: "toggle",
  84.   position: [70,0,10,5],
  85.   clickable: true,
  86.   shortcut: "V",
  87.   visible: true,
  88.   components: [
  89.    
  90.     { type:"box",position:[0,0,100,100],stroke:"#EDC",width:4},
  91.     { type: "text",position:[10,10,80,40],value:"Spectate",color:"#EDC"},
  92.     { type: "text",position:[10,55,80,25],value:"[V]",color:"#EDC"}
  93.    
  94.   ]
  95.    
  96. };
  97. var origin = {
  98.  
  99.   id: "origin",
  100.   position: [60,0,10,5],
  101.   clickable: true,
  102.   shortcut: "C",
  103.   visible: true,
  104.   components: [
  105.    
  106.     { type:"box",position:[0,0,100,100],stroke:"#EDC",width:4},
  107.     { type: "text",position:[10,10,80,40],value:"Origin",color:"#EDC"},
  108.     { type: "text",position:[10,55,80,25],value:"[C]",color:"#EDC"}
  109.    
  110.   ]
  111.    
  112. };
  113.  
  114. this.event = function(event,game) {
  115.  
  116.   switch (event.name) {
  117.  
  118.     case "ui_component_clicked":
  119.      
  120.       var func = event.id;
  121.       var ship = event.ship;
  122.      
  123.       switch (func) {
  124.        
  125.         case "toggle":
  126.          
  127.           if (ship.type == baseShip) {
  128.            
  129.             var chng = 609;
  130.            
  131.           }
  132.           else {
  133.            
  134.             var chng = baseShip;
  135.            
  136.           }
  137.           ship.set({type:chng});
  138.           var up = (chng - (chng % 100)) / 100;
  139.           ship.set({stats:(11111111 * up),crystals:(5*up*up*4)});
  140.          
  141.           break;
  142.        
  143.         case "origin":
  144.          
  145.           ship.set({x:0,y:0});
  146.          
  147.           break;
  148.        
  149.       }
  150.      
  151.       break;
  152.      
  153.      
  154.    
  155.   }
  156.  
  157. };
  158.  
  159. this.tick = function(game) {
  160.  
  161.   if ( game.step % 60 == 0 ) {
  162.    
  163.     for ( var a = 0 ; a < game.ships.length ; a++ ) {
  164.      
  165.       var ship = game.ships[a];
  166.       if ( !ship.custom.start_ship_begun ) {
  167.        
  168.         ship.custom.start_ship_begun = true;
  169.         ship.setUIComponent(toggle);
  170.         ship.setUIComponent(origin);
  171.        
  172.       }
  173.  
  174.     }
  175.    
  176.   }
  177.  
  178. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement