CCBlueX Forum

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

    [REQUEST] anyone got a autogapple script for redesky

    Requests
    5
    5
    218
    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.
    • Vibe
      Vibe last edited by

      title....

      hahayes IndomsGods Rafay 3 Replies Last reply Reply Quote 1
      • hahayes
        hahayes @Vibe last edited by

        @vibe consider searching for it

        1 Reply Last reply Reply Quote 1
        • ?
          A Former User last edited by

          pov: you cant use the search feature

          1 Reply Last reply Reply Quote 1
          • IndomsGods
            IndomsGods @Vibe last edited by

            @vibe here:

            ///api_version=2
            //Copyright 2020 commandblock2 distributed under AGPL-3.0-or-later
            (script = registerScript({
                name: "AutoCum",
                version: "1.0",
                authors: ["LolMc","commandblock2"]
            })).import("Core.lib")
            
            
            Potion = Java.type('net.minecraft.potion.Potion')
            
            var originalIndex = -1
            var inventoryIndex = -1
            module =
            {
                name: "AutoCum",
                description: "Cum yellow thing to your mouth",
                category: "combat",
                values:
                    [
                        health = value.createFloat("Health", 10, 1, 20),
                        itemSwitchDelay = value.createInteger("SwitchDelayms", 100, 0, 1000)
                    ],
            
                onUpdate: function () {
                    if (mc.thePlayer.getHealth() <= health.get() && !mc.thePlayer.isPotionActive(Potion.regeneration)) {
                        gAppleIndex = InventoryUtils.findItem(36, 45, Items.golden_apple)
                        gAppleIndex = gAppleIndex == -1 ? InventoryUtils.findItem(9, 36, Items.golden_apple) : gAppleIndex
            
                        if (originalIndex == -1) { // wtffffff have to check null because if (originalIndex) doesn't work when it equas to 0
                            originalIndex = mc.thePlayer.inventory.currentItem
                        }
            
            
                        if (gAppleIndex >= 36 && gAppleIndex < 45) {
                            //switch to gapple
                            mc.thePlayer.inventory.currentItem = gAppleIndex - 36
            
                        } else if (gAppleIndex >= 9 && gAppleIndex < 36 && !(mc.currentScreen instanceof GuiInventory)) {
                            //switch gapple and 36 (first slot)
                            inventoryIndex = gAppleIndex
                            switchGapple(inventoryIndex)
                        } else return
            
                        mc.gameSettings.keyBindUseItem.pressed = true
            
                    }
                    else {
                        reset()
                    }
                }
            }
            function reset() {
                if (originalIndex != -1 || inventoryIndex != -1)
                    mc.gameSettings.keyBindUseItem.pressed = false
            
                if (originalIndex != -1 ) {
                    mc.thePlayer.inventory.currentItem = originalIndex;
                    originalIndex = -1
                }
            
                if (inventoryIndex != -1) {
                    switchGapple(inventoryIndex)
                    inventoryIndex = -1
                }
            
            }
            
            function switchGapple(index) {
                //open inventory (I don't care about when you are on horse, implement it yourself)
                mc.getNetHandler().addToSendQueue(new C16PacketClientStatus(C16PacketClientStatus.EnumState.OPEN_INVENTORY_ACHIEVEMENT));
                mc.displayGuiScreen(new GuiInventory(mc.thePlayer));
            
                timeout(itemSwitchDelay.get(), function () {
                    slot = mc.thePlayer.inventoryContainer.getSlot(index)
            
                    mc.playerController.windowClick(mc.currentScreen.inventorySlots.windowId, slot.slotNumber, 0, 2, mc.thePlayer)
                    mc.thePlayer.closeScreen()
                })
            }
            
            1 Reply Last reply Reply Quote 1
            • Rafay
              Rafay @Vibe last edited by Rafay

              @vibe https://forums.ccbluex.net/topic/19/autogapple-re-upload-legacy?_
              or...
              https://forums.ccbluex.net/topic/976/script-cool-autogapple-core?_

              also use the search feature
              the devs made it for people like you

              1 Reply Last reply Reply Quote 1
              • 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