Minecraft-Console-Client/MinecraftClient/config/sample-script.cs
ORelio 3e2622fbb7 Various C# Script improvements
Move handling code in a separate file
Add caching ability for low-power devices (rpi..)
Use a distinct API with MCC.MethodName()
Stop script execution only on specific API calls
2015-08-23 18:51:29 +02:00

14 lines
No EOL
453 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 methods provided by the MCC API */
for (int i = 0; i < 5; i++)
{
int count = MCC.GetVarAsInt("test") + 1;
MCC.SetVar("test", count);
MCC.SendText("Hello World no. " + count);
MCC.LogToConsole("Sleeping for 5 seconds...");
Thread.Sleep(5000);
}