Exemplo n.º 1
0
        private async Task ServerSendChatAsync(string text, IInnerPlayerControl player)
        {
            string playername = player.PlayerInfo.PlayerName;
            await player.SetNameAsync($"PublicMsg").ConfigureAwait(false);

            await player.SendChatAsync($"{text}").ConfigureAwait(false);

            await player.SetNameAsync(playername);
        }
Exemplo n.º 2
0
        private async Task ServerSendChatAsync(string text, IInnerPlayerControl player)
        {
            string playername  = player.PlayerInfo.PlayerName;
            byte   playercolor = player.PlayerInfo.ColorId;

            await player.SetColorAsync(ColorType.Black).ConfigureAwait(false);

            await player.SetNameAsync($"<Server>").ConfigureAwait(false);

            await player.SendChatAsync($"{text}").ConfigureAwait(false);

            await player.SetColorAsync(playercolor);

            await player.SetNameAsync(playername);
        }
Exemplo n.º 3
0
        public async ValueTask <int> SendMessage(IInnerPlayerControl player, string message)
        {
            string name  = player.PlayerInfo.PlayerName;
            byte   color = player.PlayerInfo.ColorId;
            await player.SetNameAsync("[FF0000FF]All Of Us Bot | Public");

            await player.SetColorAsync((byte)0);

            await player.SendChatAsync(message);

            await player.SetNameAsync(name);

            await player.SetColorAsync(color);

            return(0);
        }