Free javascript Hosting


eldenringcalc1.js

Uploaded on Mar 20 2022 02:51 by johnthew1138

//#from flask import flask
//from typing import List

//#app = flask(__name__)

//#Global Variables
level = 0;
runereqtotal = 0;
runereqowned = 0;
runereqfinal = 0;
getcostx = 0;
totalcostlist = [];
nextlvlcostlist = [];
goalcostfinal = 0;
leveldiff = 0;

//#Global Inputs
//currentlvl = int(input('Enter your current level: '))
var currentlvl = prompt('Enter your current level: ');
//goallvl = int(input('Enter your goal level: '))
var goallvl = prompt('Enter your goal level: ');
//currentrune = int(input('Enter your current rune count: '))
var currentrune = prompt('Enter your current rune count: ');

//#Lists for storage

const totalcostlist = [0, 673, 1362, 2068, 2791, 3531, 4288, 5063, 5856, 6667, 7496, 8343, 9381, 10619, 12064, 13723, 15605, 17718, 20071, 22672, 25529, 28651, 32046, 35724, 39693, 43963, 48543, 53442, 58670, 64236, 70151, 76423, 83063, 90081, 97488, 105293, 113507, 122140, 131204, 140709, 150665, 161084, 171977, 183356, 195232, 207616, 220520, 233955, 247934, 262469, 277571, 293253, 309527, 326406, 343903, 362030, 380800, 400225, 420319, 441095, 462567, 484748, 507651, 531291, 555681, 580834, 606765, 633488, 661018, 689369, 718555, 748591, 779491, 811271, 843946, 877530, 912039, 947488, 983893, 1021270, 1059634, 1099001, 1139386, 1180806, 1223278, 1266817, 1311440, 1357163, 1404004, 1451979, 1501104, 1551397, 1602875, 1655556, 1709457, 1764595, 1820988, 1878653, 1937609, 1997874, 2059465, 2122401, 2186700, 2252381, 2319463, 2387964, 2457903, 2529298, 2602169, 2676536, 2752417, 2829832, 2908800, 2989342, 3071476, 3155223, 3240603, 3327636, 3416343, 3506743, 3598858, 3692708, 3788313, 3885695, 3984874, 4085872, 4188710, 4293409, 4399991, 4508477, 4618890, 4731250, 4845580, 4961902, 5080239, 5200612, 5323044, 5447557, 5574175, 5702919, 5833813, 5966880, 6102143, 6239626, 6379351, 6521343, 6665625, 6812220, 6961153, 7112448, 7266128, 7422218, 7580742, 7741725, 7905191, 8071166, 8239673, 8410738, 8584386, 8760643, 8939533, 9121082, 9305315, 9492259, 9681938, 9874379, 10069678, 10267721, 10468605, 10672355, 10878999, 11088563, 11301073, 11516557, 11735042, 11956554, 12181121, 12408770, 12639529, 12873425, 13110487, 13350741, 13594216, 13840940, 14090942, 14344249, 14600890, 14860893, 15124288, 15391103, 15661366, 15935107, 16212355, 16493140, 16777490, 17065436, 17357007, 17652232, 17951142, 18253767, 18560136, 18870280, 19184229, 19502014, 19823665, 20149214, 20478690, 20812125, 21149550, 21490997, 21836496, 22186079, 22539777, 22897623, 23259648, 23625883, 23996361, 24371114, 24750175, 25133575, 25521348, 25913526, 26310141, 26711227, 27116816, 27526942, 27941638, 28360937, 28784873, 29213480, 29646791, 30084840, 30527660, 30975286, 31427753, 31885094, 32347344, 32814537, 33286709, 33763894, 34246126, 34733441, 35225874, 35723461, 36226236, 36734236, 37247442, 37765997, 38289884, 38819138, 39353796, 39893894, 40439468, 40990555, 41547191, 42109414, 42677260, 43250765, 43829967, 44414904, 45005612, 45602129, 46204492, 46812740, 47426910, 48047039, 48673166, 49305329, 49943567, 50587918, 51238420, 51895112, 52558032, 53227220, 53902714, 54584554, 55272779, 55967428, 56668541, 57376157, 58090317, 58811060, 59538425, 60272453, 61013185, 61760660, 62514919, 63276002, 64043951, 64818806, 65600607, 66389396, 67185214, 67988103, 68798103, 69615257, 70439606, 71271191, 72110055, 72956239, 73809786, 74670738, 75539137, 76415026, 77298447, 78189444, 79088059, 79994334, 80908313, 81830040, 82759557, 83696908, 84642136, 85595286, 86556401, 87525524, 88502700, 89487973, 90481388, 91482988, 92492819, 93510925, 94537350, 95572140, 96615339, 97666993, 98727147, 99795846, 100873136, 101959062, 103053671, 104157007, 105269117, 106390047, 107519844, 108658553, 109806221, 110962894, 112128620, 113303445, 114487415, 115680578, 116882981, 118094672, 119315698, 120546106, 121785944, 123035259, 124294100, 125562514, 126840550, 128128256, 129425680, 130732871, 132049877, 133376748, 134713531, 136060276, 137417032, 138783849, 140160775, 141547860, 142945153, 144352705, 145770565, 147198782, 148626999, 150076082, 151535674, 153005825, 154486585, 155978005, 157480135, 158993027, 160516731, 162051299, 163596782, 165153231, 166720698, 168299234, 169888892, 171489722, 173101777, 174725109, 176359771, 178005814, 179663291, 181332254, 183012757, 184704852, 186408591, 188124028, 189851216, 191590209, 193341060, 195103822, 196878549, 198665294, 200464112, 202275056, 204098181, 205933541, 207781190, 209641183, 211513574, 213398419, 215295771, 217205686, 219128219, 221063426, 223011361, 224972080, 226945638, 228932092, 230931497, 232943909, 234969383, 237007977, 239059746, 241124747, 243203036, 245294670, 247399706, 249518200, 251650210, 253795792, 255955004, 258127904, 260314548, 262514995, 264729302, 266957527, 269199728, 271455962, 273726289, 276010766, 278309452, 280622405, 282949685, 285291350, 287647459, 290018070, 292403244, 294803039, 297217515, 299646731, 302090747, 304549623, 307023418, 309512193, 312016007, 314534921, 317068996, 319618291, 322182868, 324762787, 327358109, 329968895, 332595205, 335237102, 337894646, 340567899, 343256922, 345961778, 348682528, 351419234, 354171957, 356940761, 359725707, 362526858, 365344276, 368178024, 371028165, 373894761, 376777876, 379677572, 382593913, 385526963, 388476784, 391443441, 394426997, 397427516, 400445062, 403479698, 406531490, 409600501, 412686796, 415790439, 418911496, 422050031, 425206109, 428379794, 431571153, 434780250, 438007151, 441251921, 444514626, 447795331, 451094103, 454411008, 457746111];
const nextlvlcostlist = [673, 689, 706, 723, 740, 757, 775, 793, 811, 829, 847, 1038, 1238, 1445, 1659, 1882, 2113, 2353, 2601, 2857, 3122, 3395, 3678, 3969, 4270, 4580, 4899, 5228, 5566, 5915, 6272, 6640, 7018, 7407, 7805, 8214, 8633, 9064, 9505, 9956, 10419, 10893, 11379, 11876, 12384, 12904, 13435, 13979, 14535, 15102, 15682, 16274, 16879, 17497, 18127, 18770, 19425, 20094, 20776, 21472, 22181, 22903, 23640, 24390, 25153, 25931, 26723, 27530, 28351, 29186, 30036, 30900, 31780, 32675, 33584, 34509, 35449, 36405, 37377, 38364, 39367, 40385, 41420, 42472, 43539, 44623, 45723, 46841, 47975, 49125, 50293, 51478, 52681, 53901, 55138, 56393, 57665, 58956, 60265, 61591, 62936, 64299, 65681, 67082, 68501, 69939, 71395, 72871, 74367, 75881, 77415, 78968, 80542, 82134, 83747, 85380, 87033, 88707, 90400, 92115, 93850, 95605, 97382, 99179, 100998, 102838, 104699, 106582, 108486, 110413, 112360, 114330, 116322, 118337, 120373, 122432, 124513, 126618, 128744, 130894, 133067, 135263, 137483, 139725, 141992, 144282, 146595, 148933, 151295, 153680, 156090, 158524, 160983, 163466, 165975, 168507, 171065, 173648, 176257, 178890, 181549, 184233, 186944, 189679, 192441, 195299, 198043, 200884, 203750, 206644, 209564, 212510, 215484, 218485, 221512, 224567, 227649, 230759, 233896, 237062, 240254, 243475, 246724, 250002, 253307, 256641, 260003, 263395, 266815, 270263, 273741, 277248, 280785, 284350, 287946, 291571, 295225, 298910, 302625, 306369, 310144, 313949, 317785, 321651, 325549,];

//#Changes inputs to work with the lists starting at 0
goalcostx = goallvl; //- 1
currentcostx = currentlvl; //#- 1

//#Loop for next level cost
goalcostfinal = totalcostlist[goalcostx] - totalcostlist[currentcostx] - currentrune;

//#Gets level difference for output
leveldiff = goallvl - currentlvl;

console.log('You need', goalcostfinal, 'more runes to get to level', goallvl);
console.log('You are level', currentlvl);
console.log('Level difference:', leveldiff);
console.log('');

if(goalcostfinal == 0){
console.log('Seek power, Tarnished.');
}else if(goalcostfinal <= 0){
console.log('Put these foolish ambitions to rest.');
}else{
console.log('Go forth, Tarnished, and seek runes.');
}

Back to list