Infinite Rankup System

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

titustitus98

Member
Feb 19, 2018
47
0
6
25
Category:
Ranking

Suggested name:
rankup.sk

Spigot/Skript Version:
1.16.5/Skript version 2.5.3

What I want:
So what I need is a skript which would be a basic /rankup skript, but when you reach z rank your rank would be set to A1 and then A2 when you reach Z1 and so on.
the price would go up by 100$ every rankup and would start at 1000$ and once you get to A1 the base price and increase are increased by 50$.
There would also be a /ranks coomand which would display the prices for the next 4 ranks.
Then there would be the /setrank command which for example if I were to set my rank to 3 it would then show me as having C rank and if I were to set it to 27 then it would be A1 rank.

Here is what I was already able to code, the function here is what replaces the number with the letter which defines the rank, I just have not been able to make it become A1 for example if the rank variable was set to 27.
Code:
function rankNum(n: number) :: string:

    set {_l::*} to split "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z" at ","
    set {_i} to {_n}
    return "%{_l::%{_i}%}%%{_i}%"


command ranks:
    trigger:
        send "&4----&cRANKS&4----"
        send ""
        send "&cE &8- &f$1300"
        send "&cD &8- &f$1200"
        send "&cC &8- &f$1100"
        send "&cB &8- &f$1000"
        send "&cA &8- &fCurrent Rank"
        send ""
        send "&4----&cRANKS&4----"


Ideas for commands:
/ranks, /setrank, /rankup

Ideas for permissions:
admin.set.rank

When I'd like it by:

ASAP