level up Interface.
Purpose: To show up Level up interfaces each time you level.
Okay, first things first.
Then after that Copy this code I'm going to provide with you.
Code:
public void levelup(int i)
{
char c = '\0';
switch(i)
{
case 0: // Attack
changeText126("@[email protected]! You've just advanced a Attack level!", 6248);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])).append("!").toString(), 6249);
sendFrame164(6247);
if (playerLevel[0] == 99) {
itemMessage("@[email protected], Your Attack level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9064, 250);
maxedStats += 1;
}
break;
case 1: // Defence
changeText126("@[email protected]! You've just advanced a Defence level!", 6254);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])).append("!").toString(), 6255);
sendFrame164(6253);
if (playerLevel[1] == 99) {
itemMessage("Congratulations, Your Defence level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9072, 250);
maxedStats += 1;
}
break;
case 2: // Strength'
changeText126("@[email protected]! You've just advanced a Strength level!", 6207);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])).append("!").toString(), 6208);
sendFrame164(6206);
if (playerLevel[2] == 99) {
itemMessage("Congratulations, Your Strength level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9068, 250);
maxedStats += 1;
}
break;
case 3: // '\003'
changeText126("@[email protected]! You've just advanced a Hitpoints level!", 6217);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])).append("!").toString(), 6218);
sendFrame164(6216);
if (playerLevel[3] == 99) {
itemMessage("Congratulations, Your Hitpoints level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9076, 250);
maxedStats += 1;
}
break;
case 4: // '\004'
changeText126("@[email protected]! You've just advanced a Ranged level!", 5453);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])). append("!").toString(), 6114);
sendFrame164(4443);
if (playerLevel[4] == 99) {
itemMessage("Congratulations, Your Ranged level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9144, 250);
maxedStats += 1;
}
break;
case 5: // '\005'
sendFrame164(6242);
changeText126("@[email protected]! You've just advanced a Prayer level!", 6243);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])). append("!").toString(), 6244);
updateRequired = true;
if (playerLevel[5] == 99) {
itemMessage("Congratulations, Your Prayer level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9128, 250);
maxedStats += 1;
}
break;
case 6: // '\006'
sendFrame164(6211);
changeText126("@[email protected]! You've just advanced a Magic level!", 6212);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])). append("!").toString(), 6213);
updateRequired = true;
if (playerLevel[6] == 99) {
itemMessage("Congratulations, Your Magic level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9132, 250);
maxedStats += 1;
}
break;
case 7: // '\007'
sendFrame164(6226);
changeText126("@[email protected]! You've just advanced a Cooking level!", 6227);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])). append("!").toString(), 6228);
if (playerLevel[7] == 99) {
itemMessage("Congratulations, Your Cooking level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9112, 250);
maxedStats += 1;
}
break;
case 8: // '\b'
sendFrame164(4272);
changeText126("@[email protected]! You've just advanced a Woodcutting level!", 4273);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])). append("!").toString(), 4274);
if (playerLevel[8] == 99) {
itemMessage("Congratulations, Your Woodcutting level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9088, 250);
maxedStats += 1;
}
break;
case 9: // '\t'
sendFrame164(6231);
changeText126("@[email protected]! You've just advanced a Fletching level!", 6232);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])). append("!").toString(), 6233);
if (playerLevel[9] == 99) {
itemMessage("Congratulations, Your Fletching level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9100, 250);
maxedStats += 1;
}
break;
case 10: // '\n'
sendFrame164(6258);
changeText126("@[email protected]! You've just advanced a Fishing level!", 6259);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])). append("!").toString(), 6260);
if (playerLevel[10] == 99) {
itemMessage("Congratulations, Your Fishing level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9108, 250);
maxedStats += 1;
}
break;
case 11: // '\013'
sendFrame164(4282);
changeText126("@[email protected]! You've just advanced a Firemaking level!", 4283);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])). append("!").toString(), 4284);
if (playerLevel[11] == 99) {
itemMessage("Congratulations, Your Firemaking level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9092, 250);
maxedStats += 1;
}
break;
case 12: // '\f'
sendFrame164(6263);
changeText126("@[email protected]! You've just advanced a Crafting level!", 6264);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])). append("!").toString(), 6265);
if (playerLevel[12] == 99) {
itemMessage("Congratulations, Your Crafting level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9096, 250);
}
maxedStats += 1;
break;
case 13: // '\r'
changeText126("@[email protected]! You've just advanced a Smithing level!", 6222);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])). append("!").toString(), 6223);
sendFrame164(6221);
if (playerLevel[13] == 99) {
itemMessage("Congratulations, Your Smithing level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9104, 250);
maxedStats += 1;
}
break;
case 14: // '\016'
changeText126("@[email protected]! You've just advanced a Mining level!", 4417);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])). append("!").toString(), 4438);
sendFrame164(4416);
if (playerLevel[14] == 99) {
itemMessage("Congratulations, Your Mining level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9120, 250);
maxedStats += 1;
}
break;
case 15: // '\017'
changeText126("@[email protected]! You've just advanced a Herblore level!", 6238);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])). append("!").toString(), 6239);
sendFrame164(6237);
if (playerLevel[15] == 99) {
itemMessage("Congratulations, Your Herblore level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9084, 250);
maxedStats += 1;
}
break;
case 16: // '\020'
changeText126("@[email protected]! You've just advanced a Agility level!", 4278);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])). append("!").toString(), 4279);
sendFrame164(4277);
if (playerLevel[16] == 99) {
itemMessage("Congratulations, Your Agility level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9136, 250);
maxedStats += 1;
}
break;
case 17: // '\021'
changeText126("@[email protected]! You've just advanced a Thieving level!", 4263);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])). append("!").toString(), 4264);
sendFrame164(4261);
if (playerLevel[17] == 99) {
itemMessage("Congratulations, Your Thieving level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9080, 250);
maxedStats += 1;
}
break;
case 18: // '\022'
changeText126("@[email protected]! You've just advanced a Slayer level!", 12123);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])). append("!").toString(), 12124);
sendFrame164(12122);
if (playerLevel[18] == 99) {
itemMessage("Congratulations, Your Slayer level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9124, 250);
maxedStats += 1;
}
break;
case 19: // '\023'
changeText126("@[email protected]@[email protected]! You've just advanced a farming level!",4889);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])). append("!").toString(), 4890);
changeText126("", 4891);
sendFrame246(4888,200,5340);
sendFrame164(4887);
if (playerLevel[19] == 99) {
itemMessage("Congratulations, Your Farming level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9140, 250);
maxedStats += 1;
}
break;
case 20: // '\024'
changeText126("@[email protected]! You've just advanced a Runecrafting level!", 4268);
changeText126((new StringBuilder()).append("You have now reached level ").append(getLevelForXP(playerXP[i])). append("!").toString(), 4269);
sendFrame164(4267);
if (playerLevel[20] == 99) {
itemMessage("Congratulations, Your Runecrafting level is now 99!",
"Speak to Bob in Lumbridge for a skill cape of achievement.", 9116, 250);
maxedStats += 1;
}
break;
}
}
That will make the level up interfaces. If you want to improve go ahead.
@Edit: Add this if you get any errors.
Below that you will see this.
Replace it with this code.
And that should do it.
Then there you go! You have added the level up interfaces.
P.s: This is not leeched from PwnScape. PwnScape's level up interface code
is totally different then this one.
Thanks and i hope you enjoy this tutorial.