Code:
public void levelup(int i)
{
char c = '\0';
switch(i)
{
case 0:
changeText126("Congratulations, you just advanced an attack level!", 6248);
changeText126((new StringBuilder()).append("Your attack level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 6249);
sendFrame164(6247);
break;
case 1:
changeText126("Congratulations, you just advanced a defence level!", 6254);
changeText126((new StringBuilder()).append("Your defence level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 6255);
sendFrame164(6253);
break;
case 2:
changeText126("Congratulations, you just advanced a strength level!", 6207);
changeText126((new StringBuilder()).append("Your strength level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 6208);
sendFrame164(6206);
break;
case 3:
changeText126("Congratulations, you just advanced a hitpoints level!", 6217);
changeText126((new StringBuilder()).append("Your hitpoints level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 6218);
sendFrame164(6216);
break;
case 4:
changeText126("Congratulations, you just advanced a ranged level!", 5453);
changeText126((new StringBuilder()).append("Your ranged level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 6114);
sendFrame164(4443);
break;
case 5:
sendFrame164(6242);
changeText126("Congratulations, you just advanced a prayer level!", 6243);
changeText126((new StringBuilder()).append("Your prayer level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 6244);
break;
case 6:
sendFrame164(6211);
changeText126("Congratulations, you just advanced a magic level!", 6212);
changeText126((new StringBuilder()).append("Your magic level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 6213);
break;
case 7:
sendFrame164(6226);
changeText126("Congratulations, you just advanced a cooking level!", 6227);
changeText126((new StringBuilder()).append("Your cooking level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 6228);
break;
case 8:
sendFrame164(4272);
changeText126("Congratulations, you just advanced a woodcutting level!", 4273);
changeText126((new StringBuilder()).append("Your woodcutting level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 4274);
break;
case 9:
sendFrame164(6231);
changeText126("Congratulations, you just advanced a fletching level!", 6232);
changeText126((new StringBuilder()).append("Your fletching level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 6233);
break;
case 10:
sendFrame164(6258);
changeText126("Congratulations, you just advanced a fishing level!", 6259);
changeText126((new StringBuilder()).append("Your fishing level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 6260);
break;
case 11:
sendFrame164(4282);
changeText126("Congratulations, you just advanced a fire making level!", 4283);
changeText126((new StringBuilder()).append("Your firemaking level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 4284);
break;
case 12:
sendFrame164(6263);
changeText126("Congratulations, you just advanced a crafting level!", 6264);
changeText126((new StringBuilder()).append("Your crafting level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 6265);
break;
case 13:
changeText126("Congratulations, you just advanced a smithing level!", 6222);
changeText126((new StringBuilder()).append("Your smithing level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 6223);
sendFrame164(6221);
break;
case 14:
changeText126("Congratulations, you just advanced a mining level!", 4417);
changeText126((new StringBuilder()).append("Your mining level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 4438);
sendFrame164(4416);
break;
case 15:
changeText126("Congratulations, you just advanced a herblore level!", 6238);
changeText126((new StringBuilder()).append("Your herblore level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 6239);
sendFrame164(6237);
break;
case 16:
changeText126("Congratulations, you just advanced a agility level!", 4278);
changeText126((new StringBuilder()).append("Your agility level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 4279);
sendFrame164(4277);
break;
case 17:
changeText126("Congratulations, you just advanced a thieving level!", 4263);
changeText126((new StringBuilder()).append("Your theiving level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 4264);
sendFrame164(4261);
break;
case 18:
changeText126("Congratulations, you just advanced a slayer level!", 12123);
changeText126((new StringBuilder()).append("Your slayer level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 12124);
sendFrame164(12122);
break;
case 19:
changeText126("@blu@Congratulations, you just advanced a farming level!",4889);
changeText126((new StringBuilder()).append("Your farming level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 4890);
changeText126("", 4891);
sendFrame246(4888,200,5340);
sendFrame164(4887);
break;
case 20:
changeText126("Congratulations, you just advanced a runecrafting level!", 4268);
changeText126((new StringBuilder()).append("Your runecrafting level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 4269);
sendFrame164(4267);
break;
}
}