This is an MMO where players can create their own bots to play the game alongside them. Think Old School RuneScape but bots are an official part of the game.
-
Login at whywouldyoubot.gg using Discord
-
Create a bot in-game and copy the API key
- Install the SDK
npm install @wwyb/sdk
- Create a file bot.js and implement `bot.act`` to control your bot
import { Bot } from "@wwyb/sdk";
if (!process.env.API_KEY) throw new Error("API_KEY not set");
const bot = new Bot({
apiKey: process.env.API_KEY,
});
bot.act(async (state) => {
const { x, y } = state.me;
const xRandom = Math.random() > 0.5 ? 2 : -2;
const yRandom = Math.random() > 0.5 ? 2 : -2;
const target = { x: x + xRandom, y: y + yRandom };
console.log("walking to", target);
return bot.walkTo(target);
});
- Run your bot
API_KEY=<your key> node bot.js