Exemplo n.º 1
0
		public bool OnTarget( Mobile from, Item coin )
		{
			DefragTables();
			
			if(IsCoolingDown(from))
			{
                from.SendLocalizedMessage(1113368); // You already made a wish today. Try again tomorrow!
				return false;
			}
			
			if(.20 >= Utility.RandomDouble())
			{
				Item item = null;
				switch(Utility.Random(4))
				{
					case 0: item = new SolesOfProvidence(); break;
					case 1: item = new GemologistsSatchel(); break;
					case 2: item = new RelicFragment(5); break;
					case 3: item = new EnchantEssence(5); break;
				}
				
				if(from.Backpack == null || !from.Backpack.TryDropItem(from, item, false))
					item.MoveToWorld(from.Location, from.Map);
			}
			else
			{
				switch(Utility.Random(4))
				{
					case 0:
						from.AddStatMod(new StatMod(StatType.Str, "FoF_Str", 10, TimeSpan.FromMinutes(60)));
                        from.SendLocalizedMessage(1113373); // You suddenly feel stronger!
						break;
					case 1:
                        from.AddStatMod(new StatMod(StatType.Dex, "FoF_Dex", 10, TimeSpan.FromMinutes(60)));
                        from.SendLocalizedMessage(1113374); // You suddenly feel more agile!
						break;
					case 2:
                        from.AddStatMod(new StatMod(StatType.Int, "FoF_Int", 10, TimeSpan.FromMinutes(60)));
						from.SendLocalizedMessage(1113371); // You suddenly feel wiser!
						break;
					case 3:
                        m_LuckTable[from] = DateTime.UtcNow + TimeSpan.FromMinutes(60);
                        from.SendLocalizedMessage(1079551); // Your luck just improved!
						break;
				}

                from.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
			}

            from.PlaySound(0x22);

			m_RewardCooldown[from] = DateTime.UtcNow + TimeSpan.FromHours(24);

            if (coin.Amount <= 1)
                coin.Delete();
            else
			    coin.Amount--;

			return false;
		}
Exemplo n.º 2
0
        public bool OnTarget(Mobile from, Item coin)
        {
            DefragTables();

            if (IsCoolingDown(from))
            {
                from.SendLocalizedMessage(1113368); // You already made a wish today. Try again tomorrow!
                return(false);
            }

            if (.20 >= Utility.RandomDouble())
            {
                Item item = null;
                switch (Utility.Random(4))
                {
                default:
                case 0: item = new SolesOfProvidence(); break;

                case 1: item = new GemologistsSatchel(); break;

                case 2: item = new RelicFragment(5); break;

                case 3: item = new EnchantedEssence(5); break;
                }

                if (from.Backpack == null || !from.Backpack.TryDropItem(from, item, false))
                {
                    item.MoveToWorld(from.Location, from.Map);
                }
            }
            else
            {
                switch (Utility.Random(4))
                {
                case 0:
                    from.AddStatMod(new StatMod(StatType.Str, "FoF_Str", 10, TimeSpan.FromMinutes(60)));
                    from.SendLocalizedMessage(1113373);     // You suddenly feel stronger!
                    break;

                case 1:
                    from.AddStatMod(new StatMod(StatType.Dex, "FoF_Dex", 10, TimeSpan.FromMinutes(60)));
                    from.SendLocalizedMessage(1113374);     // You suddenly feel more agile!
                    break;

                case 2:
                    from.AddStatMod(new StatMod(StatType.Int, "FoF_Int", 10, TimeSpan.FromMinutes(60)));
                    from.SendLocalizedMessage(1113371);     // You suddenly feel wiser!
                    break;

                case 3:
                    m_LuckTable[from] = DateTime.UtcNow + TimeSpan.FromMinutes(60);
                    from.SendLocalizedMessage(1079551);     // Your luck just improved!
                    break;

                case 4:
                    m_SpecialProtection[from] = DateTime.UtcNow + TimeSpan.FromMinutes(60);
                    from.SendLocalizedMessage(1113375);     // You suddenly feel less vulnerable!
                    break;

                case 5:
                    m_BalmBoost[from] = DateTime.UtcNow + TimeSpan.FromMinutes(60);
                    from.SendLocalizedMessage(1113372);     // The duration of your balm has been increased by an hour!
                    break;
                }

                from.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
            }

            from.PlaySound(0x22);

            m_RewardCooldown[from] = DateTime.UtcNow + TimeSpan.FromHours(24);

            if (coin.Amount <= 1)
            {
                coin.Delete();
            }
            else
            {
                coin.Amount--;
            }

            return(false);
        }