Thread: Need help with mining

Results 1 to 9 of 9
  1. #1 Need help with mining 
    Registered Member
    Join Date
    Jan 2012
    Posts
    43
    Thanks given
    5
    Thanks received
    2
    Rep Power
    11
    With whatever pickaxe in inventory, while trying to open bank or use portals it starts to mine and says : You smashed your pickaxe on the rock.

    This happens both when equipped or in inventory.

    I really need to fix that, accepting all the help!
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Sep 2008
    Posts
    4,833
    Thanks given
    894
    Thanks received
    1,439
    Rep Power
    2924
    Go into your mining.java and search for " You smashed your pickaxe on the rock" and post the Method surrounding it, I'll take a look.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Xynth's Avatar
    Join Date
    May 2009
    Posts
    2,222
    Thanks given
    226
    Thanks received
    259
    Rep Power
    1155
    Just make sure it only does mining actions for only mining object IDs?
    Attached image
    Reply With Quote  
     

  4. #4  
    Registered Member Recursion's Avatar
    Join Date
    Feb 2010
    Posts
    638
    Thanks given
    0
    Thanks received
    29
    Rep Power
    41
    Quote Originally Posted by Xynth View Post
    Just make sure it only does mining actions for only mining object IDs?
    ^ this.

    You might have also forgotten to add a break after clicking on the object, causing it to go to the next case, in this case, a rock's id - executing the mining code.
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Sep 2008
    Posts
    4,833
    Thanks given
    894
    Thanks received
    1,439
    Rep Power
    2924
    Quote Originally Posted by Nukka View Post
    ^ this.

    You might have also forgotten to add a break after clicking on the object, causing it to go to the next case, in this case, a rock's id - executing the mining code.
    That is very much a possibility, Pretty likely if the You smashed your pickaxe on the rock thing was coded wrong, Its supposed to be in the start mining method operating under a Misc.Random
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jan 2012
    Posts
    43
    Thanks given
    5
    Thanks received
    2
    Rep Power
    11
    Could someone help me via teamviewer , I just can't handle it!

    Code there, if needed something else, tell me!
    private String smashPickAxeOnRock = "You smashed your pickaxe on the rock...";

    private int checkPickAxeForAnimation() {
    for (int[] equipmentData : pickAxeData) {
    if (c.getItems().playerHasItem(equipmentData[0], 1) || c.playerEquipment[c.playerWeapon] == equipmentData[0]) {
    currentAnimation = equipmentData[1];
    c.sendMessage(smashPickAxeOnRock);
    return equipmentData[1];
    }
    }
    return -1;
    }
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Jan 2012
    Posts
    43
    Thanks given
    5
    Thanks received
    2
    Rep Power
    11
    Anyone ?
    Reply With Quote  
     

  8. #8  
    Extreme Donator


    Join Date
    Oct 2006
    Posts
    1,370
    Thanks given
    64
    Thanks received
    197
    Rep Power
    426
    Make an array with all the rock objectIDs, like so:
    Code:
    public int[] rocks = {rockId1, rockId2, rockId3};
    Then make a for loop in your checkPickAxeForAnimation method:
    Code:
    for (int i = 0; i < rocks.length; i++) {
    then add a check to see if the object you are clicking on is an object:
    Code:
    if (i == c.objectId) { c.sendMessage(smashPickAxeOnRock);


    ~flow@hacking . rs
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Jan 2012
    Posts
    43
    Thanks given
    5
    Thanks received
    2
    Rep Power
    11
    Fixed it already, but thanks anyways. Had some lines missing..
    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: 19
    Last Post: 01-02-2010, 11:59 PM
  2. Mining
    By Mister Maggot in forum Snippets
    Replies: 14
    Last Post: 12-11-2009, 12:48 AM
  3. mining help
    By Vox' in forum Help
    Replies: 2
    Last Post: 06-04-2009, 05:10 PM
  4. Mining
    By Mrquarterx in forum Help
    Replies: 4
    Last Post: 05-04-2009, 05:40 AM
  5. 90% mining
    By Shoebox in forum Tutorials
    Replies: 39
    Last Post: 11-23-2008, 06:23 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
  •