Purpose: Want people to rate your server without having to post? Help is here!
Difficulty: However hard YOU make it for YOURSELF.
Assumed Knowledge: Basic server CODING
Server Base: Any.
Classes Modified: client.java, serverratingyes.java, serverratingno.java
Procedure
Step 1: First, search for
Code:
public void appendToBanned
in your client.
Step 2: When you find that void, press enter after the last } - there's a lot - and paste this
Code:
public void serverRatingYes (String player) {
BufferedWriter bw = null;
try {
bw = new BufferedWriter(new FileWriter("serverratingyes.txt", true));
bw.write(player);
bw.newLine();
bw.flush();
} catch (IOException ioe) {
ioe.printStackTrace();
} finally {
if (bw != null) try {
bw.close();
} catch (IOException ioe2) {
sendMessage("Error logging rating - good!");
}
}
}
public void serverRatingNo (String player) {
BufferedWriter bw = null;
try {
bw = new BufferedWriter(new FileWriter("serverratingno.txt", true));
bw.write(player);
bw.newLine();
bw.flush();
} catch (IOException ioe) {
ioe.printStackTrace();
} finally {
if (bw != null) try {
bw.close();
} catch (IOException ioe2) {
sendMessage("Error logging rating - bad!");
}
}
}
Step 3: Search for
and you'll see
Code:
case 169: //train tele
if(emotes == 0)
{
teleportToX = 2813;
teleportToY = 3681;
}
else
{
emotes = 0;
pEmote = playerSE;
updateRequired = true; appearanceUpdateRequired = true;
}
break;
or something like it - press enter twice after the break and paste this
Code:
case 150: //server rating - yes - by Newb 2341
if(emotes == 0)
{
serverRatingYes(playerName);
}
break;
case 151: //server rating - no - by Newb 2341
if(emotes == 0)
{
serverRatingNo(playerName);
}
break;
Step 4: Search for
Code:
handler.updatePlayer(this, outStream);
handler.updateNPC(this, outStream);
resetItems(3214);
resetBank();
and you'll see some frames - press enter after the end of one and past these
Step 5: Now make these two text documents in your server file
one named: serverratingyes
one named: serverratingno
Step 6: Open the serverratingyes file and paste this in it
Code:
Likes The Server
~~~~~~~~~~~~~~~~
Step 7: Open the other file, serverratingno, and paste this in
Code:
Doesn't Like The Server
~~~~~~~~~~~~~~~~~~~~~~~
Step 8: Save, compile and run! Yay!
RUNDOWN
[i]Players open the emote tab (running guy) and see two tabs - one Good and one Bad. They click one once and it records the response - their name - in the file they chose, good or bad.
Credits: Newb 2341