public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (0.25 > Utility.RandomDouble() && reg.Name == "Fairy Dragon Lair")
            {
                switch (Utility.Random(2))
                {
                    case 0: c.DropItem(new EssenceDiligence()); break;
                    case 1: c.DropItem(new FaeryDust()); break;
                }
            }
            if (Utility.RandomDouble() <= 0.25)
            {
                switch (Utility.Random(2))
                {
                    case 0:
                        c.DropItem(new FeyWings());
                        break;
                    case 1:
                        c.DropItem(new FairyDragonWing());
                        break;

                }
            }

            if (Utility.RandomDouble() < 0.10)
            {
                c.DropItem(new DraconicOrb());

            }
        }
示例#2
0
        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (1.0 > Utility.RandomDouble() && reg.Name == "Crimson Veins")
            {
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new EssencePrecision());
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new DaemonClaw());
            }

            if (1.0 > Utility.RandomDouble() && reg.Name == "Fire Temple Ruins")
            {
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new EssenceOrder());
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new DaemonClaw());
            }
            if (1.0 > Utility.RandomDouble() && reg.Name == "Lava Caldera")
            {
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new EssencePassion());
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new DaemonClaw());
            }
        }
示例#3
0
 protected override void OnTick()
 {
     if (m_Mobile.Map != m_Container.Map || !m_Mobile.InRange(m_Container.GetWorldLocation(), 3))
     {
         DynamicFurniture.Close(m_Container);
     }
 }
示例#4
0
文件: RotWorm.cs 项目: rokann/JustUO
 public override void OnDeath(Container c)
 {
     base.OnDeath(c);
     var reg = Region.Find(c.GetWorldLocation(), c.Map);
     if (0.4 > Utility.RandomDouble() && reg.Name == "Ariel Writ Disaster")
         c.DropItem(new ArielHavenWritofMembership());
     c.DropItem(new BonePile());
 }
示例#5
0
        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (0.25 > Utility.RandomDouble() && reg.Name == "Cavern of the Discarded")
            {
                c.DropItem(new ReflectiveWolfEye());
            }
        }
示例#6
0
文件: Shade.cs 项目: Crome696/ServUO
        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (0.25 > Utility.RandomDouble() && reg.Name == "The Lands of the Lich")
            {
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new EssenceDirection());
            }
        }
示例#7
0
        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (0.25 > Utility.RandomDouble() && reg.Name == "Abyssal Lair Entrance")
            {
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new EssenceAchievement());
            }
        }
示例#8
0
        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (1.0 > Utility.RandomDouble() && reg.Name == "Skeletal Dragon")
            {
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new EssencePersistence());

            }
        }
        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (0.25 > Utility.RandomDouble() && reg.Name == "Passage of Tears")
            {
                if (Utility.RandomDouble() < 0.6)
                    c.DropItem(new EssenceSingularity());

            }
        }
示例#10
0
文件: ShopMap.cs 项目: dpisanu/xrunuo
            private bool IsAccessible()
            {
                if (!m_Container.IsAccessibleTo(m_Mobile))
                {
                    return(false);
                }

                if (!m_Mobile.InRange(m_Container.GetWorldLocation(), 18))
                {
                    return(false);
                }

                return(true);
            }
示例#11
0
        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (0.25 > Utility.RandomDouble() && reg.Name == "Passage of Tears")
            {
                switch (Utility.Random(2))
                {
                    case 0: c.DropItem(new EssenceSingularity()); break;
                    case 1: c.DropItem(new VialOfVitriol()); break;

                }
            }
        }
示例#12
0
 public override void OnDeath(Container c)
 {
     base.OnDeath(c);
     Region reg = Region.Find(c.GetWorldLocation(), c.Map);
     if (0.25 > Utility.RandomDouble() && reg.Name == "The Secret Gardens")
     {
         switch (Utility.Random(2))
         {
             case 0: c.DropItem(new EssenceFeeling()); break;
             case 1: c.DropItem(new FaeryDust()); break;
         }
         #region Mondain's Legacy
         if (Utility.RandomDouble() < 0.3)
             c.DropItem(new PixieLeg());
         #endregion
     }
 }
示例#13
0
		public static void Container_Snoop( Container cont, Mobile from )
		{

            if (from.BeginAction(typeof(IAction)))
            {
                bool releaseLock = true;
                bool canSnoop = true;

                if (from.AccessLevel > AccessLevel.Player || from.InRange(cont.GetWorldLocation(), 1))
                {
                    Mobile root = cont.RootParent as Mobile;

                    if (root != null && !root.Alive)
                        canSnoop = false;
                    else if (root != null && root.AccessLevel > AccessLevel.Player && from.AccessLevel == AccessLevel.Player)
                    {
                        from.SendLocalizedMessage(500209); // You can not peek into the container.
                        canSnoop = false;
                    }
                    else if (root != null && from.AccessLevel == AccessLevel.Player && !CheckSnoopAllowed(from, root))
                    {
                        from.SendLocalizedMessage(1001018); // You cannot perform negative acts on your target.
                        canSnoop = false;
                    }

                    if (canSnoop)
                    {
                        if (from.AccessLevel > AccessLevel.Player)
                            cont.DisplayTo(from);
                        else
                        {
                            new InternalTimer(from, cont).Start();
                            releaseLock = false;
                        }
                    }
                }
                else
                    from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.

                if (releaseLock && from is PlayerMobile)
                    ((PlayerMobile)from).EndPlayerAction();
            }
            else
                from.SendAsciiMessage("You must wait to perform another action.");
		}
示例#14
0
        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
			if (0.25 > Utility.RandomDouble() && reg.Name == "Crimson Veins")
			{
				if (Utility.RandomDouble() < 0.6)
				{
					switch (Utility.Random(2))
					{
						case 0: c.DropItem(new EssencePrecision()); break;
						case 1: c.DropItem(new LavaSerpentCrust()); break;
					}
				}
			}

			if (0.25 > Utility.RandomDouble() && reg.Name == "Fire Temple Ruins")
			{
				if (Utility.RandomDouble() < 0.6)
				{
					switch (Utility.Random(2))
					{
						case 0: c.DropItem(new EssenceOrder()); break;
						case 1: c.DropItem(new LavaSerpentCrust()); break;
					}
				}
			}
			if (0.25 > Utility.RandomDouble() && reg.Name == "Lava Caldera")
			{
				if (Utility.RandomDouble() < 0.6)
				{
					switch (Utility.Random(2))
					{
						case 0: c.DropItem(new EssencePassion()); break;
						case 1: c.DropItem(new LavaSerpentCrust()); break;
					}
				}
			}
        }
示例#15
0
文件: ClanSS.cs 项目: Crome696/ServUO
        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (0.25 > Utility.RandomDouble() && reg.Name == "Cavern of the Discarded")
            {
                switch (Utility.Random(10))
                {
                    case 0: c.DropItem(new AbyssalCloth()); break;
                    case 1: c.DropItem(new PowderedIron()); break;
                    case 2: c.DropItem(new CrystallineBlackrock()); break;
                    case 3: c.DropItem(new EssenceBalance()); break;
                    case 4: c.DropItem(new CrystalShards()); break;
                    case 5: c.DropItem(new ArcanicRuneStone()); break;
                    case 6: c.DropItem(new DelicateScales()); break;
                    case 7: c.DropItem(new SeedRenewal()); break;
                    case 8: c.DropItem(new CrushedGlass()); break;
                    case 9: c.DropItem(new ElvenFletchings()); break;
                }
            }
        }
示例#16
0
        public static void Container_Snoop(Container cont, Mobile from)
        {
            if (from.AccessLevel > AccessLevel.Player || from.InRange(cont.GetWorldLocation(), 1))
            {
                Mobile root = cont.RootParent as Mobile;

                if (root != null && !root.Alive)
                    return;

                if (root != null && root.AccessLevel > AccessLevel.Player && from.AccessLevel == AccessLevel.Player)
                {
                    from.SendLocalizedMessage(500209); // You can not peek into the container.
                    return;
                }

                if (root != null && from.AccessLevel == AccessLevel.Player && !CheckSnoopAllowed(from, root))
                {
                    from.SendLocalizedMessage(1001018); // You cannot perform negative acts on your target.
                    return;
                }

                if (root != null && from.AccessLevel == AccessLevel.Player && from.Skills[SkillName.Snooping].Value < Utility.Random(100))
                {
                    Map map = from.Map;

                    if (map != null)
                    {
                        string message = String.Format("You notice {0} attempting to peek into {1}'s belongings.", from.Name, root.Name);

                        IPooledEnumerable eable = map.GetClientsInRange(from.Location, 8);

                        System.Collections.ArrayList list = new System.Collections.ArrayList();

                        foreach (NetState ns in eable)
                            list.Add( ns );

                        eable.Free();

                        foreach ( NetState ns in list )
                        {
                            if (ns == root.NetState)
                                root.SendAsciiMessage("You notice {0} attempting to peek into your belongings!", from.Name);
                            else if (ns != from.NetState)
                                ns.Mobile.SendAsciiMessage(message);
                        }
                    }
                }

                // custom change: only lose karma when snooping good guys
                if (from.AccessLevel == AccessLevel.Player && root != null && root.Karma > 0)
                    Titles.AwardKarma(from, -5, true);

                if (from.AccessLevel > AccessLevel.Player || from.CheckTargetSkill(SkillName.Snooping, cont, 0.0, 100.0))
                {
                    TrapableContainer tc = cont as TrapableContainer;

                    if ( from.AccessLevel == AccessLevel.Player && tc != null && tc.Trapped && tc.TrapType == TrapType.MagicTrap )
                        tc.ExecuteTrap( from );
                    cont.DisplayTo( from );
                }
                else
                {
                    from.SendLocalizedMessage(500210); // You failed to peek into the container.
                }
            }
            else
            {
                from.SendLocalizedMessage(500446); // That is too far away.
            }
        }
示例#17
0
		public static void Container_Snoop( Container cont, Mobile from )
		{
			if ( from.AccessLevel > AccessLevel.Player || from.InRange( cont.GetWorldLocation(), 1 ) )
			{
				Mobile root = cont.RootParent as Mobile;

				if ( root != null && !root.Alive )
					return;

				if ( root != null && root.AccessLevel > AccessLevel.Player && from.AccessLevel == AccessLevel.Player )
				{
					from.SendLocalizedMessage( 500209 ); // You can not peek into the container.
					return;
				}

				if ( root != null && from.AccessLevel == AccessLevel.Player && !CheckSnoopAllowed( from, root ) )
				{
					from.SendLocalizedMessage( 1001018 ); // You cannot perform negative acts on your target.
					return;
				}

				if ( root != null && from.AccessLevel == AccessLevel.Player && from.Skills[SkillName.Snooping].Value < Utility.Random( 100 ) )
				{
					Map map = from.Map;

					if ( map != null )
					{
						string message = String.Format( "You notice {0} attempting to peek into {1}'s belongings.", from.Name, root.Name );

						IPooledEnumerable eable = map.GetClientsInRange( from.Location, 8 );

						foreach ( NetState ns in eable )
						{
							if ( ns.Mobile != from )
								ns.Mobile.SendMessage( message );
						}

						eable.Free();
					}
				}

				if ( from.AccessLevel == AccessLevel.Player )
					Titles.AwardKarma( from, -4, true );

				if ( from.AccessLevel > AccessLevel.Player || from.CheckTargetSkill( SkillName.Snooping, cont, 0.0, 100.0 ) )
				{
					if ( cont is TrapableContainer && ((TrapableContainer)cont).ExecuteTrap( from ) )
						return;

					cont.DisplayTo( from );
				}
				else
				{
					from.SendLocalizedMessage( 500210 ); // You failed to peek into the container.
				}
			}
			else
			{
				from.SendLocalizedMessage( 500446 ); // That is too far away.
			}
		}
示例#18
0
		public static void Container_Snoop( Container cont, Mobile from )
		{
			/*if (!(from.Target is Stealing.StealingTarget) && DateTime.UtcNow < from.NextSkillTime)
			{
				from.SendMessage("You must wait a moment before you can snoop again.");
				return;
			}*/

			if ( from.AccessLevel > AccessLevel.Player || from.InRange( cont.GetWorldLocation(), 1 ) )
			{
				Mobile root = cont.RootParent as Mobile;

				if ( root != null )
				{
					if ( root.Alive )
					{
						if ( root.AccessLevel > AccessLevel.Player && from.AccessLevel == AccessLevel.Player )
						{
							from.SendLocalizedMessage( 500209 ); // You can not peek into the container.
							return;
						}
						else if ( from.AccessLevel == AccessLevel.Player && !CheckSnoopAllowed( from, root ) )
						{
							from.SendLocalizedMessage( 1001018 ); // You cannot perform negative acts on your target.
							return;
						}
						else if ( from.AccessLevel == AccessLevel.Player && from.Skills[SkillName.Snooping].Value < Utility.Random( 100 ) )
						{
							Map map = from.Map;

							if ( map != null )
							{
								root.SendMessage( String.Format( "You notice {0} attempting to peek into your belongings.", from.Name ) );

								string message = String.Format( "You notice {0} attempting to peek into {1}'s belongings.", from.Name, root.Name );

								IPooledEnumerable eable = map.GetClientsInRange( from.Location, 8 );

								foreach ( NetState ns in eable )
									if ( ns.Mobile != from && ns.Mobile != root )
										ns.Mobile.SendMessage( message );

								eable.Free();
							}
						}
					}
					else
						return;
				}

				if ( from.AccessLevel == AccessLevel.Player )
					Misc.Titles.AwardKarma(from, -4, true);

				if ( from.AccessLevel > AccessLevel.Player || from.CheckTargetSkill( SkillName.Snooping, cont, 0.0, 100.0 ) )
				{
					if (!(cont is TrapableContainer && ((TrapableContainer)cont).ExecuteTrap(from)))
					{
						cont.DisplayTo(from);

						//from.NextSkillTime = DateTime.UtcNow.AddSeconds(cont.Parent is Container ? 0.315 : 1.15);
					}
				}
				else
				{
					from.SendLocalizedMessage( 500210 ); // You failed to peek into the container.
					if ( from.Skills[SkillName.Hiding].Value / 2 < Utility.Random( 100 ) )
						from.RevealingAction();
				}
			}
			else
				from.SendLocalizedMessage( 500446 ); // That is too far away.
		}
示例#19
0
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            Region reg = Region.Find(c.GetWorldLocation(), c.Map);

            if (reg.Name == "Tomb of Kings")
            {
                if (Utility.RandomDouble() < 0.05)
                    c.DropItem(new SilverSnakeSkin());

                if (Utility.RandomDouble() < 0.1)
                    c.DropItem(new SilverSerpentVenom());
            }
        }
示例#20
0
        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (0.25 > Utility.RandomDouble() && reg.Name == "Enslaved Goblins")
            {
                switch (Utility.Random(2))
                {
                    case 0: c.DropItem(new EssenceControl()); break;
                    case 1: c.DropItem(new GoblinBlood()); break;

                }
            }
        }
示例#21
0
        public static void GetSADrop(Container c)
        {
            if (Utility.RandomDouble() <= 0.90) // 10% chance to move forward and drop 
                return;

            var reg = Region.Find(c.GetWorldLocation(), c.Map);

            if (reg == null || reg.Name == null)
                return;
            
            var regionname = reg.Name;

            switch (regionname)
            {
                case "Crimson Veins":
                {
                    c.DropItem(new EssencePrecision());
                    break;
                }
                case "Fire Temple Ruins":
                {
                    c.DropItem(new EssenceOrder());
                    break;
                }
                case "Lava Caldera":
                {
                    c.DropItem(new EssencePassion());
                    break;
                }
                case "Secret Garden":
                {
                    switch (Utility.Random(2))
                    {
                        case 0:
                            c.DropItem(new EssenceFeeling());
                            break;
                        case 1:
                            c.DropItem(new FaeryDust());
                            break;
                    }
                    break;
                }
                case "Cavern of the Discarded":
                {
                    switch (Utility.Random(12))
                    {
                        case 0:
                            c.DropItem(new AbyssalCloth());
                            break;
                        case 1:
                            c.DropItem(new PowderedIron());
                            break;
                        case 2:
                            c.DropItem(new CrystallineBlackrock());
                            break;
                        case 3:
                            c.DropItem(new EssenceBalance());
                            break;
                        case 4:
                            c.DropItem(new CrystalShards());
                            break;
                        case 5:
                            c.DropItem(new ArcanicRuneStone());
                            break;
                        case 6:
                            c.DropItem(new DelicateScales());
                            break;
                        case 7:
                            c.DropItem(new SeedRenewal());
                            break;
                        case 8:
                            c.DropItem(new CrushedGlass());
                            break;
                        case 9:
                            c.DropItem(new ElvenFletchings());
                            break;
                        case 10:
                            c.DropItem(new Lodestone());
                            break;
                        case 11:
                            c.DropItem(new ReflectiveWolfEye());
                            break;
                    }
                    break;
                }
                case "Abyssal Lair":
                {
                    c.DropItem(new EssenceAchievement());
                    break;
                }
                case "StygianDragonLair":
                {
                    c.DropItem(new EssenceDiligence());
                    break;
                }
                case "Skeletal Dragon":
                {
                    c.DropItem(new EssencePersistence());
                    break;
                }
                case "Lands of the Lich":
                {
                    c.DropItem(new EssenceDirection());
                    break;
                }
                case "Passage of Tears":
                {
                    c.DropItem(new EssenceSingularity());
                    break;
                }
                case "Enslaved Goblins":
                {
                    c.DropItem(new EssenceControl());
                    break;
                }
				case "Fairy Dragon Lair":
                {
                    c.DropItem(new FaeryDust());
                    break;
                }				
            }
        }
示例#22
0
        public bool PourBottle(Mobile from, Item item)
        {
            if (item is Bottle)
            {
                Container pack = from.Backpack;

                if (pack != null)
                {
                    item.Consume();                     //Consume a bottle

                    from.SendLocalizedMessage(502242);  // You pour some of the keg's contents into an empty bottle...

                    BasePotion pot = FillBottle();

                    if (pack.TryDropItem(from, pot, false))
                    {
                        from.SendLocalizedMessage(502243);                           // ...and place it into your backpack.
                        from.PlaySound(0x240);

                        if (--Held == 0)
                        {
                            from.SendLocalizedMessage(502245);                               // The keg is now empty.
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(502244);                           // ...but there is no room for the bottle in your backpack.
                        //pot.Delete();
                        pot.MoveToWorld(pack.GetWorldLocation(), pack.Map);
                    }
                    return(true);
                }
            }
            else if (item is PotionKeg)
            {
                PotionKeg keg = item as PotionKeg;

                if (keg.Held >= 100)
                {
                    from.SendLocalizedMessage(502233);                       // The keg will not hold any more!
                }
                else if (m_Type != keg.Type)
                {
                    from.SendLocalizedMessage(502236);                       // You decide that it would be a bad idea to mix different types of potions.
                }
                else
                {
                    int toHold = Math.Min(100 - keg.Held, m_Held);

                    keg.Held += toHold;

                    if ((m_Held -= toHold) == 0)
                    {
                        from.SendLocalizedMessage(502245);                           // The keg is now empty.
                    }
                    from.PlaySound(0x240);

                    return(true);
                }
            }

            return(false);
        }
示例#23
0
        public override void OnDeath(Container c)
        {
            if (Utility.Random(10) == 0)
            {
                Item item;

                switch (Utility.Random(3))
                {
                    default:
                    case 0: item = new GelatanousSkull(); break;
                    case 1: item = new CoagulatedLegs(); break;
                    case 2: item = new PartiallyDigestedTorso(); break;
                }

                base.OnDeath(c);
                Region reg = Region.Find(c.GetWorldLocation(), c.Map);
                if (0.25 > Utility.RandomDouble() && reg.Name == "Passage of Tears")
                {
                    if (Utility.RandomDouble() < 0.6)
                        c.DropItem(new EssenceSingularity());

                }
            }
        }
示例#24
0
        public override void OnDeath(Container c)
        {

            base.OnDeath(c);
            Region reg = Region.Find(c.GetWorldLocation(), c.Map);
            if (0.25 > Utility.RandomDouble() && reg.Name == "Stygian Dragon Lair Entrance")
            {
                switch (Utility.Random(2))
                {
                    case 0: c.DropItem(new EssenceDiligence()); break;
                    case 1: c.DropItem(new FaeryDust()); break;
                }
            }
        }