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.)