This repository was archived by the owner on Mar 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathengpresets.html
More file actions
104 lines (85 loc) · 4.45 KB
/
engpresets.html
File metadata and controls
104 lines (85 loc) · 4.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<html>
<head>
<title>Engineering Presets</title>
<link href="style.css" media="all" rel="stylesheet" />
</head>
<body>
<span class="txtlbl">Engineering Presets</span>
<br /><br />
<button id="btn1" class="button">Standard</button>
<br /><br />
<button id="btn5" class="button">Standard + Charge</button>
<br /><br />
<button id="btn2" class="button">Cruise</button>
<br /><br />
<button id="btn3" class="button">Battle</button>
<br /><br />
<button id="btn4" class="button">Emergency Recharge</button>
<br /><br />
<script src="jquery-1.12.0.min.js"></script>
<script>
server=""; //http://localhost:8080";
$(document).ready(function(){
$("#btn1").click(function(){ //Standard Mode
modestandard();
});
$("#btn2").click(function(){ // Not used
modecruise();
});
$("#btn3").click(function(){ //Cruise
modebattle();
});
$("#btn4").click(function(){ //Battle
modelowpower();
});
$("#btn5").click(function(){ //Low Power
modestdchg();
});
});
$(document).keydown(function(e) {
if(e.which == 49) { //1
modestandard();
}
if(e.which == 50) { //2
modecruise();
}
if(e.which == 51) { //3
modebattle();
}
if(e.which == 52) { //4
modelowpower();
}
if(e.which == 53) { //5
modestdchg();
}
});
powerdefault='commandSetSystemPower("reactor",1.0)&commandSetSystemPower("maneuver",1.0)&commandSetSystemPower("jumpdrive",1.0)&commandSetSystemPower("frontshield",1.0)&commandSetSystemPower("rearshield",1.0)&commandSetSystemPower("beamweapons",1.0)&commandSetSystemPower("missilesystem",1.0)&commandSetSystemPower("warp",1.0)&commandSetSystemPower("impulse",1.0)';
powerdefaultnoreactor='commandSetSystemPower("jumpdrive",1.0)&commandSetSystemPower("frontshield",1.0)&commandSetSystemPower("rearshield",1.0)&commandSetSystemPower("beamweapons",1.0)&commandSetSystemPower("missilesystem",1.0)&commandSetSystemPower("warp",1.0)&commandSetSystemPower("impulse",1.0)';
//All but reactor
powerzero='commandSetSystemPower("maneuver",0.0)&commandSetSystemPower("jumpdrive" ,0.0)&commandSetSystemPower("frontshield",0.0)&commandSetSystemPower("rearshield",0.0)&commandSetSystemPower("beamweapons",0.0)&commandSetSystemPower("missilesystem",0.0)&commandSetSystemPower("warp" ,0.0)&commandSetSystemPower("impulse",0.0)';
coolantdefault='commandSetSystemCoolant("reactor",0.0)&commandSetSystemCoolant("maneuver",0.0)&commandSetSystemCoolant("jumpdrive" ,0.0)&commandSetSystemCoolant("frontshield" ,0.0)&commandSetSystemCoolant("rearshield",0.0)&commandSetSystemCoolant("beamweapons",0.0)&commandSetSystemCoolant("missilesystem",0.0)&commandSetSystemCoolant("warp",0.0)&commandSetSystemCoolant("impulse",0.0)';
//All but reactor
coolantzero='commandSetSystemCoolant("reactor",0.0)&commandSetSystemCoolant("maneuver",0.0)&commandSetSystemCoolant("jumpdrive" ,0.0)&commandSetSystemCoolant("frontshield",0.0)&commandSetSystemCoolant("rearshield",0.0)&commandSetSystemCoolant("beamweapons",0.0)&commandSetSystemCoolant("missilesystem",0.0)&commandSetSystemCoolant("warp",0.0)&commandSetSystemCoolant("impulse",0.0)';
function modelowpower() {
url = server+'/set.lua?commandSetSystemPower("reactor",2.0)&commandSetSystemCoolant("reactor",7.0)&'+powerzero+'&'+coolantzero;
$.get( url );
}
function modecruise() {
url = server+'/set.lua?commandSetSystemPower("reactor",1.0)&commandSetSystemPower("maneuver",1.0)&commandSetSystemPower("jumpdrive",1.0)&commandSetSystemPower("frontshield",0.0)&commandSetSystemPower("rearshield",0.0)&commandSetSystemPower("beamweapons",0.0)&commandSetSystemPower("missilesystem",0.3)&commandSetSystemPower("warp",1.0)&commandSetSystemPower("impulse",1.0)&'+coolantzero;
$.get( url );
}
function modebattle() {
url = server+'/set.lua?commandSetSystemPower("maneuver",1.5)&commandSetSystemCoolant("frontshield",5.0)&commandSetSystemCoolant("rearshield",5.0)&commandSetSystemCoolant("maneuver",5.0)&commandSetSystemPower("reactor",1.0)&commandSetSystemCoolant("reactor",0.0)&commandSetSystemPower("frontshield",1.5)&commandSetSystemPower("rearshield",1.5)&commandSetSystemPower("impulse",1.5)&commandSetSystemCoolant("impulse",5.0)';
$.get( url );
}
function modestandard() {
url = server+'/set.lua?'+powerdefault+'&'+coolantdefault;
$.get( url );
}
function modestdchg() {
url = server+'/set.lua?commandSetSystemPower("reactor",2.25)&commandSetSystemCoolant("reactor",10.0)&'+powerdefaultnoreactor;
$.get( url );
}
</script>
</body>
</html>