flavius
March 21st, 2011, 05:00
In this tut, I am showing you how to have your own custom login messages for Admins and mods.
This is for a Noszscape base, so if you do not have Noszscape, edit the code a little bit or place them in the right section.
This tut is most defiantly for noobs.
Editing : ActionSender.java
Difficulty: 1/10
Here we go,
First open ActionSender.java In Your server name >src>RS2hd>net>ActionSender.java
Then search (ctrl+F)
Welcome
Under this something like this should be there, if not just search "if(player.banned)"
if(player.banned) {
player.getActionSender().sendLogout();
return;
}
Under that add
if (player.getRights() == 1) {
player.graphics(453);
player.forceChat("Im Back!, Yes i'm a mod.");
sendMessage("<shad=0066FF>Your a Mod, "+player.getUsername()+", Help the players!");
sendMessage("<shad=0066F6>Forums at ...");
sendMessage("<shad=0066F6>Vote at ....");
sendMessage("<shad=0066F6>Please do not ask for admin in any way, Thanks");
sendMessage("<shad=ff0000>Also, Do NOT give players ITEMS!");
}
if (player.getRights() == 2) {
player.forceChat("I'm Back!");
player.graphics(1978);
sendMessage("<shad=0066FF>Your an admin, "+player.getUsername()+", watch over the mods, and Help the players!");
dMessage("<shad=0066F6>Help out on the Fourms and server.");
sendMessage("<shad=0066F6>Please direct Mods on what they are suposed to do.");
sendMessage("<shad=0066F6>Forums at .....");
sendMessage("<shad=0066F6>Vote at ......");
sendMessage("<shad=0066F6>Offical site at...");
sendMessage("<shad=ff0000>Please do not Give items out. To spawn Items type ::item (item ID) (amount)");
}
Then under
if(player.starter == 0) {
player.animate(8525);
player.graphics(1515);
player.starter = 1;
sendMessage("<shad=0066FF>Click the scroll for your starter items!");
sendMessage("<shad=0066F6>Forums at ...");
sendMessage("<shad=0066F6>Vote at ....");
player.getInventory().addItem(550, 1);
Replace " } else {" with
} else if (player.getRights() == 0) {
This code is so both mod/admin and player messages don't show up for mods or admins.
Hope it was easy enough, This is my first tut BTW.
If you would like to do one for Donators and your player Rights are 4 for donators, Just add
Another
[code] if (player.getRights() == 1) {
player.graphics(453);
player.forceChat("Im Back!, Yes i'm a mod.");
sendMessage("<shad=0066FF>Your a Mod, "+player.getUsername()+", Help the players!");
sendMessage("<shad=0066F6>Forums at ...");
sendMessage("<shad=0066F6>Vote at ....");
sendMessage("<shad=0066F6>Please do not ask for admin in any way, Thanks");
sendMessage("<shad=ff0000>Also, Do NOT give players ITEMS!");
}
And change the 1 in "if(player.getRights() == 1) to 4 and edit what the message says. :P
Some sources like Nosz have
" if (player.donator == #) {" instead of "if (player.getRights() ==#) {"
For the Donator rank.
Thanks for reading =P.
This is for a Noszscape base, so if you do not have Noszscape, edit the code a little bit or place them in the right section.
This tut is most defiantly for noobs.
Editing : ActionSender.java
Difficulty: 1/10
Here we go,
First open ActionSender.java In Your server name >src>RS2hd>net>ActionSender.java
Then search (ctrl+F)
Welcome
Under this something like this should be there, if not just search "if(player.banned)"
if(player.banned) {
player.getActionSender().sendLogout();
return;
}
Under that add
if (player.getRights() == 1) {
player.graphics(453);
player.forceChat("Im Back!, Yes i'm a mod.");
sendMessage("<shad=0066FF>Your a Mod, "+player.getUsername()+", Help the players!");
sendMessage("<shad=0066F6>Forums at ...");
sendMessage("<shad=0066F6>Vote at ....");
sendMessage("<shad=0066F6>Please do not ask for admin in any way, Thanks");
sendMessage("<shad=ff0000>Also, Do NOT give players ITEMS!");
}
if (player.getRights() == 2) {
player.forceChat("I'm Back!");
player.graphics(1978);
sendMessage("<shad=0066FF>Your an admin, "+player.getUsername()+", watch over the mods, and Help the players!");
dMessage("<shad=0066F6>Help out on the Fourms and server.");
sendMessage("<shad=0066F6>Please direct Mods on what they are suposed to do.");
sendMessage("<shad=0066F6>Forums at .....");
sendMessage("<shad=0066F6>Vote at ......");
sendMessage("<shad=0066F6>Offical site at...");
sendMessage("<shad=ff0000>Please do not Give items out. To spawn Items type ::item (item ID) (amount)");
}
Then under
if(player.starter == 0) {
player.animate(8525);
player.graphics(1515);
player.starter = 1;
sendMessage("<shad=0066FF>Click the scroll for your starter items!");
sendMessage("<shad=0066F6>Forums at ...");
sendMessage("<shad=0066F6>Vote at ....");
player.getInventory().addItem(550, 1);
Replace " } else {" with
} else if (player.getRights() == 0) {
This code is so both mod/admin and player messages don't show up for mods or admins.
Hope it was easy enough, This is my first tut BTW.
If you would like to do one for Donators and your player Rights are 4 for donators, Just add
Another
[code] if (player.getRights() == 1) {
player.graphics(453);
player.forceChat("Im Back!, Yes i'm a mod.");
sendMessage("<shad=0066FF>Your a Mod, "+player.getUsername()+", Help the players!");
sendMessage("<shad=0066F6>Forums at ...");
sendMessage("<shad=0066F6>Vote at ....");
sendMessage("<shad=0066F6>Please do not ask for admin in any way, Thanks");
sendMessage("<shad=ff0000>Also, Do NOT give players ITEMS!");
}
And change the 1 in "if(player.getRights() == 1) to 4 and edit what the message says. :P
Some sources like Nosz have
" if (player.donator == #) {" instead of "if (player.getRights() ==#) {"
For the Donator rank.
Thanks for reading =P.