Requirements:
Warps to have the same names as in %mines% (the warps have to be lowercase letters)
if warps are uppercase letters then either change all the letters in %mines% to uppercase or use: cmd insert rankup 22 let %warp% = uppercase(%mine%) and cmd edit rankup 23 asop /warp %warp%
For the %prices%, it is how much each mine costs. For example, mine a would cost 0 since it usually is free. You can change the prices within %prices% (leave the 0 alone if mine a is given for free)
You can change the mines in %mines% but they have to have the same names as the warps you set.
Emergency:
Resets The Variable:
Warps to have the same names as in %mines% (the warps have to be lowercase letters)
if warps are uppercase letters then either change all the letters in %mines% to uppercase or use: cmd insert rankup 22 let %warp% = uppercase(%mine%) and cmd edit rankup 23 asop /warp %warp%
For the %prices%, it is how much each mine costs. For example, mine a would cost 0 since it usually is free. You can change the prices within %prices% (leave the 0 alone if mine a is given for free)
You can change the mines in %mines% but they have to have the same names as the warps you set.
Code:
cmd create rankup
cmd add rankup let %mines% = array(\"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\", \"free\")
cmd add rankup load %minerank%
cmd add rankup if varset(%minerank%[%p%]) = %false% then let %minerank%[%p%] = \"a\"
cmd add rankup let %prices% = array(0, 100000, 200000, 450000, 1500000, 2500000, 4500000, 6000000)
cmd add rankup let %playerm% = %minerank%[%p%]
cmd add rankup let %mnum% = position(%mines%, %playerm%)
cmd add rankup let %mine% = %mines%[%mnum%]
cmd add rankup let %mnum% = %mnum% + 1
cmd add rankup let %price% = %prices%[%mnum%]
cmd add rankup if varset(%price%) then goto 13
cmd add rankup message %p% §cThere is currently no mines to rankup to!
cmd add rankup exit
cmd add rankup if playerbalance(%p%) >= %price% then goto 17
cmd add rankup let %needed% = %price% - playerbalance(%p%)
cmd add rankup message %p% §cYou do not have enough money to rankup! §eYou need: §7$%needed%
cmd add rankup exit
cmd add rankup if %mines%[%mnum%] != \"free\" then goto 20
cmd add rankup message %p% §cYou are already in the highest mine!
cmd add rankup exit
cmd add rankup let %mine% = %mines%[%mnum%]
cmd add rankup ascon /takemoney %p% %price%
cmd add rankup /warp %mine%
cmd add rankup let %prefix% = uppercase(%mine%)
cmd add rankup asop /setprefix %prefix%
cmd add rankup let %minerank%[%p%] = %mine%
cmd add rankup save %minerank%
cmd add rankup message onlineplayers() §e%p% Just Ranked Up To Mine: %prefix%!
cmd add rankup exit
Emergency:
Resets The Variable:
Code:
cmd create rankupreset
cmd add rankupreset load %minerank%
cmd add rankupreset let %minerank% =
cmd add rankupreset save %minerank%