Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let bot = new Bot("Bot") //This will create the bot
- let outfit = new Outfit(bot) //What the bot will look like
- .body("#0d9436")
- .torso("#C60000")
- .head("#F3B700")
- .rightArm("#F3B700")
- .leftArm("#F3B700")
- .rightLeg("#76603F")
- .leftLeg("#76603F")
- .face()
- .hat1()
- let Spawn = world.bricks.find(brick => brick.name === "botspawn") //bot will spawn on a brick that is named botspawn
- Game.newBot(bot)
- bot.setPosition(new Vector3(Spawn.position.x + Math.floor(Math.random() * 1) + 1, Spawn.position.y + Math.floor(Math.random() * 1) + 1, Spawn.position.z))
- bot.setInterval(() => {
- let target = bot.findClosestPlayer(30)
- if (!target) return bot.setSpeech("") // if there isn't a player nearby do
- bot.setSpeech("Hello there!") // if there is a player nearby do
- }, 10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement