Skip to main content

A python client for AdventureLand.

Project description

AdventureLand Python Client

This is meant to be a python client for the game Adventure Land - The Code MMORPG. It's heavily inspired by and based on earthiverse's typescript-based ALClient.

Currently a major work in progress; but the current state is available through pip for simple installation and use.

Requirements

This package currently requires aiohttp, aiosignal, async-timeout, attrs, bidict, charset-normalizer, frozenlist, idna, igraph, multidict, python-engineio, setuptools, texttables, ujson, and yarl. (Technially only some of these are dependencies of ALPC; others are dependencies of various dependencies).

All of these requirements are installable through pip, and their individual installations are also taken care of through the install of ALPC.

Installation

The PyPI page can be found here. In order to install, simply use pip like so:

Unix/Linux
python3 -m pip install --upgrade ALPC
Windows
py -m pip install --upgrade ALPC
  • Note: This package was developed with Python 3.10.4; therefore, I cannot guarantee that it will work with anything below that. In fact, due to current bugs, I cannot even guarantee that it will work perfectly with that.

Usage

  • First: be sure to install the package from PyPI using pip.
  • Second: create a credentials.json file like so (the 'mongo' parameter is optional for if you have a mongodb database that you'd like to link to the client):
{
    "email": "your_email@address.com",
    "password": "your_password",
    "mongo": "optional_mongo_uri"
}
  • Third: create a python file like so:
import aiohttp
import asyncio
import logging
import sys
import ALPC as AL

logging.root.setLevel(logging.INFO)

async def main():
    async with aiohttp.ClientSession() as session:
        print('Logging in...')
        await AL.Game.loginJSONFile(session, '..\credentials.json')
        print('Successfully logged in!')
        print('Getting G Data...')
        await AL.Game.getGData(session, True, True)
        print('Obtained G Data!')
        print('Preparing pathfinder...')
        await AL.Pathfinder.prepare(AL.Game.G)
        print('Pathfinder prepared!')
        print('Starting character...')
        char = await AL.Game.startCharacter(session, 'WarriorSurge', 'US', 'I')
        print('Moving to main...')
        await char.smartMove('main')
        print('Moving to halloween...')
        await char.smartMove('halloween')
        print('Moving to desertland...')
        await char.smartMove('desertland')
        print('Returning to main...')
        await char.smartMove('main')
        print('Disconnecting...')
        await char.disconnect()

# this part is technically only required if you're running on windows due to hinkyness involving windows OS and asyncio
if sys.platform == 'win32':
    asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
asyncio.run(main())
  • Fourth: run your python file; you should get this as a result:
Logging in...
Successfully logged in!
Getting G Data...
Obtained G Data!
Preparing pathfinder...
Pathfinder prepared!
Starting character...
Moving to main...
Moving to halloween...
Moving to desertland...
Returning to main...
Disconnecting...

Version History

0.1.0: basic functionality; initial release 0.2.0: added all of the individual character classes 0.3.0: added database functionality

Final Notes

  • AS STATED, THIS PACKAGE IS STILL A WORK IN PROGRESS. If you have ANY issues at all or any suggestions or come accross any bugs, feel free to either submit them to the issues tab or submit your info to the existing issue if your bug/issue/suggestion is already there.
  • The current largest bug I have is as follows:
    1. Pathfinder takes FAR too long to prepare. We've sped it up by 3 seconds with the most recent update; but it's still not enough. Any help with bugs (both found and not found) would be very much appreciated.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ALPC-0.4.0.tar.gz (94.1 kB view details)

Uploaded Source

Built Distribution

ALPC-0.4.0-py3-none-any.whl (102.3 kB view details)

Uploaded Python 3

File details

Details for the file ALPC-0.4.0.tar.gz.

File metadata

  • Download URL: ALPC-0.4.0.tar.gz
  • Upload date:
  • Size: 94.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for ALPC-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ae4ecc70f3883916c1a9ed0de39518a15287c572617303b96a0a64c26701bb2e
MD5 d36d98b6a41e2f840177b19cb3e9c9b4
BLAKE2b-256 c787b7bdb257b12456a12676e11c2fe966d1f51102ad69a062c2620720b108df

See more details on using hashes here.

File details

Details for the file ALPC-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: ALPC-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 102.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for ALPC-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29d49f94efbbbab8c3318785e45550b5bdd3da5a8811c2454f2bae7b0cedd023
MD5 461184b1a1617d9fe6eee21a657f8de8
BLAKE2b-256 73f59d1aa9d42f62e475267e15635db23a86d0ab6a5965ee355ed8d7590f72cd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page