-
Notifications
You must be signed in to change notification settings - Fork 3
/
panic_kotor.html
599 lines (538 loc) · 18.8 KB
/
panic_kotor.html
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
<!DOCTYPE html>
<html>
<head>
<title>SWGOH Tools - Revan/KOTOR Panic Farming Calculator</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<meta charset="utf-8" />
<style>
p { max-width: 800px;}
.swgoh_ad {
position: absolute;
left:0;
top:90px;
width:0;
height:0px;
}
#ad {
width:100%;
height:60px;
}
h3 {
font-size: 1.2em;
margin-bottom: 4px;
}
@-webkit-keyframes blinker {
from,
49.9% {
opacity: 0;
}
50%,
to {
opacity: 1;
}
}
@-webkit-keyframes fader {
50% {
opacity: 0;
}
}
b.nowrap {
white-space: nowrap;
}
#panic {
text-align: center;
}
.dontpanic {
color: green;
font-size: 50px;
}
.panic {
color: red;
font-size: 50px;
animation: blinker 1s linear infinite;
}
.maybepanic {
color: black;
font-size: 50px;
animation: blinker 1s linear infinite;
}
#dontpanic, #dont, #do {
display: none;
}
@media(min-width: 520px) { #top { padding-bottom:0px} #ad { height:90px;} .swgoh_ad { left:inherit; top:0; right:0; width: 328px; height: 90px; } }
@media(min-width: 720px) { #top { padding-bottom:0px} #ad { height:90px;} .swgoh_ad { left:inherit; top:0; right:0; width: 528px; height: 90px; } }
@media(min-width: 920px) { #top { padding-bottom:0px} #ad { height:90px;} .swgoh_ad { left:inherit; top:0; right:0; width: 728px; height: 90px; } }
@media(min-width: 1200px) { #top { padding-bottom:0px} #ad { height:90px;} .swgoh_ad { left:inherit; top:0; right:0; width: 1000px; height: 90px; } }
</style>
<script src="https://use.fontawesome.com/c278e2b3ff.js"></script>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script src="jquery.js"></script>
<script>
$(document).ready(function() {
var storage = null;
if(window.localStorage) storage = window.localStorage;
else if(window.globalStorage) storage = window.globalStorage[location.hostname];
var left = 0;
function cacheForm(name) {
var val = fetch(name);
if(val) $('#'+name).val(val);
$('#'+name).on("change",function(e) {
store(name,$('#'+name).val());
});
}
function store(key,val) {
storage.setItem(key,val);
}
function fetch(key) {
return storage.getItem(key);
}
function getLeft() {
var days = parseInt($("#days").val())+6;
left = new Date().setHours(24*days);
update();
}
function timer() {
var now = new Date().getTime();
var display = (left - now)/(1000*60);
$('#timeleft').html(display.toFixed(3)+" minutes left!");
}
function update() {
var c = parseInt(update1('bindo')); //hard node
var n = parseInt(update1('shan')); //hard nodes
var m = parseInt(update1('mission')); //cantina nodes (16)
var t = parseInt(update1('t3m4')); //cantina nodes (12)
var z = parseInt(update1('zaal')); //hard nodes
var crystals = 0;
var shipments = 0;
var total = c+n+m+t+z;
$('#total_total').html(total);
var days = parseInt($("#days").val())+6;
var perDay = total/days;
$('#ends').html(days+1);
$('#perday').html(Math.ceil(perDay*10)/10);
var panic = false;
$('#dont').hide();
$('#do').hide();
//CANTINA
//free = 189 energy = 3.9 shards
//1 = 120 = 2.4 shards (100 crystals)
//2 = 120 = 2.4 shards (100 crystals)
//3 = 120 = 2.4 shards (100 crystals)
// 16 shards per day avaialable from shipments at 320/4 shards (80/s)
//4 = 120 = 2.4 shards (200 crystals)
//5 = 120 = 2.4 shards (200 crystals)
//6 = 120 = 2.4 shards (400 crystals)
var cantinaTotal = m+t;
var cantinaPerDay = cantinaTotal/days;
var refreshes = 0;
var shipments = 0;
var crystals = 0;
var special_total = 0;
$('#dont').hide();
$('#do').hide();
if(cantinaPerDay<=3.9) { //free crystals
refreshes = 0;
crystals = 0;
} else if(cantinaPerDay<=6.3) { //1 refresh
refreshes = 1;
crystals = 100;
} else if(cantinaPerDay<=8.7) { //2 refreshes
refreshes = 2;
crystals = 200;
} else if(cantinaPerDay<=11.1) { //3 refreshes
refreshes = 3;
crystals = 300;
} else if(cantinaPerDay<=13.5) { //4 refreshes
refreshes = 4;
crystals = 500;
} else if(cantinaPerDay<=15.1) { //3 refreshes + 1 shipment
refreshes = 3;
shipments = 1;
crystals = 620;
} else if(cantinaPerDay<=15.9) { //5 refreshes
refreshes = 5;
crystals = 700;
} else if(cantinaPerDay<=17.5) { //4 refreshes + 1 shipment
refreshes = 4;
shipments = 1;
crystals = 820;
} else if(cantinaPerDay<=19.1) { //3 refreshes + 2 shipments
refreshes = 3;
shipments = 2;
crystals = 940;
} else if(cantinaPerDay<=19.9) { //5 refreshes + 1 shipment
refreshes = 5;
shipments = 1;
crystals = 1020;
} else if(cantinaPerDay<=21.5) { //4 refreshes + 2 shipment
refreshes = 4;
shipments = 2;
crystals = 1140;
} else if(cantinaPerDay<=23.1) { //3 refreshes + 3 shipments
refreshes = 3;
shipments = 3;
crystals = 1260;
} else if(cantinaPerDay<=23.9) { //5 refreshes + 2 shipments
refreshes = 5;
shipments = 2;
crystals = 1340;
} else if(cantinaPerDay<=25.5) { //4 refreshes + 3 shipments
refreshes = 4;
shipments = 3;
crystals = 1460;
} else if(cantinaPerDay<=27.1) { //3 refreshes + 4 shipments
refreshes = 3;
shipments = 4;
crystals = 1580;
} else if(cantinaPerDay<=27.9) { //5 refreshes + 3 shipments
refreshes = 5;
shipments = 3;
crystals = 1660;
} else if(cantinaPerDay<=29.5) { //4 refreshes + 4 shipments
refreshes = 4;
shipments = 4;
crystals = 1780;
} else if(cantinaPerDay<=31.9) { //5 refreshes + 4 shipments
refreshes = 5;
shipments = 4;
crystals = 1980;
} else if(cantinaPerDay<=34.3) { //6 refreshes + 4 shipments
refreshes = 6;
shipments = 4;
crystals = 2380;
} else if(cantinaPerDay<=36.7) { //7 refreshes + 4 shipments
refreshes = 7;
shipments = 4;
crystals = 2780;
} else {
refreshes = "7+";
shipments = 4;
crystals = 3000;
special_total = 2780*days;
}
$("#cantinaPerDay").html(Math.ceil(cantinaPerDay*10)/10);
$("#refreshes").html(refreshes);
$("#shipments").html(shipments);
//HARD NODES
var hardPerDay = (c+n+z)/days;
var cpd = c/days;
var npd = n/days;
var zpd = z/days;
var shardsPerDayPossible = 16*.333;
$("#hardPerDayc").html(Math.ceil(cpd*10)/10);
$("#hardPerDayn").html(Math.ceil(npd*10)/10);
$("#hardPerDayz").html(Math.ceil(zpd*10)/10);
$('#hard_supc').hide();
$('#hard_supn').hide();
$('#hard_supz').hide();
if(cpd>shardsPerDayPossible) {
var extraNeeded = c-(shardsPerDayPossible*days);
shardsPerDayPossible = 8*.333;
//one refresh costs 25
if(extraNeeded>0 && extraNeeded<shardsPerDayPossible*days){
crystals += 25;
$('#hard_supc_pd').html(1);
extraNeeded=0;
} else if(extraNeeded>0) {
crystals += 25;
extraNeeded -= days*shardsPerDayPossible;
}
//next refresh costs 50 plus 50 for the energy (guess)
if(extraNeeded>0 && extraNeeded<shardsPerDayPossible*days){
crystals += 50+50;
$('#hard_supc_pd').html(2);
extraNeeded=0;
} else if(extraNeeded>0) {
crystals += 50+50;
extraNeeded -= days*shardsPerDayPossible;
}
//next refresh costs 100 plus 50 for the energy (guess)
if(extraNeeded>0 && extraNeeded<shardsPerDayPossible*days){
crystals += 100+50;
$('#hard_supc_pd').html(3);
extraNeeded=0;
} else if(extraNeeded>0) {
crystals += 100+50;
extraNeeded -= days*shardsPerDayPossible;
}
//still need more from shipments
if(extraNeeded>0) {
$('#hard_supc_ship').html(Math.ceil(extraNeeded/days));
crystals += Math.round(extraNeeded*80/days);
} else {
$('#hard_supc_ship').html(0);
}
$('#hard_supc').show();
}
shardsPerDayPossible = 16*.333;
if(npd>shardsPerDayPossible) {
var extraNeeded = n-(shardsPerDayPossible*days);
shardsPerDayPossible = 8*.333;
//one refresh costs 25
if(extraNeeded>0 && extraNeeded<shardsPerDayPossible*days){
crystals += 25;
$('#hard_supn_pd').html(1);
extraNeeded=0;
} else if(extraNeeded>0) {
crystals += 25;
extraNeeded -= days*shardsPerDayPossible;
}
//next refresh costs 50 plus 50 for the energy (guess)
if(extraNeeded>0 && extraNeeded<shardsPerDayPossible*days){
crystals += 50+50;
$('#hard_supn_pd').html(2);
extraNeeded=0;
} else if(extraNeeded>0) {
crystals += 50+50;
extraNeeded -= days*shardsPerDayPossible;
}
//next refresh costs 100 plus 50 for the energy (guess)
if(extraNeeded>0 && extraNeeded<shardsPerDayPossible*days){
crystals += 100+50;
$('#hard_supn_pd').html(3);
extraNeeded=0;
} else if(extraNeeded>0) {
crystals += 100+50;
extraNeeded -= days*shardsPerDayPossible;
}
//still need more from shipments
if(extraNeeded>0) {
$('#hard_supn_ship').html(Math.ceil(extraNeeded/days));
crystals += Math.round(extraNeeded*80/days);
} else {
$('#hard_supn_ship').html(0);
}
$('#hard_supn').show();
}
shardsPerDayPossible = 16*.333;
if(zpd>shardsPerDayPossible) {
var extraNeeded = z-(shardsPerDayPossible*days);
shardsPerDayPossible = 8*.333;
//one refresh costs 25
if(extraNeeded>0 && extraNeeded<shardsPerDayPossible*days){
crystals += 25;
$('#hard_supz_pd').html(1);
extraNeeded=0;
} else if(extraNeeded>0) {
crystals += 25;
extraNeeded -= days*shardsPerDayPossible;
}
//next refresh costs 50 plus 50 for the energy (guess)
if(extraNeeded>0 && extraNeeded<shardsPerDayPossible*days){
crystals += 50+50;
$('#hard_supz_pd').html(2);
extraNeeded=0;
} else if(extraNeeded>0) {
crystals += 50+50;
extraNeeded -= days*shardsPerDayPossible;
}
//next refresh costs 100 plus 50 for the energy (guess)
if(extraNeeded>0 && extraNeeded<shardsPerDayPossible*days){
crystals += 100+50;
$('#hard_supz_pd').html(3);
extraNeeded=0;
} else if(extraNeeded>0) {
crystals += 100+50;
extraNeeded -= days*shardsPerDayPossible;
}
//still need more from shipments
if(extraNeeded>0) {
$('#hard_supz_ship').html(Math.ceil(extraNeeded/days));
crystals += Math.round(extraNeeded*80/days);
} else {
$('#hard_supz_ship').html(0);
}
$('#hard_supz').show();
}
if(crystals>500 || panic) $('#do').show();
else $('#dont').show();
$("#crystals").html(crystals);
$("#totalcrystals").html(crystals*days);
if(refreshes=="7+") $("#totalcrystals").html(special_total+"+");
if(refreshes=="7+") $("#crystals").html(crystals+"+");
}
function update1(who) {
var stars = parseInt($('#'+who+'_stars').val());
var shards = parseInt($('#'+who+'_shards').val());
if(isNaN(stars)) stars = 0;
if(isNaN(shards)) shards = 0;
var rarity = $('#rarity').val();
if(stars>=7) {
$("#"+who+"_sh").hide();
} else {
$("#"+who+"_sh").show();
}
var remain7 = 0;
if(stars==7) {
remain7 = 0;
} else if(stars==6) {
$('#'+who+'_max').html("100");
remain7 = 100-shards;
} else if(stars==5) {
$('#'+who+'_max').html("85");
remain7 = 185-shards;
} else if(stars==4) {
$('#'+who+'_max').html("65");
remain7 = 250-shards;
} else if(stars==3) {
$('#'+who+'_max').html("30");
remain7 = 280-shards;
} else if(stars==2) {
$('#'+who+'_max').html("25");
remain7 = 305-shards;
} else if(stars==1) {
$('#'+who+'_max').html("15");
remain7 = 320-shards;
} else {
$('#'+who+'_max').html("10");
remain7 = 330-shards;
}
if(rarity==6) remain7-=100;
if(rarity==5) remain7-=185;
if(remain7<0) remain7 = 0;
$('#'+who+'_total').html(remain7);
return remain7;
}
function panic() {
update();
$('#panic').hide();
$('#dontpanic').show();
return false;
}
cacheForm("bindo_stars");
cacheForm("bindo_shards");
cacheForm("shan_stars");
cacheForm("shan_shards");
cacheForm("mission_stars");
cacheForm("mission_shards");
cacheForm("t3m4_stars");
cacheForm("t3m4_shards");
cacheForm("zaal_stars");
cacheForm("zaal_shards");
$("#bindo_stars").on("change", update);
$("#bindo_shards").on("change", update);
$("#shan_stars").on("change", update);
$('#shan_shards').on("change", update);
$("#mission_stars").on("change", update);
$('#mission_shards').on("change", update);
$("#t3m4_stars").on("change", update);
$('#t3m4_shards').on("change", update);
$("#zaal_stars").on("change", update);
$('#zaal_shards').on("change", update);
$('#rarity').on("change", update);
$('#days').on("change", getLeft);
var now = new Date().getTime();
var days = 1513299681000-now;
days = Math.ceil(days/(86400000));
//$('#days').val(days);
$('#button').on("click", panic);
setInterval(timer,130);
getLeft();
update();
});
</script>
</head>
<body>
<div id="top">
<a href="http://www.swgoh.life/index.html" id="logoClick"></a>
<div id="ad">
<!-- Swgoh.life -->
<ins class="adsbygoogle swgoh_ad"
style="display:block"
data-ad-client="ca-pub-0176506581219642"
data-ad-slot="9855290481"
data-ad-format="horizontal"></ins>
<script>
//https://support.google.com/adsense/answer/6307124
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
<div id="middleSolo">
<h1><a href="http://www.swgoh.life/index.html">More Tools</a> > <a href="http://www.swgoh.life/panic.html">Panic Farming</a> > Revan/KOTOR Panic Farming Calculator</h1>
<p>Enter your stars/shards for each toon you are panicing about and we'll tell you if you really need to panic.</p>
<div class="half">
<form action="#" method="post">
<h3>How many days until the event starts?</h3>
<input type="text" id="days" name="days" value="30" size="3" /> (nobody knows. take a guess)<br /><br />
<h3>How many stars do you want?</h3>
<select id="rarity"><option value="7">7★</option><option value="6">6★</option><option value="5">5★</option></select><br /><br />
<h3>Bastila Shan:</h3>
Stars: <input type="text" id="shan_stars" name="shan_stars" value="1" size="2" />/ 7
<span id="shan_sh">Shards: <input type="text" id="shan_shards" name="shan_shards" value="0" size="2" />/ <span id="shan_max">15</span><br /></span>
<br />
<h3>Jolee Bindo:</h3>
Stars: <input type="text" id="bindo_stars" name="bindo_stars" value="1" size="2" />/ 7
<span id="bindo_sh">Shards: <input type="text" id="bindo_shards" name="bindo_shards" value="0" size="2" />/ <span id="bindo_max">15</span><br /></span>
<br />
<h3>Mission Vao:</h3>
Stars: <input type="text" id="mission_stars" name="mission_stars" value="1" size="2" />/ 7
<span id="mission_sh">Shards: <input type="text" id="mission_shards" name="mission_shards" value="0" size="2" />/ <span id="mission_max">15</span><br /></span>
<br />
<h3>T3-M4:</h3>
Stars: <input type="text" id="t3m4_stars" name="t3m4_stars" value="1" size="2" />/ 7
<span id="t3m4_sh">Shards: <input type="text" id="t3m4_shards" name="t3m4_shards" value="0" size="2" />/ <span id="t3m4_max">15</span><br /></span>
<br />
<h3>Zaalbar:</h3>
Stars: <input type="text" id="zaal_stars" name="zaal_stars" value="1" size="2" />/ 7
<span id="zaal_sh">Shards: <input type="text" id="zaal_shards" name="zaal_shards" value="0" size="2" />/ <span id="zaal_max">15</span><br /></span>
<br />
<input type="submit" id="button" value="Should I Panic?" class="btn" />
<br /><br />
</form>
</div>
<div class="half">
<div id="panic">
<b class="maybepanic">DON'T PANIC</b>
</div>
<div id="dontpanic">
<h3>Shards Needed:</h3>
<span id="shan_total"></span> shards needed for Bastila Shan.<br />
<span id="bindo_total"></span> shards needed for Jolee Bindo.<br />
<span id="mission_total"></span> shards needed for Mission Vao.<br />
<span id="t3m4_total"></span> shards needed for T3-M4.<br />
<span id="zaal_total"></span> shards needed for Zaalbar.<br />
<br />
<h3>Farming Required:</h3>
The event ends in <span id="ends"></span> days. You need to farm <span id="perday"></span> shards per day.
<br /><br />
To get Bastila Shan you need to get <b class="nowrap"><span id="hardPerDayn"></span> shards per day</b> from hard nodes and shipments. <span id="hard_supn">You will need to refresh the hard node <span id="hard_supn_pd"></span> times per day and purchase <span id="hard_supn_ship"></span> shards per day from shipments.</span>
<br /><br />
To get Jolee Bindo you need to get <b class="nowrap"><span id="hardPerDayc"></span> shards per day</b> from hard nodes and shipments. <span id="hard_supc">You will need to refresh the hard node <span id="hard_supc_pd"></span> times per day and purchase <span id="hard_supc_ship"></span> shards per day from shipments.</span>
<br /><br />
To get Zaalbar you need to get <b class="nowrap"><span id="hardPerDayz"></span> shards per day</b> from hard nodes and shipments. <span id="hard_supz">You will need to refresh the hard node <span id="hard_supz_pd"></span> times per day and purchase <span id="hard_supz_ship"></span> shards per day from shipments.</span>
<br /><br />
To get Mission Vao and T3-M4 you need to get <b class="nowrap"><span id="cantinaPerDay"></span> shards per day</b> from cantina. Do <b class="nowrap"><span id="refreshes"></span> cantina refreshes</b> every day and purchase
<b class="nowrap"><span id="shipments"></span> shipments</b> (4 shards for 320 crystals) each day.<br />
<br /><br />
This will require <span id="crystals"></span> crystals per day. <b class="nowrap"><span id="totalcrystals"></span> crystals total</b>.<br />
<br />
<b class="dontpanic" id="dont">DON'T PANIC</b>
<b class="panic" id="do">PANIC! PANIC!</b>
<b id="timeleft"></b>
</div>
</div>
<br /><br /><hr /><ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-format="fluid"
data-ad-layout="in-article"
data-ad-client="ca-pub-0176506581219642"
data-ad-slot="6732943283"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-92624-14', 'auto');
ga('send', 'pageview');
</script>
</div>
<div id="foot">
<p>SWGOH.LIFE is not affiliated with EA, EA Capital Games, Disney or Lucasfilm LTD.</p>
</div>
</body>
</html>