Code:
public void levelUp(int skill) {
switch(skill) {
case 0:
sendFrame126("Congratulations! You've just advanced a Attack level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+"!", 4269);
c.sendMessage("Congratulations! You've just advanced a attack level.");
sendFrame164(6247);
break;
case 1:
sendFrame126("Congratulations! You've just advanced a Defence level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Defence level.");
sendFrame164(6253);
break;
case 2:
sendFrame126("Congratulations! You've just advanced a Strength level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Strength level.");
sendFrame164(6206);
break;
case 3:
sendFrame126("Congratulations! You've just advanced a Hitpoints level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Hitpoints level.");
sendFrame164(6216);
break;
case 4:
sendFrame126("Congratulations! You've just advanced a Ranged level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Ranging level.");
sendFrame164(4443);
break;
case 5:
sendFrame126("Congratulations! You've just advanced a Prayer level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Prayer level.");
sendFrame164(6242);
break;
case 6:
sendFrame126("Congratulations! You've just advanced a Magic level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Magic level.");
sendFrame164(6211);
break;
case 7:
sendFrame126("Congratulations! You've just advanced a Cooking level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Cooking level.");
sendFrame164(6226);
break;
case 8:
sendFrame126("Congratulations! You've just advanced a Woodcutting level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Woodcutting level.");
sendFrame164(4272);
break;
case 9:
sendFrame126("Congratulations! You've just advanced a Fletching level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Fletching level.");
sendFrame164(6231);
break;
case 10:
sendFrame126("Congratulations! You've just advanced a Fishing level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Fishing level.");
sendFrame164(6258);
break;
case 11:
sendFrame126("Congratulations! You've just advanced a Fire making level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Fire making level.");
sendFrame164(4282);
break;
case 12:
sendFrame126("Congratulations! You've just advanced a Crafting level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Crafting level.");
sendFrame164(6263);
break;
case 13:
sendFrame126("Congratulations! You've just advanced a Smithing level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Smithing level.");
sendFrame164(6221);
break;
case 14:
sendFrame126("Congratulations! You've just advanced a Mining level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Mining level.");
sendFrame164(4416);
break;
case 15:
sendFrame126("Congratulations! You've just advanced a Herblore level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Herblore level.");
sendFrame164(6237);
break;
case 16:
sendFrame126("Congratulations! You've just advanced a Agility level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Agility level.");
sendFrame164(4277);
break;
case 17:
sendFrame126("Congratulations! You've just advanced a Thieving level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Thieving level.");
sendFrame164(4261);
break;
case 18:
sendFrame126("Congratulations! You've just advanced a Slayer level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Slayer level.");
sendFrame164(12122);
break;
case 19:
sendFrame126("Congratulations! You've just advanced a Farming level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Farming level.");
sendFrame164(5267);
break;
case 20:
sendFrame126("Congratulations! You've just advanced a Runecrafting level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Runecrafting level.");
sendFrame164(4267);
break;
case 21:
sendFrame126("Congratulations! You've just advanced a Construction level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Construction level.");
sendFrame164(7267);
break;
case 22:
sendFrame126("Congratulations! You've just advanced a Hunter level!", 4268);
sendFrame126("You have now reached level "+getLevelForXP(c.playerXP[skill])+".", 4269);
c.sendMessage("Congratulations! You've just advanced a Hunter level.");
sendFrame164(8267);
break;
}
c.dialogueAction = 0;
c.nextChat = 0;
sendFrame126("Click here to continue", 358);
}