diff options
| author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-07-04 15:10:01 +0800 |
|---|---|---|
| committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-07-04 15:10:01 +0800 |
| commit | f331a409ac5be5fd97dafb5e6884357bed0f2985 (patch) | |
| tree | e2c14cf4251ebaf73130101b1db7cb991591b350 /utils | |
| parent | ed04de9848baf3ad2436d5e5537ab2ec61676bc4 (diff) | |
| download | SoopyV2-f331a409ac5be5fd97dafb5e6884357bed0f2985.tar.gz SoopyV2-f331a409ac5be5fd97dafb5e6884357bed0f2985.tar.bz2 SoopyV2-f331a409ac5be5fd97dafb5e6884357bed0f2985.zip | |
+ toggle for waypoints in F7/M7
+ support for skill levels over 60
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/nonPooledThread.js | 14 | ||||
| -rw-r--r-- | utils/statUtils.js | 18 |
2 files changed, 23 insertions, 9 deletions
diff --git a/utils/nonPooledThread.js b/utils/nonPooledThread.js index 2061db1..4720700 100644 --- a/utils/nonPooledThread.js +++ b/utils/nonPooledThread.js @@ -1,14 +1,14 @@ let Executors = Java.type("java.util.concurrent.Executors") class NonPooledThread { - constructor(fun) { - this.fun = fun - this.executor = Executors.newSingleThreadExecutor() - } + constructor(fun) { + this.fun = fun + this.executor = Executors.newSingleThreadExecutor() + } - start() { - this.executor.execute(this.fun) - } + start() { + this.executor.execute(this.fun) + } } export default NonPooledThread
\ No newline at end of file diff --git a/utils/statUtils.js b/utils/statUtils.js index ae064cf..89b467d 100644 --- a/utils/statUtils.js +++ b/utils/statUtils.js @@ -280,14 +280,28 @@ function getLevelByXp(xp, type, levelCap) { level++ xpCurrent -= 200000000 } - if(level < levelCap){ + if (level < levelCap) { progress = xpCurrent / 200000000 xpForNext = 200000000 - }else{ + } else { progress = 0 xpForNext = NaN } } + if (type === 0 && level === 60 && levelCap === Infinity) { + maxLevel = Infinity + let slope = 600000 + let xpForCurr = 7000000 + slope + while (xpCurrent > xpForCurr) { + level++ + xpCurrent -= xpForCurr + xpForCurr += slope + if (level % 10 === 0) slope *= 2 + } + + progress = xpCurrent / xpForCurr + xpForNext = xpForCurr + } return { xp, level, |
