EN Examples and Recipes - LIHACHTETAN/ClassicUO-Bad-Newbie-CSharp-Scripts-IDE GitHub Wiki
Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
All examples are saved as .csx. They use game data from the current session.
UO.Print("Hello from C#!");
await WaitAsync(100);for (int i = 0; i < 3; i++)
{
UO.Print($"Position: {UO.GetX()}, {UO.GetY()}, {UO.GetZ()}");
await WaitAsync(500);
}var values = new List<int> { 2, 3, 4 };
int total = values.Sum();
UO.Print($"Total = {total}");string message = Args.Length > 0 ? Args[0] : "No arguments";
UO.Print(message);Syntax, async, UO calls and argument splitting are checked by the automatic C#-probe. The real server response is checked separately.