xabbo-scripts/Scripts/Cabbage Placer Loop.csx
Administrator 7a548130a3 Move all scripts into Scripts/ subfolder
Keeps the repo root clean - only README.md visible on landing page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 09:49:37 +01:00

47 lines
1.2 KiB
C#

Log("=== Cabbage Placer Loop (Alle Tiles) ===");
// Raumgrenzen
int minX = 4;
int maxX = 11;
int minY = 1;
int maxY = 13;
EnsureInventory();
Delay(100);
while (Run) {
bool hasCabbage = true;
for (int x = minX; x <= maxX && Run && hasCabbage; x++) {
for (int y = maxY; y >= minY && Run && hasCabbage; y--) {
long cabbageId = -1;
string cabbageName = "";
foreach (var item in Inventory) {
string name = item.GetName().ToLower();
if (name.Contains("cabbage")) {
cabbageId = item.Id;
cabbageName = item.GetName();
break;
}
}
if (cabbageId != -1) {
Log($"Platziere: {cabbageName} auf ({x}, {y})...");
Send(Out["PlaceObject"], $"-{cabbageId} {x} {y} 0");
Delay(100);
EnsureInventory();
Delay(100);
} else {
Log("Kein Cabbage mehr im Inventar!");
hasCabbage = false;
}
}
}
Log("Durchlauf abgeschlossen. Starte neu...");
Delay(500);
EnsureInventory();
Delay(100);
}