mirror of
https://github.com/bdnugget/rs-sdk.git
synced 2026-11-07 09:07:30 +00:00
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>
24 lines
542 B
TypeScript
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
|
|
});
|