nexusnull / albot Goto Github PK
View Code? Open in Web Editor NEWmy instance: http://albot.nexusnull.com
License: GNU General Public License v3.0
my instance: http://albot.nexusnull.com
License: GNU General Public License v3.0
the old code used to revive the bwi is messy, it needs to be cleaned.
And because of it he may just die for no reason.
The regen_hp and regen_mp skills are not supported.
Steps to reproduce
use_skill("regen_hp")
TypeError: Cannot read property 'game' of undefined
0|main | at /home/albot/ALBot/GameController.js:78:17
0|main | at new Promise ()
0|main | at GameController.stopCharacter (/home/albot/ALBot/GameController.js:76:16)
0|main | at /home/albot/ALBot/GameController.js:58:36
0|main | at Game.emit (/home/albot/ALBot/EventSystem.js:23:23)
0|main | at ChildProcess. (/home/albot/ALBot/Game.js:49:26)
0|main | at ChildProcess.emit (node:events:369:20)
0|main | at emit (node:internal/child_process:920:12)
0|main | at processTicksAndRejections (node:internal/process/task_queues:82:21)
I recently got the bot UI working, and noticed that there was no gold counter. I think this would be a nice feature, in addition to a Code Cost meter. Both of the codes can be found on Spadar's github, and could easily be implemented (I think?)
When I run the code, and navigate to my controller, it shows up as a black screen. I get a few errors in the console when I run however:
{ Error: listen EACCES 0.0.0.0:81
at Server.setupListenHandle [as _listen2] (net.js:1329:19)
at listenInCluster (net.js:1387:12)
at Server.listen (net.js:1475:7)
at Function.listen (/home/runner/node_modules/express/lib/application.js:618:24)
at WebServer.openSocket (/home/runner/node_modules/bot-web-interface/webServer/WebServer.js:24:9)
at Object.startOnPort (/home/runner/node_modules/bot-web-interface/main.js:11:19)
at main (/home/runner/index.js:77:19)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)
errno: 'EACCES',
code: 'EACCES',
syscall: 'listen',
address: '0.0.0.0',
port: 81 }
Error: listen EACCES 0.0.0.0:81
at Server.setupListenHandle [as _listen2] (net.js:1329:19)
at listenInCluster (net.js:1387:12)
at Server.listen (net.js:1475:7)
at Function.listen (/home/runner/node_modules/express/lib/application.js:618:24)
at WebServer.openSocket (/home/runner/node_modules/bot-web-interface/webServer/WebServer.js:24:9)
at Object.startOnPort (/home/runner/node_modules/bot-web-interface/main.js:11:19)
at main (/home/runner/index.js:77:19)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)
{ Error: listen EACCES 0.0.0.0:82
at Server.setupListenHandle [as _listen2] (net.js:1329:19)
at listenInCluster (net.js:1387:12)
at Server.listen (net.js:1475:7)
at Server.listen.Server.attach (/home/runner/node_modules/socket.io/lib/index.js:273:9)
at new Server (/home/runner/node_modules/socket.io/lib/index.js:59:17)
at SocketServer.openSocket (/home/runner/node_modules/bot-web-interface/webServer/SocketServer.js:39:15)
at Object.startOnPort (/home/runner/node_modules/bot-web-interface/main.js:12:22)
at main (/home/runner/index.js:77:19)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)
errno: 'EACCES',
code: 'EACCES',
syscall: 'listen',
address: '0.0.0.0',
port: 82 }
Error: listen EACCES 0.0.0.0:82
at Server.setupListenHandle [as _listen2] (net.js:1329:19)
at listenInCluster (net.js:1387:12)
at Server.listen (net.js:1475:7)
at Server.listen.Server.attach (/home/runner/node_modules/socket.io/lib/index.js:273:9)
at new Server (/home/runner/node_modules/socket.io/lib/index.js:59:17)
at SocketServer.openSocket (/home/runner/node_modules/bot-web-interface/webServer/SocketServer.js:39:15)
at Object.startOnPort (/home/runner/node_modules/bot-web-interface/main.js:12:22)
at main (/home/runner/index.js:77:19)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)
In the end, I noticed that various functions are not showing up due to lack of them being on the parent object. However, many of these functions are defined in various phases of the code. In the end, I believe you should use vm
, a native nodejs module that allows you to execute code in a specific context. You can then make this context be the parent. and then run the CODE file in a separate context that has that as .parent
It appears that the bot is taking longer to login on some platforms - wondering if you had any clue what this could be, or not. In addition, they seem to have instants where they just stand there.
Hey, I just tried to run the node main in my raspberry pi 3b+ but im getting an error related to the userData file. I did the rename part and everything...
pi@raspberrypi:~/ALBot $ node main
/home/pi/ALBot/userData:2
"config": {
^
SyntaxError: Unexpected token :
at createScript (vm.js:53:10)
at Object.runInThisContext (vm.js:95:10)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/home/pi/ALBot/app/httpWrapper.js:4:16)
/home/pi/ALBot/userData:2
"config": {
^
SyntaxError: Unexpected token :
at createScript (vm.js:53:10)
at Object.runInThisContext (vm.js:95:10)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/home/pi/ALBot/app/httpWrapper.js:4:16)
It appears that glob
as defined in /game.js is incomplete - it doesn't have all the properties.
Hence, I believe the following code would work:
glob = Object.create(this, Object.getOwnPropertyDescriptors(glob));
Cannot figure out how to call switchServer
function from ./app/Extensions.js
while inside my own character's code. I tried to see from the files what the hierarchy does objects have and tried this code:
game.process.gameContext.context.albot.switchServer
. But object game
have no process
field so it failed.
Could someone share working code?
Why aren't you online on Twitch?
parent.character.width
/ height
becomes NaN
after death and respawn.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.