paste your levelUP method
|
Hello, I am currently experiencing some problems with my levels, all the sudden.
Everytime I level up now, it only changes the number after the "/". Also, I don't get a level up message anymore. Could please someone help me to fix this? Thanks a lot!
Picture:
Thanks again!
paste your levelUP method
First this code was working fine, but now it's f*cked up somehow/..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(), 6228); 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!", 6212); changeText126((new StringBuilder()).append("Your Woodcutting level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 6213); 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 Firemaking 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(995); 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 an Agility level!", 4278); changeText126((new StringBuilder()).append("Your Agility level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 4279); sendFrame164(4277); 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; case 21: changeText126("Congratulations, you just advanced a Summoning level!", 4268); changeText126((new StringBuilder()).append("Your Summoning level is now ").append(getLevelForXP(playerXP[i])). append("!").toString(), 4269); sendFrame164(4267); break; case 22: changeText126("Congratulations, you just advanced a Hunter level!", 4268); changeText126((new StringBuilder()).append("Your Hunter level is now ").append(getLevelForXP(playerXP[i])). append("!").toString(), 4269); sendFrame164(4267); break; } }
try this m8
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(), 6228); 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!", 6212); changeText126((new StringBuilder()).append("Your Woodcutting level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 6213); 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 Firemaking 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(), 4418); sendFrame164(995); 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 an Agility level!", 4278); changeText126((new StringBuilder()).append("Your Agility level is now ").append(getLevelForXP(playerXP[i])).append(" .").toString(), 4279); sendFrame164(4277); 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; case 21: changeText126("Congratulations, you just advanced a Summoning level!", 4268); changeText126((new StringBuilder()).append("Your Summoning level is now ").append(getLevelForXP(playerXP[i])). append("!").toString(), 4269); sendFrame164(4267); break; case 22: changeText126("Congratulations, you just advanced a Hunter level!", 4268); changeText126((new StringBuilder()).append("Your Hunter level is now ").append(getLevelForXP(playerXP[i])). append("!").toString(), 4269); sendFrame164(4267); break; } }
i change the mining bit
the 1 i gave you
Code: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(), 4418); sendFrame164(995); break;
the 1 you gave us
Code: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(), 4418); sendFrame164(995); break;
make sure you pot up
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |