What are we doing?
Step 1-4: Making Cache AutoDownload.
Step 5: Changing Path's
Step 6: Making Cache/Uploading
Step 7: Jarring & Signing
Step 8: Html Code
Step 9: (Bluur only) Make ip Load in Client.java
Step 10: Error connecting to server fix
Step 1:
Open up Client.java.
Declear this!
Code:
import java.util.zip.CRC32;
import java.awt.Dimension;
import java.net.URL;
import java.net.URLConnection;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
Step 2:
(still in client.java)
Search for:
And replace the whole method with
Code:
private Class44 method67(int i, String s, String s1, int j, byte byte0, int k)
{
byte abyte0[] = null;
int l = 5;
try
{
if(aClass14Array970[0] != null)
{
abyte0 = aClass14Array970[0].method233(true, i);
}
if(abyte0 == null)
{
method13(15, (byte)4, "Downloading Cache");
downloadcache("http://YOURWEBSITE.com/cache.zip", "cache.zip", "", "cache");
}
if(aClass14Array970[0] != null)
{
abyte0 = aClass14Array970[0].method233(true, i);
}
}
catch(Exception exception) { }
if(abyte0 != null);
if(abyte0 != null)
{
Class44 class44 = new Class44(44820, abyte0);
return class44;
}
int i1 = 0;
do
{
if(abyte0 != null)
{
break;
}
String s2 = "Unknown error";
method13(k, (byte)4, "Client updated - please reload client");
//method13(k, (byte)4, (new StringBuilder()).append("Requesting ").append(s).toString());
Object obj = null;
try
{
int j1 = 0;
DataInputStream datainputstream = method132((new StringBuilder()).append(s1).append(j).toString());
byte abyte1[] = new byte[6];
datainputstream.readFully(abyte1, 0, 6);
Class30_Sub2_Sub2 class30_sub2_sub2 = new Class30_Sub2_Sub2(abyte1, 891);
class30_sub2_sub2.anInt1406 = 3;
int l1 = class30_sub2_sub2.method412() + 6;
int i2 = 6;
abyte0 = new byte[l1];
for(int j2 = 0; j2 < 6; j2++)
{
abyte0[j2] = abyte1[j2];
}
while(i2 < l1)
{
int k2 = l1 - i2;
if(k2 > 1000)
{
k2 = 1000;
}
int l2 = datainputstream.read(abyte0, i2, k2);
if(l2 < 0)
{
s2 = (new StringBuilder()).append("Length error: ").append(i2).append("/").append(l1).toString();
throw new IOException("EOF");
}
i2 += l2;
int i3 = (i2 * 100) / l1;
if(i3 != j1)
{
method13(k, (byte)4, (new StringBuilder()).append("Loading ").append(s).append(" - ").append(i3).append("%").toString());
}
j1 = i3;
}
datainputstream.close();
try
{
if(aClass14Array970[0] != null)
{
aClass14Array970[0].method234(abyte0.length, abyte0, (byte)2, i);
}
}
catch(Exception exception3)
{
aClass14Array970[0] = null;
}
}
catch(IOException ioexception)
{
if(s2.equals("Unknown error"))
{
s2 = "Connection error";
}
abyte0 = null;
}
catch(NullPointerException nullpointerexception)
{
s2 = "Null error";
abyte0 = null;
if(!signlink.reporterror)
{
return null;
}
}
catch(ArrayIndexOutOfBoundsException arrayindexoutofboundsexception)
{
s2 = "Bounds error";
abyte0 = null;
if(!signlink.reporterror)
{
return null;
}
}
catch(Exception exception1)
{
s2 = "Unexpected error";
abyte0 = null;
if(!signlink.reporterror)
{
return null;
}
}
if(abyte0 == null)
{
for(int k1 = l; k1 > 0; k1--)
{
if(i1 >= 3)
{
method13(k, (byte)4, "Game updated - please reload page");
k1 = 10;
} else
{
method13(k, (byte)4, (new StringBuilder()).append(s2).append(" - Retrying in ").append(k1).toString());
}
try
{
Thread.sleep(1000L);
}
catch(Exception exception2) { }
}
l *= 2;
if(l > 60)
{
l = 60;
}
aBoolean872 = !aBoolean872;
}
} while(true);
Class44 class44_1 = new Class44(44820, abyte0);
if(byte0 != -41)
{
throw new NullPointerException();
} else
{
return class44_1;
}
}
Replace: http://YOURWEBSITE.com/cache.zip
with the link of your cache!
step 3:
(Still in Client.java)
Above the code you just added,
Add this
Code:
/*
Non-Renamed
*/
public String name;
public String dir;
public void downloadcache(String url, String name1, String dir1, String type)
{
dir = dir1;
name = name1;
try
{
URLConnection connection = (new URL(url)).openConnection();
String f[] = url.split("/");
File file = new File(f[f.length - 1]);
int length = connection.getContentLength();
InputStream instream = connection.getInputStream();
try{new File(signlink.findcachedir()+dir).mkdir();}catch(Exception e){}
FileOutputStream outstream = new FileOutputStream(signlink.findcachedir()+dir+file);
int size = 0;
int copy;
byte[] buffer = new byte[4096];
while((copy = instream.read(buffer)) != -1)
{
outstream.write(buffer, 0, copy);
size+= copy;
int percentage = (int)(((double)size / (double)length) * 100D);
method13(percentage, (byte)4, "Downloading Cache - "+percentage+"%");
}
if(length != size)
{
instream.close();
outstream.close();
} else
{
method13(5, (byte)4, "Unpacking files...");
instream.close();
outstream.close();
unZipFile();
deleteFile();
method13(10, (byte)4, "Unpacking was complete");
}
}
catch(Exception e)
{
System.err.println("Error connecting to server.");
e.printStackTrace();
}
}
public void writeStream(InputStream In, OutputStream Out) throws IOException
{
byte Buffer[] = new byte[4096];
int Len;
while((Len = In.read(Buffer)) >= 0)
{
Out.write(Buffer, 0, Len);
}
In.close();
Out.close();
}
public void unZipFile()
{
try
{
ZipFile ZipFile = new ZipFile(signlink.findcachedir()+dir+name);
for(Enumeration Entries = ZipFile.entries(); Entries.hasMoreElements();)
{
ZipEntry Entry = (ZipEntry)Entries.nextElement();
if(Entry.isDirectory())
{
(new File(signlink.findcachedir()+dir+Entry.getName())).mkdir();
} else
{
writeStream(ZipFile.getInputStream(Entry), new BufferedOutputStream(new FileOutputStream(signlink.findcachedir()+dir+Entry.getName())));
}
}
ZipFile.close();
}
catch(Exception e)
{
e.printStackTrace();
}
}
public void deleteFile()
{
try
{
File file = new File(signlink.findcachedir()+dir+name);
file.delete();
}
catch(Exception e)
{
e.printStackTrace();
}
}
Save & Close client.java
Step 4:
In a folder named sign u should see the file: signlink.java
Open it and search for
Code:
public static final String findcachedir()
Replace the whole code with this one
Code:
public static final String findcachedir()
{
String s;
String s1;
File file;
s = "C:/.YOURSERVERNAME_file_store_32/";
s1 = "";
file = new File((new StringBuilder()).append(s1).append(s).toString());
if(file.exists() || file.mkdir())
{
return (new StringBuilder()).append(s1).append(s).append("/").toString();
}
return null;
}
Replace YOURSERVERNAME with the name of your server.
Save & Close signlink.java
Step 5:
Open Class30_Sub2_Sub1_Sub1.java
And Press control h(REPLACE OPTION)
Replace:
With:
Code:
C:/.YOURSERVERNAME_file_store_32/Sprites/
Replace:
With:
Code:
C:/.YOURSERVERNAME_file_store_32/
Replace:
With:
Code:
C:/.YOURSERVERNAME_file_store_32/Files
Don't forget to change YOURSERVERNAME to the name of your server
Step 6: (MAKING VIDEO SOON)
Move the file named cache
to your desktop
Put sprites, files,
cursors, user, interface
, interfaces,...
(Keep sign)
in it.
U might not have all of these but be sure to put the ones u have
in the cache folder!
open the folder cache and zip all the files in it (NOT THE FOLDER ITSELF)
only the files in it!!!!!!
Name it: cache.zip
and upload it to:
dropbox (Must make an account) FAST
Fileden (Must make an account) SLOW
Step 7:
Jarring & Signing!
Video:
VIDEO
Step 8:
The Html:
Open notepad and Copy & Paste this
Code:
<html>
<head>
<title>YOURSERVERNAME!</title>
<meta content="Evrsoft First Page" name="GENERATOR">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<link href="style.css" type="text/css" rel="stylesheet">
<style type="text/css">
A {
FONT-WEIGHT: bold; COLOR: #c0c0c0; TEXT-DECORATION: none
}
A:link {
FONT-WEIGHT: bold; COLOR: #c0c0c0; TEXT-DECORATION: none
}
A:visited {
FONT-WEIGHT: bold; COLOR: #c0c0c0; TEXT-DECORATION: none
}
A:active {
FONT-WEIGHT: bold; COLOR: #358391; TEXT-DECORATION: none
}
A:hover {
FONT-WEIGHT: bold; COLOR: #358391; TEXT-DECORATION: none
}
BODY {
FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #ffffff; FONT-FAMILY: verdana
}
TD {
FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #ffffff; FONT-FAMILY: verdana
}
TR {
FONT-WEIGHT: normal; FONT-SIZE: 11px; COLOR: #ffffff; FONT-FAMILY: verdana
}
</style>
<script language="JavaScript" src="java/javascript.js" type="text/JavaScript">
</script>
<script language="JavaScript" src="java/base.js" type="text/javascript">
</script>
<script language="JavaScript" src="java/tabel.js" type="text/javascript">
</script>
<link title="SHORTCUT ICON" href="http://www.veebimaja.net/vm01.png" type="picture" rel="SHORTCUT ICON">
</head>
<body bgcolor="#202020" leftmargin="0" background="img/bg.gif" topmargin="0">
<center>
<table height="100%" cellspacing="0" cellpadding="0" width="776" bgcolor="#202020" border="0">
<tbody>
<tr>
<td width="3" bgcolor="#FFFFFF"></td>
<td valign="top" width="770">
<table cellspacing="0" cellpadding="0" width="770" bgcolor="#202020" border="0">
<tbody>
<tr>
<td valign="center" align="left" height="32">SERVERNAME ©Copright 2010, Made by YOURNAME</a> </td>
</tr>
<tr>
<td valign="center" align="center" background="img/headerback.jpg" height="132"><img height="1" src="img/pixel.gif" width="15" border="0"><font size="5">!!!YOURSERVERNAME!!! Server</font><br>
<img height="1" src="img/pixel.gif" width="15" border="0">The Revolution Rsps.</td>
</tr>
<tr>
<td height="10"></td>
</tr>
<tr>
<td valign="center" align="center" background="" height="32"><img height="1" src="" width="15" border="0"><a href="#"></a> <a href="#">WebClient</a> </tr>
</tbody>
</table>
<applet name="client.jar" width="765" height="503" archive="client.jar" code="client.class">
<param name="java_arguments" value="-Xmx320m">
</applet>
</td>
<td width="3" bgcolor="#FFFFFF"></td>
</tr>
</tbody>
</table>
</center>
<div style="MARGIN-TOP: 1em; FONT-SIZE: 0.8em; MARGIN-BOTTOM: 1em; TEXT-ALIGN: center">Made by YOURNAME</div>
</body>
</html>
Save: ANYNAME.html
Bluur ONLY:
open up client.java and search for:
Replace the whole void with:
Code:
public final void init() // settings
{
try
{
anInt957 = 10; //high detial //1?
anInt958 = 0;
// method52(false); //false
aBoolean959 = true;
signlink.storeid = 32; //not really needed for us
signlink.startpriv(InetAddress.getLocalHost());
setserver("SERVERIP", "PORT");
method2(503, false, 765); //sets gameframe size
}
catch(Exception exception)
{
return;
}
}
Replace SERVERIP & PORT with the ip / port from your server.
Now search for:
And replace the Whole void with:
Code:
public static void main(String args[])
{
try
{
}
catch(Exception exception)
{
return;
}
finally{
anInt957 = 10;
anInt958 = 0;
aBoolean959 = true;
try {
signlink.startpriv(InetAddress.getLocalHost());
}
catch(UnknownHostException uhe) {
return;
}
client client1 = new client();
client1.method1(503, false, 765);
setserver("SERVERIP", "PORT");
return;
}
}
now add this void(UNDER void main):
Code:
public static void setserver(String s, String p)
{
server = s;
port = p;
}
If you don't add this your webclient won't connect to your server.
Step 10:
if you still can't connect to your server;
Search in client.java
And replace that Whole method19 with this one:
Code:
public final Socket method19(int i)
throws IOException
{
if(signlink.mainapp != null)
return signlink.opensocket(i);
else
return new Socket(InetAddress.getByName("enkrona.servegame.com"), i);
}
Next search for (still in client.java
Code:
public final void method84
just before the last "}" add if you dont have it allready
Code:
aClass24_1168 = new Class24(this, -978, method19(43594 + anInt958));
Proof:
Downloading Cache:
Cache:
unpacking Cache:
complete Loaded:
___________________________
Click on the Image ore HERE to go to my page for webclients.