Minecraft-Console-Client/MinecraftClient/config/sample-script.cs
ORelio 3ce91188c7 Add support for C# scripts in scripting bot
- Now scripts can also be written in C#
- C# scripts can access ChatBot API
- Add more methods in ChatBot API
- Add an example of C# script file
- Coding style fixes: method names ucfirst
2015-06-20 22:58:18 +02:00

15 lines
No EOL
464 B
C#

//MCCScript 1.0
/* This is a sample script for Minecraft Console Client
* The code provided in this file will be compiled at runtime and executed
* Allowed instructions: Any C# code AND all methods provided by the bot API */
for (int i = 0; i < 5; i++)
{
int count = GetVarAsInt("test");
count++;
SetVar("test", count);
SendText("Hello World no. " + count);
PerformInternalCommand("log Sleeping for 5 seconds...");
Thread.Sleep(5000);
}