Add set varname=value MCC command

- Allow to use vars declared in scripts or directly by the user
- Commands my now use %variable% as well
- Moved "help" command from RemoteControl to inner MCC command manager
- The only special command is "wait", which is only available in scripts
Todo: Solve ambiguity between MCC help and Server help commands
Note: Auto accept tpa suggested by MousePak
Note: Manually choosing MC version suggested by ZizzyDizzyMC
This commit is contained in:
ORelio 2014-06-14 18:48:43 +02:00
parent 8b5ce567a6
commit 87d4687394
5 changed files with 96 additions and 76 deletions

View file

@ -87,6 +87,7 @@ namespace MinecraftClient.ChatBots
{
if (instruction_line[0] != '#' && instruction_line[0] != '/' && instruction_line[1] != '/')
{
instruction_line = Settings.expandVars(instruction_line);
string instruction_name = instruction_line.Split(' ')[0];
switch (instruction_name.ToLower())
{
@ -100,11 +101,10 @@ namespace MinecraftClient.ChatBots
sleepticks = ticks;
break;
default:
if (isInternalCommand(instruction_line))
if (!performInternalCommand(instruction_line))
{
performInternalCommand(instruction_line);
sleepticks = 0; Update(); //Unknown command : process next line immediately
}
else sleepticks = 0; Update(); //Unknown command : process next line immediately
break;
}
}