@cncta/client
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

@cncta/client

Game client for CNC:TA

Setup

import { TaClient } from '@cncta/client';

const client = new TaClient(username, password);
/** Login and open a world instance */
const world = await client.open(410);

If you already have a sessionId

import { TaClient } from '@cncta/client';

const client = TaClient.fromSessionId('some-session-id');
// Open a game world instance
const world = await client.open(410);

Commands

Player info

const player = await world.player;
player.Name;

Server info

const server = await world.server;
server.ww; // World width

Send Mail

await world.mail('shockr', 'Hello World', `This is a test message`);

World Data

const data = await world.data;

/** All players */
console.log(data.players);

/** Alliance list */
console.log(data.alliances);

Readme

Keywords

none

Package Sidebar

Install

npm i @cncta/client

Weekly Downloads

0

Version

2.2.0

License

MIT

Unpacked Size

94.1 kB

Total Files

76

Last publish

Collaborators

  • blacha