Files
max bittkerandClaude Opus 4.6 eeb527f40d Remove custom log/warn/error from runScript, use console.log directly
Removes the dedup logging system (LogEntry, captured log functions, flush
timers) from the runner and the log/warn/error fields from ScriptContext.
Scripts now use standard console.log/warn/error instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 18:06:01 -04:00

24 lines
542 B
TypeScript

import { runScript } from '../../sdk/runner';
await runScript(async (ctx) => {
const { bot, sdk } = ctx;
// Skip tutorial if active
await bot.skipTutorial();
// === YOUR SCRIPT LOGIC BELOW ===
// Example: chop a tree
const tree = sdk.findNearbyLoc(/^tree$/i);
if (tree) {
console.log(`Found tree at (${tree.x}, ${tree.z})`);
const result = await bot.chopTree(tree);
console.log(result.message);
}
// === END SCRIPT LOGIC ===
}, {
timeout: 60_000, // 1 minute timeout
});