Jump to content
Sign in to follow this  
Barky

More Ranks in Demethium Base @Author Barky

Recommended Posts

[B][I][COLOR="#000000"]Discription : [COLOR="#00FF00"]We will add more ranks into the Demethium 637 Source[/COLOR][/COLOR][/I][/B]
[B][I][COLOR="#000000"]Difficulty : [COLOR="#00FF00"]1/10[/COLOR][/COLOR][/I][/B]
[B][I][COLOR="#000000"]Knoledge : [COLOR="#00FF00"]N/A[/COLOR][/COLOR][/I][/B]
[B][I][COLOR="#000000"]Location : [COLOR="#00FF00"]org.Demethium.net.Actionmanager.java[/COLOR][/COLOR][/I][/B]

[B][COLOR="#000000"]In the end i will also let you add custom commands for these ranks.[/COLOR][/B]

[B][COLOR="#0000FF"]step one:[/COLOR][/B]

[B][SIZE=2][COLOR="#000000"]Go to Actionmanager.java. Search for:[/COLOR][/SIZE][/B]
[code]
public static void loginResponse(Player player) {
[/code]

[B][SIZE=2][COLOR="#000000"]Replace that with this, and all under it.[/COLOR][/SIZE][/B]
[code]
public static void loginResponse(Player player) { /* the staff under here, Right 2 = Admin, Right 1 = Moderator, Right 5 = Head Moderator, Hidden Admin Right = 3, */
/* Hidden Moderator right = 6 , Donator Right = 4 */
player.getAppearance().resetAppearence();
for (String admin : ADMINS)
if (player.getUsername().equalsIgnoreCase(admin))
player.getDefinition().setRights(2);
for (String mod : MODERATORS)
if (player.getUsername().equalsIgnoreCase(mod))
player.getDefinition().setRights(1);
for (String hmod : HEADMODERATORS)
if (player.getUsername().equalsIgnoreCase(hmod))
player.getDefinition().setRights(5);
for (String hadmin : HIDDENADMINS)
if (player.getUsername().equalsIgnoreCase(hadmin))
player.getDefinition().setRights(3);
for (String hhmod : HIDDENMODERATORS)
if (player.getUsername().equalsIgnoreCase(hhmod))
player.getDefinition().setRights(6);
for (String donor : DONATORS)
if (player.getUsername().equalsIgnoreCase(donor))
player.getDefinition().setRights(4);
[/code]

[B][SIZE=2][COLOR="#000000"]stop at:[/COLOR][/SIZE][/B]
[code]
//
MessageBuilder bldr = new MessageBuilder();
[/code]

[B][SIZE=2][COLOR="#000000"]In The Top look for:[/COLOR][/SIZE][/B]
[code]
public static void packet108(Player player, int i1, int i2) {
MessageBuilder bldr = new MessageBuilder(108);
bldr.writeByteA(i1);
bldr.writeByteS(i2);
player.write(bldr.toMessage());
}
[/code]

[B][SIZE=2][COLOR="#000000"]Put one space under the '}' and then add this under it:[/COLOR][/SIZE][/B]
[code]
public static final String[] ADMINS = { "Delano", "Mod Cain","Delano413","Mod Crown","Mod Ehno", "Mod Tank Da"};
/* Admin ranks here, easier to see. */
public static final String[] MODERATORS = { "", "", "", "", "", "", ""};
/* Mod ranks here, easier to see. */
public static final String[] HEADMODERATORS = { "", "", "", "", "", "", ""};
/* Head Moderators Here, Admin -Ban , Easier to see [BETA] */
public static final String[] HIDDENADMINS = { "", "", "", "", "", "", ""};
/* Hiden Administrators, All admin ranks - the Admin Crown [BETA] */
public static final String[] HIDDENMODERATORS = { "", "", "", "", "", "", ""};
/* Hiden Moderators, all mod ranks - the Mod Crown [BETA] */
public static final String[] DONATORS = { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""};
/* Donator Ranks [BETA] */
[/code]

[B][SIZE=2][COLOR="#000000"]Under that leave 1 space open[/COLOR][/SIZE][/B]

[COLOR="#0000FF"]Step 2:[/COLOR]

[B][SIZE=2][COLOR="#000000"]Go to Commands.java inside org.Dementhium.contect, and look for:[/COLOR][/SIZE][/B]
[code]
if (player.getRights() == 2) {
adminCommands(player, command);
}
[/code]

[B][SIZE=2][COLOR="#000000"]under that add this:[/COLOR][/SIZE][/B]
[code]
if (player.getRights() == 5) {
jagexmodCommands(player, command); /* Head Moderators Rank */
}
if (player.getRights() == 3) {
hiddenadminCommands(player, command);
}
if (player.getRights() == 6) {
hiddenmodsCommands(player, command);
}
if (player.getRights() == 4) {
donatorCommands(player, command);
}
[/code]

[B][SIZE=2][COLOR="#000000"]If there is a rank you aren't using, make a comment block out of it.
Now Search for:[/COLOR][/SIZE][/B]

[code]
public static void adminCommands(final Player player, String[] command) {
[/code]

[B][SIZE=2][COLOR="#000000"]Above that add:[/COLOR][/SIZE][/B]
[code]
public static void ######(final Player player, String[] command) {
}

}
[/code]

[B][SIZE=2][COLOR="#000000"]You replace the '######' with example;[/COLOR][/SIZE][/B]
[code]
jagexmodCommands
hiddenadminCommands
hiddenmodsCommands
donatorCommands
[/code]

[B][SIZE=2][COLOR="#000000"]Above the first '}' add the commands you want them to have.[/COLOR][/SIZE][/B]

[B][I][COLOR="#008000"]Hope i helped, Took me a little while so thanks is appriciated <3[/COLOR][/I][/B] Edited by Barky

Share this post


Link to post
Share on other sites
[B][I]wanted to make step 1 and step 2 spoilers but didnt got it to work :3[/I][/B]

Share this post


Link to post
Share on other sites
This makes me want to scream...

Share this post


Link to post
Share on other sites
[quote name='Lukedawesome']this makes me want to scream in hope's ear.[/QUOTE]

Oh my. Any reason why it's my ear? =o

Share this post


Link to post
Share on other sites
[quote name='Hope']Oh my. Any reason why it's my ear? =o[/QUOTE]

Want it in the mouth? Hope not. o.o

Share this post


Link to post
Share on other sites
[quote name='Lukedawesome']Want it in the mouth? Hope not. o.o[/QUOTE]

Offer still up?

Share this post


Link to post
Share on other sites
Sign in to follow this  

×