Originally Posted by
Kris
I'm not familiar with the source so I'm not the best teacher at this point, I can tell you basically how this is done but I cannot give you content which you can just copy-paste into direct files.
Basically, create a player-based variable (I'm guessing in Player class), for example..
public int donatedAmount;
This integer would be the donated amount, unique to all players.
Go to the spot which you want to give the donated amount and increment the value there, for example.. You stated the clue thing. Find the spot where you open the clue and give the rewards and simply add something in the lines of player.donatedAmount += 10; Or create setters and getters for the variable in Player class in the lines of:
public int getDonatedAmount() {
return donatedAmount;
}
public void setDonatedAmount(int amount) {
donatedAmount += amount;
}
Doesn't matter at this point which method you use, second one is aesthetically more appealing but it doesn't matter really.
And basically.. Wherever you're displaying the donated amount you'd just show it as..
Well, I'll put it in a simple send-message method..
player.sendMessage("You have donated: $" + player.donatedAmount + "."); //Or whatever the method's called.. I never worked with lower revisions so I'm not the best at spoonfeeding here.