Very nice!
|
nice man, i might use.
edit: what if you loose your skillcape?
Very nice!
Then you can buy from your skillcape store or add this in your commands.java
Code:if (playerCommand.equalsIgnoreCase("skillcapes")) { c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); c.getItems().addItem(SKILLCAPE ID HERE!, 1); }
Instead of
Could be just added anCode:switch(skill) { case 0: sendFrame126("Congratulations, you just advanced an attack level!", 6248); sendFrame126("Your attack level is now "+getLevelForXP(c.playerXP[skill])+".", 6249); c.sendMessage("Congratulations, you just advanced an attack level."); sendFrame164(6247); if(c.playerLevel[0] == 99) { //or you can do > 98 c.getItems().addItem(9748, 1); return; } break; case 1: sendFrame126("Congratulations, you just advanced a defence level!", 6254); sendFrame126("Your defence level is now "+getLevelForXP(c.playerXP[skill])+".", 6255); c.sendMessage("Congratulations, you just advanced a defence level."); sendFrame164(6253); if(c.playerLevel[1] == 99) { //or you can do > 98 c.getItems().addItem(9754, 1); return; } break; case 2: sendFrame126("Congratulations, you just advanced a strength level!", 6207); sendFrame126("Your strength level is now "+getLevelForXP(c.playerXP[skill])+".", 6208); c.sendMessage("Congratulations, you just advanced a strength level."); sendFrame164(6206); if(c.playerLevel[2] == 99) { //or you can do > 98 c.getItems().addItem(9751, 1); return; } break; case 3: sendFrame126("Congratulations, you just advanced a hitpoints level!", 6217); sendFrame126("Your hitpoints level is now "+getLevelForXP(c.playerXP[skill])+".", 6218); c.sendMessage("Congratulations, you just advanced a hitpoints level."); sendFrame164(6216); if(c.playerLevel[3] == 99) { //or you can do > 98 c.getItems().addItem(9769, 1); return; } break; case 4: sendFrame126("Congratulations, you just advanced a ranged level!", 5453); sendFrame126("Your ranged level is now "+getLevelForXP(c.playerXP[skill])+".", 6114); c.sendMessage("Congratulations, you just advanced a ranging level."); sendFrame164(4443); if(c.playerLevel[4] == 99) { //or you can do > 98 c.getItems().addItem(9757, 1); return; } break; case 5: sendFrame126("Congratulations, you just advanced a prayer level!", 6243); sendFrame126("Your prayer level is now "+getLevelForXP(c.playerXP[skill])+".", 6244); c.sendMessage("Congratulations, you just advanced a prayer level."); sendFrame164(6242); if(c.playerLevel[5] == 99) { //or you can do > 98 c.getItems().addItem(9760, 1); return; } break; case 6: sendFrame126("Congratulations, you just advanced a magic level!", 6212); sendFrame126("Your magic level is now "+getLevelForXP(c.playerXP[skill])+".", 6213); c.sendMessage("Congratulations, you just advanced a magic level."); sendFrame164(6211); if(c.playerLevel[6] == 99) { //or you can do > 98 c.getItems().addItem(9763, 1); return; } break; case 7: sendFrame126("Congratulations, you just advanced a cooking level!", 6227); sendFrame126("Your cooking level is now "+getLevelForXP(c.playerXP[skill])+".", 6228); c.sendMessage("Congratulations, you just advanced a cooking level."); sendFrame164(6226); if(c.playerLevel[7] == 99) { //or you can do > 98 c.getItems().addItem(9802, 1); return; } break; case 8: sendFrame126("Congratulations, you just advanced a woodcutting level!", 4273); sendFrame126("Your woodcutting level is now "+getLevelForXP(c.playerXP[skill])+".", 4274); c.sendMessage("Congratulations, you just advanced a woodcutting level."); sendFrame164(4272); if(c.playerLevel[8] == 99) { //or you can do > 98 c.getItems().addItem(9808, 1); return; } break; case 9: sendFrame126("Congratulations, you just advanced a fletching level!", 6232); sendFrame126("Your fletching level is now "+getLevelForXP(c.playerXP[skill])+".", 6233); c.sendMessage("Congratulations, you just advanced a fletching level."); sendFrame164(6231); if(c.playerLevel[9] == 99) { //or you can do > 98 c.getItems().addItem(9784, 1); return; } break; case 10: sendFrame126("Congratulations, you just advanced a fishing level!", 6259); sendFrame126("Your fishing level is now "+getLevelForXP(c.playerXP[skill])+".", 6260); c.sendMessage("Congratulations, you just advanced a fishing level."); sendFrame164(6258); if(c.playerLevel[10] == 99) { //or you can do > 98 c.getItems().addItem(9799, 1); return; } break; case 11: sendFrame126("Congratulations, you just advanced a fire making level!", 4283); sendFrame126("Your firemaking level is now "+getLevelForXP(c.playerXP[skill])+".", 4284); c.sendMessage("Congratulations, you just advanced a fire making level."); sendFrame164(4282); if(c.playerLevel[11] == 99) { //or you can do > 98 c.getItems().addItem(9805, 1); return; } break; case 12: sendFrame126("Congratulations, you just advanced a crafting level!", 6264); sendFrame126("Your crafting level is now "+getLevelForXP(c.playerXP[skill])+".", 6265); c.sendMessage("Congratulations, you just advanced a crafting level."); sendFrame164(6263); if(c.playerLevel[12] == 99) { //or you can do > 98 c.getItems().addItem(9781, 1); return; } break; case 13: sendFrame126("Congratulations, you just advanced a smithing level!", 6222); sendFrame126("Your smithing level is now "+getLevelForXP(c.playerXP[skill])+".", 6223); c.sendMessage("Congratulations, you just advanced a smithing level."); sendFrame164(6221); if(c.playerLevel[13] == 99) { //or you can do > 98 c.getItems().addItem(9796, 1); return; } break; case 14: sendFrame126("Congratulations, you just advanced a mining level!", 4417); sendFrame126("Your mining level is now "+getLevelForXP(c.playerXP[skill])+".", 4438); c.sendMessage("Congratulations, you just advanced a mining level."); sendFrame164(4416); if(c.playerLevel[14] == 99) { //or you can do > 98 c.getItems().addItem(9793, 1); return; } break; case 15: sendFrame126("Congratulations, you just advanced a herblore level!", 6238); sendFrame126("Your herblore level is now "+getLevelForXP(c.playerXP[skill])+".", 6239); c.sendMessage("Congratulations, you just advanced a herblore level."); sendFrame164(6237); if(c.playerLevel[15] == 99) { //or you can do > 98 c.getItems().addItem(9775, 1); return; } break; case 16: sendFrame126("Congratulations, you just advanced a agility level!", 4278); sendFrame126("Your agility level is now "+getLevelForXP(c.playerXP[skill])+".", 4279); c.sendMessage("Congratulations, you just advanced an agility level."); sendFrame164(4277); if(c.playerLevel[16] == 99) { //or you can do > 98 c.getItems().addItem(9772, 1); return; } break; case 17: sendFrame126("Congratulations, you just advanced a thieving level!", 4263); sendFrame126("Your theiving level is now "+getLevelForXP(c.playerXP[skill])+".", 4264); c.sendMessage("Congratulations, you just advanced a thieving level."); sendFrame164(4261); if(c.playerLevel[17] == 99) { //or you can do > 98 c.getItems().addItem(9778, 1); return; } break; case 18: sendFrame126("Congratulations, you just advanced a slayer level!", 12123); sendFrame126("Your slayer level is now "+getLevelForXP(c.playerXP[skill])+".", 12124); c.sendMessage("Congratulations, you just advanced a slayer level."); sendFrame164(12122); if(c.playerLevel[18] == 99) { //or you can do > 98 c.getItems().addItem(9787, 1); return; } break; case 20: sendFrame126("Congratulations, you just advanced a runecrafting level!", 4268); sendFrame126("Your runecrafting level is now "+getLevelForXP(c.playerXP[skill])+".", 4269); c.sendMessage("Congratulations, you just advanced a runecrafting level."); sendFrame164(4267); if(c.playerLevel[20] == 99) { //or you can do > 98 c.getItems().addItem(9766, 1); return; } break; } c.dialogueAction = 0; c.nextChat = 0; }
Code:if(c.playerLevel[skill] > 98) giveCape(skill);Something like that.Code:public void giveCape(int i){ int capes[] = {9747,9750,9753,9756}; //just examples.. addItem(capes[i],1); }
Something useful in a long time, thanks.
Using that code I've managed to put this together...
Code:public void levelUp(int skill) { int totalLevel = 0; for(int i = 0; i < 22; i++) { totalLevel += (getLevelForXP(c.playerXP[i])); } sendFrame126("Total\\n Level: "+totalLevel, 3984); int[][] data = { {0, 6248, 6249, 6247}, // ATTACK {1, 6254, 6255, 6253}, // DEFENCE {2, 6207, 6208, 6206}, // STRENGTH {3, 6217, 6218, 6216}, // HITPOINTS {4, 5453, 6114, 4443}, // RANGED {5, 6243, 6244, 6242}, // PRAYER {6, 6212, 6213, 6211}, // MAGIC {7, 6227, 6228, 6226}, // COOKING {8, 4273, 4274, 4272}, // WOODCUTTING {9, 6232, 6233, 6231}, // FLETCHING {10, 6259, 6260, 6258}, // FISHING {11, 4283, 4284, 4282}, // FIREMAKING {12, 6264, 6265, 6263}, // CRAFTING {13, 6222, 6223, 6221}, // SMITHING {14, 4417, 4438, 4416}, // MINING {15, 6238, 6239, 6237}, // HERBLORE {16, 4278, 4279, 4277}, // AGILITY {17, 4263, 4264, 4261}, // THIEVING {18, 12123, 12124, 12122}, // SLAYER ****, -1, -1, -1}, // FARMING {20, 4268, 4269, 4267}, // RUNECRAFTING }; String[] name = { "Attack", "Defence", "Strength", "Hitpoints", "Ranged", "Prayer", "Magic", "Cooking", "Woodcutting", "Fletching", "Fishing", "Firemaking", "Crafting", "Smithing", "Mining", "Herblore", "Agility", "Theiving", "Slayer", "Farming", "Runecrafting", }; for(int i = 0; i < 21; i++) { if(skill == data[i][0]) { sendFrame126("@bla@Congratulations, you just advanced a "+name[i]+" level!", data[i][1]); sendFrame126("@dbl@Your "+name[i]+" level is now "+getLevelForXP(c.playerXP[skill])+".", data[i][2]); c.sendMessage("Congratulations, you just advanced a "+name[i]+" level."); sendFrame164(data[i][3]); if(skill > 98) { c.getItems().addItem(skillcapes[skill][0]); } } } c.dialogueAction = 0; c.nextChat = 0; }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |