2022-11-28 13:55:05 +08:00
|
|
|
|
//MCCScript 1.0
|
2015-06-21 18:45:43 +02:00
|
|
|
|
|
2015-06-25 12:12:59 +02:00
|
|
|
|
/* This script demonstrates how to use methods and arguments */
|
2015-06-21 18:45:43 +02:00
|
|
|
|
|
2015-06-25 12:12:59 +02:00
|
|
|
|
string text = "hello";
|
|
|
|
|
|
|
|
|
|
|
|
if (args.Length > 0)
|
|
|
|
|
|
text = args[0];
|
|
|
|
|
|
|
2015-06-21 18:45:43 +02:00
|
|
|
|
for (int i = 0; i < 5; i++)
|
|
|
|
|
|
{
|
2015-08-23 18:51:24 +02:00
|
|
|
|
int count = MCC.GetVarAsInt("test") + 1;
|
|
|
|
|
|
MCC.SetVar("test", count);
|
2015-06-25 12:12:59 +02:00
|
|
|
|
SendHelloWorld(count, text);
|
2015-06-21 18:45:43 +02:00
|
|
|
|
SleepBetweenSends();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//MCCScript Extensions
|
|
|
|
|
|
|
|
|
|
|
|
/* Here you can define methods for use into your script */
|
|
|
|
|
|
|
2015-06-25 12:12:59 +02:00
|
|
|
|
void SendHelloWorld(int count, string text)
|
2015-06-21 18:45:43 +02:00
|
|
|
|
{
|
2015-08-23 18:51:24 +02:00
|
|
|
|
MCC.SendText("Hello World no. " + count + ": " + text);
|
2015-06-21 18:45:43 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void SleepBetweenSends()
|
|
|
|
|
|
{
|
2015-08-23 18:51:24 +02:00
|
|
|
|
MCC.LogToConsole("Sleeping for 5 seconds...");
|
2015-06-21 18:45:43 +02:00
|
|
|
|
Thread.Sleep(5000);
|
2022-11-28 13:55:05 +08:00
|
|
|
|
}
|