Exemple #1
0
        public override void Execute(CommandEventArgs args, object o)
        {
            if (o is Item && !(o is AddonComponent) && !(o is BaseAddon))
            {
                Item         i       = (Item)o;
                RaisableItem newItem = new RaisableItem(i.ItemID);

                newItem.Hue     = i.Hue;
                newItem.Light   = i.Light;
                newItem.Movable = false;
                newItem.Name    = i.Name;

                newItem.MoveToWorld(i.Location, i.Map);

                if (i.Parent == args.Mobile)
                {
                    newItem.Bounce(args.Mobile);
                }

                if (i is Container)
                {
                    ((Container)i).Destroy();
                }
                else
                {
                    i.Delete();
                }

                AddResponse("The item has been converted to a raisable item.");
            }
            else
            {
                LogFailure("This command only works with basic items (no addons).");
            }
        }
        public static void GenKhaldun_OnCommand(CommandEventArgs e)
        {
            m_Count = 0;

            // Generate Morph Items
            CreateMorphItem(5459, 1416, 0, 0x1D0, 0x1, 1);
            CreateMorphItem(5460, 1416, 0, 0x1D0, 0x1, 1);
            CreateMorphItem(5459, 1416, 0, 0x1, 0x53D, 1);
            CreateMorphItem(5460, 1416, 0, 0x1, 0x53B, 1);

            CreateMorphItem(5459, 1425, 0, 0x1, 0x53B, 2);
            CreateMorphItem(5459, 1426, 0, 0x1, 0x53B, 2);
            CreateMorphItem(5459, 1427, 0, 0x1, 0x53B, 2);
            CreateMorphItem(5460, 1425, 0, 0x1, 0x53B, 2);
            CreateMorphItem(5460, 1426, 0, 0x1, 0x53B, 2);
            CreateMorphItem(5460, 1427, 0, 0x1, 0x53B, 2);
            CreateMorphItem(5461, 1427, 0, 0x1, 0x53B, 2);
            CreateMorphItem(5460, 1422, 0, 0x1, 0x544, 2);
            CreateMorphItem(5460, 1419, 0, 0x1, 0x545, 2);
            CreateMorphItem(5460, 1420, 0, 0x1, 0x545, 2);
            CreateMorphItem(5460, 1423, 0, 0x1, 0x545, 2);
            CreateMorphItem(5460, 1424, 0, 0x1, 0x545, 2);
            CreateMorphItem(5461, 1426, 0, 0x1, 0x545, 2);
            CreateMorphItem(5460, 1417, 0, 0x1, 0x546, 1);
            CreateMorphItem(5460, 1418, 0, 0x1, 0x546, 2);
            CreateMorphItem(5460, 1421, 0, 0x1, 0x546, 2);
            CreateMorphItem(5461, 1425, 0, 0x1, 0x548, 2);
            CreateMorphItem(5459, 1420, 0, 0x1, 0x54A, 2);
            CreateMorphItem(5459, 1421, 0, 0x1, 0x54A, 2);
            CreateMorphItem(5459, 1423, 0, 0x1, 0x54A, 2);
            CreateMorphItem(5459, 1418, 0, 0x1, 0x54B, 2);
            CreateMorphItem(5459, 1422, 0, 0x1, 0x54B, 2);
            CreateMorphItem(5459, 1417, 0, 0x1, 0x54C, 1);
            CreateMorphItem(5459, 1419, 0, 0x1, 0x54C, 2);
            CreateMorphItem(5459, 1424, 0, 0x1, 0x54C, 2);

            CreateMorphItem(5458, 1426, 0, 0x1, 0x1D1, 2);
            CreateMorphItem(5459, 1427, 0, 0x1, 0x1E3, 2);
            CreateMorphItem(5458, 1425, 3, 0x1, 0x1E4, 2);
            CreateMorphItem(5458, 1427, 6, 0x1, 0x1E5, 2);
            CreateMorphItem(5461, 1427, 0, 0x1, 0x1E8, 2);
            CreateMorphItem(5460, 1427, 0, 0x1, 0x1E9, 2);
            CreateMorphItem(5458, 1425, 0, 0x1, 0x1EA, 2);
            CreateMorphItem(5458, 1427, 0, 0x1, 0x1EA, 2);
            CreateMorphItem(5458, 1427, 3, 0x1, 0x1EA, 2);

            // Generate Approach Lights
            CreateApproachLight(5393, 1417, 0, 0x1857, 0x1858, LightType.Circle150);
            CreateApproachLight(5393, 1420, 0, 0x1857, 0x1858, LightType.Circle150);
            CreateApproachLight(5395, 1421, 0, 0x1857, 0x1858, LightType.Circle150);
            CreateApproachLight(5396, 1417, 0, 0x1857, 0x1858, LightType.Circle150);
            CreateApproachLight(5397, 1419, 0, 0x1857, 0x1858, LightType.Circle150);

            CreateApproachLight(5441, 1393, 5, 0x1F2B, 0x19BB, LightType.Circle225);
            CreateApproachLight(5446, 1393, 5, 0x1F2B, 0x19BB, LightType.Circle225);

            // Generate Sound Effects
            CreateSoundEffect(5425, 1489, 5, 0x102, 1);
            CreateSoundEffect(5425, 1491, 5, 0x102, 1);

            CreateSoundEffect(5449, 1499, 10, 0xF5, 1);
            CreateSoundEffect(5451, 1499, 10, 0xF5, 1);
            CreateSoundEffect(5453, 1499, 10, 0xF5, 1);

            CreateSoundEffect(5524, 1367, 0, 0x102, 1);

            CreateSoundEffect(5450, 1370, 0, 0x220, 2);
            CreateSoundEffect(5450, 1372, 0, 0x220, 2);

            CreateSoundEffect(5460, 1416, 0, 0x244, 2);

            CreateSoundEffect(5483, 1439, 5, 0x14, 3);

            // Generate Big Teleporter
            CreateBigTeleporterItem(5387, 1325, true);
            CreateBigTeleporterItem(5388, 1326, true);
            CreateBigTeleporterItem(5388, 1325, false);
            CreateBigTeleporterItem(5387, 1326, false);

            // Generate Central Khaldun entrance
            DisappearingRaiseSwitch sw = TryCreateItem(5459, 1426, 10, new DisappearingRaiseSwitch()) as DisappearingRaiseSwitch;
            RaiseSwitch             lv = TryCreateItem(5403, 1359, 0, new RaiseSwitch()) as RaiseSwitch;

            RaisableItem stone = TryCreateItem(5403, 1360, 0, new RaisableItem(0x788, 10, 0x477, 0x475, TimeSpan.FromMinutes(1.5))) as RaisableItem;
            RaisableItem door  = TryCreateItem(5524, 1367, 0, new RaisableItem(0x1D0, 20, 0x477, 0x475, TimeSpan.FromMinutes(5.0))) as RaisableItem;

            sw.RaisableItem = stone;
            lv.RaisableItem = door;

            e.Mobile.SendMessage(String.Format("{0} dynamic Khaldun item{1} generated.", m_Count, m_Count == 1 ? "" : "s"));
        }