Adding custom login box's and buttons.
I was trying to find this out myself, I found it stupid that nobody had bothered making a tut, In the end I did it by messing around. Heres my method.
Note: This will only work with client which already have sprites (Added before.)
Difficulty: 1/10
Assumed knowlege: C&P, CTRL + F, compiling and saving
Firstly you must go into your client.java and search for:
Code:
public final void method51(int i)
Under there you should find some code similar to this:
Code:
public final void method51(int i)
{
aClass30_Sub2_Sub1_Sub2_966 = new Class30_Sub2_Sub1_Sub2(aClass44_1053, "titlebox", 0);
if(i <= 0)
aBoolean1231 = !aBoolean1231;
aClass30_Sub2_Sub1_Sub2_967 = new Class30_Sub2_Sub1_Sub2(aClass44_1053, "titlebutton", 0);
aClass30_Sub2_Sub1_Sub2Array1152 = new Class30_Sub2_Sub1_Sub2[12];
int j = 0;
try
{
j = Integer.parseInt(getParameter("fl_icon"));
}
Replace that code with this code:
Code:
public final void method51(int i)
{
aClass30_Sub2_Sub1_Sub2_966 = new Class30_Sub2_Sub1_Sub2(aClass44_1053, "titlebox", 0);
aClass30_Sub2_Sub1_Sub1_1291 = new Class30_Sub2_Sub1_Sub1(aClass44_1053, "titlebox", 0);
if(i <= 0)
aBoolean1231 = !aBoolean1231;
aClass30_Sub2_Sub1_Sub2_967 = new Class30_Sub2_Sub1_Sub2(aClass44_1053, "titlebutton", 0);
aClass30_Sub2_Sub1_Sub1_1292 = new Class30_Sub2_Sub1_Sub1(aClass44_1053, "titlebutton", 0);
aClass30_Sub2_Sub1_Sub2Array1152 = new Class30_Sub2_Sub1_Sub2[12];
int j = 0;
try
{
j = Integer.parseInt(getParameter("fl_icon"));
}
Then search for:
Code:
aClass30_Sub2_Sub1_Sub2_966.method361
Quote that out (//) and add this underneth:
Code:
aClass30_Sub2_Sub1_Sub1_1291.method348(0, 16083, 0);
Then search for:
Code:
private Class30_Sub2_Sub1_Sub1
Then add these:
Code:
private Class30_Sub2_Sub1_Sub1 aClass30_Sub2_Sub1_Sub1_1291;
private Class30_Sub2_Sub1_Sub1 aClass30_Sub2_Sub1_Sub1_1292;
Now scroll up to the top of your document and search for (What one of your login button says):
There you will see this code or similar:
Code:
aClass30_Sub2_Sub1_Sub4_1272.method382(0xffffff, l, anInt939, "@[email protected]", k1 + 5, true);
Above that code you will see:
Code:
aClass30_Sub2_Sub1_Sub1_967.method361
Change that code to this:
Code:
aClass30_Sub2_Sub1_Sub1_1292.method348
Now save and leave your client open (incase of error, CTRL + Z)
Open up Class30_Sub2_Sub1_Sub1.java
Then add these:
Code:
else if (s.startsWith("titlebox")){
try{
Image image = Toolkit.getDefaultToolkit().getImage("./sprites/loginbox.png");
anIntArray1439 = new int[anInt1440 * anInt1441];
PixelGrabber pixelgrabber = new PixelGrabber(image, 0, 0, anInt1440, anInt1441, anIntArray1439, 0, anInt1440);
pixelgrabber.grabPixels();
}catch (Exception exception){
System.out.println("could not load: "+s+" "+i+".jpg");
}
}
else if (s.equalsIgnoreCase("titlebutton"))
{
try
{
Image image = Toolkit.getDefaultToolkit().getImage("./Sprites/loginbutton.png");
anIntArray1439 = new int[anInt1440 * anInt1441];
PixelGrabber pixelgrabber = new PixelGrabber(image, 0, 0, anInt1440, anInt1441, anIntArray1439, 0, anInt1440);
pixelgrabber.grabPixels();
}
catch (Exception exception)
{
System.out.println(((Object) (exception)));
}
}
The sprites must be put in /Sprites/ folder and the button must be called loginbutton and saved in the png format and the box must be called loginbox also in the png format. (.png)
I have posted this on MSCP as the user YupolaScape, dont say 'leecher'.
This tutorial is uber C&P so I dont think I deserve credits.