Originally Posted by
Zivik
Should use abstraction for something like this. Goes along with what Jet was saying and ease-of-use for everyone.
Wouldn't suggest using abstraction, I'd rather suggest doing something along these lines
Code:
/**
* A class to hold all the constants
*/
public final class Achievements {
...
}
Then have another class hold various 1 dimension arrays which you can easily extend
Code:
/**
* holds all the 1 dimensional arrays
*/
public class AchievementsController {
private static final int[] AMOUNT_TO_DO = {1};
public static void incrementAchievement() {
.....
}
Then when a player does what you want him to do, in this case kill a rock crab or w.e
just head to the dropitems method located in npchandler and do something like
Code:
AchievementsController.incrementAchievement(.....);