Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error starting a modified version #66

Open
Manni1990 opened this issue Apr 27, 2019 · 1 comment
Open

Error starting a modified version #66

Manni1990 opened this issue Apr 27, 2019 · 1 comment

Comments

@Manni1990
Copy link

I am using rbot to learn something from it. I am calling rbot directly to log onto a server. That works fine. Now I tried to make the bot move directly, without me having to interact via Chat.

To do so, I added to "rbot.js" the lines

var moveTask = require("./task/moveTask")
(together with the other variables)

and

moveTask.moveTo(311,116,281)
inside the "bot.on("login" -part.

When I try to use it, it shows me the ErrorMessage "TypeError: p.floored is not a function". Now the line with "p.floored" is part of rbot and is called by center(p), which is called again by "moveTo". On the other hand I can nowhere find a definition of this. When I googled it, I come across the function "floor" as part of the module "Math" with a slightly different syntax:

floor(p) instead of p.floored

Anyway, if I change the line to Math.floor(p), than I get the same problem for "offset", which is called upon "p.floored()" originally. I cannot find any information about that part and to me it seemed kind of like a floor-ceiling-function with the border of .5, so I tried to leave it out. After that I get again an error for "distanceTo". This function I could not find yet anywhere.

Can someone help me?

@SonicandTailsCD
Copy link

SonicandTailsCD commented Apr 19, 2023

Hm, I'm not experienced, but I guess I can help!
If you only want a bot to move while no one sees any chat, modify

 bot.on('chat'... etc)

to

 bot.on('whisper', etc)

after that you want to modify

bot.chat()

to

bot.whisper("[your username]", )

You're done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants