private void InternalCallback(Mobile from, object targeted, object state)
        {
            PigmentsOfTokuno pigment = (PigmentsOfTokuno)state;

            if (pigment.Deleted || pigment.UsesRemaining <= 0 || !from.InRange(pigment.GetWorldLocation(), 3) || !pigment.IsAccessibleTo(from))
            {
                return;
            }

            Item i = targeted as Item;

            if (i == null)
            {
                from.SendLocalizedMessage(1070931);                   // You can only dye artifacts and enhanced magic items with this tub.
            }
            else if (!from.InRange(i.GetWorldLocation(), 3) || !IsAccessibleTo(from))
            {
                from.SendLocalizedMessage(502436);                   // That is not accessible.
            }
            else if (from.Items.Contains(i))
            {
                from.SendLocalizedMessage(1070930);                   // Can't dye artifacts or enhanced magic items that are being worn.
            }
            else if (i.IsLockedDown)
            {
                from.SendLocalizedMessage(1070932);                   // You may not dye artifacts and enhanced magic items which are locked down.
            }
            else if (i is PigmentsOfTokuno)
            {
                from.SendLocalizedMessage(1042417);                   // You cannot dye that.
            }
            else if (!IsValidItem(i))
            {
                from.SendLocalizedMessage(1070931);                   // You can only dye artifacts and enhanced magic items with this tub.	//Yes, it says tub on OSI.  Don't ask me why ;p
            }
            else
            {
                //Notes: on OSI there IS no hue check to see if it's already hued.  and no messages on successful hue either
                i.Hue = PigmentInfo.GetInfo(pigment.Type).Hue;

                if (--pigment.UsesRemaining <= 0)
                {
                    pigment.Delete();
                }
            }
        }
Exemplo n.º 2
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                Item item = targeted as Item;

                if (item == null)
                {
                    return;
                }

                if (!item.IsChildOf(from.Backpack))
                {
                    from.SendLocalizedMessage(1062334);                       // This item must be in your backpack to be used.
                }
                else if (item is PigmentsOfTokuno || item is PigmentsOfTokunoMajor || item is CompassionPigment)
                {
                    from.SendLocalizedMessage(1042083);                       // You cannot dye that.
                }
                else if (item.IsLockedDown)
                {
                    from.SendLocalizedMessage(1070932);                       // You may not dye artifacts and enhanced magic items which are locked down.
                }
                else if (!PigmentsOfTokuno.CheckWarn(item))
                {
                    from.SendLocalizedMessage(1070930);                       // Can't dye artifacts or enhanced magic items that are being worn.
                }
                else if (PigmentsOfTokuno.CanHue(item))
                {
                    item.Hue = m_Pigment.Hue;

                    m_Pigment.UsesRemaining--;

                    if (m_Pigment.UsesRemaining <= 0)
                    {
                        m_Pigment.Delete();
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1070931);                       // You can only dye artifacts and enhanced magic items with this tub.
                }
            }
        public NoxGreenDonationBoxAos()
        {
            Weight = 1.0;
            Hue = 1420;
            Item item = null;
            Name = "Defiance Nox Green Member Box of Holding";

            CharacterCreation.PlaceItemIn(this, 16, 60, (item = new DonationSkillBall( 25, false )));
            CharacterCreation.PlaceItemIn(this, 28, 60, (item = new DonationSkillBall( 25, false )));
            CharacterCreation.PlaceItemIn(this, 40, 60, (item = new DonationSkillBall( 25, false )));

            CharacterCreation.PlaceItemIn(this, 16, 81, (item = new HoodedShroudOfShadows()));
            item.Hue = 1420;
            item.Name = "Nox Shroud of Shadows";
                        item.LootType = LootType.Blessed;

            BaseContainer cont;
            CharacterCreation.PlaceItemIn(this, 58, 57, (cont = new Backpack()));
            cont.Hue = 1420;
            cont.Name = "a donation backpack";

            CharacterCreation.PlaceItemIn(cont, 44, 65, new SulfurousAsh(10000));
            CharacterCreation.PlaceItemIn(cont, 77, 65, new Nightshade(10000));
            CharacterCreation.PlaceItemIn(cont, 110, 65, new SpidersSilk(10000));
            CharacterCreation.PlaceItemIn(cont, 143, 65, new Garlic(10000));

            CharacterCreation.PlaceItemIn(cont, 44, 128, new Ginseng(10000));
            CharacterCreation.PlaceItemIn(cont, 77, 128, new Bloodmoss(10000));
            CharacterCreation.PlaceItemIn(cont, 110, 128, new BlackPearl(10000));
            CharacterCreation.PlaceItemIn(cont, 143, 128, new MandrakeRoot(10000));

            //CharacterCreation.PlaceItemIn(this, 74, 64, new DonationBandana());
            //Replaced the bandana with a deed - Edit by Blady
            CharacterCreation.PlaceItemIn(this, 74, 64, (item = new DonationDeed()));
            item.Hue = 1420;

            CharacterCreation.PlaceItemIn(this, 103, 58, (item = new Sandals()));
            item.Hue = 1420; //Utility.RandomList(1420, 1281, 1161, 1420, 1420, 1420, 1266, 1420, 1420, 1645);
            item.LootType = LootType.Blessed;

            CharacterCreation.PlaceItemIn( this, 122, 53, new SpecialDonateDye() );
            CharacterCreation.PlaceItemIn(this, 11420, 53, (item = new PigmentsOfTokuno( 5 )));
            ((PigmentsOfTokuno)item).Type = PigmentType.NoxGreen;
            CharacterCreation.PlaceItemIn(this, 156, 55, (item = new EtherealHorse()));
            item.Hue = 1420;
            item.Name = "No Age Ethereal";
            ((EtherealMount)item).IsDonationItem = true;

            CharacterCreation.PlaceItemIn(this, 34, 83, (item = new HolyDeedofBlessing()));
            item.Hue = 1420;
            CharacterCreation.PlaceItemIn(this, 43, 83, (item = new ClothingBlessDeed()));
            item.Hue = 1420;
            CharacterCreation.PlaceItemIn(this, 58, 83, (item = new TreasureMap(6, Map.Felucca)));
            item.Hue = 1420;
            CharacterCreation.PlaceItemIn(this, 73, 83, (item = new SmallBrickHouseDeed()));
            item.Hue = 1420;
            CharacterCreation.PlaceItemIn(this, 88, 83, (item = new NameChangeDeed()));
            item.Hue = 1420;
            CharacterCreation.PlaceItemIn(this, 103, 83, (item = new MiniHouseDeed()));
            item.Hue = 1420;
            //CharacterCreation.PlaceItemIn(this, 118, 83, (item = new BankCheck(100000)));
            //item.Hue = 1420;
            CharacterCreation.PlaceItemIn(this, 130, 83, (item = new MembershipTicket()));
            item.Hue = 1420;
            ((MembershipTicket)item).MemberShipTime = TimeSpan.MaxValue;
        }
Exemplo n.º 4
0
		public override void HandleButtonResponse( NetState sender, int adjustedButton, ImageTileButtonInfo buttonInfo )
		{
			PlayerMobile pm = sender.Mobile as PlayerMobile;

			if( pm == null || !pm.InRange( m_Collector.Location, 7 ) || !(pm.ToTItemsTurnedIn >= TreasuresOfTokuno.ItemsPerReward) )
				return;

			bool pigments = (buttonInfo is PigmentsTileButtonInfo);

			Item item = null;

			if( pigments )
			{
				PigmentsTileButtonInfo p = buttonInfo as PigmentsTileButtonInfo;

				item = new PigmentsOfTokuno( p.Pigment );
			}
			else
			{
				TypeTileButtonInfo t = buttonInfo as TypeTileButtonInfo;

				if( t.Type == typeof( PigmentsOfTokuno ) )	//Special case of course.
				{
					pm.CloseGump( typeof( ToTTurnInGump ) );	//Sanity
					pm.CloseGump( typeof( ToTRedeemGump ) );

					pm.SendGump( new ToTRedeemGump( m_Collector, true ) );

					return;
				}

				try
				{
					item = (Item)Activator.CreateInstance( t.Type );
				}
				catch { }
			}

			if( item == null )
				return; //Sanity

			if( pm.AddToBackpack( item ) )
			{
				pm.ToTItemsTurnedIn -= TreasuresOfTokuno.ItemsPerReward;
				m_Collector.SayTo( pm, 1070984, (item.Name == null || item.Name.Length <= 0)? String.Format( "#{0}", item.LabelNumber ) : item.Name ); // You have earned the gratitude of the Empire. I have placed the ~1_OBJTYPE~ in your backpack.
			}
			else
			{
				item.Delete();
				m_Collector.SayTo( pm, 500722 ); // You don't have enough room in your backpack!
				m_Collector.SayTo( pm, 1070982 ); // When you wish to choose your reward, you have but to approach me again.
			}
		}
Exemplo n.º 5
0
 public DyeTarget(PigmentsOfTokuno m_dye)
     : base(8, false, TargetFlags.None)
 {
     dye = m_dye;
 }
Exemplo n.º 6
0
        public static bool IsValidItem(Item i)
        {
            // As per UO Herald Playguide:
            // "These dyes essentially combine the ability of all currently available dye tubs and Tokuno dyes."

            if (i.Stackable)
            {
                return(false);
            }

            if (i is BaseArmor)
            {
                BaseArmor armor = i as BaseArmor;

                // Leather Armor
                if (armor.MaterialType == ArmorMaterialType.Leather || armor.MaterialType == ArmorMaterialType.Studded)
                {
                    return(true);
                }

                // Metal Armor
                if (armor.MaterialType == ArmorMaterialType.Plate)
                {
                    return(true);
                }
            }

            // Weapons
            if (i is BaseWeapon)
            {
                return(true);
            }

            // Spellbooks (including other non-mage spellbooks) & Runebooks
            if (i is Spellbook || i is Runebook || i is RecallRune)
            {
                return(true);
            }

            // Statuettes
            if (i is MonsterStatuette)
            {
                return(true);
            }

            // Books
            if (i is BaseBook)
            {
                return(true);
            }

            // Jewelry
            if (i is BaseJewel)
            {
                return(true);
            }

            // Artifacts and magical items dyable with Tokuno dyes
            if (PigmentsOfTokuno.CanHue(i))
            {
                return(true);
            }

            // Talismans
            if (i is Talisman)
            {
                return(true);
            }

            if (i is DeerMask || i is TribalMask || i is BearMask)
            {
                return(true);
            }

            if (i is SnakeSkinBoots)
            {
                return(true);
            }

            return(false);
        }