CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Unsolved autoupdate

    Support
    5
    6
    183
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • some one
      some one last edited by

      How can I add autoupdate for script?

      A Phạm Phúc Hoàng 2 Replies Last reply Reply Quote 0
      • [deleted]
        [deleted] last edited by

        create a file somewhere with current version of script, buy a server, upload a file to server with latest version, use bufferedreader to read .txt file with latest version and compare them with located on pc, and if version on pc and on server is different - download update

        ? 1 Reply Last reply Reply Quote 0
        • ?
          A Former User @[deleted] last edited by

          @deleted said in autoupdate:

          create a file somewhere with current version of script, buy a server, upload a file to server with latest version, use bufferedreader to read .txt file with latest version and compare them with located on pc, and if version on pc and on server is different - download update

          why would you buy a server for a blockgame hax skript, github exists.

          1 Reply Last reply Reply Quote 0
          • A
            Aftery @some one last edited by

            @some-one runs script
            script downloads script
            script loads new script

            some one 1 Reply Last reply Reply Quote 0
            • Phạm Phúc Hoàng
              Phạm Phúc Hoàng @some one last edited by

              @some-one skid this :
              function _runUpdater() {
              try {
              ["Core", script.scriptName].forEach(function (n, i) {
              if (([coreAutoUpdate, scriptAutoUpdate][i] !== false) && (_log[n] === undefined)) {
              _updating = n; _log[n] = false;
              if ((_response = HttpUtils.get("https://dyskord.cc/check?name=" + n + "&ver=" + [coreVersion, script.scriptVersion][i])) && _response[0] != "{") {
              HttpUtils.download("https://raw.githubusercontent.com/CzechHek/Core/master/" + ["Core.lib", "Scripts/" + n + ".js"][i], [new File(LiquidBounce.fileManager.dir, "scripts/Core.lib"), script.getScriptFile()][i]);
              showMessage("Automatically updated " + n + " " + [coreVersion, script.scriptVersion][i] + " to " + _response, "Core Updater");
              _isLatest = false; _log[n] = true;
              }
              } else _log[n] = _log[n] || false;
              });
              } catch (e) {
              print("Couldn't check", _updating, "for updates!", e);
              _log[_updating] = e.getMessage();
              if (_log[script.scriptName] === undefined) _runUpdater();
              };

              }

              1 Reply Last reply Reply Quote 0
              • some one
                some one @Aftery last edited by

                @aftery thank you very much

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                About
                • Terms of Service
                • Privacy Policy
                • Status
                • Contact Us
                Downloads
                • Releases
                • Source code
                • License
                Docs
                • Tutorials
                • CustomHUD
                • AutoSettings
                • ScriptAPI
                Community
                • Forum
                • Guilded
                • YouTube
                • Twitter
                • D.Tube