SHOW:
|
|
- or go back to the newest paste.
| 1 | PARAMETER duration. | |
| 2 | ||
| 3 | set SAFETY_MARGIN to 1. | |
| 4 | ||
| 5 | set start to TIME:SECONDS. | |
| 6 | set end to TIME:SECONDS + duration. | |
| 7 | lock remaining to end - TIME:SECONDS. | |
| 8 | ||
| 9 | print " ". | |
| 10 | print "Warping for " + duration + "s.". | |
| 11 | ||
| 12 | set WARPMODE to "RAILS". | |
| 13 | - | |
| 13 | + | |
| 14 | - | // |
| 14 | + | // |
| 15 | - | // MODE: MEANING: MINIMUM DURATION: |
| 15 | + | // MODE: MEANING: MINIMUM DURATION: |
| 16 | - | // 0 1x - |
| 16 | + | // 0 1x - |
| 17 | - | // 1 5x 10s |
| 17 | + | // 1 5x 10s |
| 18 | - | // 2 10x 20s |
| 18 | + | // 2 10x 20s |
| 19 | - | // 3 50x 100s |
| 19 | + | // 3 50x 100s |
| 20 | - | // 4 100x 200s |
| 20 | + | // 4 100x 200s |
| 21 | - | // 5 1,000x 2,000s |
| 21 | + | // 5 1,000x 2,000s |
| 22 | - | // 6 10,000x 20,000s |
| 22 | + | // 6 10,000x 20,000s |
| 23 | - | // 7 100,000x 200,000s |
| 23 | + | // 7 100,000x 200,000s |
| 24 | - | // |
| 24 | + | // |
| 25 | ||
| 26 | set MINIMUM to list(0, 10, 20, 100, 200, 2000, 20000, 200000). | |
| 27 | set MULTIPLICATOR to list(1, 5, 10, 50, 100, 1000, 10000, 100000). | |
| 28 | ||
| 29 | set done to 0. | |
| 30 | until (remaining <= 3 or done = 1) {
| |
| 31 | ||
| 32 | - | print "Remaining: " + Round(remaining) + "s". |
| 32 | + | print "Remaining: " + Round(remaining) + "s". |
| 33 | ||
| 34 | - | // Determine which warp speed to use. |
| 34 | + | // Determine which warp speed to use. |
| 35 | - | set warpLevel to 0. |
| 35 | + | set warpLevel to 0. |
| 36 | - | until warpLevel >= MINIMUM:Length or MINIMUM[warpLevel + 1] > remaining {
|
| 36 | + | until warpLevel >= MINIMUM:Length or MINIMUM[warpLevel + 1] > remaining {
|
| 37 | - | set warpLevel to warpLevel + 1. |
| 37 | + | set warpLevel to warpLevel + 1. |
| 38 | - | } |
| 38 | + | } |
| 39 | - | print "Acceleration: " + MULTIPLICATOR[warpLevel] + "x". |
| 39 | + | print "Using " + MULTIPLICATOR[warpLevel] + "x acceleration...". |
| 40 | ||
| 41 | - | // Initiate time warp. |
| 41 | + | // Initiate time warp. |
| 42 | - | set margin to SAFETY_MARGIN * MULTIPLICATOR[warpLevel]. |
| 42 | + | set margin to SAFETY_MARGIN * MULTIPLICATOR[warpLevel]. |
| 43 | ||
| 44 | - | if (remaining < margin) {
|
| 44 | + | if (remaining < margin) {
|
| 45 | - | set done to 1. |
| 45 | + | set done to 1. |
| 46 | - | } |
| 46 | + | } |
| 47 | - | |
| 47 | + | |
| 48 | - | set WARP to warpLevel. |
| 48 | + | set WARP to warpLevel. |
| 49 | ||
| 50 | - | until (remaining < margin) {
|
| 50 | + | until (remaining < margin) {
|
| 51 | - | wait 0.1. |
| 51 | + | wait 0.1. |
| 52 | - | } |
| 52 | + | } |
| 53 | } | |
| 54 | ||
| 55 | set WARP to 0. | |
| 56 | ||
| 57 | - | print "Finished warping. Error: " + Round(duration - TIME:SECONDS + start) + "s.". |
| 57 | + | print "Finished warping. Waiting for remaining " + remaining + "s...". |
| 58 | wait remaining. | |
| 59 | print "Done.". |