Thread: runecrafting/herb problems

Results 1 to 9 of 9
  1. #1 runecrafting/herb problems 
    Registered Member Andrew's Avatar
    Join Date
    Nov 2008
    Posts
    2,890
    Thanks given
    612
    Thanks received
    207
    Rep Power
    551
    resolved
    Reply With Quote  
     

  2. #2  
    Registered Member Andrew's Avatar
    Join Date
    Nov 2008
    Posts
    2,890
    Thanks given
    612
    Thanks received
    207
    Rep Power
    551
    bump

    cmonnn
    Last edited by Austin_; 11-09-2011 at 09:38 PM.
    Reply With Quote  
     

  3. #3  
    Registered Member Andrew's Avatar
    Join Date
    Nov 2008
    Posts
    2,890
    Thanks given
    612
    Thanks received
    207
    Rep Power
    551
    bump
    Reply With Quote  
     

  4. #4  
    arrowzftw
    Guest
    Try this for the Herblore:

    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);
    	}
    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;



    Heres for runecrafting:

    Code:
    for (int alters = 0; alters < getRuneCrafting().altarID.length; alters++) {
    			if (objectID == getRuneCrafting().altarID[i]) {
    					getRuneCrafting().craftRunes(this, objectID);
    			}
    		}
    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.
    Reply With Quote  
     

  5. #5  
    Registered Member Andrew's Avatar
    Join Date
    Nov 2008
    Posts
    2,890
    Thanks given
    612
    Thanks received
    207
    Rep Power
    551
    Code:
    Client.java:8771: variable i might not have been initialized
                            if (objectID == getRuneCrafting().altarID[i]) {
                                                                      ^
    1 error
    Press any key to continue . . .
    also the herb with that break;

    just makes it when i click on any herb it says you need a level of 1 to clean this herb.... nothign else happens
    Reply With Quote  
     

  6. #6  
    Registered Member Andrew's Avatar
    Join Date
    Nov 2008
    Posts
    2,890
    Thanks given
    612
    Thanks received
    207
    Rep Power
    551
    stilll looking
    Reply With Quote  
     

  7. #7  
    Banned

    Join Date
    Jun 2008
    Age
    28
    Posts
    811
    Thanks given
    302
    Thanks received
    36
    Rep Power
    0
    Code:
    		for (int alters = 0; alters < getRuneCrafting().altarID.length; alters++) {
    			if (objectID == getRuneCrafting().altarID[alters]) {
    					getRuneCrafting().craftRunes(this, objectID);
    			}
    		}
    Reply With Quote  
     

  8. #8  
    Super Donator


    Join Date
    Jun 2007
    Age
    31
    Posts
    2,157
    Thanks given
    316
    Thanks received
    282
    Rep Power
    779
    Code:
    if (objectID == getRuneCrafting().altarID[0]) {
    change it to
    Code:
    if (objectID == getRuneCrafting().altarID[alters]) {
    for your runecrafting

    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();
    						}
    				}
    Reply With Quote  
     

  9. Thankful user:


  10. #9  
    Registered Member

    Join Date
    Sep 2007
    Age
    32
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    if (objectID == getRuneCrafting().altarID[0]) {
    should be

    if (objectID == getRuneCrafting().altarID[altars]) {
    l0l at slow reply
    Hyperion V2 Martin's Updates.

    Scar says:
    i hate it when it hits your face
    Reply With Quote  
     

  11. Thankful user:



Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Herb Identifying
    By signup in forum Snippets
    Replies: 2
    Last Post: 08-11-2011, 06:58 PM
  2. *RIP* Hug A Herb... or whatever.
    By tcuzza in forum General
    Replies: 2
    Last Post: 10-06-2010, 11:09 PM
  3. Start of herb
    By Huey in forum Tutorials
    Replies: 9
    Last Post: 06-08-2009, 08:07 PM
  4. New Herb Skillicon
    By Mime in forum Graphics
    Replies: 20
    Last Post: 03-20-2008, 04:24 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •