Exemple #1
0
        /// <summary>
        /// If our connection doesn't have a Player yet, everything is sent here to handle
        /// login and Player creation.
        /// </summary>
        /// <param name="conn">The TelnetConnection the input is coming from</param>
        /// <param name="line">The input string</param>
        static public void LoginInterpret(TelnetConnection conn, string line)
        {
            Player player = new Player();

            player.MaxHealth     = 200;
            player.Health        = 200;
            player.PhysicalPower = 10;
            player.MagicPower    = 10;
            player.Name          = line;
            player.HandlingName  = line;
            player.Connection    = conn;

            foreach (Skill skill in Global.SkillTable.Values)
            {
                if (skill.Name == "Autoattack")
                {
                    continue;
                }
                player.Skills.Add(skill.Name, new SkillInstance(skill));
            }

            player.SkillSlots.Insert(0, player.Skills["Backstab"]);
            player.SkillSlots.Insert(1, player.Skills["Flurry"]);
            player.SkillSlots.Insert(2, player.Skills["Savage Strike"]);
            conn.SetPlayer(player);

            DynamicMenu menu = new DynamicMenu(player, "HandleClientMenu");

            menu.List.Add("telnet", new Command("telnet", "", false, "Sets your client type as a telnet connection (telnet, terminal, MUD client)"));
            menu.List.Add("full", new Command("full", "", false, "Sets your client type as the official rich client"));
            menu.List.Add("android", new Command("android", "", false, "Sets your client type as an Android phone"));
            player.Menu = menu;
            player.SendMessage("Please select your client type:\n\r- telnet\n\r- full\n\r- android\n\r");
        }
Exemple #2
0
        /// <summary>
        /// If our connection doesn't have a Player yet, everything is sent here to handle 
        /// login and Player creation.
        /// </summary>
        /// <param name="conn">The TelnetConnection the input is coming from</param>
        /// <param name="line">The input string</param>
        public static void LoginInterpret(TelnetConnection conn, string line)
        {
            Player player = new Player();
            player.MaxHealth = 200;
            player.Health = 200;
            player.PhysicalPower = 10;
            player.MagicPower = 10;
            player.Name = line;
            player.HandlingName = line;
            player.Connection = conn;

            foreach (Skill skill in Global.SkillTable.Values)
            {
                if (skill.Name == "Autoattack")
                    continue;
                player.Skills.Add(skill.Name, new SkillInstance(skill));
            }

            player.SkillSlots.Insert(0, player.Skills["Backstab"]);
            player.SkillSlots.Insert(1, player.Skills["Flurry"]);
            player.SkillSlots.Insert(2, player.Skills["Savage Strike"]);
            conn.SetPlayer(player);

            InputStringMenu strMenu = new InputStringMenu(player, "HandlePasswordInput");
            player.Menu = strMenu;
            player.SendMessage("Password: ");
        }
Exemple #3
0
        /// <summary>
        /// If our connection doesn't have a Player yet, everything is sent here to handle
        /// login and Player creation.
        /// </summary>
        /// <param name="conn">The TelnetConnection the input is coming from</param>
        /// <param name="line">The input string</param>
        static public void LoginInterpret(TelnetConnection conn, string line)
        {
            Player player = new Player();

            player.MaxHealth     = 200;
            player.Health        = 200;
            player.PhysicalPower = 10;
            player.MagicPower    = 10;
            player.Name          = line;
            player.HandlingName  = line;
            player.Connection    = conn;

            foreach (Skill skill in Global.SkillTable.Values)
            {
                if (skill.Name == "Autoattack")
                {
                    continue;
                }
                player.Skills.Add(skill.Name, new SkillInstance(skill));
            }

            player.SkillSlots.Insert(0, player.Skills["Backstab"]);
            player.SkillSlots.Insert(1, player.Skills["Flurry"]);
            player.SkillSlots.Insert(2, player.Skills["Savage Strike"]);
            conn.SetPlayer(player);

            InputStringMenu strMenu = new InputStringMenu(player, "HandlePasswordInput");

            player.Menu = strMenu;
            player.SendMessage("Password: ");
        }
Exemple #4
0
        /// <summary>
        /// If our connection doesn't have a Player yet, everything is sent here to handle 
        /// login and Player creation.
        /// </summary>
        /// <param name="conn">The TelnetConnection the input is coming from</param>
        /// <param name="line">The input string</param>
        public static void LoginInterpret(TelnetConnection conn, string line)
        {
            Player player = new Player();
            player.MaxHealth = 200;
            player.Health = 200;
            player.PhysicalPower = 10;
            player.MagicPower = 10;
            player.Name = line;
            player.HandlingName = line;
            player.Connection = conn;

            foreach (Skill skill in Global.SkillTable.Values)
            {
                if (skill.Name == "Autoattack")
                    continue;
                player.Skills.Add(skill.Name, new SkillInstance(skill));
            }

            player.SkillSlots.Insert(0, player.Skills["Backstab"]);
            player.SkillSlots.Insert(1, player.Skills["Flurry"]);
            player.SkillSlots.Insert(2, player.Skills["Savage Strike"]);
            conn.SetPlayer(player);

            DynamicMenu menu = new DynamicMenu(player, "HandleClientMenu");
            menu.List.Add("telnet", new Command("telnet", "", false, "Sets your client type as a telnet connection (telnet, terminal, MUD client)"));
            menu.List.Add("full", new Command("full", "", false, "Sets your client type as the official rich client"));
            menu.List.Add("android", new Command("android", "", false, "Sets your client type as an Android phone"));
            player.Menu = menu;
            player.SendMessage("Please select your client type:\n\r- telnet\n\r- full\n\r- android\n\r");
        }