Purpose: To make your client have teh new login screen
Difficulty: 2/10
Assumed Knowledge: C & P, and the ability to add items to cache
Classes Modified: Client.java
Refactored/Non-Refactored?: Refactored

Step 1: Adding the sprites
Download these sprites, add them into the cache as so
http://uppit.com/uolfkln7tftu/login_screen.rarOpen Toms cache editor, and go to View/Edit Image Archives>Title
Replace the folowing:
titlebox > titlebox.png
titlebutton > 0 > login_button.png
Hit the plus sign, and look for login_button_hovered.png and add it
Hit the plus sign once again, and look for input.png and add it aswell
Hit the plus sign for the last time, and look for input_hovered.png and add it
Step 2: The code!
In client.java, find private void resetImageProducers() and replace it with this
private void resetImageProducers() {
if (aRSImageProducer_1107 != null)
return;
super.fullGameScreen = null;
aRSImageProducer_1166 = null;
aRSImageProducer_1164 = null;
aRSImageProducer_1163 = null;
aRSImageProducer_1165 = null;
aRSImageProducer_1123 = null;
aRSImageProducer_1124 = null;
aRSImageProducer_1125 = null;
aRSImageProducer_1110 = new RSImageProducer(128, 265,
getGameComponent());
DrawingArea.setAllPixelsToZero();
aRSImageProducer_1111 = new RSImageProducer(128, 265,
getGameComponent());
DrawingArea.setAllPixelsToZero();
aRSImageProducer_1107 = new RSImageProducer(509, 171,
getGameComponent());
DrawingArea.setAllPixelsToZero();
aRSImageProducer_1108 = new RSImageProducer(360, 132,
getGameComponent());
DrawingArea.setAllPixelsToZero();
aRSImageProducer_1109 = new RSImageProducer(412, 283,
getGameComponent());
DrawingArea.setAllPixelsToZero();
aRSImageProducer_1112 = new RSImageProducer(202, 238,
getGameComponent());
DrawingArea.setAllPixelsToZero();
aRSImageProducer_1113 = new RSImageProducer(203, 238,
getGameComponent());
DrawingArea.setAllPixelsToZero();
aRSImageProducer_1114 = new RSImageProducer(74, 94, getGameComponent());
DrawingArea.setAllPixelsToZero();
aRSImageProducer_1115 = new RSImageProducer(75, 94, getGameComponent());
DrawingArea.setAllPixelsToZero();
if (titleStreamLoader != null) {
drawLogo();
loadTitleScreen();
}
welcomeScreenRaised = true;
}Next, find nullloader() and add
aBackground_967 = null;
aBackground_968 = null;
aBackground_969 = null;
aBackground_970 = null;under aBackground_966 = null;
Next, find drawLoginScreen()
replace it with
private void drawLoginScreen(boolean flag) {
resetImageProducers();
aRSImageProducer_1109.initDrawingArea();
aBackground_966.method361(0, 0);
char c = '\u0168';
char c1 = '\310';
if (loginScreenState == 2) {
int j = c1 / 2 - 50;
if (loginMessage1.length() > 0) {
chatTextDrawingArea.method382(0xffff00, c / 2 + 50,
loginMessage1, j - 15, true);
chatTextDrawingArea.method382(0xffff00, c / 2 + 50,
loginMessage2, j, true);
j += 30;
} else {
int i1 = c / 2;
int l1 = c1 / 2 + 50;
if (loginHovered == 0)
aBackground_967.method361(i1 - 109, l1 + 12);
else if (loginHovered == 1)
aBackground_968.method361(i1 - 109, l1 + 12);
if (box1Hovered == 0)
aBackground_969.method361(i1 - 108, l1 - 82);
else if (box1Hovered == 1)
aBackground_970.method361(i1 - 108, l1 - 82);
if (box2Hovered == 0)
aBackground_969.method361(i1 - 108, l1 - 29);
else if (box2Hovered == 1)
aBackground_970.method361(i1 - 108, l1 - 29);
chatTextDrawingArea.method382(0xffff00, c / 2, loginMessage2,
j - 7, true);
j += 39;
chatTextDrawingArea
.method389(
false,
c / 2 - 100,
0xffffff,
""
+ myUsername
+ ((loginScreenCursorPos == 0)
& (loopCycle % 40 < 20) ? "@yel@|"
: ""), j);
j += 53;
chatTextDrawingArea
.method389(
true,
c / 2 - 100,
0xffffff,
""
+ TextClass
.passwordAsterisks(myPassword)
+ ((loginScreenCursorPos == 1)
& (loopCycle % 40 < 20) ? "@yel@|"
: ""), j);
j += 55;
}
}Okay, next find processLoginScreenInput() and replace it with this
private void processLoginScreenInput() {
if (loginScreenState == 0) {
loginMessage1 = "";
loginMessage2 = "Enter your username & password.";
loginScreenState = 2;
loginScreenCursorPos = 0;
} else {
if (loginScreenState == 2) {
int j = super.myHeight / 2 - 40;
j += 30;
j += 25;
if (super.clickMode3 == 1 && super.saveClickX >= 274
&& super.saveClickX <= 542 && super.saveClickY >= 242
&& super.saveClickY < 271)
loginScreenCursorPos = 0;
j += 15;
if (super.clickMode3 == 1 && super.saveClickX >= 274 && super.saveClickX <= 542
&& super.saveClickY >= 294 && super.mouseY <= 324)
loginScreenCursorPos = 1;
j += 15;
int i1 = super.myWidth / 2;
int k1 = super.myHeight / 2 + 50;
k1 += 20;
System.out.println("MouseX: " + super.saveClickX + " MouseY "
+ super.saveClickY);
if (super.mouseX >= 274 && super.mouseX <= 542
&& super.mouseY >= 242 && super.mouseY <= 271)
box1Hovered = 1;
else
box1Hovered = 0;
if (super.mouseX >= 274 && super.mouseX <= 542
&& super.mouseY >= 294 && super.mouseY <= 324)
box2Hovered = 1;
else
box2Hovered = 0;
if (super.mouseX >= 273 && super.mouseX <= 540
&& super.mouseY >= 335 && super.mouseY <= 373)
loginHovered = 1;
else
loginHovered = 0;
if (super.clickMode3 == 1 && super.saveClickX >= 273
&& super.saveClickX <= 540 && super.saveClickY >= 335
&& super.saveClickY <= 373) {
loginFailures = 0;
if (myUsername.length() > 0 && myPassword.length() > 0)
login(myUsername, myPassword, false);
else
loginScreenCursorPos = 0;
if (loggedIn)
return;
}
do {
int l1 = readChar(-796);
if (l1 == -1)
break;
boolean flag1 = false;
for (int i2 = 0; i2 < validUserPassChars.length(); i2++) {
if (l1 != validUserPassChars.charAt(i2))
continue;
flag1 = true;
break;
}
if (loginScreenCursorPos == 0) {
if (l1 == 8 && myUsername.length() > 0)
myUsername = myUsername.substring(0, myUsername
.length() - 1);
if (l1 == 9 || l1 == 10 || l1 == 13)
loginScreenCursorPos = 1;
if (flag1)
myUsername += (char) l1;
if (myUsername.length() > 12)
myUsername = myUsername.substring(0, 12);
} else if (loginScreenCursorPos == 1) {
if (l1 == 8 && myPassword.length() > 0)
myPassword = myPassword.substring(0, myPassword
.length() - 1);
if (l1 == 9 || l1 == 10 || l1 == 13)
if (myUsername.length() > 0
&& myPassword.length() > 0)
login(myUsername, myPassword, false);
else
loginScreenCursorPos = 0;
if (flag1)
myPassword += (char) l1;
if (myPassword.length() > 20)
myPassword = myPassword.substring(0, 20);
}
} while (true);
return;
}
if (loginScreenState == 3) {
int k = super.myWidth / 2;
int j1 = super.myHeight / 2 + 50;
j1 += 20;
if (super.clickMode3 == 1 && super.saveClickX >= k - 75
&& super.saveClickX <= k + 75
&& super.saveClickY >= j1 - 20
&& super.saveClickY <= j1 + 20)
loginScreenState = 0;
}
}
}Time to add the variables, add these at the bottom of client.java
public static int loginHovered;
public static int box1Hovered;
public static int box2Hovered;
private Background aBackground_967;
private Background aBackground_968;
private Background aBackground_969;
private Background aBackground_970;Enjoy
-Tampon Abuse|BrandonNOTE This does not include the click to change cursor pos Have fun!