Thread: [PI] brokenBarrows method.

Results 1 to 3 of 3
  1. #1 [PI] brokenBarrows method. 
    Registered Member

    Join Date
    Sep 2009
    Age
    27
    Posts
    2,768
    Thanks given
    367
    Thanks received
    187
    Rep Power
    458
    So basically in the brokenBarrows method in Project Insanity, it breaks barrows on death, and when you drop it.

    ItemHandler.java

    Code:
    	public int[][] brokenBarrows = {{4708,4860},{4710,4866},{4712,4872},{4714,4878},{4716,4884},
    	{4720,4896},{4718,4890},{4720,4896},{4722,4902},{4732,4932},{4734,4938},{4736,4944},{4738,4950},
    	{4724,4908},{4726,4914},{4728,4920},{4730,4926},{4745,4956},{4747,4926},{4749,4968},{4751,4994},
    	{4753,4980},{4755,4986},{4757,4992},{4759,4998}};
    and then we come to this part, this is the part i don't get are the broken barrow item ids in there? because i want to create a new thing that breaks on death

    Code:
    			if (itemId > 4705 && itemId < 4760) {
    				for (int j = 0; j < brokenBarrows.length; j++) {
    					if (brokenBarrows[j][0] == itemId) {
    						itemId = brokenBarrows[j][1];
    						break;
    					}
    				}
    			}
    Thanks, rep+
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Mar 2011
    Posts
    4,062
    Thanks given
    194
    Thanks received
    689
    Rep Power
    0
    the broken barrows ids are in the int array

    the first array ([j][0]) is the regular barrows, and the 2nd one ([j][1]) is the broken barrows

    edit: just make a new one like this

    public int[][] breakOnDeath = { {regItemIdHere, brokenItemIdHere} };

    for (int j = 0; j < breakOnDeath.length; j++) {
    if (itemId == breakOnDeath[j][0])
    itemId = breakOnDeath[j][1];
    }
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member

    Join Date
    Sep 2009
    Age
    27
    Posts
    2,768
    Thanks given
    367
    Thanks received
    187
    Rep Power
    458
    Thanks
    Reply With Quote  
     


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. Replies: 5
    Last Post: 09-05-2011, 11:21 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
  •