Navigation

    CCBlueX Forum

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

    [JS]AutoUpdate (The most complicated way? xd)

    Scripts
    5
    11
    139
    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.
    • FaaatPotato
      FaaatPotato last edited by FaaatPotato

      Complicated AutoUpdate

      • check if update required
      • download update using raw (on enable rn)
      • thats it its just hella ugly in code

      AutoUpdate.js

      idk if its the best way to check if an update is needed but i used

      localeCompare()
      

      What should you do? Use Core to avoid ugly and long code like mine!

      suicidemouse33 FaaatPotato CzechHek 3 Replies Last reply Reply Quote 1
      • suicidemouse33
        suicidemouse33 @FaaatPotato last edited by

        @faaatpotato

        "Nutting in cats is illegal"

        Why

        FaaatPotato 1 Reply Last reply Reply Quote 0
        • FaaatPotato
          FaaatPotato @suicidemouse33 last edited by

          @suicidemouse33 idk its in every script i make

          suicidemouse33 1 Reply Last reply Reply Quote 0
          • suicidemouse33
            suicidemouse33 @FaaatPotato last edited by

            @faaatpotato why though

            FaaatPotato 1 Reply Last reply Reply Quote 0
            • FaaatPotato
              FaaatPotato @suicidemouse33 last edited by

              @suicidemouse33

              @faaatpotato said in [JS]AutoUpdate (The most complicated way? xd):

              idk its in every script i make

              suicidemouse33 1 Reply Last reply Reply Quote 0
              • suicidemouse33
                suicidemouse33 @FaaatPotato last edited by

                @faaatpotato i meant like why are you putting that in the script's description

                FaaatPotato 1 Reply Last reply Reply Quote 0
                • FaaatPotato
                  FaaatPotato @suicidemouse33 last edited by

                  @suicidemouse33 alt text

                  1 Reply Last reply Reply Quote 2
                  • FaaatPotato
                    FaaatPotato @FaaatPotato last edited by FaaatPotato

                    @faaatpotato

                    Update:

                    • Now added how to check for an version-change instead of an entire script-change
                    • its way easier to use now ig :axocool:
                    1 Reply Last reply Reply Quote 0
                    • CzechHek
                      CzechHek @FaaatPotato last edited by CzechHek

                      @faaatpotato

                      The simplest way

                      ///api_version=2
                      (script = registerScript({
                          name: "ScriptThatAutoUpdates",
                          authors: ["CzechHek"],
                          version: "1"
                      })).import("Core.lib");
                      
                      Core.updateURL = "raw script url"
                      //such as https://raw.githubusercontent.com/CzechHek/Core/master/Scripts/InventoryManager.js
                      //if a script is in Core's repo, it gets checked automatically without the need of updateURL property
                      //if updateURL == false ("" / false / NaN / ...) then autoupdating is disabled
                      
                      stolen nft 1 Reply Last reply Reply Quote 2
                      • A
                        Aftery last edited by

                        var a = getLocalData(scriptName).substring(94, 97);
                        var b = getOnlineData(rawLink).substring(94, 97);
                        

                        awesome

                        1 Reply Last reply Reply Quote 0
                        • stolen nft
                          stolen nft @CzechHek last edited by stolen nft

                          @czechhek Another reason why people are using Core.lib

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post