Here you are, full donator rank.
Player.java declare this somewhere
Code:
public int member = 0;
Add this wherever you handle your player saving:
Code:
bufferedwriter.newLine();
bufferedwriter.write("member:", 0, 7);
bufferedwriter.write(Integer.toString(member), 0,
Integer.toString(member).length());
bufferedwriter.newLine();
Add this wherever your player loading is handled:
Code:
} else if (s2.equals("member")) {
member = Integer.parseInt(s4);
Commands.java for ::yell
Code:
if (cmd[0].equalsIgnoreCase("yell")) {
for (Player pl : Engine.players) {
if (pl != null) {
if (p.muteType > 0) { // might need to change this to whatever your mute system uses
p.getActionSender().sendMessage(p, "You are muted and cannot yell at the moment.");
return;
}
if (p.rights == 0 && p.member == 0) {
p.getActionSender().sendMessage(p, "You must be a donor to use the yell channel, contact staff to learn how to donate.");
return;
} else if (p.username.equalsIgnoreCase("ownersnamehere") && p.member == 1) {
pl.getActionSender().sendMessage(pl, "<col=FF0000>["Owner"]<col=000000>[<img=1>"+p.username+"]: "+command.substring(5));
} else if (p.rights == 1) {
pl.getActionSender().sendMessage(pl, "<col=FF0000>["Mod"]<col=000000>[<img=0>"+p.username+"]: "+command.substring(5));
} else if (p.rights >= 2) {
pl.getActionSender().sendMessage(pl, "<col=FF0000>["Admin"]<col=000000>[<img=1>"+p.username+"]: "+command.substring(5));
} else if (p.member == 1) {
pl.getActionSender().sendMessage(pl, "<col=FF0000>["Donator"]<col=000000>["+p.username+"]: "+command.substring(5));
}
}
}
}
If you want to add a donor zone, commands.java add
Code:
if (cmd[0].equals("donorzone") && p.member == 1) {
if (p.wildernessZone(p.absX, p.absY)) {
p.getActionSender().sendMessage(p, "You cant use this cmd in pvp zone!");
return;
}
p.teleportTo(xcoordhere, ycoordhere, 0, 4, 0, 8939, 8941, 1576, 0, 1577, 0);
p.actionSender.removeOverlay(p);
p.loadStaticObjects();
} else {
p.getActionSender().sendMessage(p, "You must be a donator to access the donator zone, contact staff to learn how to donate.");
return;
}
If you want to make an item wieldable only for donators, add this in equipment.java:
Code:
if (wearId == 14484) { //change to any id you want..
if (p.member == 1) {
} else {
p.getActionSender().sendMessage(p, "You must be a donor to use Dragon Claws!");
return;
}
}
No need to give admin, rep + thanks would be nice though (:
If you need any other commands or w/e let me know and ill see what i can do, have fun!