Beispiel #1
0
        public virtual void BonusAction(PlayerMobile player, Mobile attacker)
        {
            Unicorn c = new Unicorn();

            c.SetControlMaster(this);
            c.MoveToWorld(this.Location, this.Map);
            c.ControlOrder = OrderType.Guard;

            new InternalTimer(c).Start();

            if (player != null && player.Poisoned)
            {
                if (player.CurePoison(this))
                {
                    player.SendLocalizedMessage(1010059);                       //You have been cured of all poisons.

                    player.FixedParticles(0x373A, 10, 15, 5012, EffectLayer.Waist);
                    player.PlaySound(0x1E0);
                }
            }
        }
Beispiel #2
0
        public void makeready(Mobile who)
        {
            PlayerMobile c = (PlayerMobile)who;

            if (!who.Alive)
            {
                who.Resurrect();
            }

            Container bp      = c.Backpack;
            Container bankbag = new Bag();

            bankbag.Hue = 63;
            BankBox bank   = c.BankBox;
            Item    oncurs = c.Holding;

            if (oncurs != null)
            {
                bp.DropItem(oncurs);
            }

            c.SendMessage("You have 10 seconds until the duel begins");
            c.SendMessage(63, "After one of you dies, both of you will be teleported out");

            c.Criminal = true;
            c.CurePoison(c);

            c.Blessed = true;
            c.Frozen  = true;

            c.Hits = c.HitsMax;
            c.Mana = c.ManaMax;
            c.Stam = c.StamMax;

            c.StatMods.Clear();

            if (bp != null)
            {
                Item toDisarm = c.FindItemOnLayer(Layer.OneHanded);

                if (toDisarm == null || !toDisarm.Movable)
                {
                    toDisarm = c.FindItemOnLayer(Layer.TwoHanded);
                }

                if (toDisarm != null)
                {
                    bp.DropItem(toDisarm);
                }

                if (c.Mount != null)
                {
                    IMount mount = c.Mount;
                    mount.Rider = null;
                    if (mount is BaseMount)
                    {
                        BaseMount oldMount = (BaseMount)mount;
                        oldMount.Map = Map.Internal;
                        c.TempMount  = oldMount;
                    }
                }

                //while((BasePotion)bp.FindItemByType(typeof(BasePotion)) != null)
                //{
                //	BasePotion potion = (BasePotion)bp.FindItemByType(typeof(BasePotion));
                //	bankbag.DropItem(potion);
                //}
                while ((EtherealMount)bp.FindItemByType(typeof(EtherealMount)) != null)
                {
                    EtherealMount mount = (EtherealMount)bp.FindItemByType(typeof(EtherealMount));
                    bankbag.DropItem(mount);
                }

                /*Item[] weps = bp.FindItemsByType( typeof( BaseWeapon ) );
                 * for ( int i = 0; i < weps.Length; ++i )
                 * {
                 *      Item item = (Item)weps[i];
                 *      BaseWeapon weapon = item as BaseWeapon;
                 *      if( weapon.DamageLevel > WeaponDamageLevel.Regular )
                 *                              bankbag.DropItem( item );
                 * }*/
                if (bankbag.Items.Count > 0)
                {
                    bank.DropItem(bankbag);
                }
                else
                {
                    bankbag.Delete();
                }
            }
        }