-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathplay.js
More file actions
22 lines (19 loc) · 684 Bytes
/
Copy pathplay.js
File metadata and controls
22 lines (19 loc) · 684 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const robot = require("robotjs")
const roam = require("./NodeGameBot/Engine/roamer")
robot.moveMouse(500, 500)
robot.mouseClick()
let walk = () => {
// Give path accepts the name of the path as well as a 2nd parameter allowing the user to reverse the path.
// The default behavior will not reverse the path:
// roam.givePath("NameOfPath")
// But adding any 2nd variable which evaluates to [true] will reverse the path:
// roam.givePath("NameOfPath", true)
roam.givePath("RazorHillToOrgrimmar")
// Uses a callback function to begin walking.
roam.walkPath(() => {
console.log("Finished Walking.")
})
}
setTimeout(() => {
walk()
}, 500)