Code:
public void levelup(int skill)
{
switch(skill)
{
case 0: // Attack
sendFrame164(6247);
sendFrame126("Congratulations, you just advanced an Attack level!", 6248);
sendFrame126("Your Attack level is now "+playerLevel[0]+" .", 6249);
sendMessage("Congratulations, you just advanced an Attack level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 1: // Strength
sendFrame164(6206);
sendFrame126("Congratulations, you just advanced a Strength level!", 6207);
sendFrame126("Your Strength level is now "+playerLevel[2]+" .", 6208);
sendMessage("Congratulations, you just advanced a Strength level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 2: // Defence
sendFrame164(6253);
sendFrame126("Congratulations, you just advanced a Defense level!", 6254);
sendFrame126("Your Defense level is now "+playerLevel[1]+" .", 6255);
sendMessage("Congratulations, you just advanced a Defense level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 3: //Hitpoints
sendFrame164(6216);
sendFrame126("Congratulations, you just advanced a Hitpoints level!", 6217);
sendFrame126("Your Hitpoints level is now "+playerLevel[3]+" .", 6218);
sendMessage("Congratulations, you just advanced a Hitpoints level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 4: //Ranged
sendFrame164(4443);
sendFrame126("Congratulations, you just advanced a Ranged level!", 4444);
sendFrame126("Your Ranged level is now "+playerLevel[4]+" .", 4445);
sendMessage("Congratulations, you just advanced a Ranged level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 5: // Prayer
sendFrame164(6242);
sendFrame126("Congratulations, you just advanced a Prayer level!", 6243);
sendFrame126("Your Prayer level is now "+playerLevel[5]+" .", 6244);
sendMessage("Congratulations, you just advanced a Prayer level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 6: // Magic
sendFrame164(6211);
sendFrame126("Congratulations, you just advanced a Magic level!", 6212);
sendFrame126("Your Magic level is now "+playerLevel[6]+" .", 6213);
sendMessage("Congratulations, you just advanced a Magic level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 7: //Cooking
sendFrame164(6226);
sendFrame126("Congratulations, you just advanced a Cooking level!", 6227);
sendFrame126("Your Cooking level is now "+playerLevel[7]+" .", 6228);
sendMessage("Congratulations, you just advanced a Cooking level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 8: //Woodcutting
sendFrame164(4272);
sendFrame126("Congratulations, you just advanced a Woodcutting level!", 4273);
sendFrame126("Your Woodcutitng level is now "+playerLevel[8]+" .", 4274);
sendMessage("Congratulations, you just advanced a Woodcutting level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 9: //Fletching
sendFrame164(6231);
sendFrame126("Congratulations, you just advanced a Fletching level!", 6232);
sendFrame126("Your Fletching level is now "+playerLevel[9]+" .", 6233);
sendMessage("Congratulations, you just advanced a Fletching level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 10: //Fishing
sendFrame164(6258);
sendFrame126("Congratulations, you just advanced a Fishing level!", 6259);
sendFrame126("Your Fishing level is now "+playerLevel[10]+" .", 6260);
sendMessage("Congratulations, you just advanced a Fishing level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 11: //Firemaking
sendFrame164(4282);
sendFrame126("Congratulations, you just advanced a Firemaking level!", 4283);
sendFrame126("Your Firemaking level is now "+playerLevel[11]+" .", 4284);
sendMessage("Congratulations, you just advanced a Firemaking level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 12: //Crafting
sendFrame164(6263);
sendFrame126("Congratulations, you just advanced a Crafting level!", 6264);
sendFrame126("Your Crafting level is now "+playerLevel[12]+" .", 6265);
sendMessage("Congratulations, you just advanced a Crafting level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 13: //Smithing
sendFrame164(6221);
sendFrame126("Congratulations, you just advanced a Smithing level!", 6222);
sendFrame126("Your Smithing level is now "+playerLevel[13]+" .", 6223);
sendMessage("Congratulations, you just advanced a Smithing level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 14: //Mining
sendFrame164(4416);
sendFrame126("Congratulations, you just advanced a Mining level!", 4417);
sendFrame126("Your Mining level is now "+playerLevel[14]+" .", 4418);
sendMessage("Congratulations, you just advanced a Mining level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 15: //Herblore
sendFrame164(6237);
sendFrame126("Congratulations, you just advanced a Herblore level!", 6238);
sendFrame126("Your Herblore level is now "+playerLevel[15]+" .", 6239);
sendMessage("Congratulations, you just advanced a Herblore level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 16: //Agility
sendFrame164(4277);
sendFrame126("Congratulations, you just advanced a Agility level!", 4278);
sendFrame126("Your Agility level is now "+playerLevel[16]+" .", 4279);
sendMessage("Congratulations, you just advanced an Agility level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 17: //Thieving
sendFrame164(4261);
sendFrame126("Congratulations, you just advanced a Thieving level!", 4262);
sendFrame126("Your Thieving level is now "+playerLevel[17]+" .", 4263);
sendMessage("Congratulations, you just advanced a Thieving level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 18: //Slayer
// sendFrame164(12123);
// sendFrame126("Congratulations, you just advanced a Slayer level!", 6207);
// sendFrame126("Your Slayer level is now "+playerLevel[18]+" .", 6208);
sendMessage("Congratulations, you just advanced a Slayer level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 19: //Farming
// sendFrame164(4261);
// sendFrame126("Congratulations, you just advanced a Farming level!", 6207);
// sendFrame126("Your Farming level is now "+playerLevel[19]+" .", 6208);
sendMessage("Congratulations, you just advanced a Farming level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
case 20: //Runecrafting
sendFrame164(4267);
sendFrame126("Congratulations, you just advanced a Runecrafting level!", 4268);
sendFrame126("Your Runecrafting level is now "+playerLevel[20]+" .", 4269);
sendMessage("Congratulations, you just advanced a Runecrafting level.");
stillgfx(199, absY, absX);
NpcDialogueSend = true;
break;
}
}
You Also Need This for Stillgfx'z..
Code:
public void stillgfxz(int id, int Y, int X, int height, int time)
{
for (Player p : server.playerHandler.players)
{
if(p != null)
{
client person = (client)p;
if((person.playerName != null || person.playerName != "null"))
{
if(person.distanceToPoint(X, Y) <= 60)
{
person.stillgfxz2(id, Y, X, height, time);
}
}
}
}
}
public void stillgfxz2(int id, int Y, int X, int height, int time)
{
outStream.createFrame(85);
outStream.writeByteC(Y - (mapRegionY * 8));
outStream.writeByteC(X - (mapRegionX * 8));
outStream.createFrame(4);
outStream.writeByte(0);//Tiles away (X >> 4 + Y & 7)
outStream.writeWord(id);//Graphic id
outStream.writeByte(height);//height of the spell above it's basic place, i think it's written in pixels 100 pixels higher
outStream.writeWord(time);//Time before casting the graphic
}
public void stillgfx3(int id, int heightS, int Y, int X, int timeBCS) {
outStream.createFrame(85);
outStream.writeByteC(Y - (mapRegionY * 8));
outStream.writeByteC(X - (mapRegionX * 8));
outStream.createFrame(4);
outStream.writeByte(0);//Tiles away (X >> 4 + Y & 7) //Tiles Away From absX and absY
outStream.writeWord(id);//Graphic id
outStream.writeByte(heightS);//height of the spell above it's basic place, i think it's written in pixels 100 pixels higher //100
outStream.writeWord(timeBCS);//Time before casting the graphic
}
public void stillgfx2(int id, int Y, int X)
{
outStream.createFrame(85);
outStream.writeByteC(Y - (mapRegionY * 8));
outStream.writeByteC(X - (mapRegionX * 8));
outStream.createFrame(4);
outStream.writeByte(0);//Tiles away (X >> 4 + Y & 7)
outStream.writeWord(id);//Graphic id
outStream.writeByte(100);//height of the spell above it's basic place, i think it's written in pixels 100 pixels higher
outStream.writeWord(0);//Time before casting the graphic
}
public void stillgfx(int id, int Y, int X)
{
for (Player p : server.playerHandler.players)
{
if(p != null)
{
client person = (client)p;
if((person.playerName != null || person.playerName != "null"))
{
if(person.distanceToPoint(X, Y) <= 60)
{
person.stillgfx2(id, Y, X);
}
}
}
}
}
Replace You'r public boolean addSkillXP