public override void AddComponents()
        {
            AddItem(new Item(0xFAC), 0, 0, 0);                 // fire pit
            AddItem(new Item(0xDE3), 0, 0, 0);                 // camp fire
            AddItem(new Item(0x974), 0, 0, 1);                 // cauldron

            for (int i = 0; i < 2; i++)
            {
                LockableContainer cont = null;

                switch (Utility.Random(3))
                {
                case 0: cont = new MetalChest(); break;

                case 1: cont = new WoodenChest(); break;

                case 2: cont = new SmallCrate(); break;
                }

                cont.Movable = false;
                cont.Locked  = true;

                cont.TrapType      = TrapType.ExplosionTrap;
                cont.TrapPower     = Utility.RandomMinMax(30, 40);
                cont.TrapLevel     = 2;
                cont.RequiredSkill = 76;
                cont.LockLevel     = 66;
                cont.MaxLockLevel  = 116;
                cont.DropItem(new Gold(Utility.RandomMinMax(100, 400)));
                cont.DropItem(new Arrow(10));
                cont.DropItem(new Bolt(10));

                if (Utility.RandomDouble() < 0.8)
                {
                    switch (Utility.Random(4))
                    {
                    case 0: cont.DropItem(new LesserCurePotion()); break;

                    case 1: cont.DropItem(new LesserExplosionPotion()); break;

                    case 2: cont.DropItem(new LesserHealPotion()); break;

                    case 3: cont.DropItem(new LesserPoisonPotion()); break;
                    }
                }

                if (Utility.RandomDouble() < 0.5)
                {
                    Item item = Loot.RandomArmorOrShieldOrWeapon();

                    if (item is BaseWeapon)
                    {
                        BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, false, 0, Utility.RandomMinMax(1, 5), 10, 100);
                    }
                    else if (item is BaseArmor)
                    {
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, false, 0, Utility.RandomMinMax(1, 5), 10, 100);
                    }

                    cont.DropItem(item);
                }

                Point3D loc = GetRandomSpawnPoint(3);

                AddItem(cont, loc.X, loc.Y, loc.Z);
            }

            switch (Utility.Random(2))
            {
            case 0: m_Prisoner = new Noble(); break;

            case 1: m_Prisoner = new SeekerOfAdventure(); break;
            }

            for (int i = 0; i < 4; i++)
            {
                Point3D loc = GetRandomSpawnPoint(5);

                AddMobile(Camper, 6, loc.X, loc.Y, loc.Z);
            }

            Point3D p = GetRandomSpawnPoint(3);

            AddMobile(m_Prisoner, 0, p.X, p.Y, p.Z);
            Console.WriteLine(Location.ToString());
        }
Exemple #2
0
        public override void AddComponents()
        {
            this.AddItem(new Item(0xFAC), 0, 0, 0); // fire pit
            this.AddItem(new Item(0xDE3), 0, 0, 0); // camp fire
            this.AddItem(new Item(0x974), 0, 0, 1); // cauldron

            for (int i = 0; i < 2; i++)
            {
                LockableContainer cont = null;

                switch (Utility.Random(3))
                {
                case 0:
                    cont = new MetalChest();
                    break;

                case 1:
                    cont = new WoodenChest();
                    break;

                case 2:
                    cont = new SmallCrate();
                    break;
                }

                cont.Movable = false;
                cont.Locked  = true;

                cont.TrapType      = TrapType.ExplosionTrap;
                cont.TrapPower     = Utility.RandomMinMax(30, 40);
                cont.TrapLevel     = 2;
                cont.RequiredSkill = 76;
                cont.LockLevel     = 66;
                cont.MaxLockLevel  = 116;
                cont.DropItem(new Gold(Utility.RandomMinMax(100, 400)));
                cont.DropItem(new Arrow(10));
                cont.DropItem(new Bolt(10));

                if (Utility.RandomDouble() < 0.8)
                {
                    switch (Utility.Random(4))
                    {
                    case 0:
                        cont.DropItem(new LesserCurePotion());
                        break;

                    case 1:
                        cont.DropItem(new LesserExplosionPotion());
                        break;

                    case 2:
                        cont.DropItem(new LesserHealPotion());
                        break;

                    case 3:
                        cont.DropItem(new LesserPoisonPotion());
                        break;
                    }
                }

                if (Utility.RandomDouble() < 0.5)
                {
                    Item item = Loot.RandomArmorOrShieldOrWeapon();
                    cont.DropItem(item);
                }

                Point3D loc = this.GetRandomSpawnPoint(3);

                this.AddItem(cont, loc.X, loc.Y, loc.Z);
            }

            switch (Utility.Random(2))
            {
            case 0:
                this.m_Prisoner = new Noble();
                break;

            case 1:
                this.m_Prisoner = new SeekerOfAdventure();
                break;
            }

            for (int i = 0; i < 4; i++)
            {
                Point3D loc = this.GetRandomSpawnPoint(5);

                this.AddMobile(this.Camper, 6, loc.X, loc.Y, loc.Z);
            }

            Point3D p = this.GetRandomSpawnPoint(3);

            this.AddMobile(this.m_Prisoner, 0, p.X, p.Y, p.Z);
        }
Exemple #3
0
        public override void AddComponents()
        {
            Item item = new Item(0xFAC);

            item.Movable = false;
            AddItem(item, 0, 0, 0);               // fire pit
            item         = new Item(0xDE3);
            item.Movable = false;
            AddItem(item, 0, 0, 0);               // camp fire
            item         = new Item(0x974);
            item.Movable = false;
            AddItem(item, 0, 0, 1);               // cauldron

            for (int i = 0; i < 2; i++)
            {
                LockableContainer cont = null;

                switch (Utility.Random(3))
                {
                case 0:
                    cont = new MetalChest();
                    break;

                case 1:
                    cont = new WoodenChest();
                    break;

                case 2:
                    cont = new SmallCrate();
                    break;
                }

                cont.Movable = false;
                cont.Locked  = true;

                cont.TrapType    = TrapType.ExplosionTrap;
                cont.TrapPower   = Utility.RandomMinMax(30, 40);
                cont.TrapLevel   = 2;
                cont.TrapEnabled = true;

                cont.RequiredSkill = 76;
                cont.LockLevel     = 66;
                cont.MaxLockLevel  = 116;

                cont.DropItem(new Gold(Utility.RandomMinMax(100, 400)));
                cont.DropItem(new Arrow(10));
                cont.DropItem(new Bolt(10));

                if (Utility.RandomDouble() < 0.8)
                {
                    switch (Utility.Random(4))
                    {
                    case 0:
                        cont.DropItem(new LesserCurePotion());
                        break;

                    case 1:
                        cont.DropItem(new LesserExplosionPotion());
                        break;

                    case 2:
                        cont.DropItem(new LesserHealPotion());
                        break;

                    case 3:
                        cont.DropItem(new LesserPoisonPotion());
                        break;
                    }
                }

                if (Utility.RandomDouble() < 0.5)
                {
                    item = Loot.RandomArmorOrShieldOrWeapon();

                    if (item is BaseWeapon)
                    {
                        BaseRunicTool.ApplyAttributesTo((BaseWeapon)item, false, 0, Utility.RandomMinMax(1, 5), 10, 100);
                    }
                    else if (item is BaseArmor)
                    {
                        BaseRunicTool.ApplyAttributesTo((BaseArmor)item, false, 0, Utility.RandomMinMax(1, 5), 10, 100);
                    }

                    cont.DropItem(item);
                }

                AddItem(cont, Utility.RandomMinMax(-5, 5), Utility.RandomMinMax(-5, 5), 0);
            }

            m_Prisoner = new BaseEscort();

            for (int i = 0; i < 4; i++)
            {
                Point3D loc = GetRandomSpawnPoint(5);

                AddMobile(new Brigand(), 6, 0, 0, 0);
            }

            AddMobile(m_Prisoner, 2, 2, 3, 0);
        }