Originally Posted by
xxfrogxx
Not sure what to do now lol...
This is in PlayerAssistant.java
Oh this is simple, if you'd like you can create a class called Rights or just erase the Rights.* and make them the integer rights (4,5,6,7.. etc)
One easy way to cut on having to make the class would be go to your Config class and add this:
Code:
public static final int DONATOR = 4;
public static final int SUPER_DONATOR = 5;
public static final int EXTREME_DONATOR = 6;
public static final int SPONSOR = 7;
and change that to this and import the Config class
Code:
public void rights() {
if (c.getRights().equal(Config.DONATOR)) {
c.sendMessage("You are now a Donator and you've donated $"+c.donPoints+".");
} else if (c.getRights().equal(Config.SUPER_DONATOR)) {
c.sendMessage("You are now a Super Donator and you've donated $"+c.donPoints+".");
} else if (c.getRights().equal(Config.EXTREME_DONATOR)) {
c.sendMessage("You are now an Extreme Donator and you've donated $"+c.donPoints+".");
} else if (c.getRights().equal(Config.SPONSOR)) {
c.sendMessage("You are now a Sponsor and you've donated $"+c.donPoints+".");
} else {
c.sendMessage("How'd you get this message?");
}
}
EDIT: Looking at your tut again, don't forget this part aswell
Code:
case 607:
c.memberPoints += 10;
c.donPoints += 10;
c.getItems().deleteItem(607, 1);
c.getwM().serverMessage("@dre@"+c.playerName+" has just redeemed a $10 scroll! Thank you for donating!");
c.sendMessage("You now have "+c.memberPoints+" member points. Speak to Twiggy to redeem them for cosmetics.");
c.saveCharacter = true;
c.saveFile = true;
if (c.donPoints <= 9) {
return;
} else if (c.donPoints >= 10 && c.donPoints <= 49 && !c.getRights().equal(Config.DONATOR)) {
c.setRights(Config.DONATOR);
} else if (c.donPoints >= 50 && c.donPoints <= 99 && !c.getRights().equal(Config.SUPER_DONATOR)) {
c.setRights(Config.SUPER_DONATOR);
} else if (c.donPoints >= 100 && c.donPoints <= 249 && !c.getRights().equal(Config.EXTREME_DONATOR)) {
c.setRights(Config.EXTREME_DONATOR);
} else if (c.donPoints >= 250 && !c.getRights().equal(Rights.SPONSOR)) {
c.setRights(Config.SPONSOR);
}
c.getPA().rights();
c.saveCharacter = true;
c.saveFile = true;
break;
case 608:
c.memberPoints += 50;
c.donPoints += 50;
c.getItems().deleteItem(608, 1);
c.getwM().serverMessage("@dre@"+c.playerName+" has just redeemed a $50 scroll! Thank you for donating!");
c.sendMessage("You now have "+c.memberPoints+" member points. Speak to Twiggy to redeem them for cosmetics.");
c.saveCharacter = true;
c.saveFile = true;
if (c.donPoints <= 9) {
return;
} else if (c.donPoints >= 10 && c.donPoints <= 49 && !c.getRights().equal(Config.DONATOR)) {
c.setRights(Config.DONATOR);
} else if (c.donPoints >= 50 && c.donPoints <= 99 && !c.getRights().equal(Config.SUPER_DONATOR)) {
c.setRights(Config.SUPER_DONATOR);
} else if (c.donPoints >= 100 && c.donPoints <= 249 && !c.getRights().equal(Config.EXTREME_DONATOR)) {
c.setRights(Config.EXTREME_DONATOR);
} else if (c.donPoints >= 250 && !c.getRights().equal(Config.SPONSOR)) {
c.setRights(Config.SPONSOR);
}
c.getPA().rights();
c.saveCharacter = true;
c.saveFile = true;
break;
case 786:
c.memberPoints += 100;
c.donPoints += 100;
c.getItems().deleteItem(786, 1);
c.getwM().serverMessage("@dre@"+c.playerName+" has just redeemed a $100 scroll! Thank you for donating!");
c.sendMessage("You now have "+c.memberPoints+" member points. Speak to Twiggy to redeem them for cosmetics.");
c.saveCharacter = true;
c.saveFile = true;
if (c.donPoints <= 9) {
return;
} else if (c.donPoints >= 10 && c.donPoints <= 49 && !c.getRights().equal(Config.DONATOR)) {
c.setRights(Config.DONATOR);
} else if (c.donPoints >= 50 && c.donPoints <= 99 && !c.getRights().equal(Config.SUPER_DONATOR)) {
c.setRights(Config.SUPER_DONATOR);
} else if (c.donPoints >= 100 && c.donPoints <= 249 && !c.getRights().equal(Config.EXTREME_DONATOR)) {
c.setRights(Config.EXTREME_DONATOR);
} else if (c.donPoints >= 250 && !c.getRights().equal(Config.SPONSOR)) {
c.setRights(Config.SPONSOR);
}
c.getPA().rights();
c.saveCharacter = true;
c.saveFile = true;
break;