Exemplo n.º 1
0
        public void CheckWaves()
        {
            ColUtility.For <int, List <BaseCreature> >(MyrmidexTeam, (i, key, value) =>
            {
                if (value.Where(bc => bc != null && !bc.Deleted && bc.Alive).Count() == 0)
                {
                    ColUtility.Free(MyrmidexTeam[key]);
                    MyrmidexTeam.Remove(key);

                    RegionMessage(i == 0 ? 1156604 : 1156605);     // The Eodonians have secured new ground, the front line has moved up!

                    //if (HasPlayers())
                    //    Timer.DelayCall<Allegiance>(TimeSpan.FromSeconds(3), SpawnWave, Allegiance.Myrmidex);
                }
            });

            ColUtility.For <int, List <BaseCreature> >(TribeTeam, (i, key, value) =>
            {
                if (value.Where(bc => bc != null && !bc.Deleted && bc.Alive).Count() == 0)
                {
                    ColUtility.Free(TribeTeam[key]);
                    TribeTeam.Remove(key);

                    RegionMessage(i == 0 ? 1156602 : 1156603); // The Myrmidex have secured new ground, the front line has moved up!

                    //if (HasPlayers())
                    //    Timer.DelayCall<Allegiance>(TimeSpan.FromSeconds(3), SpawnWave, Allegiance.Tribes);
                }
            });
        }
Exemplo n.º 2
0
            public void AddGumpLayout()
            {
                AddBackground(0, 0, 400, 500, 9270);

                AddHtmlLocalized(0, 15, 400, 16, 1154645, "#1156704", 0xFFFF, false, false);                   // Select your destination:

                ColUtility.For <int, Point3D>(SerpentsJawbone.Locations, (i, key, value) =>
                {
                    AddHtmlLocalized(60, 45 + (i * 25), 250, 16, key, 0xFFFF, false, false);
                    AddButton(20, 50 + (i * 25), 2117, 2118, key, GumpButtonType.Reply, 0);
                });
            }
Exemplo n.º 3
0
            public void AddGumpLayout()
            {
                AddBackground(0, 0, 370, 428, 0x1400);

                AddHtmlLocalized(10, 10, 350, 18, 1114513, "#1156704", 0x56BA, false, false); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>

                ColUtility.For(Locations, (i, key, value) =>
                {
                    AddButton(10, 41 + (i * 20), 1209, 1210, key, GumpButtonType.Reply, 0);
                    AddHtmlLocalized(50, 41 + (i * 20), 150, 20, key, 0x7FFF, false, false);
                });
            }
Exemplo n.º 4
0
            private void Fill()
            {
                int time = 200;

                if (_Spigot.ItemID == 39922)
                {
                    _Spigot.ItemID = 17294;
                }
                else if (_Spigot.ItemID == 39909)
                {
                    _Spigot.ItemID = 17278;
                }

                _Checked.ForEach(i => i.Movable = false);
                ColUtility.For(_Checked, (i, item) =>
                {
                    Timer.DelayCall(TimeSpan.FromMilliseconds(time), Fill, item);
                    time += 200;
                });
            }
Exemplo n.º 5
0
        public void CheckWaves()
        {
            ColUtility.For <int, List <BaseCreature> >(MyrmidexTeam, (i, key, value) =>
            {
                if (value.Where(bc => bc != null && !bc.Deleted && bc.Alive).Count() == 0)
                {
                    ColUtility.Free(MyrmidexTeam[key]);
                    MyrmidexTeam.Remove(key);

                    RegionMessage(i == 0 ? 1156604 : 1156605); // The Eodonians have secured new ground, the front line has moved up!
                }
            });

            ColUtility.For <int, List <BaseCreature> >(TribeTeam, (i, key, value) =>
            {
                if (value.Where(bc => bc != null && !bc.Deleted && bc.Alive).Count() == 0)
                {
                    ColUtility.Free(TribeTeam[key]);
                    TribeTeam.Remove(key);

                    RegionMessage(i == 0 ? 1156602 : 1156603); // The Myrmidex have secured new ground, the front line has moved up!
                }
            });
        }
Exemplo n.º 6
0
        public void CheckQueue()
        {
            if (Queue.Count == 0)
            {
                return;
            }

            bool message = false;

            List <Mobile> copy = new List <Mobile>(Queue.Keys);

            for (int i = 0; i < copy.Count; i++)
            {
                Mobile m = copy[i];

                if (m.Map != Map.TerMur || m.NetState == null)
                {
                    RemoveFromQueue(m);

                    if (i == 0)
                    {
                        message = true;
                    }

                    continue;
                }

                foreach (ShadowguardEncounter inst in Encounters.Where(inst => inst.PartyLeader == m))
                {
                    if (i == 0)
                    {
                        message = true;
                    }

                    RemoveFromQueue(m);
                    continue;
                }

                if (Queue.Count > 0)
                {
                    message = true;

                    Timer.DelayCall(TimeSpan.FromMinutes(2), () =>
                    {
                        EncounterType type           = Queue[m];
                        ShadowguardInstance instance = GetAvailableInstance(type);

                        if (instance != null && instance.TryBeginEncounter(m, true, type))
                        {
                            RemoveFromQueue(m);
                        }
                    });
                }

                break;
            }

            if (message && Queue.Count > 0)
            {
                ColUtility.For(Queue.Keys, (i, mob) =>
                {
                    Party p = Party.Get(mob);

                    if (p != null)
                    {
                        p.Members.ForEach(info => info.Mobile.SendLocalizedMessage(1156190, i + 1 > 1 ? i.ToString() : "next"));
                    }
                    //A Shadowguard encounter has opened. You are currently ~1_NUM~ in the
                    //queue. If you are next, you may proceed to the entry stone to join.
                    else
                    {
                        mob.SendLocalizedMessage(1156190, i + 1 > 1 ? i.ToString() : "next");
                    }
                });
            }
        }
Exemplo n.º 7
0
        public override void Setup()
        {
            Armor          = new List <Item>();
            DestroyedArmor = new List <Item>();
            Spawn          = new List <BaseCreature>();
            Items          = new List <Item>();

            int toSpawn = 1 + (PartySize() * 2);

            ColUtility.For(SpawnPoints, (i, p) =>
            {
                ConvertOffset(ref p);

                var armor = new CursedSuitOfArmor(this);
                armor.MoveToWorld(p, Map.TerMur);
                Armor.Add(armor);

                if (i > 13)
                {
                    armor.ItemID = 0x1512;
                }
            });

            for (int i = 0; i < toSpawn; i++)
            {
                SpawnRandom();
            }

            Item    item = new Static(3633);
            Point3D pnt  = new Point3D(-4, 2, 0);

            ConvertOffset(ref pnt);
            item.MoveToWorld(pnt, Map.TerMur);
            Items.Add(item);

            item = new Static(3633);
            pnt  = new Point3D(-4, -4, 0);
            ConvertOffset(ref pnt);
            item.MoveToWorld(pnt, Map.TerMur);
            Items.Add(item);

            item = new Static(3633);
            pnt  = new Point3D(2, -4, 0);
            ConvertOffset(ref pnt);
            item.MoveToWorld(pnt, Map.TerMur);
            Items.Add(item);

            item = new PurifyingFlames();
            pnt  = new Point3D(-4, 2, 8);
            ConvertOffset(ref pnt);
            item.MoveToWorld(pnt, Map.TerMur);
            Items.Add(item);

            item = new PurifyingFlames();
            pnt  = new Point3D(-4, -4, 8);
            ConvertOffset(ref pnt);
            item.MoveToWorld(pnt, Map.TerMur);
            Items.Add(item);

            item = new PurifyingFlames();
            pnt  = new Point3D(2, -4, 8);
            ConvertOffset(ref pnt);
            item.MoveToWorld(pnt, Map.TerMur);
            Items.Add(item);
        }