Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Basic Admin mod
- * by MALEFOR
- *
- * Here are all of my admin functions that I've used when hosting the Fighter Series mod
- * Note: this is a very basic mod created by a complete scrub ;D This can definately be improved / done better
- * Everyone, noob or professional, has full permission to use, edit and add to this mod
- *
- * Notes:
- * I've left code that can spawn aliens and asteroids automatically for more abusive fun
- * If the god ship level is 8, it WILL FORCE survival, regardless of root_mode
- * A ship level that isn't a whole number, eg 7.9 - 79X, will not appear on the ship tree but will still exist in game
- * This can be useful as nobody can directly upgrade to them.
- * The only way to become the ship is through ship.set or by manually setting it using the console command game.ships[n].set(type:XXX})
- *
- */
- var god_791 = "Your god ship code"; // I've included mine from the Fighter series at the end
- var ships = []
- ships.push(god,791);
- var entity = { // This is the red tint that appears across the map when the god doth have been summoned, this is not necessary
- id: "alert",
- obj: "https://starblast.data.neuronality.com/mods/objects/plane.obj",
- emissive: "https://raw.githubusercontent.com/MALEFOR27/Entity_Detected/master/Alert_BG.png"
- } ;
- var danger = function(game) {
- game.setObject({
- id:"alert",
- type:entity,
- position:{x:0,y:0,z:20},
- scale:{x:1000,y:1000,z:1},
- rotation: {x:0,y:0,z:0}
- }) ;
- } ;
- var spawnAsteroid = function(game) {
- game.addAsteroid( {
- x: (Math.random()-0.5)*game.options.map_size*30,
- y: (Math.random()-0.5)*game.options.map_size*30,
- vx: (Math.random()-.5)*.2,
- vy: (Math.random()-.5)*.2,
- size: 50
- }) ;
- } ;
- var spawnAlien = function(game) {
- game.addAlien( {
- x: 0,
- y: 0,
- code: 20,
- level: 1,
- points: 300,
- crystal_drop: 30,
- }) ;
- } ;
- var immune_button = {
- id: "immune",
- position: [2,40,8,14],
- clickable: true,
- shortcut: "Z",
- visible: false,
- components: [] // you can add visible components if you wish
- } ;
- var immuneShip = function(ship) {
- ship.set({invulnerable:1000}) ;
- } ;
- var god_button = {
- id: "god",
- position: [2,50,8,14],
- clickable: true,
- shortcut: "D",
- visible: false,
- components: [] // you can add visible components if you wish
- } ;
- var godShip = function(ship) {
- ship.set({type:791}) ;
- } ;
- var reset_button = {
- id: "reset",
- position: [2,70,8,14],
- clickable: true,
- shortcut: "J",
- visible: true,
- components: [
- { type:"box",position:[0,0,100,100],fill:"#456",stroke:"#CDE",width:2},
- { type: "text",position:[10,35,80,30],value:"Reset",color:"#CDE"},
- { type: "text",position:[20,70,60,20],value:"[J]",color:"#CDE"}
- ]
- } ;
- var resetShip = function(ship) {
- ship.set({type:101}) ;
- } ;
- this.tick = function(game) {
- if (game.step % 60 == 0)
- {
- for (var i=0;i<game.ships.length;i++)
- {
- var admin = game.ships[0] ; // This is the first person to join, make sure this is you
- var ship = game.ships[i] ; // This is everyone else
- if (!admin.custom.immune_button_installed)
- {
- admin.custom.immune_button_installed = true;
- admin.setUIComponent(immune_button);
- }
- if (!ship.custom.reset_button_installed)
- {
- ship.custom.reset_button_installed = true;
- ship.setUIComponent(reset_button);
- }
- if (!admin.custom.god_button_installed)
- {
- admin.custom.god_button_installed = true;
- admin.setUIComponent(god_button);
- }
- }
- }
- } ;
- this.event = function(event,game) {
- switch (event.name)
- {
- case "ui_component_clicked":
- var ship = event.ship ;
- var component = event.id ;
- if (component == "immune")
- {
- immuneShip(ship);
- }
- if (component == "god")
- {
- godShip(ship);
- danger(game);
- }
- if (component == "reset")
- {
- resetShip(ship);
- break ;
- }
- }
- } ;
- var Malefor_the_Supreme_Overlord_791 = '{"name":"Malefor the Supreme Overlord","level":7.9,"model":1,"size":5,"specs":{"shield":{"capacity":[9999999,9999999],"reload":[99999999,99999999]},"generator":{"capacity":[9999999,9999999],"reload":[9999999,9999999]},"ship":{"mass":9999999,"speed":[240,240],"rotation":[400,400],"acceleration":[400,400]}},"bodies":{"main":{"section_segments":8,"offset":{"x":0,"y":-70,"z":5},"position":{"x":[0,0,0,0,0,0,-6,-10,-8,4,15,5],"y":[-40,-5,40,110,215,335,375,430,480,520,580,650],"z":[0,0,-10,-40,-50,-30,-20,-10,0,10,0,-10]},"width":[0,10,50,45,65,40,35,25,20,15,10,0],"height":[0,10,45,45,60,40,35,25,20,15,10,0],"texture":[17,5,5,17,5,5,5,5,5,5,17],"propeller":false,"laser":{"damage":[1000,1000],"rate":10,"type":1,"speed":[200,200],"number":15,"recoil":0,"error":50}},"head":{"section_segments":20,"offset":{"x":0,"y":-90,"z":0},"position":{"x":[0,0,0,0,0,0,0,0,0,0],"y":[-100,-85,-70,-50,-30,-10,20,40,60,55],"z":[-15,3,10,16,20,28,38,36,30,20]},"width":[0,14,20,25,35,40,45,40,35,0],"height":[0,4,12,6,10,20,22,20,15,0],"texture":[5]},"lower_jaw":{"section_segments":20,"offset":{"x":0,"y":-90,"z":-5},"position":{"x":[0,0,0,0,0,0,0,0,0,0],"y":[-100,-85,-70,-50,-30,-10,20,40,60,55],"z":[-22,-28,-28,-25,-15,-10,0,10,10,10]},"width":[0,14,20,25,35,40,45,40,35,0],"height":[0,4,12,6,10,20,22,20,15,0],"texture":[5]},"horns":{"section_segments":10,"offset":{"x":14,"y":-80,"z":50},"position":{"x":[0,10,15,-5],"y":[10,40,80,140],"z":[-5,10,30,70]},"width":[12,9,5,0],"height":[12,9,5,0],"texture":[63],"angle":14},"side_horns":{"section_segments":10,"offset":{"x":30,"y":-80,"z":40},"position":{"x":[0,10,15,13],"y":[5,20,50,90],"z":[-5,7,25,60]},"width":[12,9,5,0],"height":[12,9,5,0],"texture":[63],"angle":17},"inner_horns":{"section_segments":10,"offset":{"x":5,"y":-60,"z":50},"position":{"x":[3,10,12,8],"y":[10,30,50,70],"z":[0,15,30,40]},"width":[8,5,3,0],"height":[10,7,3,0],"texture":[63],"angle":5},"top_propulsors":{"section_segments":10,"offset":{"x":90,"y":165,"z":-75},"position":{"x":[-60,-30,-25,-8,-5,-10,0,2,5,0],"y":[-90,-30,-15,10,30,70,120,150,180,170],"z":[10,10,0,0,0,25,0,0,0,0]},"width":[0,25,30,18,15,8,10,15,10,0],"height":[15,15,15,15,15,10,10,15,10,0],"propeller":false,"texture":[5,5,5,5,5,17,5,17,17]},"claw_1":{"section_segments":8,"offset":{"x":95,"y":350,"z":-83},"position":{"x":[0,0,0,0,0,0,0],"y":[0,5,10,25,45,65,85],"z":[0,-4,-6,-4,4,15,25]},"width":[5,4,4,3,2,1,0],"height":[7,5,4,3,3,1,0],"texture":[5]},"claw_2":{"section_segments":8,"offset":{"x":105,"y":345,"z":-85},"position":{"x":[0,0,0,0,0,0,0],"y":[0,5,10,22,38,55,75],"z":[0,-4,-6,-4,4,15,25]},"width":[5,4,4,3,2,1,0],"height":[7,5,4,3,3,1,0],"texture":[5],"angle":18},"claw_3":{"section_segments":8,"offset":{"x":85,"y":345,"z":-83},"position":{"x":[0,0,0,0,0,0,0],"y":[0,5,10,22,38,55,75],"z":[0,-4,-6,-4,4,15,25]},"width":[5,4,4,3,2,1,0],"height":[7,5,4,3,3,1,0],"texture":[5],"angle":-15},"wing_support1":{"section_segments":8,"offset":{"x":70,"y":5,"z":0},"position":{"x":[-60,0,44,70],"y":[-35,7,35,-85],"z":[0,0,-25,-5]},"width":[40,20,10,0],"height":[0,10,10,0],"texture":[5]},"wing_support2":{"section_segments":8,"offset":{"x":120,"y":-5,"z":-20},"position":{"x":[0,0,0],"y":[0,85,150],"z":[-10,20,40]},"width":[5,5,0],"height":[5,5,0],"texture":[5],"angle":130}},"wings":{"eyes":{"doubleside":true,"offset":{"x":20,"y":-120,"z":35},"length":[25],"width":[30,0],"angle":[20],"position":[-10,55],"texture":[17],"bump":{"position":-40,"size":5}},"bottom":{"doubleside":true,"offset":{"x":10,"y":20,"z":-10},"length":[30,30,50,20,60,40,60,80,40,40,30,30],"width":[90,90,70,100,190,350,150,320,150,280,100,240,80],"angle":[0,0,-27,27,27,20,10,0,-10,-20,-27,-27],"position":[-10,0,30,70,60,100,45,120,70,140,90,160,100],"texture":[4],"bump":{"position":-40,"size":5}}},"typespec":{"name":"Malefor the Supreme Overlord","level":7.9,"model":1,"code":791,"specs":{"shield":{"capacity":[9999999,9999999],"reload":[99999999,99999999]},"generator":{"capacity":[9999999,9999999],"reload":[9999999,9999999]},"ship":{"mass":9999999,"speed":[240,240],"rotation":[400,400],"acceleration":[400,400]}},"shape":[19,17.835,13.989,11.883,9.826,8.73,8.463,7.922,16.125,25.586,23.711,21.12,32.811,43.804,50.89,52.337,54.031,55.44,50.152,41.208,34.644,34.865,34.194,44.525,42.257,58.002,42.257,44.525,34.194,34.865,34.644,41.208,50.152,55.44,54.031,52.337,50.89,43.804,32.811,21.12,23.711,25.586,16.125,7.922,8.463,8.73,9.826,11.883,13.989,17.835],"lasers":[{"x":0,"y":-11,"z":0.5,"angle":0,"damage":[1000,1000],"rate":10,"type":1,"speed":[200,200],"number":15,"spread":0,"error":50,"recoil":0}],"radius":58.002}}';
- var Baby_Dragon_792 = '{"name":"Baby Dragon","level":7.9,"model":2,"size":0.6,"specs":{"shield":{"capacity":[10000,10000],"reload":[10000,10000]},"generator":{"capacity":[6043,6043],"reload":[1381,1381]},"ship":{"mass":999999999,"speed":[300,300],"rotation":[150,150],"acceleration":[350,350]}},"bodies":{"main":{"section_segments":10,"offset":{"x":0,"y":0,"z":0},"position":{"x":[0,0,0,0,0,0,0,0,0,0,0,0],"y":[-100,-98,-95,-70,-40,0,40,70,80,90,100],"z":[0,0,0,0,0,0,0,0,0,0,0]},"width":[0,5,10,20,30,20,20,30,30,30,20,0],"height":[0,4,4,20,20,10,10,15,15,15,10,10],"texture":[4,4,17,4,4,5,17,17,5]},"front":{"section_segments":10,"offset":{"x":8,"y":-40,"z":10},"position":{"x":[3,14,18,10],"y":[10,30,50,70],"z":[0,15,30,40]},"width":[10,7,3,0],"height":[10,7,3,0],"texture":[63],"angle":14},"back":{"section_segments":10,"offset":{"x":0,"y":0,"z":0},"position":{"x":[0,0,0,0,0],"y":[90,95,100,105,90],"z":[0,0,0,0,0]},"width":[10,15,18,19,2],"height":[3,5,7,8,2],"texture":[17],"propeller":true},"cockpit":{"section_segments":8,"offset":{"x":0,"y":-25,"z":12},"position":{"x":[0,0,0,0,0,0],"y":[-45,-40,-25,0,5],"z":[0,0,0,0,0,0]},"width":[0,10,15,5,0],"height":[0,10,15,5,0],"texture":[9]},"laser":{"section_segments":10,"offset":{"x":0,"y":-50,"z":-13},"position":{"x":[0,0,0,0,0,0,0,0,0,0],"y":[-30,-25,0,10,20,25,30,40,70,60],"z":[0,0,0,0,0,0,0,0,0,0]},"width":[0,10,15,15,15,10,10,15,10,0],"height":[0,10,15,15,15,10,10,15,5,0],"texture":[6,4,10,3,4,3,2],"propeller":true,"laser":{"damage":[259,259],"rate":10,"type":1,"speed":[130,130],"number":3,"error":10}}},"wings":{"top":{"doubleside":true,"offset":{"x":10,"y":60,"z":5},"length":[40],"width":[50,40],"angle":[30],"position":[0,50],"texture":[5],"bump":{"position":10,"size":10}},"side":{"doubleside":true,"offset":{"x":10,"y":70,"z":5},"length":[30],"width":[40,20],"angle":[-13],"position":[0,60],"texture":[17],"bump":{"position":10,"size":10}},"wings_inner":{"doubleside":true,"offset":{"x":0,"y":35,"z":0},"length":[60],"width":[100,70],"angle":[0],"position":[-40,10],"texture":[4],"bump":{"position":10,"size":15}},"wings_outer":{"doubleside":true,"offset":{"x":-90,"y":35,"z":0},"length":[30],"width":[100,70],"angle":[0,0],"position":[-25,10],"texture":[4],"bump":{"position":-20,"size":15}},"wings_dropoff":{"doubleside":true,"offset":{"x":90,"y":0,"z":0},"length":[35,15,20,25],"width":[100,200,85,130,35],"angle":[-10,20,0,0],"position":[10,70,20,80,0],"texture":[4,4],"bump":{"position":-20,"size":15}}},"typespec":{"name":"Baby Dragon","level":7.9,"model":2,"code":792,"specs":{"shield":{"capacity":[10000,10000],"reload":[10000,10000]},"generator":{"capacity":[6043,6043],"reload":[1381,1381]},"ship":{"mass":999999999,"speed":[300,300],"rotation":[150,150],"acceleration":[350,350]}},"shape":[1.2,1.168,0.974,0.808,0.694,0.615,0.5,0.458,0.461,1.242,1.495,1.705,2.213,2.213,2.206,2.239,2.311,2.424,2.578,2.382,2.528,1.257,1.649,1.745,1.319,1.262,1.319,1.745,1.649,1.257,2.528,2.382,2.578,2.424,2.311,2.239,2.206,2.213,2.213,1.705,1.495,1.242,0.461,0.458,0.5,0.615,0.694,0.808,0.974,1.168],"lasers":[{"x":0,"y":-0.96,"z":-0.156,"angle":0,"damage":[259,259],"rate":10,"type":1,"speed":[130,130],"number":3,"spread":0,"error":10,"recoil":0}],"radius":2.578}}';
Add Comment
Please, Sign In to add comment