Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- note = "allLevels is an array of level names";
- note = "priorityLevels is an array of level names that have priority over the others";
- note = "useNum is the amount of times the command has been used";
- upnext = "Check if useNum is larger than the amount of names in the priorityLevels array. If yes, get a random name from the allLevels array. If not, get the next level from priorityLevels";
- if(useNum <= priorityLevels.length){
- out = priorityLevels[useNum - 1];
- } else {
- out = allLevels[Math.floor(Math.random() * (allLevels.length - 1))];
- }
- upnext = "Output";
- out;
Add Comment
Please, Sign In to add comment