Ask Alexander01998 if he can make a Modification Creator to wurst to add your own code like this
// Auto-farming script for multiple accounts with timing and range control
var isFarming = false;
var accounts = ["<User1>", "<User2>", "<User3>"]; // List your account usernames here
var currentAccountIndex = 0;
// Timing variables
var switchIntervalSeconds = 300; // Change this to the desired number of seconds
var switchIntervalMilliseconds = switchIntervalSeconds * 1000;
var lastSwitchTime = 0;
// Farming range
var farmingRange = 5; // Change this to the desired range in blocks
// Toggle farming state
function toggleAutoFarm() {
isFarming = !isFarming;
Chat.print(isFarming ? "Auto-farming started!" : "Auto-farming stopped!");
}
// Switch to the next account
function switchAccount() {
currentAccountIndex = (currentAccountIndex + 1) % accounts.length;
var currentAccount = accounts[currentAccountIndex];
Chat.print("Switched to account: " + currentAccount);
// Implement the account activation here
Client.sendChatCommand("-AlsoActivate " + currentAccount);
}
// Check and farm the specific crop type
function farmCrop(cropId) {
var nearbyBlocks = World.getNearbyBlocks(Player.getPosition(), farmingRange);
for (var i = 0; i < nearbyBlocks.length; i++) {
var block = nearbyBlocks[i];
if (block.getId() == cropId) {
Player.swingArm();
block.break(); // Break the crop
// Plant a new crop (assuming you have it in hand)
Player.sendChat("/give @p " + cropId); // Change this to your preferred planting method
}
}
}
// Main tick function
function onTick() {
if (isFarming) {
var currentTime = Client.getCurrentTime(); // Get current game time in milliseconds
// Switch account based on the timer
if (currentTime - lastSwitchTime >= switchIntervalMilliseconds) {
lastSwitchTime = currentTime;
switchAccount();
}
// Set crop IDs (these may vary based on Minecraft version)
var crops = {
wheat: 59, // Wheat
carrots: 141, // Carrots
beetroot: 244, // Beetroot
potatoes: 142 // Potatoes
};
// Check for each crop type
for (var crop in crops) {
farmCrop(crops[crop]);
}
}
}
// Register the command
function onEnable() {
Client.registerChatCommand("toggleautofarm", toggleAutoFarm);
}