コード例 #1
0
ファイル: Shoes.cs プロジェクト: jsrn/MidnightWatchServer
        public override bool Scissor( Mobile from, Scissors scissors )
        {
            if ( Deleted || !from.CanSee( this ) ) return false;

            base.ScissorHelper( from, new Leather(), 1 );

            return true;
        }
コード例 #2
0
ファイル: Cloth.cs プロジェクト: jsrn/MidnightWatchServer
		public bool Scissor( Mobile from, Scissors scissors )
		{
			if ( Deleted || !from.CanSee( this ) ) return false;

			base.ScissorHelper( from, new Bandage(), 1 );

			return true;
		}
コード例 #3
0
ファイル: Shoes.cs プロジェクト: greeduomacro/UO-Forever
		public override bool Scissor( Mobile from, Scissors scissors )
		{
			if( DefaultResource == CraftResource.None )
				return base.Scissor( from, scissors );

			from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
			return false;
		}
コード例 #4
0
ファイル: RibCage.cs プロジェクト: Crome696/ServUO
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (this.Deleted || !from.CanSee(this))
                return false;

            base.ScissorHelper(from, new Bone(), Utility.RandomMinMax(3, 5));

            return true;
        }
コード例 #5
0
ファイル: BoltOfCloth.cs プロジェクト: FreeReign/forkuo
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (this.Deleted || !from.CanSee(this))
                return false;

            base.ScissorHelper(from, new Cloth(), 50);

            return true;
        }
コード例 #6
0
        public bool Scissor( Mobile from, Scissors scissors )
        {
            if ( Deleted || !from.CanSee( this ) ) return false;

            Cloth c = new Cloth();
            c.Hue = this.Hue;
            base.ScissorHelper( from, c, 50 );

            return true;
        }
コード例 #7
0
ファイル: PelvisBone.cs プロジェクト: romeov007/imagine-uo
		public bool Scissor( Mobile from, Scissors scissors )
		{
			if ( Deleted || !from.CanSee( this ) )
				return false;

			base.ScissorHelper( from, new Bone(), 1 );
			from.PlaySound( 0x21B );

			return false;
		}
コード例 #8
0
ファイル: OilCloth.cs プロジェクト: danscava/RunUO.T2A
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (Deleted || !from.CanSee(this))
            {
                return(false);
            }

            base.ScissorHelper(from, new Bandage(), 1);

            return(true);
        }
コード例 #9
0
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (Deleted || !from.CanSee(this))
            {
                return(false);
            }

            base.ScissorHelper(from, new Bone(), Utility.RandomMinMax(10, 15));

            return(true);
        }
コード例 #10
0
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (Deleted || !from.CanSee(this))
            {
                return(false);
            }

            ScissorHelper(from, new Cloth(), 50);

            return(true);
        }
コード例 #11
0
ファイル: Cloth.cs プロジェクト: Ravenwolfe/xrunuo
        public bool Scissor( Mobile from, Scissors scissors )
        {
            if ( Deleted || !from.CanSee( this ) )
                return false;

            from.SendLocalizedMessage( 1008117 ); // You cut the material into bandages and place them in your backpack.

            base.ScissorHelper( from, new Bandage(), 1 );

            return true;
        }
コード例 #12
0
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (Deleted || !from.CanSee(this)) return false;

            //base.ScissorHelper(from, new Cloth(), 50);

            from.SendMessage("You removed the tag from the pillow, that is illegal.  You are now a criminal.");
            from.Criminal = true;

            return true;
        }
コード例 #13
0
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(502437);                   // Items you wish to cut must be in your backpack.
                return(false);
            }

//			CraftSystem system = DefTailoring.CraftSystem;
            CraftSystem system = new DefTailoring();

            system.CustomSystem(from);


            CraftItem item = system.CraftItems.SearchFor(GetType());

            if (item != null && item.Ressources.Count == 1 && item.Ressources.GetAt(0).Amount >= 2)
            {
                try
                {
                    Type resourceType = null;

                    if (this is BaseShoes)
                    {
                        CraftResourceInfo info = CraftResources.GetInfo(((BaseShoes)this).Resource);

                        if (info != null && info.ResourceTypes.Length > 0)
                        {
                            resourceType = info.ResourceTypes[0];
                        }
                    }

                    if (resourceType == null)
                    {
                        resourceType = item.Ressources.GetAt(0).ItemType;
                    }

                    Item res = (Item)Activator.CreateInstance(resourceType);

                    ScissorHelper(from, res, m_PlayerConstructed ? (item.Ressources.GetAt(0).Amount / 2) : 1);

                    res.LootType = LootType.Regular;

                    return(true);
                }
                catch
                {
                }
            }

            from.SendLocalizedMessage(502440);               // Scissors can not be used on that to produce anything.
            return(false);
        }
コード例 #14
0
        public bool Scissor( Mobile from, Scissors scissors )
        {
            if ( Deleted || !from.CanSee( this ) ) return false;

            //base.ScissorHelper( from, new Bandage(), 1 );
            this.Consume( 1 );
            Bandage give = new Bandage();
            give.Hue = this.Hue;
            from.AddToBackpack( give );

            return true;
        }
コード例 #15
0
ファイル: SpineBone.cs プロジェクト: mguerine/runuo-ws
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (Deleted || !from.CanSee(this))
            {
                return(false);
            }

            base.ScissorHelper(from, new Bone(), 3);
            from.PlaySound(0x21B);

            return(false);
        }
コード例 #16
0
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (Deleted || !from.CanSee(this))
            {
                return(false);
            }

            from.SendLocalizedMessage(1008117);               // You cut the material into bandages and place them in your backpack.

            base.ScissorHelper(from, new Bandage(), 1);

            return(true);
        }
コード例 #17
0
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (Deleted || !from.CanSee(this))
            {
                return(false);
            }

            Cloth c = new Cloth();

            c.Hue = this.Hue;
            base.ScissorHelper(from, c, 50);

            return(true);
        }
コード例 #18
0
        public bool Scissor( Mobile from, Scissors scissors )
        {
            if ( Deleted || !from.CanSee( this ) ) return false;

            if ( !IsChildOf ( from.Backpack ) )
            {
                from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack
                return false;
            }

            base.ScissorHelper( from, new BarbedLeather(), 1 );

            return true;
        }
コード例 #19
0
 public bool Scissor(Mobile from, Scissors scissors)
 {
     if (Deleted || !from.CanSee(this))
     {
         return(false);
     }
     if (!IsChildOf(from.Backpack))
     {
         from.SendLocalizedMessage(502437);                 // Items you wish to cut must be in your backpack
         return(false);
     }
     base.ScissorHelper(from, new EtherealLeather(), 1);
     return(true);
 }
コード例 #20
0
ファイル: TaggedPillow.cs プロジェクト: zerodowned/annox
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (Deleted || !from.CanSee(this))
            {
                return(false);
            }

            //base.ScissorHelper(from, new Cloth(), 50);

            from.SendMessage("You removed the tag from the pillow, that is illegal.  You are now a criminal.");
            from.Criminal = true;

            Delete();
            return(true);
        }
コード例 #21
0
ファイル: ResRobe.cs プロジェクト: FreeReign/imaginenation
		bool IScissorable.Scissor( Mobile from, Scissors scissors )
		{
			if( !Deleted && ( IsChildOf( from ) || IsChildOf( from.BankBox ) || (from.InRange( this, 3 ) && from.InLOS(this) ) ) )
			{
				from.SendAsciiMessage( "You put the bandages in your pack." );
				from.AddToBackpack( new Bandage( 3 ) );
				Delete();
				return true;
			}
			else
			{
                from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
				return false;
			}
		}
コード例 #22
0
ファイル: ResRobe.cs プロジェクト: rberiot/imaginenation
 bool IScissorable.Scissor(Mobile from, Scissors scissors)
 {
     if (!Deleted && (IsChildOf(from) || IsChildOf(from.BankBox) || (from.InRange(this, 3) && from.InLOS(this))))
     {
         from.SendAsciiMessage("You put the bandages in your pack.");
         from.AddToBackpack(new Bandage(3));
         Delete();
         return(true);
     }
     else
     {
         from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
         return(false);
     }
 }
コード例 #23
0
ファイル: SalvageBag.cs プロジェクト: zerodowned/last-wish
        private void SalvageCloth(Mobile from)
        {
            Scissors scissors = from.Backpack.FindItemByType(typeof(Scissors)) as Scissors;

            if (scissors == null)
            {
                from.SendLocalizedMessage(1079823);   // You need scissors in order to salvage cloth.
                return;
            }

            int salvaged    = 0;
            int notSalvaged = 0;

            Container sBag = this;

            List <Item> scissorables = sBag.FindItemsByType <Item>();

            for (int i = scissorables.Count - 1; i >= 0; --i)
            {
                Item item = scissorables[i];

                if (item is IScissorable)
                {
                    IScissorable scissorable = (IScissorable)item;

                    if (Scissors.CanScissor(from, scissorable) && scissorable.Scissor(from, scissors))
                    {
                        ++salvaged;
                    }
                    else
                    {
                        ++notSalvaged;
                    }
                }
            }

            from.SendLocalizedMessage(1079974, String.Format("{0}\t{1}", salvaged, salvaged + notSalvaged));     // Salvaged: ~1_COUNT~/~2_NUM~ tailored items

            Container pack = from.Backpack;

            foreach (Item i in ((Container)this).FindItemsByType(typeof(Item), true))
            {
                if ((i is Leather) || (i is Cloth) || (i is SpinedLeather) || (i is HornedLeather) || (i is BarbedLeather) || (i is Bandage) || (i is Bone))
                {
                    from.AddToBackpack(i);
                }
            }
        }
コード例 #24
0
		public bool Scissor( Mobile from, Scissors scissors )
		{
			if ( DateTime.Now < m_NextWoolTime )
			{
				// This sheep is not yet ready to be shorn.
				PrivateOverheadMessage( MessageType.Regular, 0x3B2, 500449, from.NetState );
				return false;
			}
			
			from.SendLocalizedMessage( 500452 ); // You place the gathered wool into your backpack.
			from.AddToBackpack( new Wool( Map == Map.Felucca ? 2 : 1 ) );
			
			NextWoolTime = DateTime.Now + TimeSpan.FromHours( 3.0 ); // TODO: Proper time delay
			
			return true;
		}
コード例 #25
0
ファイル: UncutCloth.cs プロジェクト: proxeeus/UORebirth
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (Deleted || !from.CanSee(this))
            {
                return(false);
            }

            //base.ScissorHelper( from, new Bandage(), 1 );
            this.Consume(1);
            Bandage give = new Bandage();

            give.Hue = this.Hue;
            from.AddToBackpack(give);

            return(true);
        }
コード例 #26
0
        public override bool Scissor(Mobile from, Scissors scissors)
        {
            if (IsCuttable && IsAccessibleTo(from))
            {
                if (!Opened && m_Timer == null)
                {
                    m_Timer = Timer.DelayCall(TimeSpan.FromSeconds(3), FinishOpening, from);
                    scissors.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1071897); // You carefully cut into the organ.
                    return(true);
                }

                scissors.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1071898); // You have already cut this organ open.
            }

            return(false);
        }
コード例 #27
0
ファイル: Hides.cs プロジェクト: Jascen/UOSmart
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (this.Deleted || !from.CanSee(this))
            {
                return(false);
            }

            //if (Core.AOS && !this.IsChildOf(from.Backpack))
            //{
            //    from.SendLocalizedMessage(502437); // Items you wish to cut must be in your backpack
            //    return false;
            //}
            base.ScissorHelper(from, new Leather(), 1);

            return(true);
        }
コード例 #28
0
		public override bool Scissor( Mobile from, Scissors scissors )
		{
			if ( IsCuttable && IsAccessibleTo( from ) )
			{
				if ( !m_Opened && m_Timer == null )
				{
					m_Timer = Timer.DelayCall<Mobile>( TimeSpan.FromSeconds( 3 ), new TimerStateCallback<Mobile>( FinishOpening ), from );
					scissors.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071897 ); // You carefully cut into the organ.
					return true;
				}
				else
					scissors.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071898 ); // You have already cut this organ open.
			}

			return false;
		}
コード例 #29
0
        public override bool Scissor(Mobile from, Scissors scissors)
        {
            if (IsAccessibleTo(from))
            {
                if (!m_Cut && m_Timer == null)
                {
                    m_Timer = Timer.DelayCall(TimeSpan.FromSeconds(3), CuttingDone, from);
                    scissors.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1071899); // You begin cutting through the vein.
                    return(true);
                }

                scissors.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1071900); // // This vein has already been cut.
            }

            return(false);
        }
コード例 #30
0
ファイル: PlagueBeastVein.cs プロジェクト: Crome696/ServUO
        public override bool Scissor(Mobile from, Scissors scissors)
        {
            if (this.IsAccessibleTo(from))
            {
                if (!this.m_Cut && this.m_Timer == null)
                {
                    this.m_Timer = Timer.DelayCall<Mobile>(TimeSpan.FromSeconds(3), new TimerStateCallback<Mobile>(CuttingDone), from);
                    scissors.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1071899); // You begin cutting through the vein.
                    return true;
                }
                else
                    scissors.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1071900); // // This vein has already been cut.
            }

            return false;
        }
コード例 #31
0
        private void SalvageCloth(Mobile from)
        {
            Scissors scissors = from.Backpack.FindItemByType(typeof(Scissors)) as Scissors;

            if (scissors == null)
            {
                from.SendLocalizedMessage(1079823); // You need scissors in order to salvage cloth.
                return;
            }

            int salvaged    = 0;
            int notSalvaged = 0;

            Container sBag = this;

            List <Item> Scissorables = sBag.FindItemsByType <Item>();

            for (int i = Scissorables.Count - 1; i >= 0; i--)
            {
                Item item = Scissorables[i];
                if (item is IScissorable)
                {
                    if (((IScissorable)item).Scissor(from, scissors))
                    {
                        salvaged++;
                    }
                    else
                    {
                        notSalvaged++;
                    }
                }
            }

            from.SendLocalizedMessage(1079974, String.Format("{0}\t{1}", salvaged, salvaged + notSalvaged)); // Salvaged: ~1_COUNT~/~2_NUM~ tailored items

            Container pack = from.Backpack;

            foreach (Item i in ((Container)this).FindItemsByType(typeof(Item), true))
            {
                //daat99 OWLTR start - custom leathers
                if ((i is BaseLeather) || (i is Cloth) || (i is Bandage) || (i is Bone))
                //daat99 OWLTR end - custom leathers
                {
                    from.AddToBackpack(i);
                }
            }
        }
コード例 #32
0
        public override bool Scissor(Mobile from, Scissors scissors)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(502437); // Items you wish to cut must be in your backpack.
                return(false);
            }

            CraftSystem system = DefTailoring.CraftSystem;

            CraftItem item = system.CraftItems.SearchFor(GetType());

            if (item != null && item.Resources.Count == 1 && item.Resources.GetAt(0).Amount >= 2)
            {
                try
                {
                    Type resourceType = null;

                    CraftResourceInfo info = CraftResources.GetInfo(Resource);

                    if (info != null && info.ResourceTypes.Length > 0)
                    {
                        resourceType = info.ResourceTypes[0];
                    }

                    if (resourceType == null)
                    {
                        resourceType = item.Resources.GetAt(0).ItemType;
                    }

                    Item res = (Item)Activator.CreateInstance(resourceType);

                    ScissorHelper(from, res, PlayerConstructed ? (item.Resources.GetAt(0).Amount / 2) : 1);

                    res.LootType = LootType.Regular;

                    return(true);
                }
                catch (Exception e)
                {
                    Server.Diagnostics.ExceptionLogging.LogException(e);
                }
            }

            from.SendLocalizedMessage(502440); // Scissors can not be used on that to produce anything.
            return(false);
        }
コード例 #33
0
        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (Deleted || !from.CanSee(this))
            {
                return(false);
            }

            if (!from.InRange(GetWorldLocation(), 2) || !from.InLOS(this))
            {
                from.LocalOverheadMessage(Network.MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
                return(false);
            }

            base.ScissorHelper(from, new BarbedLeather(), 1);

            return(true);
        }
コード例 #34
0
ファイル: PlagueBeastVein.cs プロジェクト: pallop/Servuo
        public override bool Scissor(Mobile from, Scissors scissors)
        {
            if (this.IsAccessibleTo(from))
            {
                if (!this.m_Cut && this.m_Timer == null)
                {
                    this.m_Timer = Timer.DelayCall <Mobile>(TimeSpan.FromSeconds(3), new TimerStateCallback <Mobile>(CuttingDone), from);
                    scissors.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1071899); // You begin cutting through the vein.
                    return(true);
                }
                else
                {
                    scissors.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1071900); // // This vein has already been cut.
                }
            }

            return(false);
        }
コード例 #35
0
        public override bool Scissor(Mobile from, Scissors scissors)
        {
            if (this.IsCuttable && this.IsAccessibleTo(from))
            {
                if (!this.m_Opened && this.m_Timer == null)
                {
                    this.m_Timer = Timer.DelayCall <Mobile>(TimeSpan.FromSeconds(3), new TimerStateCallback <Mobile>(FinishOpening), from);
                    scissors.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1071897); // You carefully cut into the organ.
                    return(true);
                }
                else
                {
                    scissors.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1071898); // You have already cut this organ open.
                }
            }

            return(false);
        }
コード例 #36
0
        public override bool Scissor(Mobile from, Scissors scissors)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(502437); // Items you wish to cut must be in your backpack.
                return(false);
            }

            Cloth cloth = new Cloth();

            cloth.Amount = 1;
            cloth.Hue    = Hue;

            Delete();

            from.AddToBackpack(cloth);
            from.SendMessage("You cut the item into cloth.");

            return(false);
        }
コード例 #37
0
        public bool Scissor( Mobile from, Scissors scissors )
        {
            if ( Deleted || !from.CanSee( this ) )
                return false;

            int amount = RandomAmount();

            Item bones = new Bone( amount );
            from.PlaySound( 0x21B );

            if ( from.Backpack != null && from.Backpack.TryDropItem( from, bones, false ) )
            {
                from.SendLocalizedMessage( 1008123 ); // You cut the material and place it into your backpack.
                Delete();
            }
            else
                base.ScissorHelper( from, bones, 1 );

            return true;
        }
コード例 #38
0
        /*public override void OnSingleClick( Mobile from )
         * {
         *      int number = (Amount == 1) ? 1049124 : 1049123;
         *
         *      from.Send( new MessageLocalized( Serial, ItemID, MessageType.Regular, 0x3B2, 3, number, "", Amount.ToString() ) );
         * }*/

        public bool Scissor(Mobile from, Scissors scissors)
        {
            if (Deleted || !from.CanSee(this))
            {
                return(false);
            }

            Consume();
            Item bandage = new Bandage();

            bandage.Hue = Hue;
            if (!from.PlaceInBackpack(bandage))
            {
                bandage.MoveToWorld(from.Location, from.Map);
            }

            //base.ScissorHelper( from, new Bandage(), 1 );

            return(true);
        }
コード例 #39
0
		public virtual bool Scissor( Mobile from, Scissors scissors )
		{
			if ( !m_Cut )
			{
				PlagueBeastLord owner = RootParent as PlagueBeastLord;

				m_Cut = true;
				Movable = true;

				from.AddToBackpack( this );
				from.LocalOverheadMessage( MessageType.Regular, 0x34, 1071906 ); // * You remove the plague mutation core from the plague beast, causing it to dissolve into a pile of goo *				

				if ( owner != null )
					Timer.DelayCall<PlagueBeastLord>( TimeSpan.FromSeconds( 1 ), new TimerStateCallback<PlagueBeastLord>( KillParent ), owner );

				return true;
			}

			return false;
		}
コード例 #40
0
        public virtual bool Scissor(Mobile from, Scissors scissors)
        {
            if (!this.m_Cut)
            {
                PlagueBeastLord owner = this.RootParent as PlagueBeastLord;

                this.m_Cut   = true;
                this.Movable = true;

                from.AddToBackpack(this);
                from.LocalOverheadMessage(MessageType.Regular, 0x34, 1071906); // * You remove the plague mutation core from the plague beast, causing it to dissolve into a pile of goo *

                if (owner != null)
                {
                    Timer.DelayCall <PlagueBeastLord>(TimeSpan.FromSeconds(1), new TimerStateCallback <PlagueBeastLord>(KillParent), owner);
                }

                return(true);
            }

            return(false);
        }
コード例 #41
0
ファイル: Scissors.cs プロジェクト: zerodowned/UO-Forever
        public BlessedClothingCutGump(IScissorable target, Scissors scissors)
            : base(150, 50)
        {
            Closable   = true;
            Disposable = true;
            Dragable   = true;
            Resizable  = false;

            m_Target   = target;
            m_Scissors = scissors;

            AddBackground(0, 0, 250, 170, 0x13BE);
            AddBackground(10, 10, 200, 150, 0xBB8);

            AddHtml(20, 30, 140, 60, "WARNING: If you cut that blessed cloth, the blessing will be lost!", false, false);
            // Do you wish to re-deed this decoration?

            AddHtmlLocalized(55, 100, 150, 25, 1011011, false, false);             // CONTINUE
            AddButton(20, 100, 0xFA5, 0xFA7, (int)Buttons.Confirm, GumpButtonType.Reply, 0);

            AddHtmlLocalized(55, 125, 150, 25, 1011012, false, false);             // CANCEL
            AddButton(20, 125, 0xFA5, 0xFA7, (int)Buttons.Cancel, GumpButtonType.Reply, 0);
        }
コード例 #42
0
 public override bool Scissor(Mobile from, Scissors scissors)
 {
     return(false);
 }
コード例 #43
0
ファイル: Scissors.cs プロジェクト: FreeReign/forkuo
 public InternalTarget(Scissors item)
     : base(2, false, TargetFlags.None)
 {
     this.m_Item = item;
 }
コード例 #44
0
ファイル: Scissors.cs プロジェクト: Delphi79/RunUO-2.3.1
 public InternalTarget(Scissors item) : base(2, false, TargetFlags.None)
 {
     m_Item = item;
 }
コード例 #45
0
ファイル: Cloth.cs プロジェクト: Godkong/RunUO
        /*public override void OnSingleClick( Mobile from )
        {
            int number = (Amount == 1) ? 1049124 : 1049123;

            from.Send( new MessageLocalized( Serial, ItemID, MessageType.Regular, 0x3B2, 3, number, "", Amount.ToString() ) );
        }*/
        public bool Scissor( Mobile from, Scissors scissors )
        {
            if ( Deleted || !from.CanSee( this ) ) return false;

            Consume();
            Item bandage = new Bandage();
            bandage.Hue = Hue;
            if (!from.PlaceInBackpack(bandage))
                bandage.MoveToWorld(from.Location, from.Map);

            //base.ScissorHelper( from, new Bandage(), 1 );

            return true;
        }
コード例 #46
0
ファイル: Ring.cs プロジェクト: greeduomacro/divinity
 public override bool Scissor( Mobile from, Scissors scissors )
 {
     return false;
 }
コード例 #47
0
 public override bool Scissor(Mobile from, Scissors scissors)
 {
     return(Helpers.CutCloth(this, from));
 }
コード例 #48
0
ファイル: Scissors.cs プロジェクト: greeduomacro/UO-Forever
		public BlessedClothingCutGump(IScissorable target, Scissors scissors)
			: base(150, 50)
		{
			Closable = true;
			Disposable = true;
			Dragable = true;
			Resizable = false;

			m_Target = target;
			m_Scissors = scissors;

			AddBackground(0, 0, 250, 170, 0x13BE);
			AddBackground(10, 10, 200, 150, 0xBB8);

			AddHtml(20, 30, 140, 60, "WARNING: If you cut that blessed cloth, the blessing will be lost!", false, false);
				// Do you wish to re-deed this decoration?

			AddHtmlLocalized(55, 100, 150, 25, 1011011, false, false); // CONTINUE
			AddButton(20, 100, 0xFA5, 0xFA7, (int)Buttons.Confirm, GumpButtonType.Reply, 0);

			AddHtmlLocalized(55, 125, 150, 25, 1011012, false, false); // CANCEL
			AddButton(20, 125, 0xFA5, 0xFA7, (int)Buttons.Cancel, GumpButtonType.Reply, 0);
		}
コード例 #49
0
        public bool Scissor( Mobile from, Scissors scissors )
        {
            if ( !IsChildOf( from.Backpack ) )
            {
                from.SendLocalizedMessage( 502437 ); // Items you wish to cut must be in your backpack.
                return false;
            }

            if ( Ethics.Ethic.IsImbued( this ) )
            {
                from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
                return false;
            }

            if ( TestCenter.Enabled && !String.IsNullOrEmpty( Name ) && Name.ToLower().IndexOf( "beta" ) > -1 )
            {
                from.SendMessage( "This item is too special to be cut." );
                return false;
            }

            CraftSystem system = DefTailoring.CraftSystem;

            CraftItem item = system.CraftItems.SearchFor( GetType() );

            if ( item != null && item.Resources.Count == 1 && item.Resources.GetAt( 0 ).Amount >= 2 )
            {
                try
                {
                    Item res = (Item)Activator.CreateInstance( CraftResources.GetInfo( m_Resource ).ResourceTypes[0] );

                    ScissorHelper( from, res, m_PlayerConstructed ? (item.Resources.GetAt( 0 ).Amount / 2) : 1 );
                    return true;
                }
                catch
                {
                }
            }

            from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
            return false;
        }
コード例 #50
0
ファイル: OuterTorso.cs プロジェクト: Ravenwolfe/Origins
 public new bool Scissor( Mobile from, Scissors scissors )
 {
     from.SendAsciiMessage( "Scissors can not be used on that to produce anything." ); // Scissors can not be used on that to produce anything.
     return false;
 }
コード例 #51
0
        public virtual bool Scissor(Mobile from, Scissors scissors)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(502437);                   // Items you wish to cut must be in your backpack.
                return(false);
            }

            if (Ethics.Ethic.IsImbued(this))
            {
                from.SendLocalizedMessage(502440);                   // Scissors can not be used on that to produce anything.
                return(false);
            }

            if (TestCenter.Enabled && !String.IsNullOrEmpty(Name) && Name.ToLower().IndexOf("beta") > -1)
            {
                from.SendMessage("This item is too special to be cut.");
                return(false);
            }

            CraftSystem system = DefTailoring.CraftSystem;

            CraftItem item = system.CraftItems.SearchFor(GetType());

            if (item != null && item.Resources.Count == 1 && item.Resources.GetAt(0).Amount >= 2)
            {
                try
                {
                    Type resourceType = null;

                    CraftResourceInfo info = CraftResources.GetInfo(m_Resource);

                    if (info != null && info.ResourceTypes.Length > 0)
                    {
                        resourceType = info.ResourceTypes[0];
                    }

                    if (resourceType == null)
                    {
                        resourceType = item.Resources.GetAt(0).ItemType;
                    }

                    Item res = (Item)Activator.CreateInstance(resourceType);

                    ScissorHelper(from, res, m_PlayerConstructed ? (item.Resources.GetAt(0).Amount / 2) : 1, !resourceType.IsSubclassOf(typeof(BaseLeather)));

                    if (this is BaseShoes)
                    {
                        switch (((BaseShoes)this).Resource)
                        {
                        case CraftResource.RegularLeather: { res.Hue = 0; break; }

                        case CraftResource.SpinedLeather: { res.Hue = 643; break; }

                        case CraftResource.HornedLeather: { res.Hue = 551; break; }

                        case CraftResource.BarbedLeather: { res.Hue = 449; break; }
                        }
                    }

                    //Cutting up items with special hues only gives 1 cloth
                    if (res.Amount >= 1 && res.Hue >= 1000)
                    {
                        from.SendMessage("The corrosive dye destroyed most of the cloth, yielding very little usable material.");
                        res.Amount = 1;
                    }

                    res.LootType = LootType.Regular;

                    return(true);
                }
                catch
                {
                }
            }

            from.SendLocalizedMessage(502440);               // Scissors can not be used on that to produce anything.
            return(false);
        }
コード例 #52
0
 public new bool Scissor(Mobile from, Scissors scissors)
 {
     from.SendLocalizedMessage(502440);               // Scissors can not be used on that to produce anything.
     return(false);
 }
コード例 #53
0
        public virtual bool Scissor(Mobile from, Scissors scissors)
        {
			if ( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 502437 ); // Items you wish to cut must be in your backpack.
				return false;
			}

			if ( Ethic.IsImbued( this ) )
			{
				from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
				return false;
			}

			CraftSystem system = DefTailoring.CraftSystem;

			CraftItem item = system.CraftItems.SearchFor( GetType() );

			if ( item != null && item.Resources.Count == 1 && item.Resources.GetAt( 0 ).Amount >= 2 )
			{
				try
				{
					Type resourceType = null;

					CraftResourceInfo info = CraftResources.GetInfo( m_Resource );

					if ( info != null && info.ResourceTypes.Length > 0 )
						resourceType = info.ResourceTypes[0];

					if ( resourceType == null )
						resourceType = item.Resources.GetAt( 0 ).ItemType;

                    // Debug code
                    //from.SendMessage("item: {0}", Layer);

                    Item res = null;

                    if (Layer == Layer.Shoes)
                        res = new Leather();
                    else
                        res = new Bandage();

					ScissorHelper( from, res, (item.Resources.GetAt( 0 ).Amount / 2) );
                    
					res.LootType = LootType.Regular;

					return true;
				}
				catch
				{
				}
			}

			from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
			return false;
		}
コード例 #54
0
 public virtual bool Scissor(Mobile from, Scissors scissors)
 {
     return(false);
 }
コード例 #55
0
		public bool Scissor( Mobile from, Scissors scissors )
		{
			if ( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 502437 ); // Items you wish to cut must be in your backpack.
				return false;
			}

			CraftSystem system = DefTailoring.CraftSystem;

			CraftItem item = system.CraftItems.SearchFor( GetType() );

			if ( item != null && item.Ressources.Count == 1 && item.Ressources.GetAt( 0 ).Amount >= 2 )
			{
				try
				{
					Hue = CraftResources.GetHue( m_Resource );

					Item res = (Item)Activator.CreateInstance( CraftResources.GetInfo( m_Resource ).ResourceTypes[0] );

					ScissorHelper( from, res, m_PlayerConstructed ? (item.Ressources.GetAt( 0 ).Amount / 2) : 1 );
					return true;
				}
				catch
				{
				}
			}

			from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
			return false;
		}
コード例 #56
0
        public bool Scissor( Mobile from, Scissors scissors )
        {
            /*if ( !IsChildOf( from.Backpack ) )
            {
                from.SendLocalizedMessage( 502437 ); // Items you wish to cut must be in your backpack.
                return false;
            }

            int res = Server.Engines.Craft.TailoringSystem.GetResourcesFor( this.GetType() );
            if ( res > 0 )
            {
                Item bandage = new Bandage( res );
                bandage.Hue = this.Hue;
                from.AddToBackpack( bandage );
                this.Delete();

                from.SendAsciiMessage( "You cut the item into bandages and place them in your backpack." );
                return true;
            }
            else*/
            {
                from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
                return false;
            }
        }
コード例 #57
0
 public new bool Scissor(Mobile from, Scissors scissors)
 {
     from.SendLocalizedMessage(502440); // Scissors can not be used on that to produce anything.
     return false;
 }
コード例 #58
0
		public virtual bool Scissor( Mobile from, Scissors scissors )
		{
			if ( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 502437 ); // Items you wish to cut must be in your backpack.
				return false;
			}

            if (Ethics.Ethic.IsImbued(this) || NotScissorable)
			{
				from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
				return false;
			}

			if ( TestCenter.Enabled && !String.IsNullOrEmpty( Name ) && Name.ToLower().IndexOf( "beta" ) > -1 )
			{
				from.SendMessage( "This item is too special to be cut." );
				return false;
			}

			CraftSystem system = DefTailoring.CraftSystem;

			CraftItem item = system.CraftItems.SearchFor( GetType() );

			if ( item != null && item.Resources.Count == 1 && item.Resources.GetAt( 0 ).Amount >= 2 )
			{
				try
				{
					Type resourceType = null;

					CraftResourceInfo info = CraftResources.GetInfo( m_Resource );

					if ( info != null && info.ResourceTypes.Length > 0 )
						resourceType = info.ResourceTypes[0];

					if ( resourceType == null )
						resourceType = item.Resources.GetAt( 0 ).ItemType;

					Item res = (Item)Activator.CreateInstance( resourceType );

					ScissorHelper( from, res, m_PlayerConstructed ? (item.Resources.GetAt( 0 ).Amount / 2) : 1, !resourceType.IsSubclassOf( typeof( BaseLeather ) ) );

					//Cutting up items with special hues only gives 1 cloth
					if ( res.Amount >= 1 && res.Hue >= 1000 )
					{
						from.SendMessage("The corrosive dye destroyed most of the cloth, yielding very little usable material.");
						res.Amount = 1;
					}

					res.LootType = LootType.Regular;

					return true;
				}
				catch
				{
				}
			}

			from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
			return false;
		}
コード例 #59
0
		public bool Scissor( Mobile from, Scissors scissors )
		{
			if ( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 502437 ); // Items you wish to cut must be in your backpack.
				return false;
			}

			if ( Ethics.Ethic.IsImbued( this ) )
			{
				from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
				return false;
			}

			CraftSystem system = DefTailoring.CraftSystem;

			CraftItem item = system.CraftItems.SearchFor( GetType() );

			if ( item != null && item.Ressources.Count == 1 && item.Ressources.GetAt( 0 ).Amount >= 2 )
			{
				try
				{
					Type resourceType = null;

					CraftResourceInfo info = CraftResources.GetInfo( m_Resource );

					if ( info != null && info.ResourceTypes.Length > 0 )
						resourceType = info.ResourceTypes[0];

					if ( resourceType == null )
						resourceType = item.Ressources.GetAt( 0 ).ItemType;

					Item res = (Item)Activator.CreateInstance( resourceType );

					ScissorHelper( from, res, m_PlayerConstructed ? (item.Ressources.GetAt( 0 ).Amount / 2) : 1 );

					res.LootType = LootType.Regular;

					return true;
				}
				catch
				{
				}
			}

			from.SendLocalizedMessage( 502440 ); // Scissors can not be used on that to produce anything.
			return false;
		}
コード例 #60
0
ファイル: PlagueBeastLord.cs プロジェクト: FreeReign/forkuo
        public virtual bool Scissor(Mobile from, Scissors scissors)
        {
            if (this.IsAccessibleTo(from))
                scissors.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1071918);  // You can't cut through the plague beast's amorphous skin with scissors!

            return false;
        }