Closed twnku closed 6 months ago
i guess the only option is using c# script with infinite loop, by adding this to MinecraftClient.ini
to run the script on first login
[ChatBot.ScriptScheduler]
Enabled = true
[[ChatBot.ScriptScheduler.TaskList]]
Task_Name = "run script.cs on login"
Trigger_On_First_Login = true
Action = "script script.cs"
and for the script.cs
//MCCScript 1.0
/* This is a sample script that will load a ChatBot into Minecraft Console Client
* Simply execute the script once with /script or the script scheduler to load the bot */
MCC.LoadBot(new CustomBot());
//MCCScript Extensions
/* The ChatBot class must be defined as an extension of the script in the Extensions section
* The class can override common methods from ChatBot.cs, take a look at MCC's source code */
public class CustomBot : ChatBot
{
Random rnd = new Random();
public override void Initialize()
{
antiAFKLoop();
}
public async void antiAFKLoop()
{
while (true)
{
if(isAFKon)
{
LogToConsole("§a["+this.GetUsername()+"] Location: §e"+this.GetCurrentLocation());
this.PerformInternalCommand("look -90 0");
LogToConsole("§a["+this.GetUsername()+"] Yaw:§e "+this.GetYaw()+" §aPitch:§e "+this.GetPitch());
await System.Threading.Tasks.Task.Delay(rnd.Next(180000, 300000));
this.PerformInternalCommand("look -90 45");
LogToConsole("§a["+this.GetUsername()+"] New Yaw:§e "+this.GetYaw()+" §aNew Pitch:§e "+this.GetPitch());
await System.Threading.Tasks.Task.Delay(rnd.Next(180000, 300000));
}
}
}
}
Is there any way to do /look command using Script Scheduler feature? i tried using this but its not working, it send a command to the server and not mcc. my
TerrainAndMovements = true
is enabled, and it works fine if i send the command directly to mccand also this
it says
Unknown command. Type /help for a list of commands.
which mean it sends /look command into the server, and not looking at direction.