Esempio n. 1
0
        protected override bool Process(SocketProxyWorker client, string args)
        {
            Entity player = client.World.GetPlayer(args);

            if (player == null)
            {
                client.SendText("*Error*", "Player not found!");
            }

            var packet = NWriter.Write(writer => new EditAccountListPacket
            {
                AccountListId = 0,
                Add           = true,
                ObjectId      = player.ID
            }.Write(writer));

            client.SendAsClient(client.PacketTable.EDITACCOUNTLIST, packet);

            packet = NWriter.Write(writer => new AccountListPacket
            {
                AccountListId = 0,
                AccountIds    = new[] { player.Stats[StatsType.AccountId].ToString() }
            }.Write(writer));
            client.SendAsServer(client.PacketTable.ACCOUNTLIST, packet);

            client.SendText("", "Added " + player.GetStats <string>(StatsType.Name) + " to starred list");
            return(true);
        }
Esempio n. 2
0
        protected override bool Process(SocketProxyWorker client, string args)
        {
            var ms = new MemoryStream();

            using (var writer = new NWriter(ms))
                writer.WriteUTF("/teleport " + args);
            client.SendAsClient(client.PacketTable.PLAYERTEXT, ms.ToArray());
            return(true);
        }