public DuelSetup_Rules_Spells(Duel d) : base(0, 0)
		{
            Handeling = d;

			Closable = true;
			Dragable = true;
			Resizable = false;

            AddBackground(219, 238, 172, 254, 9300);
            AddLabel(255, 244, 70, @"Spell Use Rules");

            AddCheck(225, 265, 210, 211, Handeling.Spells, 1);
            AddLabel(255, 262, 54, @"Allow Magic");
            AddButton(225, 290, 1209, 1210, 2, GumpButtonType.Reply, 0);
            AddLabel(255, 288, 54, @"1st Circle");
            AddButton(225, 315, 1209, 1210, 3, GumpButtonType.Reply, 0);
            AddLabel(255, 312, 54, @"2nd Circle");
            AddButton(225, 340, 1209, 1210, 4, GumpButtonType.Reply, 0);
            AddLabel(255, 338, 54, @"3rd Circle");
            AddButton(225, 365, 1209, 1210, 5, GumpButtonType.Reply, 0);
            AddLabel(255, 362, 54, @"4th Circle");
            AddButton(225, 390, 1209, 1210, 6, GumpButtonType.Reply, 0);
            AddLabel(255, 388, 54, @"5th Circle");
            AddButton(225, 415, 1209, 1210, 7, GumpButtonType.Reply, 0);
            AddLabel(255, 412, 54, @"6th Circle");
            AddButton(225, 440, 1209, 1210, 8, GumpButtonType.Reply, 0);
            AddLabel(255, 438, 54, @"7th Circle");
            AddButton(225, 465, 1209, 1210, 9, GumpButtonType.Reply, 0);
            AddLabel(255, 462, 54, @"8th Circle");
		}
		public DuelSetup_Pending(Duel d) : base(0, 0)
		{
            Handeling = d;

			Closable = false;
			Dragable = true;
			Resizable = false;

            int bh = (PlayerCount() * 38);
			AddBackground( 212, 177, 251, bh, 9250 );
			AddBackground( 219, 185, 235, (bh - 15), 9350 );

            int y = 190;
            IEnumerator key = Handeling.Teams.Keys.GetEnumerator();
            for (int i = 0; i < Handeling.Teams.Count; ++i)
            {
                key.MoveNext();
                Duel_Team d_team = (Duel_Team)Handeling.Teams[(int)key.Current];

                for (int i2 = 0; i2 < d_team.Players.Count; ++i2)
                {
                    object o = (object)d_team.Players[i2];
                    if (o is PlayerMobile)
                    {
                        PlayerMobile pm = (PlayerMobile)o;
                        AddLabel(250, y, 0, String.Format("{0}", pm.Name));
                        AddImage(225, y, ImageID((bool)d_team.Accepted[pm]));
                        y += 30;
                    }
                }
            }
		}
        public DuelSetup_Rules_Combat(Duel d)
            : base(0, 0)
        {
            Handeling = d;

            Closable = true;
            Dragable = true;
            Resizable = false;

            AddBackground(219, 238, 172, 179, 9300);
            AddLabel(245, 244, 70, @"Combat Ability Rules");

            AddCheck(225, 265, 210, 211, Handeling.CombatAbilities, 1);
            AddLabel(255, 265, 54, @"Combat Abilities");
            AddCheck(225, 290, 210, 211, Handeling.Stun, 2);
            AddLabel(255, 290, 54, @"Stun");
            AddCheck(225, 315, 210, 211, Handeling.Disarm, 3);
            AddLabel(255, 315, 54, @"Disarm");
            AddCheck(225, 340, 210, 211, Handeling.ConcussionBlow, 4);
            AddLabel(255, 340, 54, @"Concussion Blow");
            AddCheck(225, 365, 210, 211, Handeling.CrushingBlow, 5);
            AddLabel(255, 365, 54, @"Crushing Blow");
            AddCheck(225, 390, 210, 211, Handeling.ParalyzingBlow, 6);
            AddLabel(255, 390, 54, @"Paralyzing Blow");
        }
        public DuelSetup_Rules_Skills(Duel d)
            : base(0, 0)
        {
            Handeling = d;

            Closable = true;
            Dragable = true;
            Resizable = false;

            AddBackground(219, 238, 172, 254, 9300);
            AddLabel(255, 244, 70, @"Skill Use Rules");

            AddCheck(225, 265, 210, 211, Handeling.Anatomy, 1);
            AddLabel(255, 265, 54, @"Anatomy");
            AddCheck(225, 290, 210, 211, Handeling.DetectHidden, 2);
            AddLabel(255, 290, 54, @"Detect Hidden");
            AddCheck(225, 315, 210, 211, Handeling.EvaluatingIntelligence, 3);
            AddLabel(255, 315, 54, @"Evaluating Intelligence");
            AddCheck(225, 340, 210, 211, Handeling.Hiding, 4);
            AddLabel(255, 340, 54, @"Hiding");
            AddCheck(225, 365, 210, 211, Handeling.Poisoning, 5);
            AddLabel(255, 365, 54, @"Poisoning");
            AddCheck(225, 390, 210, 211, Handeling.Snooping, 6);
            AddLabel(255, 390, 54, @"Snooping");
            AddCheck(225, 415, 210, 211, Handeling.Stealing, 7);
            AddLabel(255, 415, 54, @"Stealing");
            AddCheck(225, 440, 210, 211, Handeling.SpiritSpeak, 8);
            AddLabel(255, 440, 54, @"Spirit Speak");
            AddCheck(225, 465, 210, 211, Handeling.Stealth, 9);
            AddLabel(255, 465, 54, @"Stealth");
        }
		public DuelSetup_Rules(Duel d) : base(0, 0)
		{
            Handeling = d;

			Closable = true;
			Dragable = true;
			Resizable = false;

            AddBackground(219, 238, 172, 229, 9300);
            AddLabel(283, 244, 70, @"Rules");

            AddButton(225, 265, 1209, 1210, 1, GumpButtonType.Reply, 0);
            AddLabel(245, 262, 54, @"Spells");
            AddButton(225, 285, 1209, 1210, 2, GumpButtonType.Reply, 0);
            AddLabel(245, 282, 54, @"Combat Abilities");
            AddButton(225, 305, 1209, 1210, 3, GumpButtonType.Reply, 0);
            AddLabel(245, 302, 54, @"Skills");
            AddButton(225, 325, 1209, 1210, 4, GumpButtonType.Reply, 0);
            AddLabel(245, 322, 54, @"Weapons");
            AddButton(225, 345, 1209, 1210, 5, GumpButtonType.Reply, 0);
            AddLabel(245, 342, 54, @"Armor");
            AddButton(225, 365, 1209, 1210, 6, GumpButtonType.Reply, 0);
            AddLabel(245, 362, 54, @"Items");
            //AddButton(225, 385, 1209, 1210, 7, GumpButtonType.Reply, 0);
            //AddLabel(245, 382, 54, @"Samurai Spells");
            //AddButton(225, 405, 1209, 1210, 8, GumpButtonType.Reply, 0);
            //AddLabel(245, 402, 54, @"Chivalry");
            //AddButton(225, 425, 1209, 1210, 9, GumpButtonType.Reply, 0);
            //AddLabel(245, 422, 54, @"Necromancy");
            //AddButton(225, 445, 1209, 1210, 10, GumpButtonType.Reply, 0);
            //AddLabel(245, 442, 54, @"Ninja Spells");
		}
        public DuelSetup_Rules_Items(Duel d)
            : base(0, 0)
        {
            Handeling = d;

            Closable = true;
            Dragable = true;
            Resizable = false;

            //AddBackground(219, 238, 172, 154, 9300);
            AddBackground(219, 238, 172, 178, 9300);
            AddLabel(255, 244, 70, @"Item Use Rules");

            AddCheck(225, 265, 210, 211, Handeling.Potions, 1);
            AddLabel(255, 265, 54, @"Potions");
            AddCheck(225, 290, 210, 211, Handeling.Bandages, 2);
            AddLabel(255, 290, 54, @"Bandages");
            AddCheck(225, 315, 210, 211, Handeling.TrappedContainers, 3);
            AddLabel(255, 315, 54, @"Trapped Containers");
            AddCheck(225, 340, 210, 211, Handeling.Bolas, 4);
            AddLabel(255, 340, 54, @"Bolas");
            AddCheck(225, 365, 210, 211, Handeling.Mounts, 5);
            AddLabel(255, 365, 54, @"Mounts");
            AddCheck(225, 390, 210, 211, Handeling.Wands, 6);
            AddLabel(255, 390, 54, @"Wands");
        }
        public DuelSetup_Rules_View(Duel d, int team, int id)
            : base(0, 0)
        {
            Handeling = d;
            TeamID = team;
            Index = id;

            Closable = false;
            Dragable = true;
            Resizable = false;

            int bh = 309 + (20 * Handeling.Teams.Count);
            AddBackground(221, 179, 194, bh, 9300);
            AddLabel(266, 186, 70, @"View Duel Rules");

            AddButton(225, 209, 1209, 1210, 11, GumpButtonType.Reply, 0);
            AddLabel(245, 206, 57, @"I accept these rules");
            AddButton(225, 230, 1209, 1210, 0, GumpButtonType.Reply, 0);
            AddLabel(245, 227, 38, @"I do not accept these rules");

            AddButton(225, 256, 1209, 1210, 1, GumpButtonType.Reply, 0);
            AddLabel(245, 253, 54, @"Spells");
            AddButton(225, 276, 1209, 1210, 2, GumpButtonType.Reply, 0);
            AddLabel(245, 273, 54, @"Combat Abilities");
            AddButton(225, 296, 1209, 1210, 3, GumpButtonType.Reply, 0);
            AddLabel(245, 293, 54, @"Skills");
            AddButton(225, 316, 1209, 1210, 4, GumpButtonType.Reply, 0);
            AddLabel(245, 313, 54, @"Weapons");
            AddButton(225, 336, 1209, 1210, 5, GumpButtonType.Reply, 0);
            AddLabel(245, 333, 54, @"Armor");
            AddButton(225, 356, 1209, 1210, 6, GumpButtonType.Reply, 0);
            AddLabel(245, 353, 54, @"Items");
            //AddButton(225, 376, 1209, 1210, 7, GumpButtonType.Reply, 0);
            //AddLabel(245, 373, 54, @"Samurai Spells");
            //AddButton(225, 396, 1209, 1210, 8, GumpButtonType.Reply, 0);
            //AddLabel(245, 393, 54, @"Chivalry");
            //AddButton(225, 416, 1209, 1210, 9, GumpButtonType.Reply, 0);
            //AddLabel(245, 413, 54, @"Necromancy");
            //AddButton(225, 436, 1209, 1210, 10, GumpButtonType.Reply, 0);
            //AddLabel(245, 433, 54, @"Ninja Spells");

            AddLabel(256, 463, 70, @"View Participants");
            int y = 486, bid = 12;
            IEnumerator key = Handeling.Teams.Keys.GetEnumerator();
            for (int i = 0; i < Handeling.Teams.Count; ++i)
            {
                key.MoveNext();
                Duel_Team d_team = (Duel_Team)Handeling.Teams[(int)key.Current];
                AddButton(225, y, 1209, 1210, bid, GumpButtonType.Reply, 0);
                AddLabel(245, (y - 3), 12, String.Format(@"Team {0}: {1} out of {2} players", d_team.TeamID.ToString(), TeamPlayers(d_team).ToString(), d_team.Size.ToString()));

                y += 20;
                bid += 1;
            }
        }
        public DuelSetup_Rules_Weapons(Duel d)
            : base(0, 0)
        {
            Handeling = d;

            Closable = true;
            Dragable = true;
            Resizable = false;

            AddBackground(219, 238, 172, 129, 9300);
            AddLabel(263, 244, 70, @"Weapon Rules");

            AddCheck(225, 265, 210, 211, Handeling.Weapons, 1);
            AddLabel(255, 265, 54, @"Weapons Allowed");
            AddCheck(225, 290, 210, 211, Handeling.Magical, 2);
            AddLabel(255, 290, 54, @"Magic Weapons");
            AddCheck(225, 315, 210, 211, Handeling.Poisoned, 3);
            AddLabel(255, 315, 54, @"Poisoned Weapons");
            AddCheck(225, 340, 210, 211, Handeling.RunicWeapons, 4);
            AddLabel(255, 340, 54, @"Runic Weapons");
        }
        public DuelSetup_Rules_Chivalry_View(Duel d, int team, int id)
            : base(0, 0)
        {
            Handeling = d;
            TeamID    = team;
            Index     = id;

            Closable  = true;
            Dragable  = true;
            Resizable = false;

            AddBackground(219, 238, 172, 304, 9300);
            AddLabel(255, 244, 70, @"Paladin Spell Rules");

            AddImage(225, 265, ImageID(Handeling.AllowChivalry));
            AddLabel(255, 265, 54, @"Allow Chivalry");
            AddImage(225, 290, ImageID(Handeling.ClenseByFire));
            AddLabel(255, 290, 54, @"Cleanse by Fire");
            AddImage(225, 315, ImageID(Handeling.CloseWounds));
            AddLabel(255, 315, 54, @"Close Wounds");
            AddImage(225, 340, ImageID(Handeling.ConsecrateWeapon));
            AddLabel(255, 340, 54, @"Consecrate Weapon");
            AddImage(225, 365, ImageID(Handeling.DispellEvil));
            AddLabel(255, 365, 54, @"Dispell Evil");
            AddImage(225, 390, ImageID(Handeling.DivineFury));
            AddLabel(255, 390, 54, @"Divine Fury");
            AddImage(225, 415, ImageID(Handeling.EnemyOfOne));
            AddLabel(255, 415, 54, @"Enemy of One");
            AddImage(225, 440, ImageID(Handeling.HolyLight));
            AddLabel(255, 440, 54, @"Holy Light");
            AddImage(225, 465, ImageID(Handeling.NobleSacrafice));
            AddLabel(255, 465, 54, @"Noble Sacrafice");
            AddImage(225, 490, ImageID(Handeling.RemoveCurse));
            AddLabel(255, 490, 54, @"Remove Curse");
            AddImage(225, 515, ImageID(Handeling.SacredJourny));
            AddLabel(255, 515, 54, @"Sacred Journey");
        }
		public DuelSetup_Main(Duel d) : base(0, 0)
		{
            Handling = d;

			Closable = true;
			Dragable = true;
			Resizable = false;

            int bh = 165 + (Handling.Teams.Count * 20);
            AddBackground(281, 144, 279, bh, 9300);
            AddLabel(381, 151, 70, @"Duel Setup");
            AddLabel(315, 172, 40, @"Rules");
            AddLabel(315, 192, 70, @"Start Duel");
            AddLabel(315, 212, 53, @"Set Buy In");
            AddLabel(315, 232, 104, @"Add A Team");
            AddLabel(315, 252, 142, @"Remove A Team");
            AddLabel(376, 278, 104, @"Participants");
            AddButton(290, 175, 1209, 1210, 2, GumpButtonType.Reply, 0); // Rules
            AddButton(290, 195, 1209, 1210, 1, GumpButtonType.Reply, 0); // Start Duel
            AddButton(290, 215, 1209, 1210, 5, GumpButtonType.Reply, 0); // Set Buy In
            AddButton(290, 235, 1209, 1210, 3, GumpButtonType.Reply, 0); // Add A Team
            AddButton(290, 255, 1209, 1210, 4, GumpButtonType.Reply, 0); // Remove A Team

            int y = 298;
            int id = 6;
            IEnumerator key = Handling.Teams.Keys.GetEnumerator();
            for (int i = 0; i < Handling.Teams.Count; ++i)
            {
                key.MoveNext();
                Duel_Team team = (Duel_Team)Handling.Teams[(int)key.Current];
                AddLabel(315, (y - 3), 104, String.Format(@"Team {0}: {1} out of {2} players", team.TeamID.ToString(), TeamPlayers(team).ToString(), team.Size.ToString()));
                AddButton(290, y, 1209, 1210, id, GumpButtonType.Reply, 0); // View A Team

                y += 20;
                id += 1;
            }
		}
		public DuelSetup_ParticipantSetup(Duel d, int id) : base(0, 0)
		{
            Handeling = d;
            TeamID = id;
            D_Team = (Duel_Team)Handeling.Teams[TeamID];

			Closable = true;
			Dragable = true;
			Resizable = false;

            int bh = 121 + (D_Team.Size * 20);
            AddBackground(115, 85, 215, bh, 9300);
            AddLabel(164, 91, 70, @"Participant Setup");
            AddLabel(123, 113, 113, String.Format(@"Team Size: {0}", D_Team.Size.ToString()));

            AddButton(145, 138, 1209, 1210, 1, GumpButtonType.Reply, 0);
            AddLabel(166, 135, 144, @"Increase Size");
            AddButton(145, 158, 1209, 1210, 2, GumpButtonType.Reply, 0);
            AddLabel(166, 155, 144, @"Decrease Size");

            AddLabel(177, 180, 70, @"Team Players");
            int y = 204, bi = 3;
            for (int i = 0; i < D_Team.Size; ++i)
            {
                if (Handeling.Teams[TeamID].Players[i] == "@null")
                    AddLabel(144, (y - 3), 254, String.Format(@"{0}: Empty", (i +1).ToString()));
                else
                {
                    PlayerMobile pm = (PlayerMobile)D_Team.Players[i];
                    AddLabel(144, (y - 3), 254, String.Format(@"{0}: {1}", (i + 1).ToString(), pm.Name));
                }
                AddButton(123, y, 1209, 1210, bi, GumpButtonType.Reply, 0);

                y += 20;
                bi += 1;
            }
		}
        public DuelSetup_SetBuyIn(Duel d)
            : base(0, 0)
        {
            Handeling = d;

            AddBackground(135, 134, 240, 114, 9300);
            AddLabel(201, 142, 70, @"Set Duel Buy In");
            AddBackground(140, 165, 230, 26, 9350);

            if (Handeling.BuyIn > 0)
            {
                Mode = "remove";
                AddButton(145, 220, 1209, 1210, 1, GumpButtonType.Reply, 0); // Set/Remove Buy In
                AddLabel(165, 217, 40, @"Remove Buy In");
            }
            else
            {
                Mode = "set";
                AddButton(145, 220, 1209, 1210, 1, GumpButtonType.Reply, 0); // Set/Remove Buy In
                AddLabel(165, 217, 40, @"Set Buy In");
            }

            AddTextEntry(142, 169, 224, 19, 52, 3, Handeling.BuyIn.ToString());
        }
Example #13
0
        public DuelSetup_AddParticipant(Duel d, int team, int i)
            : base(0, 0)
        {
            Handeling = d;
            TeamID    = team;
            Index     = i;
            D_Team    = (Duel_Team)Handeling.Teams[TeamID];

            Closable  = true;
            Dragable  = true;
            Resizable = false;

            AddBackground(187, 187, 260, 216, 9300);
            AddLabel(239, 193, 40, @"Incoming Duel Challenge");

            AddHtml(192, 217, 248, 85, @"You have been challenged to a duel by another player, you can choose to either accept or decline this challenge. If you choose to accept the challenge  you will be added to the duel, if you choose to decline the challenge you will not be added to the duel. To accept some duel's you must pay a lump sum, this is known as dueling for cash, the gold is given to the winning team of the duel.", (bool)true, (bool)true);
            AddLabel(200, 310, 33, String.Format(@"Challenger: {0}", Handeling.Caller.Name));
            AddLabel(200, 330, 54, String.Format(@"Buy In: {0}gp", Handeling.BuyIn.ToString()));

            AddButton(200, 360, 1209, 1210, 1, GumpButtonType.Reply, 0);
            AddLabel(225, 357, 42, @"I will accept the duel");
            AddButton(200, 380, 1209, 1210, 2, GumpButtonType.Reply, 0);
            AddLabel(225, 377, 67, @"I will decline the duel");
        }
Example #14
0
        public DuelSetup_SetBuyIn(Duel d)
            : base(0, 0)
        {
            Handeling = d;

            AddBackground(135, 134, 240, 114, 9300);
            AddLabel(201, 142, 70, @"Set Duel Buy In");
            AddBackground(140, 165, 230, 26, 9350);

            if (Handeling.BuyIn > 0)
            {
                Mode = "remove";
                AddButton(145, 220, 1209, 1210, 1, GumpButtonType.Reply, 0); // Set/Remove Buy In
                AddLabel(165, 217, 40, @"Remove Buy In");
            }
            else
            {
                Mode = "set";
                AddButton(145, 220, 1209, 1210, 1, GumpButtonType.Reply, 0); // Set/Remove Buy In
                AddLabel(165, 217, 40, @"Set Buy In");
            }

            AddTextEntry(142, 169, 224, 19, 52, 3, Handeling.BuyIn.ToString());
        }
        public DuelSetup_Rules_Spells_5th_View(Duel d, int team, int id)
            : base(0, 0)
        {
            Handeling = d;
            TeamID = team;
            Index = id;

            Closable = true;
            Dragable = true;
            Resizable = false;

            AddBackground(219, 238, 172, 229, 9300);
            AddLabel(255, 244, 70, @"5th Circle Rules");

            AddImage(225, 265, ImageID(Handeling.BladeSpirits));
            AddLabel(255, 265, 54, @"Blade Spirits");
            AddImage(225, 290, ImageID(Handeling.DispelField));
            AddLabel(255, 290, 54, @"Dispel Field");
            AddImage(225, 315, ImageID(Handeling.Incognito));
            AddLabel(255, 315, 54, @"Incognito");
            AddImage(225, 340, ImageID(Handeling.MagicReflection));
            AddLabel(255, 340, 54, @"Magic Reflection");
            AddImage(225, 365, ImageID(Handeling.MindBlast));
            AddLabel(255, 365, 54, @"Mind Blast");
            AddImage(225, 390, ImageID(Handeling.Paralyze));
            AddLabel(255, 390, 54, @"Paralyze");
            AddImage(225, 415, ImageID(Handeling.PoisonField));
            AddLabel(255, 415, 54, @"Poison Field");
            AddImage(225, 440, ImageID(Handeling.SummonCreature));
            AddLabel(255, 440, 54, @"Summon Creature");
        }
 public Duel_Add_Timer(PlayerMobile caller, PlayerMobile reciever, Duel d, int team): base (TimeSpan.FromSeconds(25))
 {
     Sent = caller;
     Recieved = reciever;
     Handeling = d;
     TeamID = team;
     this.Start();
 }
 public Duel_AddTarget(Duel d, int team, int i)
     : base(16, false, TargetFlags.None)
 {
     Handeling = d;
     TeamID = team;
     Index = i;
     D_Team = (Duel_Team)Handeling.Teams[TeamID];
 }
        public DuelSetup_Rules_Skills_View(Duel d, int team, int id)
            : base(0, 0)
        {
            Handeling = d;
            TeamID = team;
            Index = id;

            Closable = true;
            Dragable = true;
            Resizable = false;

            AddBackground(219, 238, 172, 254, 9300);
            AddLabel(255, 244, 70, @"Skill Use Rules");

            AddImage(225, 265, ImageID(Handeling.Anatomy));
            AddLabel(255, 265, 54, @"Anatomy");
            AddImage(225, 290, ImageID(Handeling.DetectHidden));
            AddLabel(255, 290, 54, @"Detect Hidden");
            AddImage(225, 315, ImageID(Handeling.EvaluatingIntelligence));
            AddLabel(255, 315, 54, @"Evaluating Intelligence");
            AddImage(225, 340, ImageID(Handeling.Hiding));
            AddLabel(255, 340, 54, @"Hiding");
            AddImage(225, 365, ImageID(Handeling.Poisoning));
            AddLabel(255, 365, 54, @"Poisoning");
            AddImage(225, 390, ImageID(Handeling.Snooping));
            AddLabel(255, 390, 54, @"Snooping");
            AddImage(225, 415, ImageID(Handeling.Stealing));
            AddLabel(255, 415, 54, @"Stealing");
            AddImage(225, 440, ImageID(Handeling.SpiritSpeak));
            AddLabel(255, 440, 54, @"Spirit Speak");
            AddImage(225, 465, ImageID(Handeling.Stealth));
            AddLabel(255, 465, 54, @"Stealth");
        }
        public DuelSetup_Rules_Items_View(Duel d, int team, int id)
            : base(0, 0)
        {
            Handeling = d;
            TeamID = team;
            Index = id;

            Closable = true;
            Dragable = true;
            Resizable = false;

            //AddBackground(219, 238, 172, 154, 9300);
            AddBackground(219, 238, 172, 178, 9300);
            AddLabel(255, 244, 70, @"Item Use Rules");

            AddImage(225, 265, ImageID(Handeling.Potions));
            AddLabel(255, 265, 54, @"Potions");
            AddImage(225, 290, ImageID(Handeling.Bandages));
            AddLabel(255, 290, 54, @"Bandages");
            AddImage(225, 315, ImageID(Handeling.TrappedContainers));
            AddLabel(255, 315, 54, @"Trapped Containers");
            AddImage(225, 340, ImageID(Handeling.Bolas));
            AddLabel(255, 340, 54, @"Bolas");
            AddImage(225, 365, ImageID(Handeling.Mounts));
            AddLabel(255, 365, 54, @"Mounts");
            AddImage(225, 390, ImageID(Handeling.Wands));
            AddLabel(255, 390, 54, @"Wands");
        }
        public DuelSetup_ViewParticipants(Duel d, int teamid, int id, int teamid2)
            : base(0, 0)
        {
            Handeling = d;
            TeamID = teamid;
            Index = id;

            Closable = true;
            Dragable = true;
            Resizable = false;

            int bh = 34 + (Handeling.Teams[teamid2].Players.Count * 20);
            AddBackground(182, 269, 205, bh, 9300);
            AddLabel(204, 276, 70, String.Format(@"View Team {0} Participants", teamid2.ToString()));

            int y = 47;
            Duel_Team d_team = (Duel_Team)Handeling.Teams[teamid2];
            for (int i = 0; i < d_team.Players.Count; ++i)
            {
                object o = (object)d_team.Players[i];
                if (o is PlayerMobile)
                {
                    PlayerMobile pm = (PlayerMobile)o;
                    AddLabel(186, 297, y, String.Format(@"{0}: {1}", (i + 1).ToString(), pm.Name));
                }
                else
                    AddLabel(186, 297, y, String.Format(@"{0}: Empty Slot", (i + 1).ToString()));

                y += 20;
            }
        }
Example #21
0
        public void StartDuel(Duel d)
        {
            Handeling = d;

            if (Handeling.Caller.NetState == null)
            {
                Handeling.EndSelf();
                return;
            }

            HasStarted           = true;
            InUse                = true;
            Handeling.InProgress = true;
            Handeling.Controller = this;

            if (PlayerLocations == null)
            {
                PlayerLocations = new Dictionary <Serial, Point3D>();
            }
            if (PlayerMaps == null)
            {
                PlayerMaps = new Dictionary <Serial, Map>();
            }
            if (PlayerItems == null)
            {
                PlayerItems = new Dictionary <Serial, ArrayList>();
            }
            if (ItemLocations == null)
            {
                ItemLocations = new Dictionary <Serial, Point3D>();
            }
            if (InsuredItems == null)
            {
                InsuredItems = new ArrayList();
            }
            if (FrozenItems == null)
            {
                FrozenItems = new ArrayList();
            }

            IEnumerator key = Handeling.Teams.Keys.GetEnumerator();

            for (int i = 0; i < Handeling.Teams.Count; ++i)
            {
                key.MoveNext();
                Duel_Team d_team = (Duel_Team)Handeling.Teams[(int)key.Current];

                for (int i2 = 0; i2 < d_team.Players.Count; ++i2)
                {
                    object o = (object)d_team.Players[i2];

                    if (o is PlayerMobile)
                    {
                        PlayerMobile pm = (PlayerMobile)o;
                        StorePlayer(pm);
                        SpawnPlayer(pm, (int)key.Current);
                        PlayerNoto(pm);
                        pm.Blessed = true;
                        pm.Frozen  = true;
                        pm.Spell   = null;
                        ResurrectPlayer(pm);
                    }
                }
            }

            Timer.DelayCall(TimeSpan.FromSeconds(3.0), new TimerCallback(UnInvul));
            EndTimer = new Duel_EndTimer(Handeling);
        }
        public DuelSetup_Rules_Weapons_View(Duel d, int team, int id)
            : base(0, 0)
        {
            Handeling = d;
            TeamID = team;
            Index = id;

            Closable = true;
            Dragable = true;
            Resizable = false;

            AddBackground(219, 238, 172, 129, 9300);
            AddLabel(263, 244, 70, @"Weapon Rules");

            AddImage(225, 265, ImageID(Handeling.Weapons));
            AddLabel(255, 265, 54, @"Weapons Allowed");
            AddImage(225, 290, ImageID(Handeling.Magical));
            AddLabel(255, 290, 54, @"Magic Weapons");
            AddImage(225, 315, ImageID(Handeling.Poisoned));
            AddLabel(255, 315, 54, @"Poisoned Weapons");
            AddImage(225, 340, ImageID(Handeling.RunicWeapons));
            AddLabel(255, 340, 54, @"Runic Weapons");
        }
        public DuelSetup_Rules_Armor_View(Duel d, int team, int id)
            : base(0, 0)
        {
            Handeling = d;
            TeamID = team;
            Index = id;

            Closable = true;
            Dragable = true;
            Resizable = false;

            AddBackground(219, 238, 172, 129, 9300);
            AddLabel(263, 244, 70, @"Armor Rules");

            AddImage(225, 265, ImageID(Handeling.Armor));
            AddLabel(255, 265, 54, @"Armor Allowed");
            AddImage(225, 290, ImageID(Handeling.MagicalArmor));
            AddLabel(255, 290, 54, @"Magic Armor");
            AddImage(225, 315, ImageID(Handeling.Shields));
            AddLabel(255, 315, 54, @"Shields");
            AddImage(225, 340, ImageID(Handeling.Colored));
            AddLabel(255, 340, 54, @"Colored Armor");
        }
        public DuelSetup_Rules_Spells_3rd_View(Duel d, int team, int id)
            : base(0, 0)
        {
            Handeling = d;
            TeamID = team;
            Index = id;

            Closable = true;
            Dragable = true;
            Resizable = false;

            AddBackground(219, 238, 172, 229, 9300);
            AddLabel(255, 244, 70, @"3rd Circle Rules");

            AddImage(225, 265, ImageID(Handeling.Bless));
            AddLabel(255, 265, 54, @"Bless");
            AddImage(225, 290, ImageID(Handeling.Fireball));
            AddLabel(255, 290, 54, @"Fireball");
            AddImage(225, 315, ImageID(Handeling.MagicLock));
            AddLabel(255, 315, 54, @"Magic Lock");
            AddImage(225, 340, ImageID(Handeling.Poison));
            AddLabel(255, 340, 54, @"Poison");
            AddImage(225, 365, ImageID(Handeling.Telekinisis));
            AddLabel(255, 365, 54, @"Telekinesis");
            AddImage(225, 390, ImageID(Handeling.Teleport));
            AddLabel(255, 390, 54, @"Teleport");
            AddImage(225, 415, ImageID(Handeling.Unlock));
            AddLabel(255, 415, 54, @"Unlock Spell");
            AddImage(225, 440, ImageID(Handeling.WallOfStone));
            AddLabel(255, 440, 54, @"Wall of Stone");
        }
        public DuelSetup_Rules_Spells_2nd_View(Duel d, int team, int id)
            : base(0, 0)
        {
            Handeling = d;
            TeamID = team;
            Index = id;

            Closable = true;
            Dragable = true;
            Resizable = false;

            AddBackground(219, 238, 172, 229, 9300);
            AddLabel(255, 244, 70, @"2nd Circle Rules");

            AddImage(225, 265, ImageID(Handeling.Agility));
            AddLabel(255, 265, 54, @"Agility");
            AddImage(225, 290, ImageID(Handeling.Cunning));
            AddLabel(255, 290, 54, @"Cunning");
            AddImage(225, 315, ImageID(Handeling.Cure));
            AddLabel(255, 315, 54, @"Cure");
            AddImage(225, 340, ImageID(Handeling.Harm));
            AddLabel(255, 340, 54, @"Harm");
            AddImage(225, 365, ImageID(Handeling.MagicTrap));
            AddLabel(255, 365, 54, @"Magic Trap");
            AddImage(225, 390, ImageID(Handeling.Untrap));
            AddLabel(255, 390, 54, @"Untrap");
            AddImage(225, 415, ImageID(Handeling.Protection));
            AddLabel(255, 415, 54, @"Protection");
            AddImage(225, 440, ImageID(Handeling.Strength));
            AddLabel(255, 440, 54, @"Strength");
        }
        public DuelSetup_Rules_Spells_1st_View(Duel d, int team, int id)
            : base(0, 0)
        {
            Handeling = d;
            TeamID = team;
            Index = id;

            Closable = true;
            Dragable = true;
            Resizable = false;

            AddBackground(219, 238, 172, 229, 9300);
            AddLabel(255, 244, 70, @"1st Circle Rules");

            AddImage(225, 265, ImageID(Handeling.ReactiveArmor));
            AddLabel(255, 265, 54, @"Reactive Armor");
            AddImage(225, 290, ImageID(Handeling.Clumsy));
            AddLabel(255, 290, 54, @"Clumsy");
            AddImage(225, 315, ImageID(Handeling.CreateFood));
            AddLabel(255, 315, 54, @"Create Food");
            AddImage(225, 340, ImageID(Handeling.Feeblemind));
            AddLabel(255, 340, 54, @"Feeblemind");
            AddImage(225, 365, ImageID(Handeling.Heal));
            AddLabel(255, 365, 54, @"Heal");
            AddImage(225, 390, ImageID(Handeling.MagicArrow));
            AddLabel(255, 390, 54, @"Magic Arrow");
            AddImage(225, 415, ImageID(Handeling.NightSight));
            AddLabel(255, 415, 54, @"Night Sight");
            AddImage(225, 440, ImageID(Handeling.Weaken));
            AddLabel(255, 440, 54, @"Weaken");
        }
        public DuelSetup_Rules_Spells_View(Duel d, int team, int id)
            : base(0, 0)
        {
            Handeling = d;
            TeamID = team;
            Index = id;

            Closable = true;
            Dragable = true;
            Resizable = false;

            AddBackground(219, 238, 172, 254, 9300);
            AddLabel(255, 244, 70, @"Spell Use Rules");

            AddImage(225, 265, ImageID(Handeling.Spells));
            AddLabel(255, 265, 54, @"Allow Magic");
            AddButton(225, 290, 1209, 1210, 1, GumpButtonType.Reply, 0);
            AddLabel(255, 288, 54, @"1st Circle");
            AddButton(225, 315, 1209, 1210, 2, GumpButtonType.Reply, 0);
            AddLabel(255, 312, 54, @"2nd Circle");
            AddButton(225, 340, 1209, 1210, 3, GumpButtonType.Reply, 0);
            AddLabel(255, 338, 54, @"3rd Circle");
            AddButton(225, 365, 1209, 1210, 4, GumpButtonType.Reply, 0);
            AddLabel(255, 362, 54, @"4th Circle");
            AddButton(225, 390, 1209, 1210, 5, GumpButtonType.Reply, 0);
            AddLabel(255, 388, 54, @"5th Circle");
            AddButton(225, 415, 1209, 1210, 6, GumpButtonType.Reply, 0);
            AddLabel(255, 412, 54, @"6th Circle");
            AddButton(225, 440, 1209, 1210, 7, GumpButtonType.Reply, 0);
            AddLabel(255, 438, 54, @"7th Circle");
            AddButton(225, 465, 1209, 1210, 8, GumpButtonType.Reply, 0);
            AddLabel(255, 462, 54, @"8th Circle");
        }
Example #28
0
 public Duel_EndTimer(Duel d)
     : base(TimeSpan.FromMinutes(45.0))
 {
     Handeling = d;
     this.Start();
 }
        public DuelSetup_Rules_Spells_6th_View(Duel d, int team, int id)
            : base(0, 0)
        {
            Handeling = d;
            TeamID = team;
            Index = id;

            Closable = true;
            Dragable = true;
            Resizable = false;

            AddBackground(219, 238, 172, 229, 9300);
            AddLabel(255, 244, 70, @"6th Circle Rules");

            AddImage(225, 265, ImageID(Handeling.Dispel));
            AddLabel(255, 265, 54, @"Dispel");
            AddImage(225, 290, ImageID(Handeling.EnergyBolt));
            AddLabel(255, 290, 54, @"Energy Bolt");
            AddImage(225, 315, ImageID(Handeling.Explosion));
            AddLabel(255, 315, 54, @"Explosion");
            AddImage(225, 340, ImageID(Handeling.Invisibility));
            AddLabel(255, 340, 54, @"Invisibility");
            AddImage(225, 365, ImageID(Handeling.Mark));
            AddLabel(255, 365, 54, @"Mark");
            AddImage(225, 390, ImageID(Handeling.MassCurse));
            AddLabel(255, 390, 54, @"Mass Curse");
            AddImage(225, 415, ImageID(Handeling.ParalyzeField));
            AddLabel(255, 415, 54, @"Paralyze Field");
            AddImage(225, 440, ImageID(Handeling.Reveal));
            AddLabel(255, 440, 54, @"Reveal");
        }
        public int FilledTeams(Duel d)
        {
            int filled = 0;
            IEnumerator key = Handling.Teams.Keys.GetEnumerator();
            for (int i = 0; i < Handling.Teams.Count; ++i)
            {
                key.MoveNext();
                Duel_Team d_team = (Duel_Team)Handling.Teams[(int)key.Current];

                bool hasplayers = false;
                for (int i2 = 0; i2 < d_team.Players.Count; ++i2)
                {
                    object o = (object)d_team.Players[i2];

                    if (o is PlayerMobile)
                        hasplayers = true;
                }

                if (hasplayers)
                    filled += 1;
            }

            return filled;
        }
        public DuelSetup_Rules_Spells_7th_View(Duel d, int team, int id)
            : base(0, 0)
        {
            Handeling = d;
            TeamID = team;
            Index = id;

            Closable = true;
            Dragable = true;
            Resizable = false;

            AddBackground(219, 238, 172, 229, 9300);
            AddLabel(255, 244, 70, @"7th Circle Rules");

            AddImage(225, 265, ImageID(Handeling.ChainLightning));
            AddLabel(255, 265, 54, @"Chain Lightning");
            AddImage(225, 290, ImageID(Handeling.EnergyField));
            AddLabel(255, 290, 54, @"Energy Field");
            AddImage(225, 315, ImageID(Handeling.FlameStrike));
            AddLabel(255, 315, 54, @"Flame Strike");
            AddImage(225, 340, ImageID(Handeling.GateTravel));
            AddLabel(255, 340, 54, @"Gate Travel");
            AddImage(225, 365, ImageID(Handeling.ManaVampire));
            AddLabel(255, 365, 54, @"Mana Vampire");
            AddImage(225, 390, ImageID(Handeling.MassDispel));
            AddLabel(255, 390, 54, @"Mass Dispel");
            AddImage(225, 415, ImageID(Handeling.MeteorSwarm));
            AddLabel(255, 415, 54, @"Meteor Swarm");
            AddImage(225, 440, ImageID(Handeling.Polymorph));
            AddLabel(255, 440, 54, @"Polymorph");
        }
        public DuelSetup_Rules_Spells_8th_View(Duel d, int team, int id)
            : base(0, 0)
        {
            Handeling = d;
            TeamID = team;
            Index = id;

            Closable = true;
            Dragable = true;
            Resizable = false;

            AddBackground(219, 238, 172, 229, 9300);
            AddLabel(255, 244, 70, @"8th Circle Rules");

            AddImage(225, 265, ImageID(Handeling.EarthQuake));
            AddLabel(255, 265, 54, @"Earthquake");
            AddImage(225, 290, ImageID(Handeling.EnergyVotex));
            AddLabel(255, 290, 54, @"Energy Vortex");
            AddImage(225, 315, ImageID(Handeling.Resurrection));
            AddLabel(255, 315, 54, @"Resurrection");
            AddImage(225, 340, ImageID(Handeling.SummonAirElemental));
            AddLabel(255, 340, 54, @"Summon Air");
            AddImage(225, 365, ImageID(Handeling.SummonDaemon));
            AddLabel(255, 365, 54, @"Summon Daemon");
            AddImage(225, 390, ImageID(Handeling.SummonEarthElemental));
            AddLabel(255, 390, 54, @"Summon Earth");
            AddImage(225, 415, ImageID(Handeling.SummonFireElemental));
            AddLabel(255, 415, 54, @"Summon Fire");
            AddImage(225, 440, ImageID(Handeling.SummonWaterElemental));
            AddLabel(255, 440, 54, @"Summon Water");
        }
        public DuelSetup_AddParticipant(Duel d, int team, int i)
            : base(0, 0)
        {
            Handeling = d;
            TeamID = team;
            Index = i;
            D_Team = (Duel_Team)Handeling.Teams[TeamID];

            Closable = true;
            Dragable = true;
            Resizable = false;

            AddBackground(187, 187, 260, 216, 9300);
            AddLabel(239, 193, 40, @"Incoming Duel Challenge");

            AddHtml(192, 217, 248, 85, @"You have been challenged to a duel by another player, you can choose to either accept or decline this challenge. If you choose to accept the challenge  you will be added to the duel, if you choose to decline the challenge you will not be added to the duel. To accept some duel's you must pay a lump sum, this is known as dueling for cash, the gold is given to the winning team of the duel.", (bool)true, (bool)true);
            AddLabel(200, 310, 33, String.Format(@"Challenger: {0}", Handeling.Caller.Name));
            AddLabel(200, 330, 54, String.Format(@"Buy In: {0}gp", Handeling.BuyIn.ToString()));

            AddButton(200, 360, 1209, 1210, 1, GumpButtonType.Reply, 0);
            AddLabel(225, 357, 42, @"I will accept the duel");
            AddButton(200, 380, 1209, 1210, 2, GumpButtonType.Reply, 0);
            AddLabel(225, 377, 67, @"I will decline the duel");
        }
        public DuelSetup_Rules_Spells_4th_View(Duel d, int team, int id)
            : base(0, 0)
        {
            Handeling = d;
            TeamID = team;
            Index = id;

            Closable = true;
            Dragable = true;
            Resizable = false;

            AddBackground(219, 238, 172, 229, 9300);
            AddLabel(255, 244, 70, @"4th Circle Rules");

            AddImage(225, 265, ImageID(Handeling.ArchCure));
            AddLabel(255, 265, 54, @"Arch Cure");
            AddImage(225, 290, ImageID(Handeling.Protection));
            AddLabel(255, 290, 54, @"Arch Protection");
            AddImage(225, 315, ImageID(Handeling.Curse));
            AddLabel(255, 315, 54, @"Curse");
            AddImage(225, 340, ImageID(Handeling.FireField));
            AddLabel(255, 340, 54, @"Firefield");
            AddImage(225, 365, ImageID(Handeling.GreaterHeal));
            AddLabel(255, 365, 54, @"Greater Heal");
            AddImage(225, 390, ImageID(Handeling.Lightning));
            AddLabel(255, 390, 54, @"Lightning");
            AddImage(225, 415, ImageID(Handeling.ManaDrain));
            AddLabel(255, 415, 54, @"Mana Drain");
            AddImage(225, 440, ImageID(Handeling.Recall));
            AddLabel(255, 440, 54, @"Recall");
        }
        public DuelSetup_Rules_Combat_View(Duel d, int team, int id)
            : base(0, 0)
        {
            Handeling = d;
            TeamID = team;
            Index = id;

            Closable = true;
            Dragable = true;
            Resizable = false;

            AddBackground(219, 238, 172, 179, 9300);
            AddLabel(245, 244, 70, @"Combat Ability Rules");

            AddImage(225, 265, ImageID(Handeling.CombatAbilities));
            AddLabel(255, 265, 54, @"Combat Abilities");
            AddImage(225, 290, ImageID(Handeling.Stun));
            AddLabel(255, 290, 54, @"Stun");
            AddImage(225, 315, ImageID(Handeling.Disarm));
            AddLabel(255, 315, 54, @"Disarm");
            AddImage(225, 340, ImageID(Handeling.ConcussionBlow));
            AddLabel(255, 340, 54, @"Concussion Blow");
            AddImage(225, 365, ImageID(Handeling.CrushingBlow));
            AddLabel(255, 365, 54, @"Crushing Blow");
            AddImage(225, 390, ImageID(Handeling.ParalyzingBlow));
            AddLabel(255, 390, 54, @"Paralyzing Blow");
        }