Thread: To Vencillio users, that has problem with Cache.

Results 1 to 10 of 10
  1. #1 To Vencillio users, that has problem with Cache. 
    Registered Member
    Join Date
    Mar 2016
    Posts
    131
    Thanks given
    8
    Thanks received
    9
    Rep Power
    11
    If you're not able to find this leech, You shouldn't be thinking about running the server. So many has problem with this release, and it's just annoying to see so many posts about the cache. Let me help you out. To all players to who is using Vencillio please give credits to the rightfull owners. And to everyone who says that they havn't leeched it and got it from "draynor" Stop lieing to yourselves.

    How do i solve the problem with CacheDownloader?
    Client.Java
    Client.Java :: Line 7898 remove the "/"



    Is there a better way to Optimize the Cache Downloader? Use CacheUpdate
    Client.Java & UpdateCache.java
    1) Go in Client.Java at line 7898 add
    - "new UpdateCache(this).run();"

    2) Create an Class called "UpdateCache"
    - Make sure you edit the Cache Link, as this one is mine.

    Code:
    import java.net.URL;
    import java.net.URLConnection;
    import java.util.zip.*;
    import java.io.*;
    import javax.swing.JOptionPane;
    
    public class UpdateCache implements Runnable {
    
    	public static final String ZIP_URL = "http://destiny-rsps.org/client/cache/ProjectDestiny.zip";
    	public static final String VERSION_URL = "http://destiny-rsps.org/client/cache/version.txt";
    	public static final String VERSION_FILE = Signlink.findcachedir()+"cacheVersion.dat";
    	private Client client;
    	Client frame;
        public UpdateCache(Client client) { 
                    this.client = client;
        }
        
    		
        private void drawLoadingText(int amount, String text) {
                    client.drawLoadingText(amount, text);
        }
    	
    	public double getCurrentVersion(){
    		try {
    			BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(VERSION_FILE)));
    			return Double.parseDouble(br.readLine());
    		} catch (Exception e) {
    			return 0.1;
    		}
    	}
    	
    	public double getNewestVersion(){
    		try {
    			URL tmp = new URL(VERSION_URL);
    			BufferedReader br = new BufferedReader(new InputStreamReader(tmp.openStream()));
    			return Double.parseDouble(br.readLine());
    		} catch (Exception e) {
    			handleException(e);
    			return -1;
    		}
    	}
    	
    	private void handleException(Exception e){
    		StringBuilder strBuff = new StringBuilder();
    		strBuff.append("Please Screenshot this message, and send it to an admin!\r\n\r\n");
            StringBuilder append = strBuff.append(e.getClass().getName()).append(" \"").append(e.getMessage()).append("\"\r\n");
    		for(StackTraceElement s : e.getStackTrace())
    			strBuff.append(s.toString()).append("\r\n");
    		alert("Exception [" + e.getClass().getSimpleName() + "]",strBuff.toString(),true);
    	}
    	
    	private void alert(String msg){
    		alert("Message",msg,false);
    	}
    	
    	private void alert(String title,String msg,boolean error){
    		JOptionPane.showMessageDialog(null,
    			   msg,
    			   title,
    			    (error ? JOptionPane.ERROR_MESSAGE : JOptionPane.PLAIN_MESSAGE));
    	}
    	
    	@Override
    	public void run() {
    	drawLoadingText(0, "Checking Versions");
    		try{
    		double newest = getNewestVersion();
    		if(newest > this.getCurrentVersion()){
    			int n = JOptionPane.showConfirmDialog(
    				    null,
    				    "There is an update to version " + newest + "\n" +
    					"Would you like to update?",
    				    "Current version: "+ getCurrentVersion(),
    				    JOptionPane.YES_NO_OPTION);
    			if(n == 0){
    				updateClient();
    				drawLoadingText(0, "Cache has been updated, please restart the client!");
    				alert("Cache has been updated, please restart the client!");
    				OutputStream out = new FileOutputStream(VERSION_FILE);
    				out.write(String.valueOf(newest).getBytes());;
    				System.exit(0);
    			}else{
    				alert(" Your client may not load correct " +
    				getCurrentVersion());
    				//System.exit(0);
    			}
    		}
    		}catch(Exception e){
    			handleException(e);
    		}
    	}
    	
    	private void updateClient() {
    		File clientZip = downloadClient();
    		if(clientZip != null){
    		unZip(clientZip);
    		}
    	}
    	
    	private void unZip(File clientZip) {
    		try {
    			unZipFile(clientZip,new File(Signlink.findcachedir()));
    			clientZip.delete();
    		} catch (IOException e) {   
    			handleException(e);
    		}
    	}
    	
    	private void unZipFile(File zipFile,File outFile) throws IOException{
    		ZipInputStream zin = new ZipInputStream(new BufferedInputStream(new FileInputStream(zipFile)));
    		ZipEntry e;
    		long max = 0;
    		long curr = 0;
    		while((e = zin.getNextEntry()) != null)
    			max += e.getSize();
    		zin.close();
    		ZipInputStream in = new ZipInputStream(new BufferedInputStream(new FileInputStream(zipFile)));
    		while((e = in.getNextEntry()) != null){
    			if(e.isDirectory())
    				new File(outFile,e.getName()).mkdirs();
    			else{
    				FileOutputStream out = new FileOutputStream(new File(outFile,e.getName()));
    				byte[] b = new byte[1024];
    				int len;
    				while((len = in.read(b,0,b.length)) > -1){
    					curr += len;
    						out.write(b, 0, len);
    						setUnzipPercent((int)((curr * 100) / max));
    				}
    				out.flush();
    				out.close();
    			}
    		}
    	}
    
    	public int percent = 0;
    	
    	public void setDownloadPercent(int amount){
    	        percent = amount;
    			drawLoadingText(amount, "Downloading Cache" + " - " + amount + "%");
    	}
    	
    	public int percent2 = 0;
    	
    	public void setUnzipPercent(int amount2){
    	        percent2 = amount2;
    			drawLoadingText(amount2, "Extracting Cache" + " - " + amount2 + "%");
    	}
    
    	private File downloadClient(){
    		File ret = new File(Signlink.findcachedir()+"cache.zip");
    		try{
    		OutputStream out = new FileOutputStream(ret);
    		URLConnection conn = new URL(ZIP_URL).openConnection();
    		InputStream in = conn.getInputStream();
    		long max = conn.getContentLength();
    		long curr = 0;
    		byte[] b = new byte[1024];
    		int len;
    		while((len = in.read(b, 0, b.length)) > -1){
    			out.write(b,0,len);
    			curr += len;
    			setDownloadPercent((int)((curr * 100) / max));
    		}
    		out.flush();
    		out.close();
    		in.close();
    		return ret;
    		}catch(Exception e){
    			handleException(e);
    				ret.delete();
    			return null;
    		}
    	}
    }
    Tutorial for CacheUpdate -
    [Only registered and activated users can see links. ]

    Best Regards,
    Weeknd.
    Last edited by Weekndz; 04-28-2016 at 12:42 AM. Reason: POSTED IN WRONG SECTION!
    Reply With Quote  
     

  2. #2  
    Registered Member
    Vippy's Avatar
    Join Date
    Oct 2014
    Age
    22
    Posts
    2,561
    Thanks given
    963
    Thanks received
    1,674
    Discord
    View profile
    Rep Power
    5000
    I don't think anyone uses that source.....
    Reply With Quote  
     

  3. #3  
    Registered Member
    Faze's Avatar
    Join Date
    Oct 2014
    Posts
    574
    Thanks given
    54
    Thanks received
    539
    Rep Power
    5000
    Vippy I don't know what you're talking about bro. There's at least 6 servers up using it after like 4 days of being released.
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Mar 2016
    Posts
    131
    Thanks given
    8
    Thanks received
    9
    Rep Power
    11
    Quote Originally Posted by Vippy View Post
    I don't think anyone uses that source.....
    Quote Originally Posted by Fazeybaby View Post
    Vippy I don't know what you're talking about bro. There's at least 6 servers up using it after like 4 days of being released.
    There is a bunch who uses this source, Just check help Section and advertise section.
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Sep 2015
    Posts
    2,540
    Thanks given
    117
    Thanks received
    459
    Rep Power
    257
    Quote Originally Posted by Vippy View Post
    I don't think anyone uses that source.....
    Really? I've seen plenty already.

    Draynor, Dharoks, Mazcab v3, Billion RSPS, OS Soul, and Vencillio itself returning. That's just a few, there's plenty of people leeching it.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Vippy's Avatar
    Join Date
    Oct 2014
    Age
    22
    Posts
    2,561
    Thanks given
    963
    Thanks received
    1,674
    Discord
    View profile
    Rep Power
    5000
    Quote Originally Posted by hxze View Post
    Really? I've seen plenty already.

    Draynor, Dharoks, Mazcab v3, Billion RSPS, OS Soul, and Vencillio itself returning. That's just a few, there's plenty of people leeching it.


    Was being sarcastic because there's shit loads and more to come

    Quote Originally Posted by Fazeybaby View Post
    Vippy I don't know what you're talking about bro. There's at least 6 servers up using it after like 4 days of being released.
    Reply With Quote  
     

  7. #7  
    Best Rat Donor

    Australisch's Avatar
    Join Date
    Nov 2015
    Posts
    2,040
    Thanks given
    962
    Thanks received
    472
    Rep Power
    4799
    Lol nice.
    Rsn: vEetswa
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Jun 2016
    Posts
    163
    Thanks given
    9
    Thanks received
    10
    Rep Power
    15
    Hey! Thanks alot for this! but i get this! Any suggestions?



    Reply With Quote  
     

  9. #9  
    Member
    Join Date
    May 2010
    Posts
    10
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Thanks man this worked for me!!!
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Mar 2016
    Posts
    131
    Thanks given
    8
    Thanks received
    9
    Rep Power
    11
    Quote Originally Posted by John Clark View Post
    Thanks man this worked for me!!!
    Glad this helped you. ;-) Regarding your issue on PM i have replied.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Problems with CACHE
    By Mr Terror in forum Help
    Replies: 0
    Last Post: 12-30-2011, 07:48 PM
  2. Problem with Cache Downloading
    By Zaves in forum Help
    Replies: 0
    Last Post: 07-06-2011, 05:40 PM
  3. Problem with cache packing GZ files
    By joelivesup in forum Help
    Replies: 3
    Last Post: 06-25-2011, 01:09 AM
  4. Problem With Cache PI
    By etf80 in forum Help
    Replies: 1
    Last Post: 04-19-2011, 08:35 PM
  5. New problem with cache..
    By CommunityX in forum Help
    Replies: 3
    Last Post: 03-18-2011, 05:46 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •