Skip to content

DE Examples and Recipes

Codex edited this page Oct 11, 2026 · 1 revision

Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어

Beispiele für C#-Skripte

Alle Beispiele werden als .csx gespeichert. Sie verwenden Spieldaten aus der aktuellen Sitzung.

Lokale Nachricht

UO.Print("Hello from C#!");
await WaitAsync(100);

Mehrere Koordinatenkontrollen

for (int i = 0; i < 3; i++)
{
    UO.Print($"Position: {UO.GetX()}, {UO.GetY()}, {UO.GetZ()}");
    await WaitAsync(500);
}

Sammlungen und Berechnungen

var values = new List<int> { 2, 3, 4 };
int total = values.Sum();
UO.Print($"Total = {total}");

Argumente starten

string message = Args.Length > 0 ? Args[0] : "No arguments";
UO.Print(message);

Syntax, Async, UO-Aufrufe und Argumentsplitting werden durch die automatische C#-Probe überprüft. Die tatsächliche Serverantwort wird separat überprüft.

Clone this wiki locally