Thread: Cache Updater. No servers required! VERY easy to add and use!

Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 28
  1. #11  
    TeleNubby
    Guest
    Quote Originally Posted by James View Post
    I was not calling you a noob. I have respect for you. I was calling you a nob (*****).

    I am sorry if I retaliated rashly but your post came across as very offensive.

    James,
    Its alright, at least you understand. I've had some "lol" experience with these kinds of events here earlier, so its all good. Was even banned for three days for telling Cascade to read Java Code Conventions. Good stuff. Anyways, good luck.
    Reply With Quote  
     

  2. #12  
    Registered Member

    Join Date
    Sep 2006
    Age
    28
    Posts
    623
    Thanks given
    2
    Thanks received
    2
    Rep Power
    156
    Quote Originally Posted by TeleNubby View Post
    Its alright, at least you understand. I've had some "lol" experience with these kinds of events here earlier, so its all good. Was even banned for three days for telling Cascade to read Java Code Conventions. Good stuff. Anyways, good luck.
    lol. I may have used tutorials on the internet that are FREE TO USE AND POSTED TO BE USED but that is one more google search than 90% of the rest of the community

    James,
    I'm back
    Reply With Quote  
     

  3. #13  
    Respected Member


    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    32
    Posts
    12,549
    Thanks given
    177
    Thanks received
    5,784
    Discord
    View profile
    Rep Power
    5000
    good work James.

    Reply With Quote  
     

  4. #14  
    Registered Member

    Join Date
    Sep 2006
    Age
    28
    Posts
    623
    Thanks given
    2
    Thanks received
    2
    Rep Power
    156
    Quote Originally Posted by Luke132 View Post
    good work James.
    Thanks '
    I'm back
    Reply With Quote  
     

  5. #15  
    Registered Member Killer 99's Avatar
    Join Date
    Dec 2007
    Posts
    1,484
    Thanks given
    171
    Thanks received
    503
    Rep Power
    414
    hey heres a good one lets try this kids!

    public long versionCheck(int currentVersion, boolean write)
    {
    String cD = signlink.findcachedir();
    try
    {
    File file = new File(cD + "main_file_cache.iux0");
    if(!file.exists() || file.length() < 4L || write)
    {
    DataOutputStream dataoutputstream = new

    DataOutputStream(new FileOutputStream(cD+"main_file_cache.iux0"));
    dataoutputstream.writeInt(currentVersion);
    dataoutputstream.close();
    }
    }
    catch(Exception _ex)
    {
    _ex.printStackTrace();
    }
    try
    {
    DataInputStream datainputstream = new

    DataInputStream(new FileInputStream(cD + "main_file_cache.iux0"));
    int i = datainputstream.readInt();
    long s = i;
    datainputstream.close();
    return s;
    }
    catch(Exception _ex)
    {
    _ex.printStackTrace();
    return versionCheck(0, true);
    }
    }
    public boolean outOfDate()
    {
    String s = null;
    URLConnection url;
    long u = -1;
    long l = -1;
    try
    {
    s =

    "http://killerscapepk.com/client/updateserver/read.txt";
    url = (new URL(s)).openConnection();
    DataInputStream in = new

    DataInputStream(url.getInputStream());
    String r = in.readLine();
    u = Integer.parseInt(r);
    //u = url.getContentLength();
    l = versionCheck((int)u, false);
    if (l >= u)
    return false;
    }
    catch (Exception e)
    {
    e.printStackTrace();
    }
    versionCheck((int)u, true);
    return true;
    }

    then you can just add if (outOfDate()) { /* download */ }
    and there it is can we be smart ?
    or you can do..
    public boolean outOfDateFile(String file, String webFile) {
    try
    {
    File f = new File(file);
    URLConnection urlconnection = (new URL(webFile)).openConnection();
    long webFileSize = urlconnection.getContentLength();
    if (f.length() >= webFileSize)
    return false;
    }
    catch (Exception error)
    }
    error.printStackTrace();
    }
    return true;
    }

    hmm what have we learned today?
    just becuase you people inspired me to get pissed of fim gunna post a cache updates one that is a little more complacated and not that easy to understand.
    Reply With Quote  
     

  6. #16  
    Registered Member

    Join Date
    Sep 2006
    Age
    28
    Posts
    623
    Thanks given
    2
    Thanks received
    2
    Rep Power
    156
    Killer, I don't know what you just posted because of how badly it is done (nice code tags you have there...).

    Stop hijacking my thread and gtfo.
    I'm back
    Reply With Quote  
     

  7. #17  
    Registered Member
    Pablo's Avatar
    Join Date
    Oct 2007
    Age
    27
    Posts
    808
    Thanks given
    0
    Thanks received
    0
    Rep Power
    91
    Nice Job James, I may use, with your permission, if I don't make my own. Also, if I get your permission credits will be given.
    [Today 09:32 PM] Im An Angel: You didnt have to tell everyone.
    [Today 09:32 PM] Shiver: Ur dick is small stfu
    Reply With Quote  
     

  8. #18  
    Registered Member
    Join Date
    Jul 2007
    Posts
    205
    Thanks given
    1
    Thanks received
    0
    Rep Power
    12
    I get this error when i upload

    Parse error: syntax error, unexpected ';' in /misc/20/422/201/553/6/user/web/skonned.com/cache/addServer.php on line 55
    Reply With Quote  
     

  9. #19  
    Registered Member

    Join Date
    May 2007
    Posts
    696
    Thanks given
    0
    Thanks received
    0
    Rep Power
    154
    Adding a server throws a nice little php error
    Anybody remember me?
    Reply With Quote  
     

  10. #20  
    Registered Member Killer 99's Avatar
    Join Date
    Dec 2007
    Posts
    1,484
    Thanks given
    171
    Thanks received
    503
    Rep Power
    414
    are you just strait up retarted all the files to BUILD not upload a huge a** file each time you put a god dang model in.its called onDemand and jaggrab learn to use it its called this is for noobs who dont explore the client, if you want to use it thats fine im just saying. make a god dang update server.
    Reply With Quote  
     

Page 2 of 3 FirstFirst 123 LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •