viewing paste Unknown #16390 | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
mes "^777777Beginner Rank " +Rankb+": "+RankEXPb+"/"+.EXPb[Rankb]+"^000000";//How you would display it in a message
 
OnInit:
//How much exp needed per lvl (make sure each number is bigger than the next)
setArray .EXPb[0],
100, 1000, 3700, 10100, 22600, 44200, 78500, 129700, 202600, 302600; //This is 10 levels worth
setarray .exp1[0],1,2,3,4,5,6,7,8,9,10;// Experience at random per thing
set .ExpPerQuest, .exp1[rand(getarraysize(.exp1))];//The part that actually gives the random experience
set .MaxRankb, getarraysize(.EXPb);//Setting the Max level/rank to the amount of arrays in .EXPb
 
 
if(Rankb == .MaxRankb)end;
set RankEXPb, RankEXPb + .ExpPerQuest;
if(.EXPb[Rankb] <= RankEXPb && Rankb < .MaxRankb)
{
set Rankb, Rankb + 1;
dispbottom "Rank Up! Rank: " + Rankb;
if(Rankb == .MaxRankb) {
dispbottom "You have reached Rank 10 Beginner!";
set RankEXPa, RankEXPa + RankEXPb;
}
}
Viewed 676 times, submitted by Guest.