Ejemplo n.º 1
0
        public static void OocChannel(string message, Player player)
        {
            var players = Cache.ReturnPlayers().Where(x => x.NewbieChannel.Equals(true));

            foreach (var pc in players)
            {
                HubContext.SendToClient("<span style='color:#00AFF0'>[OOC] " + player.Name + ":</span> " + message, pc.HubGuid);
            }
        }
Ejemplo n.º 2
0
        public static void EmoteActionToRoom(string message, Player player)
        {
            var players = Cache.ReturnPlayers().Where(x => x.AreaId.Equals(player.AreaId) && x.Area.Equals(player.Area) && x.Region.Equals(player.Region));

            foreach (var pc in players)
            {
                HubContext.SendToClient(player.Name + " " + message, pc.HubGuid);
            }
        }
Ejemplo n.º 3
0
        public static void OocChannel(string message, Player player)
        {
            var players = Cache.ReturnPlayers().Where(x => x.NewbieChannel.Equals(true));

            foreach (var pc in players)
            {
                HubContext.SendToClient("OOC: " + player.Name + " says :" + message, pc.HubGuid);
            }
        }
Ejemplo n.º 4
0
        public static void GossipChannel(string message, Player player)
        {
            var players = Cache.ReturnPlayers().Where(x => x.NewbieChannel.Equals(true));

            foreach (var pc in players)
            {
                HubContext.Instance.SendToClient("<span style='color:#7CEECE'>[Gossip] " + player.Name + ":</span> " + message, pc.HubGuid);
                Score.UpdateUIChannels(pc, "<span class='gossipChannel' style='color:#7CEECE'>[Gossip] " + player.Name + ":</span> " + message, "gossipChannelF");
            }
        }
Ejemplo n.º 5
0
        public static void EmoteActionToRoom(string message, Player player)
        {
            var players = Cache.ReturnPlayers().Where(x => x.AreaId.Equals(player.AreaId) && x.Area.Equals(player.Area) && x.Region.Equals(player.Region));

            foreach (var pc in players)
            {
                if (pc != player)
                {
                    HubContext.Instance.SendToClient(Helpers.ReturnName(player, pc, string.Empty) + " " + message, pc.HubGuid);
                }
                else
                {
                    HubContext.Instance.SendToClient("You " + message, pc.HubGuid);
                }
            }
        }
Ejemplo n.º 6
0
        public static void OocChannel(string message, Player player)
        {
            var players = Cache.ReturnPlayers().Where(x => x.NewbieChannel.Equals(true));

            foreach (var pc in players)
            {
                HubContext.Instance.SendToClient("<span style='color:#00AFF0'>[OOC] " + player.Name + ":</span> " + message, pc.HubGuid);
                Score.UpdateUIChannels(pc, "<span class='oocChannel' style='color:#00AFF0'>[OOC] " + player.Name + ":</span> " + message, "oocChannelF");
            }


            var discordToSay = "[OOC] " + player.Name + " " + message;

            var discordBot = new HomeController();

            discordBot.PostToDiscord(discordToSay);
        }
Ejemplo n.º 7
0
Archivo: Who.cs Proyecto: sizzles/MIM
        public static void Connected(PlayerSetup.Player playerData)
        {
            var whoList = new StringBuilder();

            whoList.Append(Cache.ReturnPlayers().Count).Append(" Players currently playing <br />");
            foreach (var player in Cache.ReturnPlayers())
            {
                whoList.Append("<p>[")
                .Append(player.Level)
                .Append(" ")
                .Append(player.Race.Truncate(5))
                .Append(" ")
                .Append(player.SelectedClass.Truncate(3))
                .Append("]")
                .Append(" ")
                .Append(player.Name).Append("</p><br />");
            }

            HubContext.SendToClient(whoList.ToString(), playerData.HubGuid);
        }
Ejemplo n.º 8
0
        public static void Connected(PlayerSetup.Player playerData)
        {
            var playerCount = Cache.ReturnPlayers().Count + 4;
            var whoList     = new StringBuilder();

            whoList.Append("<p>" + playerCount).Append(" players currently playing:</p>");
            whoList.Append("<p>[Imm][")
            .Append("51")
            .Append(" ")
            .Append("Elf".Truncate(5))
            .Append(" ")
            .Append("Mage".Truncate(3))
            .Append("]")
            .Append(" ")
            .Append("Malleus").Append("</p> ");

            whoList.Append("<p>[Imm][")
            .Append("51")
            .Append(" ")
            .Append("Human".Truncate(5))
            .Append(" ")
            .Append("Fighter".Truncate(3))
            .Append("]")
            .Append(" ")
            .Append("Gamia").Append("</p> ");

            whoList.Append("<p>[")
            .Append("9")
            .Append(" ")
            .Append("Mau".Truncate(5))
            .Append(" ")
            .Append("Cleric".Truncate(3))
            .Append("]")
            .Append(" ")
            .Append("Kencori").Append("</p> ");

            whoList.Append("<p>[")
            .Append("5")
            .Append(" ")
            .Append("Human".Truncate(5))
            .Append(" ")
            .Append("Fighter".Truncate(3))
            .Append("]")
            .Append(" ")
            .Append("Makkan").Append("</p> ");

            foreach (var player in Cache.ReturnPlayers())
            {
                if (player.Name == "Malleus" || player.Name == "Gamia" || player.Name == "Kencori" || player.Name == "Makkan")
                {
                    continue;
                }
                whoList.Append("<p>[")
                .Append(player.Level)
                .Append(" ")
                .Append(player.Race.Truncate(5))
                .Append(" ")
                .Append(player.SelectedClass.Truncate(3))
                .Append("]")
                .Append(" ")
                .Append(player.Name).Append("</p>");
            }

            whoList.Append("<br /><p>This is a new game so player numbers wont be high yet, but we are active and improving the game everyday,<a href='https://discord.gg/nuf7FVq'> join the discord channel and say hi! </a></p>");

            HubContext.Instance.SendToClient(whoList.ToString(), playerData.HubGuid);
        }