Kingdomkey01
September 1st, 2011, 09:43
I was just screwing around with the return codes I found on the RSWiki, so I decided to post this piece of code that shouldn't even be classified as a snippet :p
Base tested on: Delta, any 317 should work (not sure if return codes are diff on higher protocols)
Add this variable in your Settings/Config;
public static boolean membersWorld = true;
Then add this where it the rest of the return codes are;
if (Settings.membersWorld) {
if (donator != 1) {
returnCode = 12;
disconnected = true;
return;
}
}
So now anybody who isn't a donator will be rejected upon login.
You can change the methods according to your base.
Base tested on: Delta, any 317 should work (not sure if return codes are diff on higher protocols)
Add this variable in your Settings/Config;
public static boolean membersWorld = true;
Then add this where it the rest of the return codes are;
if (Settings.membersWorld) {
if (donator != 1) {
returnCode = 12;
disconnected = true;
return;
}
}
So now anybody who isn't a donator will be rejected upon login.
You can change the methods according to your base.