AutoGapple

Avatar

By NoobPlayer3000 9 October 2019 16:07

Member · 2 comments


hello good morning or good night big_smile

Someone knows how to get apples in hand automatically?

Avatar

By Florasang 9 October 2019 16:49

Member · 107 comments
NoobPlayer3000 wrote


hello good morning or good night big_smile

Someone knows how to get apples in hand automatically?

There isn‘t a modulle yet, you need a script for that.


I'm a ironic, that's who I am!

Avatar

By Sms_Gamer_3808 9 October 2019 23:06

Member · 654 comments

You mean AutoEat or AutoGapple (golden apple)? AutoEat I think is already a thing. AutoGapple is fairly ez to make.


I don't exist

Avatar

By soulplexis 9 October 2019 23:30

Donator · 577 comments
Sms_Gamer_3808 wrote

You mean AutoEat or AutoGapple (golden apple)? AutoEat I think is already a thing. AutoGapple is fairly ez to make.

its actually not a thing in liquidbounce, i wish it was sad


【ソルプレクサス】

Avatar

By yorik100 10 October 2019 05:37

Member · 356 comments

If at certain health level get actual slot, search a gapple in your hotbar, switch selected slot to that slot, find a way to detect if player has eaten gapple, set a slider for min delay before next gapple, switch back to old slot (when eating a gapple it should set to the gapple slot every ticks to avoid ppl from manually switching)
Note that you can't use normal methods to detect if the player is eating, it MUST be compatible with instant fastuse

Avatar

By NoobPlayer3000 10 October 2019 07:01

Member · 2 comments
Florasang wrote
NoobPlayer3000 wrote


hello good morning or good night big_smile

Someone knows how to get apples in hand automatically?

There isn‘t a modulle yet, you need a script for that.

someone helps me create an autogapple with ScriptAPI

I saw this


var scriptName = "AutoGapple";
var scriptAuthor = "By Virus";
var scriptVersion = 1.0;

var ItemAppleGold = Java.type('net.minecraft.item.ItemAppleGold');

function ExampleModule() {
    this.getName = function() {
        return "AutoGapple";
    }
    this.getDescription = function() {
        return ".";
    }
    this.getCategory = function() {
        return "Combat"; 
    }
    this.onEnable = function() {
       
    }
    this.onDisable = function() {
        
    }
    this.onUpdate = function() {
    	if (mc.thePlayer.getHeldItem().getItem() instanceof ItemAppleGold) {
    		if(mc.thePlayer.getHealth() <= 9) {
    			mc.gameSettings.keyBindUseItem.pressed = true;
    		}else{
    			mc.gameSettings.keyBindUseItem.pressed = false;

    		}

    	}
      
    }
}
var exampleModule = new ExampleModule();
var exampleModuleClient;

function onLoad() {}

function onEnable() {
    exampleModuleClient = moduleManager.registerModule(exampleModule);
}

function onDisable() {
    moduleManager.unregisterModule(exampleModuleClient);
}

Last edited by NoobPlayer3000 (10 October 2019 08:24)

Avatar

By yorik100 10 October 2019 13:27

Member · 356 comments
NoobPlayer3000 wrote
Florasang wrote
NoobPlayer3000 wrote


hello good morning or good night big_smile

Someone knows how to get apples in hand automatically?

There isn‘t a modulle yet, you need a script for that.

someone helps me create an autogapple with ScriptAPI

I saw this


var scriptName = "AutoGapple";
var scriptAuthor = "By Virus";
var scriptVersion = 1.0;

var ItemAppleGold = Java.type('net.minecraft.item.ItemAppleGold');

function ExampleModule() {
    this.getName = function() {
        return "AutoGapple";
    }
    this.getDescription = function() {
        return ".";
    }
    this.getCategory = function() {
        return "Combat"; 
    }
    this.onEnable = function() {
       
    }
    this.onDisable = function() {
        
    }
    this.onUpdate = function() {
    	if (mc.thePlayer.getHeldItem().getItem() instanceof ItemAppleGold) {
    		if(mc.thePlayer.getHealth() <= 9) {
    			mc.gameSettings.keyBindUseItem.pressed = true;
    		}else{
    			mc.gameSettings.keyBindUseItem.pressed = false;

    		}

    	}
      
    }
}
var exampleModule = new ExampleModule();
var exampleModuleClient;

function onLoad() {}

function onEnable() {
    exampleModuleClient = moduleManager.registerModule(exampleModule);
}

function onDisable() {
    moduleManager.unregisterModule(exampleModuleClient);
}

This is so wrong
1. Doesn't take the gapple in hand automatically
2. Will eat them in a row which is a terrible thing to do
3. You can't use a gapple manually with it activated

Last edited by yorik100 (10 October 2019 15:23)

Avatar

By soulplexis 10 October 2019 21:07

Donator · 577 comments

use mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem()); then you can use right-click even when it isnt going


【ソルプレクサス】

Avatar

By soulplexis 10 October 2019 21:29

Donator · 577 comments

here, I tried. it doesn't work but it might be able to be fixed to work:

var scriptName = "AutoGapple";
var scriptAuthor = "soulplexis / virus";
var scriptVersion = 1.1;

var ItemAppleGold = Java.type('net.minecraft.item.ItemAppleGold');

function ExampleModule() {
	var Delay = value.createInteger("Delay", 100, 0, 1000);
    this.getName = function() {
        return "AutoGapple";
    }
    this.getDescription = function() {
        return "Automatically consumes a golden apple when health is low.";
    }
    this.getCategory = function() {
        return "Combat"; 
    }
    this.onEnable = function() {
		var i = 0;
		mc.playerController.sendSlotPacket(mc.thePlayer.getHeldItem(), 2);
		var original = mc.thePlayer.getHeldItem().getSlot();
    }
    this.onDisable = function() {
        
    }
    this.onUpdate = function() {
		i++;
    	if(mc.thePlayer.getHealth() <= 9) {
		for(var x = 0; x <= 8; x++) {
		var slot = mc.thePlayer.inventoryContainer.getSlot(x);
	    }
		if(slot.getItem() instanceof ItemAppleGold && i >= Delay.get()) {
			mc.playerController.sendSlotPacket(mc.thePlayer.getHeldItem(), slot);
			i = -2;
			mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem());
			
		}
    	}
      
	if(i == -1) {
		mc.playerController.sendSlotPacket(mc.thePlayer.getHeldItem(), original);
	}
    }
	this.addValues = function(soul) {
		soul.add(Delay);
	}
}
var exampleModule = new ExampleModule();
var exampleModuleClient;

function onLoad() {}

function onEnable() {
    exampleModuleClient = moduleManager.registerModule(exampleModule);
}

function onDisable() {
    moduleManager.unregisterModule(exampleModuleClient);
}

【ソルプレクサス】

Avatar

By Aftery 11 October 2019 10:45

Member · 145 comments
soulplexis wrote

here, I tried. it doesn't work but it might be able to be fixed to work:

var scriptName = "AutoGapple";
var scriptAuthor = "soulplexis / virus";
var scriptVersion = 1.1;

var ItemAppleGold = Java.type('net.minecraft.item.ItemAppleGold');

function ExampleModule() {
	var Delay = value.createInteger("Delay", 100, 0, 1000);
    this.getName = function() {
        return "AutoGapple";
    }
    this.getDescription = function() {
        return "Automatically consumes a golden apple when health is low.";
    }
    this.getCategory = function() {
        return "Combat"; 
    }
    this.onEnable = function() {
		var i = 0;
		mc.playerController.sendSlotPacket(mc.thePlayer.getHeldItem(), 2);
		var original = mc.thePlayer.getHeldItem().getSlot();
    }
    this.onDisable = function() {
        
    }
    this.onUpdate = function() {
		i++;
    	if(mc.thePlayer.getHealth() <= 9) {
		for(var x = 0; x <= 8; x++) {
		var slot = mc.thePlayer.inventoryContainer.getSlot(x);
	    }
		if(slot.getItem() instanceof ItemAppleGold && i >= Delay.get()) {
			mc.playerController.sendSlotPacket(mc.thePlayer.getHeldItem(), slot);
			i = -2;
			mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.getHeldItem());
			
		}
    	}
      
	if(i == -1) {
		mc.playerController.sendSlotPacket(mc.thePlayer.getHeldItem(), original);
	}
    }
	this.addValues = function(soul) {
		soul.add(Delay);
	}
}
var exampleModule = new ExampleModule();
var exampleModuleClient;

function onLoad() {}

function onEnable() {
    exampleModuleClient = moduleManager.registerModule(exampleModule);
}

function onDisable() {
    moduleManager.unregisterModule(exampleModuleClient);
}

yeah, shouldnt work.

edit: add checks for if you're holding a gap. stop sending item use every *delay* amount of ticks. check for regen. consider using absorption. fix user behaviour

Last edited by Aftery (11 October 2019 12:41)


@Aftery#5051 on discord.

Avatar

By CzechHek Today 13:22

Member · 341 comments
for (var i = 36; i < 45; i++) {
	if (mc.thePlayer.inventoryContainer.getSlot(i).getStack() ? mc.thePlayer.inventoryContainer.getSlot(i).getStack().getItem() instanceof Java.type('net.minecraft.item.ItemAppleGold') : false) {
		chat.print(i)
		mc.playerController.sendSlotPacket(mc.thePlayer.inventoryContainer.getSlot(i).getStack(), i - 36);
		mc.playerController.sendUseItem(mc.thePlayer, mc.theWorld, mc.thePlayer.inventoryContainer.getSlot(i).getStack());
		break
		}
}

I tried to do AutoGapple few weeks ago, ended up with this. It only eats the gapple when you for example open mc chat?
It checks if you have gapples in your inventory and tries to eat them.

Last edited by CzechHek (Today 13:26)


ScriptAPI Developer.
Experienced YouTuber.
Discord: bit.ly/dyskord
YouTube: v.ht/CzechHek