bump
cmonnn
|
resolved
bump
cmonnn
Last edited by Austin_; 11-09-2011 at 09:38 PM.
bump
Try this for the Herblore:
Your obviously using a loop you need to stop this loop when you hit a halt in the herblore otherwise it'll keep going and spamming until the identificationData.length is reached. So we use break;Code:private static final int[][] identificationData = new int[][]{ {199,249,1,1000}, {201,251,5,1000}, {203,253,11,1000}, {205,255,20,1000}, {207,257,25,1000}, {209,259,40,1000}, {211,261,48,1000}, {213,263,54,1000}, {215,265,65,1000}, {217,267,70,1000}, {219,269,75,100}}; public static void handle3(final Client c, final int ItemID, final int ItemSlot, final int a) { EventManager.getSingleton().addEvent(new Event() { public void execute(final EventContainer e) { for(int i = 0; i < identificationData.length; i++) { if(ItemID == identificationData[i][0] && c.playerLevel [15] >= identificationData[i][2]) { c.deleteItem(identificationData[i][0], 1); c.addItem(identificationData[i][1], 1); c.sM("You identify the herb, it's a "+c.GetItemName(identificationData[i][1])+"."); c.addSkillXP(identificationData[i][3], 15); e.stop(); } else { c.sM("You need a Herblore Level of "+identificationData[i][2]+" to make this"); break; e.stop(); } } } }, 600); }
Heres for runecrafting:
Basically you did a small mistake and put altarID[0], which is the air rune altar only. Instead you should of put [i] which goes through the ints in the array and see if it matches instead of just returning you to the air rune altar.Code:for (int alters = 0; alters < getRuneCrafting().altarID.length; alters++) { if (objectID == getRuneCrafting().altarID[i]) { getRuneCrafting().craftRunes(this, objectID); } }
also the herb with that break;Code:Client.java:8771: variable i might not have been initialized if (objectID == getRuneCrafting().altarID[i]) { ^ 1 error Press any key to continue . . .
just makes it when i click on any herb it says you need a level of 1 to clean this herb.... nothign else happens
stilll looking
Code:for (int alters = 0; alters < getRuneCrafting().altarID.length; alters++) { if (objectID == getRuneCrafting().altarID[alters]) { getRuneCrafting().craftRunes(this, objectID); } }
change it toCode:if (objectID == getRuneCrafting().altarID[0]) {for your runecraftingCode:if (objectID == getRuneCrafting().altarID[alters]) {
and for herblore:
Code:if(ItemID == identificationData[i][0] && c.playerLevel [15] >= identificationData[i][2]) { c.deleteItem(identificationData[i][0], 1); c.addItem(identificationData[i][1], 1); c.sM("You identify the herb, it's a "+c.GetItemName(identificationData[i][1])+"."); c.addSkillXP(identificationData[i][3], 15); e.stop(); break; } else if(itemID == identificationData[i][0]) { c.sM("You need a Herblore Level of "+identificationData[i][2]+" to make this"); e.stop(); } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |