mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Moved Auto attack and auto fishing to ChatBots and added ChatBotAPI for entity handling
This commit is contained in:
parent
8b8f3a719b
commit
dbf5334758
16 changed files with 602 additions and 465 deletions
|
|
@ -95,7 +95,7 @@ namespace MinecraftClient
|
|||
public static bool DebugMessages = false;
|
||||
public static bool ResolveSrvRecords = true;
|
||||
public static bool ResolveSrvRecordsShortTimeout = true;
|
||||
public static bool AutoAttackMobs = false;
|
||||
public static bool EntityHandling = false;
|
||||
|
||||
//AntiAFK Settings
|
||||
public static bool AntiAFK_Enabled = false;
|
||||
|
|
@ -150,12 +150,18 @@ namespace MinecraftClient
|
|||
public static bool AutoRespond_Enabled = false;
|
||||
public static string AutoRespond_Matches = "matches.ini";
|
||||
|
||||
//Auto Attack
|
||||
public static bool AutoAttack_Enabled = false;
|
||||
|
||||
//Auto Fishing
|
||||
public static bool AutoFishing_Enabled = false;
|
||||
|
||||
//Custom app variables and Minecraft accounts
|
||||
private static readonly Dictionary<string, object> AppVars = new Dictionary<string, object>();
|
||||
private static readonly Dictionary<string, KeyValuePair<string, string>> Accounts = new Dictionary<string, KeyValuePair<string, string>>();
|
||||
private static readonly Dictionary<string, KeyValuePair<string, ushort>> Servers = new Dictionary<string, KeyValuePair<string, ushort>>();
|
||||
|
||||
private enum ParseMode { Default, Main, AppVars, Proxy, MCSettings, AntiAFK, Hangman, Alerts, ChatLog, AutoRelog, ScriptScheduler, RemoteControl, ChatFormat, AutoRespond };
|
||||
private enum ParseMode { Default, Main, AppVars, Proxy, MCSettings, AntiAFK, Hangman, Alerts, ChatLog, AutoRelog, ScriptScheduler, RemoteControl, ChatFormat, AutoRespond, AutoAttack, AutoFishing };
|
||||
|
||||
/// <summary>
|
||||
/// Load settings from the give INI file
|
||||
|
|
@ -196,6 +202,8 @@ namespace MinecraftClient
|
|||
case "appvars": pMode = ParseMode.AppVars; break;
|
||||
case "autorespond": pMode = ParseMode.AutoRespond; break;
|
||||
case "chatformat": pMode = ParseMode.ChatFormat; break;
|
||||
case "autoattack": pMode = ParseMode.AutoAttack; break;
|
||||
case "autofishing": pMode = ParseMode.AutoFishing; break;
|
||||
default: pMode = ParseMode.Default; break;
|
||||
}
|
||||
}
|
||||
|
|
@ -231,7 +239,7 @@ namespace MinecraftClient
|
|||
case "privatemsgscmdname": PrivateMsgsCmdName = argValue.ToLower().Trim(); break;
|
||||
case "botmessagedelay": botMessageDelay = TimeSpan.FromSeconds(str2int(argValue)); break;
|
||||
case "debugmessages": DebugMessages = str2bool(argValue); break;
|
||||
case "autoattackmobs": AutoAttackMobs = str2bool(argValue); break;
|
||||
case "enableentityhandling": EntityHandling = str2bool(argValue); break;
|
||||
|
||||
case "botowners":
|
||||
Bots_Owners.Clear();
|
||||
|
|
@ -449,6 +457,20 @@ namespace MinecraftClient
|
|||
}
|
||||
break;
|
||||
|
||||
case ParseMode.AutoAttack:
|
||||
switch (argName.ToLower())
|
||||
{
|
||||
case "enabled": AutoAttack_Enabled = str2bool(argValue); break;
|
||||
}
|
||||
break;
|
||||
|
||||
case ParseMode.AutoFishing:
|
||||
switch (argName.ToLower())
|
||||
{
|
||||
case "enabled": AutoFishing_Enabled = str2bool(argValue); break;
|
||||
}
|
||||
break;
|
||||
|
||||
case ParseMode.MCSettings:
|
||||
switch (argName.ToLower())
|
||||
{
|
||||
|
|
@ -560,7 +582,7 @@ namespace MinecraftClient
|
|||
+ "debugmessages=false # Please enable this before submitting bug reports. Thanks!\r\n"
|
||||
+ "scriptcache=true # Cache compiled scripts for faster load on low-end devices\r\n"
|
||||
+ "timestamps=false # Prepend timestamps to chat messages\r\n"
|
||||
+ "autoattackmobs=false # Auto attack mobs around client player\r\n"
|
||||
+ "enableentityhandling=false # Toggle entities handling\r\n"
|
||||
+ "\r\n"
|
||||
+ "[AppVars]\r\n"
|
||||
+ "# yourvar=yourvalue\r\n"
|
||||
|
|
@ -639,7 +661,15 @@ namespace MinecraftClient
|
|||
+ "\r\n"
|
||||
+ "[AutoRespond]\r\n"
|
||||
+ "enabled=false\r\n"
|
||||
+ "matchesfile=matches.ini\r\n", Encoding.UTF8);
|
||||
+ "matchesfile=matches.ini\r\n"
|
||||
+ "\r\n"
|
||||
+ "[AutoAttack]\r\n"
|
||||
+ "# Entity Handling NEED to be enabled first\r\n"
|
||||
+ "enabled=false\r\n"
|
||||
+ "\r\n"
|
||||
+ "[AutoFishing]\r\n"
|
||||
+ "# Entity Handling NEED to be enabled first\r\n"
|
||||
+ "enabled=false", Encoding.UTF8);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue