예제 #1
0
        public override void OnLocationChange(Point3D old)
        {
            if (BoardGameControlItem != null)
            {
                BoardGameControlItem.Location = new Point3D(X - BoardGameControlItem.BoardOffset.X - Offset.X, Y - BoardGameControlItem.BoardOffset.Y - Offset.Y, Z - BoardGameControlItem.BoardOffset.Z - Offset.Z);
            }

            if (_Blocker != null)
            {
                _Blocker.MoveToWorld(Location, Map);
            }
        }
예제 #2
0
        private static void GenLOSBlockers()
        {
            LOSBlocker blocker = null;

            for (int y = 2392; y < 2407; y++)
            {
                blocker = new LOSBlocker();
                blocker.MoveToWorld(new Point3D(583, y, 0), Map.TerMur);
            }
        }
예제 #3
0
        public ChamberBarrier(Point3D loc)
            : base(0x3979)
        {
            Light = LightType.Circle150;

            Movable = false;
            MoveToWorld(loc, Map.TerMur);

            m_Blocker = new Blocker();
            m_Blocker.MoveToWorld(loc, Map.TerMur);

            m_LOSBlocker = new LOSBlocker();
            m_LOSBlocker.MoveToWorld(loc, Map.TerMur);
        }
예제 #4
0
        private static void GenerateCoral_OnCommand(CommandEventArgs e)
        {
            e.Mobile.SendMessage("Generating Corals...");

            int count = 0;

            for (int i = 0; i < limits.Length; i++)
            {
                Point2D actual = limits[i];
                Point2D next   = (i == limits.Length - 1 ? limits[0] : limits[i + 1]);

                for (int x = actual.X, y = actual.Y; x != next.X || y != next.Y;)
                {
                    if (x != next.X)
                    {
                        if (x < next.X)
                        {
                            x++;
                        }
                        else
                        {
                            x--;
                        }
                    }
                    if (y != next.Y)
                    {
                        if (y < next.Y)
                        {
                            y++;
                        }
                        else
                        {
                            y--;
                        }
                    }

                    Static rock       = new Static(rocks[Utility.Random(0, rocks.Count)]);
                    Item   blocker    = new Blocker();
                    Item   losBlocker = new LOSBlocker();

                    int z = map.GetAverageZ(x, y);                     // on récupère la hauteur du sol à cet endroit
                    rock.MoveToWorld(new Point3D(x, y, z), map);       // le rocher pour la forme
                    blocker.MoveToWorld(new Point3D(x, y, z), map);    // un blocker pour empêcher de passer même avec un sea horse par exemple
                    losBlocker.MoveToWorld(new Point3D(x, y, z), map); // pour empêcher tout sort de téléport de fonctionner

                    count++;
                }
            }
            e.Mobile.SendMessage(String.Format("{0} Corals have been generated !", count));
        }
        public virtual void AddComponents()
        {
            if (this == null)
            {
                return;
            }
            if (Deleted)
            {
                return;
            }
            if (!m_AddLOSBlocker)
            {
                return;
            }

            LOSBlocker LOSBlocker = new LOSBlocker();

            LOSBlocker.MoveToWorld(Location, Map);
            m_LOSBlocker = LOSBlocker;
        }
예제 #6
0
        public static void Generate()
        {
            Map map = Map.TerMur;
            int z   = -19;

            Static s = new Static(40142);

            s.MoveToWorld(new Point3D(888, 2303, z), map);

            s = new Static(40142);
            s.MoveToWorld(new Point3D(889, 2304, z), map);

            s = new Static(40142);
            s.MoveToWorld(new Point3D(896, 2295, z), map);

            s = new Static(40142);
            s.MoveToWorld(new Point3D(897, 2296, z), map);

            s = new Static(40142);
            s.MoveToWorld(new Point3D(904, 2303, z), map);

            s = new Static(40142);
            s.MoveToWorld(new Point3D(905, 2304, z), map);

            s = new Static(40142);
            s.MoveToWorld(new Point3D(896, 2311, z), map);

            s = new Static(40142);
            s.MoveToWorld(new Point3D(897, 2312, z), map);

            s = new Static(40169);
            s.MoveToWorld(new Point3D(887, 2304, z), map);

            s = new Static(40169);
            s.MoveToWorld(new Point3D(888, 2305, z), map);

            s = new Static(40169);
            s.MoveToWorld(new Point3D(895, 2296, z), map);

            s = new Static(40169);
            s.MoveToWorld(new Point3D(896, 2297, z), map);

            s = new Static(40169);
            s.MoveToWorld(new Point3D(903, 2304, z), map);

            s = new Static(40169);
            s.MoveToWorld(new Point3D(904, 2305, z), map);

            s = new Static(40169);
            s.MoveToWorld(new Point3D(895, 2312, z), map);

            s = new Static(40169);
            s.MoveToWorld(new Point3D(896, 2313, z), map);

            z = -20;

            s = new Static(40161);
            s.MoveToWorld(new Point3D(897, 2305, z), map);

            s = new Static(40165);
            s.MoveToWorld(new Point3D(894, 2306, z), map);

            MoonstonePowerGeneratorAddon addon = new MoonstonePowerGeneratorAddon(true);

            addon.MoveToWorld(new Point3D(884, 2292, z), map);

            addon = new MoonstonePowerGeneratorAddon(true);
            addon.MoveToWorld(new Point3D(896, 2286, z), map);

            addon = new MoonstonePowerGeneratorAddon(true);
            addon.MoveToWorld(new Point3D(909, 2291, z), map);

            addon = new MoonstonePowerGeneratorAddon(true);
            addon.MoveToWorld(new Point3D(914, 2305, z), map);

            addon = new MoonstonePowerGeneratorAddon(true);
            addon.MoveToWorld(new Point3D(909, 2318, z), map);

            addon = new MoonstonePowerGeneratorAddon(true);
            addon.MoveToWorld(new Point3D(896, 2323, z), map);

            addon = new MoonstonePowerGeneratorAddon(true);
            addon.MoveToWorld(new Point3D(884, 2316, z), map);

            addon = new MoonstonePowerGeneratorAddon(true);
            addon.MoveToWorld(new Point3D(878, 2304, z), map);

            MyrmidexIdol idol = new MyrmidexIdol();

            idol.MoveToWorld(new Point3D(488, 1856, 111), map);

            Teleporter teleporter = new Teleporter(new Point3D(487, 1857, 95), map);

            teleporter.MoveToWorld(new Point3D(896, 2304, 45), map);

            teleporter = new MyrmidexQueenTeleporter(new Point3D(711, 2302, 0), map);
            teleporter.MoveToWorld(new Point3D(121, 1682, -3), map);

            teleporter = new MyrmidexQueenTeleporter(new Point3D(711, 2303, 0), Map.TerMur);
            teleporter.MoveToWorld(new Point3D(121, 1683, -2), map);

            teleporter = new MyrmidexQueenTeleporter(new Point3D(711, 2304, 0), Map.TerMur);
            teleporter.MoveToWorld(new Point3D(121, 1684, -1), map);

            teleporter = new Teleporter(new Point3D(120, 1682, -1), map);
            teleporter.MoveToWorld(new Point3D(711, 2302, 0), map);

            teleporter = new Teleporter(new Point3D(120, 1683, 1), map);
            teleporter.MoveToWorld(new Point3D(711, 2303, 0), map);

            teleporter = new Teleporter(new Point3D(120, 1684, 2), map);
            teleporter.MoveToWorld(new Point3D(711, 2304, 0), map);

            teleporter = new Teleporter(new Point3D(120, 1684, 2), map);
            teleporter.MoveToWorld(new Point3D(711, 2305, 0), map);

            teleporter = new MyrmidexPitTeleporter(Allegiance.Myrmidex, new Point3D(985, 1883, 0), map);
            teleporter.MoveToWorld(new Point3D(176, 1835, 90), map);

            teleporter = new MyrmidexPitTeleporter(Allegiance.Myrmidex, new Point3D(986, 1883, 0), map);
            teleporter.MoveToWorld(new Point3D(177, 1835, 90), map);

            teleporter = new Teleporter(new Point3D(176, 1834, 90), map);
            teleporter.MoveToWorld(new Point3D(985, 1887, 0), map);

            teleporter = new Teleporter(new Point3D(177, 1834, 90), map);
            teleporter.MoveToWorld(new Point3D(986, 1887, 0), map);

            teleporter = new MyrmidexPitTeleporter(Allegiance.Tribes, new Point3D(853, 1777, 0), map);
            teleporter.MoveToWorld(new Point3D(224, 1724, 6), map);

            teleporter = new MyrmidexPitTeleporter(Allegiance.Tribes, new Point3D(854, 1777, 0), map);
            teleporter.MoveToWorld(new Point3D(224, 1725, 6), map);

            teleporter = new Teleporter(new Point3D(225, 1724, 6), map);
            teleporter.MoveToWorld(new Point3D(853, 1776, 11), map);

            teleporter = new Teleporter(new Point3D(225, 1725, 6), map);
            teleporter.MoveToWorld(new Point3D(854, 1776, 11), map);

            teleporter = new Teleporter(new Point3D(225, 1725, 6), map);
            teleporter.MoveToWorld(new Point3D(855, 1776, 11), map);

            LOSBlocker los = new LOSBlocker();

            los.MoveToWorld(new Point3D(121, 1682, -3), map);

            los = new LOSBlocker();
            los.MoveToWorld(new Point3D(121, 1683, -3), map);

            los = new LOSBlocker();
            los.MoveToWorld(new Point3D(121, 1684, -3), map);

            AllegianceIdol allegianceIdol = new AllegianceIdol(Allegiance.Tribes);

            allegianceIdol.MoveToWorld(new Point3D(267, 1741, 85), map);

            allegianceIdol = new AllegianceIdol(Allegiance.Myrmidex);
            allegianceIdol.MoveToWorld(new Point3D(176, 1813, 91), map);

            HealerCamp camp = new HealerCamp();

            camp.Map      = Map.TerMur;
            camp.Location = new Point3D(262, 1716, 80);

            GeoffreyCampAddon gcamp = new GeoffreyCampAddon();

            gcamp.MoveToWorld(new Point3D(264, 1732, 80), Map.TerMur);

            BattleSpawner spawner = new BattleSpawner();

            spawner.MoveToWorld(new Point3D(851, 1776, 0), Map.TerMur);

            Item st = new Static(0xA1F);

            st.MoveToWorld(new Point3D(913, 1871, 0), Map.TerMur);

            st = new Static(0xA1F);
            st.MoveToWorld(new Point3D(914, 1871, 0), Map.TerMur);

            BattleFlag bflag = new BattleFlag(0x42CB, 0);

            bflag.MoveToWorld(new Point3D(914, 1872, 5), Map.TerMur);

            st = new Static(0xA1F);
            st.MoveToWorld(new Point3D(913, 1792, 0), Map.TerMur);

            bflag = new BattleFlag(0x42C, 2520);
            bflag.MoveToWorld(new Point3D(914, 1793, 6), Map.TerMur);

            st = new Static(0x42D);
            st.MoveToWorld(new Point3D(913, 1793, 6), Map.TerMur);

            XmlSpawner sp = new XmlSpawner("Yar");

            sp.SpawnRange = 1;
            sp.HomeRange  = 5;
            sp.MoveToWorld(new Point3D(169, 1813, 80), map);
            sp.Respawn();

            sp            = new XmlSpawner("Bront");
            sp.SpawnRange = 1;
            sp.HomeRange  = 5;
            sp.MoveToWorld(new Point3D(1448, 3774, 0), Map.Trammel);
            sp.Respawn();

            sp            = new XmlSpawner("CollectorOfOddities");
            sp.SpawnRange = 1;
            sp.HomeRange  = 5;
            sp.MoveToWorld(new Point3D(4305, 1003, 0), Map.Trammel);
            sp.Respawn();

            sp            = new XmlSpawner("Carroll");
            sp.SpawnRange = 1;
            sp.HomeRange  = 5;
            sp.MoveToWorld(new Point3D(2878, 723, 0), Map.Trammel);
            sp.Respawn();

            sp            = new XmlSpawner("Eriathwen");
            sp.SpawnRange = 1;
            sp.HomeRange  = 5;
            sp.MoveToWorld(new Point3D(1426, 1653, 0), Map.Trammel);
            sp.Respawn();

            sp            = new XmlSpawner("EllieRafkin");
            sp.SpawnRange = 1;
            sp.HomeRange  = 5;
            sp.MoveToWorld(new Point3D(261, 1742, 80), map);
            sp.Respawn();

            sp            = new XmlSpawner("Yero");
            sp.SpawnRange = 1;
            sp.HomeRange  = 5;
            sp.MoveToWorld(new Point3D(3692, 2252, 26), Map.Trammel);
            sp.Respawn();

            sp            = new XmlSpawner("Alida");
            sp.SpawnRange = 1;
            sp.HomeRange  = 5;
            sp.MoveToWorld(new Point3D(5257, 4012, 40), Map.Trammel);
            sp.Respawn();

            sp            = new XmlSpawner("Foxx");
            sp.SpawnRange = 1;
            sp.HomeRange  = 5;
            sp.MoveToWorld(new Point3D(269, 1727, 80), map);
            sp.Respawn();

            sp            = new XmlSpawner("MyrmidexQueen/Cantwalk/true");
            sp.SpawnRange = 0;
            sp.HomeRange  = 1;
            sp.MoveToWorld(new Point3D(768, 2303, 0), map);
            sp.Respawn();
        }
예제 #7
0
        public static void GenerateMapDecoration(Map map)
        {
            blocker.ToList().ForEach(x =>
            {
                if (map.FindItem <Blocker>(new Point3D(x)) == null)
                {
                    Blocker bl = new Blocker();

                    bl.MoveToWorld(new Point3D(x), map);
                }

                if (map.FindItem <LOSBlocker>(new Point3D(x)) == null)
                {
                    LOSBlocker lb = new LOSBlocker();

                    lb.MoveToWorld(new Point3D(x), map);
                }
            });

            for (int i = 0; i < Workers.Length; i++)
            {
                Point3D p = Workers[i];

                if (map.FindMobile <Worker>(p) == null)
                {
                    Worker w = new Worker((FellowshipChain)(i + 1));

                    w.MoveToWorld(p, map);
                }
            }

            FellowshipChain c = FellowshipChain.One;

            for (int t = 0; t < Teleporters.Length / 2; t++)
            {
                Point3D p = Teleporters[t, 0];

                if (map.FindItem <BlackthornDungeonTeleporter>(p) == null)
                {
                    BlackthornDungeonTeleporter bl;

                    if (t % 2 == 0)
                    {
                        bl = new BlackthornDungeonTeleporter(c)
                        {
                            Dest = Teleporters[t, 1]
                        };

                        c++;
                    }
                    else
                    {
                        bl = new BlackthornDungeonTeleporter()
                        {
                            Dest = Teleporters[t, 1]
                        };
                    }

                    bl.MoveToWorld(p, map);
                }
            }
        }
예제 #8
0
        public static void GenerateMapDecoration(Map map)
        {
            List <Point3D> list = new List <Point3D>();

            for (var index = 0; index < blocker.Length; index++)
            {
                var point3D = blocker[index];

                list.Add(point3D);
            }

            for (var index = 0; index < list.Count; index++)
            {
                var x = list[index];

                if (map.FindItem <Blocker>(new Point3D(x)) == null)
                {
                    Blocker bl = new Blocker();

                    bl.MoveToWorld(new Point3D(x), map);
                }

                if (map.FindItem <LOSBlocker>(new Point3D(x)) == null)
                {
                    LOSBlocker lb = new LOSBlocker();

                    lb.MoveToWorld(new Point3D(x), map);
                }
            }

            for (int i = 0; i < Workers.Length; i++)
            {
                Point3D p = Workers[i];

                if (map.FindMobile <Worker>(p) == null)
                {
                    Worker w = new Worker((FellowshipChain)(i + 1));

                    w.MoveToWorld(p, map);
                }
            }

            FellowshipChain c = FellowshipChain.One;

            for (int t = 0; t < Teleporters.Length / 2; t++)
            {
                Point3D p = Teleporters[t, 0];

                if (map.FindItem <BlackthornDungeonTeleporter>(p) == null)
                {
                    BlackthornDungeonTeleporter bl;

                    if (t % 2 == 0)
                    {
                        bl = new BlackthornDungeonTeleporter(c)
                        {
                            Dest = Teleporters[t, 1]
                        };

                        c++;
                    }
                    else
                    {
                        bl = new BlackthornDungeonTeleporter
                        {
                            Dest = Teleporters[t, 1]
                        };
                    }

                    bl.MoveToWorld(p, map);
                }
            }
        }