01.05.2010, 10:07
pawn Код:
stock minrand(min, max) return random(max - min) + min;
stock rand_exp(level)
{
switch(level)
{
case 0: return minrand(200,100);
case 1: return minrand(400,400);
case 2: return minrand(200,300);
case 3: return minrand(200,200);
case 4: return minrand(200,150);
case 5: return minrand(200,170);
case 6: return minrand(200,160);
case 7: return minrand(400,400);
case 8: return minrand(200,140);
case 9: return minrand(200,100);
case 10: return minrand(200,400);
case 11: return minrand(200,100);
case 12: return minrand(200,100);
case 13: return minrand(200,100);
case 14: return minrand(200,100);
case 15: return minrand(200,300);
case 16: return minrand(200,300);
case 17: return minrand(200,300);
case 18: return minrand(200,190);
case 19: return minrand(200,180);
case 20: return minrand(200,300);
case 21: return minrand(200,250);
case 22: return minrand(200,250);
case 23: return minrand(200,200);
case 24: return minrand(200,100);
case 25: return minrand(200,100);
case 26: return minrand(200,100);
case 27: return minrand(200,140);
case 28: return minrand(200,160);
case 29: return minrand(200,180);
default: return 0;
}
return 1;
}
pawn Код:
playerDB[playerid][Exp] += rand_exp(playerDB[playerid][Level]);