Checks which region and difficulty you are in currently.
YOU HAVE TO BE AT YOUR HIGHSCORE
(THERE IS NO OTHER WAY)
This is mainly meant to be used as an addon to other scripts, that might need to check where you are, like checking all the highscores in the region you are in automatically
Guide to add to your own script:
This script is 8 lines, if you want to reduce it to 6 and don't care about line length
You can take the regionList and difficultyList variables and replace each instance of it with the strings they're set with ("forest;desert;winter;underground;volcano;highmountain;jungle;metallicruins;beach;ocean;neutral;darkrealm;heaven;universe;chaos;" and "easy;medium;hard;insane;nightmare;impossible;")
You will have to reduce all the goto's lines by 2
If you want to get the current region, you need the line
sub(regionList, regionIndex, index(regionList, ";", regionIndex) - regionIndex)```
### If you want to get the current difficulty
```lua
sub(difficultyList, difficultyIndex, index(difficultyList, ";", difficultyIndex) - difficultyIndex)```
### If you want to use this in seperate scripts
You will have to make `difficultyIndex` and `regionIndex` global variables. You can also make the variables a vector, to combine them both to 1 variable, then you would have to use d2i(x(vector)) and d2i(y(vector)) in place of the indexes
You will have to make `regionList` and `difficulityList` also global unless you just copy over their contents, like in the guide to reduce the lines to 6 from earlier
**I RECOMMEND DOING THIS IN THE EXTERNAL EDITOR AT <https://d0sboots.github.io/perfect-tower/> IT WILL MAKE IT A LOT FASTER**
Latest Script:
[#1202491285404131329 message](/guild/488444879836413975/thread/1202491285404131329/p/1202491285404131329/#msg-1206104510255075348)