Change alias of the client to be your desired realm name or, add a new field to Account interface.
Code:
import { Client, Library, PacketHook } from './../core';
import { MapInfoPacket } from '../networking';
import { GameId } from '../networking/game-ids'; @Library({
name: 'Realm Joiner Plugin',
author: 'Ark'
})
class RealmFiller {
@PacketHook()
onMapInfo(client: Client, mapInfo: MapInfoPacket): void {
if (mapInfo.name != 'NexusPortal.' + client.alias) {
setTimeout(() => {
client.changeGameId(GameId.RandomRealm);
}, 1000)
}
}