earthiverse / alclient Goto Github PK
View Code? Open in Web Editor NEWA node client for interacting with Adventure Land - The Code MMORPG
A node client for interacting with Adventure Land - The Code MMORPG
It might show it in certain situations, but it shouldn't when we are able to move in a straight line.
And somehow, for Character.locateItems()
, a way to return items of a specific slot type.
It's a bit tricky for weapons since we have to figure out a way to return items that match a specific class, too.
It's updating Socket.IO to 4.2.
[email protected]
should deal with this, but don't upgrade until they've released the updated. There's a socketio4 branch that I'll be committing to to fix any problems.
ALClient should probably use HTTPS by default
Right now I create a new bot and discard the old bot, but there should be a way to fix it so that we can just recreate the socket and reconnect.
After running the ff. code
const warrior = await AL.Game.startWarrior('character', 'ASIA', 'I')
await warrior.smartMove(entity)
Expected
warrior.moving === true
But returned false.
After inspecting the code further , I found out that what was updated is the entities Map within the warrior object.
Is this the expected behavior? If so, I'd like to update the code so that we could update the character object data i.e. warrior.moving so that we can easily get player information
Line 19 in 26f9977
In-game the code calls cruise
300 times quickly to force a disconnect.
This is sometimes useful, it should be added in ALClient, too.
First off, this is an awesome project!
I'd love to contribute to the alclient-mongo package, is there a repo for that project? I wouldn't mind pitching in and combining the two into a monorepo so they can share code.
Thanks!
I need to fill a bot full of items and see what response gets returned, then improve openChest()
.
Should be simple to reproduce and see what game_response we have to listen for.
For starters, for my code, deleting the entities with that ID from the database would solve a few of my issues
Replicate by
smartMove('goo')
ERROR Cannot read properties of undefined (reading 'id')
here
Line 575 in 6069928
toNode.id
is referenced after
It happens before the toNode
is undefined here
getPath
can't seem to find a path for { map: 'goobrawl', x: 8, y: -132 }
Line 571 in 6069928
Can add a null check here, but why has it broken all of a sudden?
Is this just me?
For some reason monster kills I get with alclient
do not go towards the monster hunts I get from Daisy. Is there a way around this?
I am able to have monster kills count when I manually hunt the monsters. Do you know if browser-based bots have this issue by chance?
Currently; the "best" option for logging packages looks like Winston as we can customize nearly everything about it fairly easily. At the moment though, my only hiccup is: how do we want format of the logs to look? Do we want timestamps? Do we want to show the level(s) of the log(s)? Do we want to be able to prettyprint JSON? Do we want basic coloring (as in just the log levels and/or the entirety of the message) or do we want advanced coloring (as in specific colors for JSON printing)?
Just to place a first suggestion: <hours>:<minutes>:<seconds>:<milliseconds> <level> [<character ID>]: <message>
MongoBulkWriteError: E11000 duplicate key error collection: ..._alclient.entities index: serverRegion_1_serverIdentifier_1_name_1_type_1 dup key: { serverRegion: "US", serverIdentifier: "III", name: null, type: "mrpumpkin" }
This happens to mrpumpkin
& mrgreen
, in both cases the key part name
is null
.
So it's obviously this index that raises the issue:
EntitySchema.index({ name: 1, serverIdentifier: 1, serverRegion: 1, type: 1 }, { unique: true })
ReferenceError: exports is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and 'C:\Users\user\Documents\alclient-test\package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
"esModuleInterop": true is set.
"type": "module" is set.
node version 16.13.2- though I tried on 16.5 and 17 as well.
Could be useful in a variety of situations.
Aria has interesting code that gets new items without paying 1 million gold.
https://discord.com/channels/238332476743745536/1001563308882669680/1001572124214960188
Now that servers can be spun up, it would be nice to override the URL.
I'd like to contribute to the code but maintaining two branches makes this process cumbersome for everyone. Perhaps the mongo
branch should be merged to master
and there can be an option to enable mongodb logging. What do you think?
That's the error I'm getting while trying to run sample code from README.
`PS J:\ALC> npx tsc main.ts
main.ts:1:8 - error TS1192: Module '"J:/ALC/node_modules/alclient/build/index"' has no default export.
1 import AL from "alclient"
~~
node_modules/alclient/build/Pathfinder.d.ts:2:8 - error TS1192: Module '"J:/ALC/node_modules/ngraph.path/index"' has no default export.
2 import path from "ngraph.path";
~~~~
Found 2 errors.`
My sample code:
`import AL from "alclient"
async function run() {
await Promise.all([AL.Game.loginJSONFile("../credentials.json"), AL.Game.getGData()])
await AL.Pathfinder.prepare(AL.Game.G)
const merchant = await AL.Game.startMerchant("Seler", "ASIA", "I")
console.log("Moving to main")
await merchant.smartMove("main")
console.log("Moving to cyberland")
await merchant.smartMove("cyberland")
console.log("Moving to halloween")
await merchant.smartMove("halloween")
merchant.disconnect()
}
run()`
is there a single interface for all classes that one could use? i don't want to duplicate code on migration for different classes. atm it's just one code for all chars.
EDIT: just saw hardcoded skills per class - so probably not.
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.