CCBlueX Forum

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

    Removal of ScriptAPI v1 support in upcoming b83

    Scripts
    5
    9
    251
    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.
    • kawaiinekololis
      kawaiinekololis Admin last edited by kawaiinekololis

      Hello everyone.

      It's been over 3 years since we introduced ScriptAPI v2 and with the many changes that have been made to LiquidBounce in the last few months, we have decided to remove support for ScriptAPI v1 to ensure that no issues arise.

      An example of such an issue can be seen here:
      https://forums.ccbluex.net/topic/7671/why-i-can-t-use-commandmanager-or-modulemanager-in-my-script

      Please update your scripts to ScriptAPI v2 to ensure they will work on future versions.
      See https://liquidbounce.net/docs/ScriptAPI/Getting for more information.

      1 Reply Last reply Reply Quote 2
      • Pinned by  kawaiinekololis kawaiinekololis 
      • Tabio
        Tabio last edited by

        ngl that stinks

        kawaiinekololis 1 Reply Last reply Reply Quote 0
        • kawaiinekololis
          kawaiinekololis Admin @Tabio last edited by kawaiinekololis

          @Tabio stinks that people can't manage to use the more modern ScriptAPI v2 after more than 3 years, knowing that v1 is deprecated.

          /// api_version=2
          var script = registerScript({
              name: "MyScript",
              version: "1.0.0",
              authors: ["My Name"]
          });
          
          script.registerModule({
              name: "MyModule",
              category: "Misc", 
              description: "An example module created with LiquidBounce's script API."
          }, function (module) {
              module.on("enable", function() {
                  Chat.print("Module enabled");
              });
          });
          

          Looks pretty straightforward to me : )

          1 Reply Last reply Reply Quote 0
          • guosic
            guosic last edited by

            The latest build is unable to recognize this script (https://liquidbounce.net/scripts/view?id=5f39449a2c282226492d6531). Can you take a look?

            kawaiinekololis 1 Reply Last reply Reply Quote 0
            • kawaiinekololis
              kawaiinekololis Admin @guosic last edited by kawaiinekololis

              @guosic This is the problem that prevents the macro script from loading in newer versions.

              2ba820e3-0ab4-4ada-8576-8e358bae63f2-image.png

              Instead of accessing the commandManager using the predefined variable, it tries to access it using a static variable (which no longer exists) directly from the LiquidBounce class.

              f2f4e657-c173-4819-8981-aa533431f0c7-image.png

              I will update the script on the Scripts page as soon as possible, but I am currently working on the new Marketplace / User Resources page, so it will be replaced very soon anyway.

              706314d9-d4fd-46cc-8693-942902fca441-image.png

              Download: Macros-2.0.1.js

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

                @kawaiinekololis
                Well in that case, it should also be mentioned that removal of @JvmStatic and kotlin ports have made some utils in old scripts broken and hard to work with when you don't know how kotlin getters and setters work. Perhaps scriptapi should have its own util references to avoid this?

                kawaiinekololis 1 Reply Last reply Reply Quote 0
                • kawaiinekololis
                  kawaiinekololis Admin @CzechHek last edited by

                  @CzechHek Yes that would make sense, making it possible to access certain important utility functions in a standardised matter that we are not going to change to support scripts as long as possible.

                  1 Reply Last reply Reply Quote 0
                  • ybyyby_ awa
                    ybyyby_ awa last edited by

                    So how can an old script maintainer like me better maintain it
                    Can you update the document to provide more detailed explanations of changes and more examples

                    ybyyby_ awa 1 Reply Last reply Reply Quote 0
                    • ybyyby_ awa
                      ybyyby_ awa @ybyyby_ awa last edited by

                      @ybyyby_-awa So I can maintain the old version as the new one

                      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