Thread: Gem Rocks.

Results 1 to 3 of 3
  1. #1 Gem Rocks. 
    Registered Member
    Join Date
    Apr 2012
    Posts
    8
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Well basically I'm working on adding my own Gem Rocks, but I'm not wanting to re-do my entire Mining system. I'm not exactly sure how I should go about it but this is what I have so far.

    Code:
    case 2111:
    			c.getPA().addSkillXP(exp * Config.MINING_EXPERIENCE, c.playerMining);
    			c.getPA().refreshSkill(c.playerMining);
    			c.miningTimer = getMiningTimer(oreType);
    		    c.mining[1] = 90;
    			c.mining[2] = 165;
    			c.getItems().addItem(RANDOM_GEMS[(int)(RANDOM_GEMS.length * Math.random())], 1);
    			c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    		break;
    Right now this is perfect, the only issue is they can spam click it to get a full inventory in about 3 seconds. I need some sort of timer, and right now I've been going insane on this little issue and I'm wearing thin.

    Any help is appreciated.

    (Yes, I know this isn't the best way of doing it, but it's how I'm doing it because as I said I'm not redoing my whole Mining.)
    Reply With Quote  
     

  2. #2  
    Registered Member Mechanikas's Avatar
    Join Date
    Jan 2012
    Posts
    205
    Thanks given
    18
    Thanks received
    7
    Rep Power
    36
    case 2111:
    if(System.currentTimeMillis() - c.buryDelay > 1500) {
    c.getPA().addSkillXP(exp * Config.MINING_EXPERIENCE, c.playerMining);
    c.getPA().refreshSkill(c.playerMining);
    c.miningTimer = getMiningTimer(oreType);
    c.mining[1] = 90;
    c.mining[2] = 165;
    c.getItems().addItem(RANDOM_GEMS[(int)(RANDOM_GEMS.length * Math.random())], 1);
    c.getMining().startMining(c.mining[0], c.mining[1], c.mining[2]);
    }
    break;
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Apr 2012
    Posts
    8
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Thank you for responding & helping, but I already answered my own question shortly after posting. I suppose I should've said so.
    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. Rocks desapears!
    By etsvaldo in forum Help
    Replies: 2
    Last Post: 02-14-2011, 02:08 AM
  2. New rocks
    By mr code in forum Tutorials
    Replies: 6
    Last Post: 01-26-2011, 10:01 PM
  3. rocks
    By Beh3moth in forum Showcase
    Replies: 2
    Last Post: 11-09-2009, 05:35 AM
  4. Placing rocks?
    By Hulsmans in forum Help
    Replies: 2
    Last Post: 07-19-2009, 07:45 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
  •