2.2.0 • Published 4 years ago

@cncta/client v2.2.0

Weekly downloads
7
License
MIT
Repository
-
Last release
4 years ago

@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);
2.2.0

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago

0.10.1

4 years ago

0.10.0

4 years ago