@habboapi/arcturus
v0.0.3
Published
Simple functions for interacting with Arcturus Emulator
Downloads
2
Readme
@habboapi/arcturus
Simple functions for interacting with Arcturus Emulator
Installation
Save To Dependencies
npm i @habboapi/arcturus --save
Interfaces
class IConfig
{
ip: string;
port: number;
portRcon: number;
}
interface IRconMessage
{
key: 'ignoreuser' | 'imagehotelalert' | 'updatecatalog' | 'givecredits' | 'imagealertuser' | 'alertuser' | 'modticket' | 'setmotto' | 'updatewordfilter' | 'setrank' | 'stalkuser' | 'talkuser' | 'forwarduser' | 'sendgift' | 'givepoints' | 'updateuser' | 'muteuser' | 'friendrequest' | 'progressachievement' | 'givebadge' | 'executecommand' | 'givepixels' | 'disconnect' | 'sendroombundle' | 'staffalert' | 'changeroomowner' | 'hotelalert' | 'giverespect';
data?: {
user_id?: number;
message?: string;
room_id?: number;
badge?: string;
credits?: number;
points?: number;
type?: number;
itemid?: number;
rank?: number;
follow_id?: number;
}
}
interface IRconResponse
{
status: IRconResponseStatus;
message: string;
}
const enum IRconResponseStatus
{
statusOk = 0,
statusError = 1,
habboNotFound = 2,
roomNotFound = 3,
systemError = 4
}
Usage
const arcturusConfig: IConfig = {
ip: 'arcturusIp',
port: 'arcturusPort',
portRcon: 'arcturusPortRcon'
}
const arcturusService = new Arcturus(arcturusConfig);
async function sendMessage(message: IRconMessage)
{
try
{
await arcturusService.rconService.sendMessage(message);
}
catch(err)
{
console.log(err);
}
}