Example #1
1
		public override void OnDoubleClick( Mobile from )
		{
			if ( !from.InRange( this.GetWorldLocation(), 2 ) || !from.InLOS( this ) )
			{
				from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that
			}
			else if ( Visible && ( ItemID == 4656 || ItemID == 4702 ) && DateTime.Now >= m_NextUse )
			{
				Point3D p = this.GetWorldLocation();

				if ( 1 > Utility.Random( Math.Max( Math.Abs( from.X - p.X ), Math.Abs( from.Y - p.Y ) ) ) )
				{
					Effects.PlaySound( from.Location, from.Map, from.GetHurtSound() );
					from.PublicOverheadMessage( MessageType.Regular, from.SpeechHue, true, "Ouch!" );
					Spells.SpellHelper.Damage( TimeSpan.FromSeconds( 0.5 ), from, Utility.Dice( 2, 10, 5 ) );
				}

				Effects.PlaySound( this.GetWorldLocation(), this.Map, 0x387 );

				Timer.DelayCall( TimeSpan.FromSeconds( 0.25 ), new TimerCallback( Down1 ) );
				Timer.DelayCall( TimeSpan.FromSeconds( 0.50 ), new TimerCallback( Down2 ) );

				Timer.DelayCall( TimeSpan.FromSeconds( 5.00 ), new TimerCallback( BackUp ) );

				m_NextUse = DateTime.Now + TimeSpan.FromSeconds( 10.0 );
			}
		}
Example #2
0
        public override void Drink( Mobile from )
        {
            if ( from.Hits < from.HitsMax )
            {
                if ( from.Poisoned || MortalStrike.IsWounded( from ) )
                {
                    from.LocalOverheadMessage( MessageType.Regular, 0x22, 1005000 ); // You can not heal yourself in your current state.
                }
                else
                {
                    if ( from.BeginAction( typeof( BaseHealPotion ) ) )
                    {
                        DoHeal( from );

                        PlayDrinkEffect( from );

                        this.Consume();

                        Timer.DelayCall( TimeSpan.FromSeconds( Delay ), new TimerStateCallback( ReleaseHealLock ), from );
                    }
                    else
                    {
                        from.LocalOverheadMessage( MessageType.Regular, 0x22, 500235 ); // You must wait 10 seconds before using another healing potion.
                    }
                }
            }
            else
            {
                from.SendLocalizedMessage( 1049547 ); // You decide against drinking this potion, as you are already at full health.
            }
        }
Example #3
0
        public override void Abrir( Mobile from )
        {
            PlagueBeastLord m = RootParent as PlagueBeastLord;
            if ( m == null ) return;

            from.Direction = from.GetDirectionTo( m );
            if ( Abierto )
            {
                from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, Plague_Texts.Line[21] );
            }
            else
            {
                from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, Plague_Texts.Line[22] );
                from.PlaySound( 0x248 );
                from.PlaySound( 0x2AC );
                Agujero.Visible = true;

                base.Abrir( from );
                //Si no hay cerebro, la herida empieza a sangrar directamente
                if ( HoldBrain == BrainTypes.Brain_None )
                {
                    PlagueBrain pb = Mybrain as PlagueBrain;
                    pb.Sangrar( from );
                }
            }
        }
Example #4
0
		public override void OnDoubleClick( Mobile m )
		{
			if ( !m.InRange( this, 2 ) )
			{
				m.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
				return;
			}

			if ( RaisableItem != null && RaisableItem.Deleted )
				RaisableItem = null;

			Flip();

			if ( RaisableItem != null )
			{
				if ( RaisableItem.IsRaisable )
				{
					RaisableItem.Raise();
					m.LocalOverheadMessage( MessageType.Regular, 0x5A, true, "You hear a grinding noise echoing in the distance." );
				}
				else
				{
					m.LocalOverheadMessage( MessageType.Regular, 0x5A, true, "You flip the switch again, but nothing happens." );
				}
			}
		}
Example #5
0
        public void CambiaGland( Mobile from, Item glandula )
        {
            if ( Glandula.RootParent.Equals( RootParent ) )
                from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, Plague_Texts.Line[18] );
            if ( Gland_Colocada )
                from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, Plague_Texts.Line[19] );

            if ( ( !Gland_Colocada ) && ( !Glandula.RootParent.Equals( RootParent ) ) ) //Si la glandula mala se sacó del bicho...
            {
                Suborgano.Hue = Hue;
                Patas1.Hue = Hue;
                Patas2.Hue = Hue;
                Patas3.Hue = Hue;
                Gland_Colocada = true;
                glandula.Movable = false;
                Agujero.Visible = true;
                base.Abrir( from );
                from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, Plague_Texts.Line[20] );
                //Si no hay cerebro, la herida empieza a sangrar directamente
                if ( HoldBrain == BrainTypes.Brain_None )
                {
                    PlagueBrain pb = Mybrain as PlagueBrain;
                    pb.Sangrar( from );
                }
            }
        }
Example #6
0
		protected override void OnTarget( Mobile from, object o )
		{
			if(o is Container)
			{
				Container xx = o as Container;

//				if (xx is QuestHolder)
//				{
//					from.LocalOverheadMessage( MessageType.Regular, 0x22, true, "Trying to dump into a Questbook is an exploit. Your Account has been flagged."); 
//	                  ((Account)from.Account).SetTag( "QuestExploit", "true"); 
//					return;
//				}

				// Container that is either in a pack or a child thereof
				if ( xx.IsChildOf( from.Backpack) || xx == from.Backpack)
				{
					from.LocalOverheadMessage( MessageType.Regular, 0x33, true, "Select the container you want to dump items INTO."); 
					from.Target = new PackToTarget( from, xx );
				}
				else
				{
					from.LocalOverheadMessage( MessageType.Regular, 0x22, true, "The container to dump FROM must be in your main backpack or BE your main backpack."); 
				}
			}
			else
			{
				from.LocalOverheadMessage( MessageType.Regular, 0x22, true, "That is not a container!"); 
			}
		}
Example #7
0
 public override void OnDoubleClick(Mobile from)
 {
     if (from.InRange(this.GetWorldLocation(), 2))
     {
         from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1071159); // Select the hitching post you want to supply hitching rope.
         from.Target = new InternalTarget(this);
     }
     else
     {
         from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
     }
 }
Example #8
0
			protected override void OnTarget( Mobile from, object targeted )
			{
				if ( m_Thorn.Deleted )
					return;

				if ( !m_Thorn.IsChildOf( from.Backpack ) )
				{
					from.SendLocalizedMessage( 1042664 ); // You must have the object in your backpack to use it.
					return;
				}

				if ( !from.CanBeginAction( typeof( GreenThorns ) ) )
				{
					from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061908 ); // * You must wait a while before planting another thorn. *
					return;
				}

				if ( from.Map != Map.Trammel && from.Map != Map.Felucca )
				{
					from.LocalOverheadMessage( MessageType.Regular, 0x2B2, true, "No solen lairs exist on this facet.  Try again in Trammel or Felucca." );
					return;
				}

				LandTarget land = targeted as LandTarget;

				if ( land == null )
				{
					from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061912 ); // * You cannot plant a green thorn there! *
				}
				else
				{
					GreenThornsEffect effect = GreenThornsEffect.Create( from, land );

					if ( effect == null )
					{
						from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061913 ); // * You sense it would be useless to plant a green thorn there. *
					}
					else
					{
						m_Thorn.Consume();

						from.LocalOverheadMessage( MessageType.Emote, 0x961, 1061914 ); // * You push the strange green thorn into the ground *
						from.NonlocalOverheadMessage( MessageType.Emote, 0x961, 1061915, from.Name ); // * ~1_PLAYER_NAME~ pushes a strange green thorn into the ground. *

						from.BeginAction( typeof( GreenThorns ) );
						new GreenThorns.EndActionTimer( from ).Start();

						effect.Start();
					}
				}
			}
Example #9
0
        public override void OnDoubleClick( Mobile from )
        {
            if ( !from.InRange( Location, 2 ) )
            {
                // I can't reach that.
                from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 );
            }
            else if ( from is PlayerMobile && ( (PlayerMobile) from ).SacredQuest )
            {
                // You cannot think of any reason to want to do this.
                from.SendLocalizedMessage( 1080538 );
            }
            else if ( from.Backpack != null )
            {
                from.DropHolding();

                Item key = from.Backpack.FindItemByType( KeyType );

                if ( key != null )
                {
                    // You are already carrying a copy of this key fragment.
                    from.SendLocalizedMessage( 1111653 );
                }
                else
                {
                    from.PlaceInBackpack( (Item) Activator.CreateInstance( KeyType ) );

                    // You reach for the key and receive a glowing copy that you place in your bag.
                    from.SendLocalizedMessage( 1111652 );
                }
            }
        }
            protected override void OnTarget( Mobile from, object targeted )
            {
                if ( from == targeted )
                {
                    from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500910 ); // Hmm, that person looks really silly.
                }
                else if ( targeted is TownCrier )
                {
                    ((TownCrier)targeted).PrivateOverheadMessage( MessageType.Regular, 0x3B2, 500907, from.NetState ); // He looks smart enough to remember the news.  Ask him about it.
                }
                else if ( targeted is BaseVendor && ((BaseVendor)targeted).IsInvulnerable )
                {
                    ((BaseVendor)targeted).PrivateOverheadMessage( MessageType.Regular, 0x3B2, 500909, from.NetState ); // That person could probably calculate the cost of what you buy from them.
                }
                else if ( targeted is Mobile )
                {
                    Mobile targ = (Mobile)targeted;

                    int marginOfError = Math.Max( 0, 20 - (int)(from.Skills[SkillName.EvalInt].Value / 5) );

                    int intel = targ.Int + Utility.RandomMinMax( -marginOfError, +marginOfError );
                    int curmana = targ.Mana;
                    if ( targ.ManaMax == 0 ) //Mongbats
                        curmana = 1;

                    int mana = ((curmana * 100) / Math.Max( targ.ManaMax, 1 )) + Utility.RandomMinMax( -marginOfError, +marginOfError );

                    int intMod = intel / 10;
                    int mnMod = mana / 10;

                    if ( intMod > 10 ) intMod = 10;
                    else if ( intMod < 0 ) intMod = 0;

                    if ( mnMod > 10 ) mnMod = 10;
                    else if ( mnMod < 0 ) mnMod = 0;

                    int body;

                    if ( targ.Body.IsHuman )
                        body = targ.Female ? 11 : 0;
                    else
                        body = 22;

                    if ( from.CheckTargetSkill( SkillName.EvalInt, targ, 0.0, 120.0 ) )
                    {
                        targ.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1038169 + intMod + body, from.NetState ); // He/She/It looks [slighly less intelligent than a rock.]  [Of Average intellect] [etc...]

                        if ( from.Skills[SkillName.EvalInt].Base >= 76.0 )
                            targ.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1038202 + mnMod, from.NetState ); // That being is at [10,20,...] percent mental strength.
                    }
                    else
                    {
                        targ.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1038166 + (body / 11), from.NetState ); // You cannot judge his/her/its mental abilities.
                    }
                }
                else if ( targeted is Item )
                {
                    ((Item)targeted).SendLocalizedMessageTo( from, 500908, "" ); // It looks smarter than a rock, but dumber than a piece of wood.
                }
            }
Example #11
0
		public override bool Use( Mobile from ) {
			Faction ourFaction = Faction.Find( from );

			bool used = false;

			foreach ( Mobile mob in from.GetMobilesInRange( 8 ) ) {
				if ( mob.Player && !mob.Alive && from.InLOS( mob ) ) {
					if ( Faction.Find( mob ) != ourFaction ) {
						continue;
					}

					BaseHouse house = BaseHouse.FindHouseAt( mob );

					if ( house == null || ( house.IsFriend( from ) || house.IsFriend( mob ) ) ) {
						Faction.ClearSkillLoss( mob );

						mob.SendGump( new ResurrectGump( mob, from, ResurrectMessage.Generic ) );
						used = true;
					}
				}
			}

			if ( used ) {
				from.LocalOverheadMessage( Server.Network.MessageType.Regular, 2219, false, "The urn shatters as you invoke its power." );
				from.PlaySound( 64 );

				Effects.PlaySound( from.Location, from.Map, 1481 );
			}

			return used;
		}
Example #12
0
        public override void OnDoubleClick( Mobile from )
        {
            if ( this.Parent != null || !this.VerifyMove( from ) )
                return;

            if ( !from.InRange( this, 2 ) )
            {
                from.LocalOverheadMessage( MessageType.Regular, 0x3B2, true, "I can't reach that." ); // I can't reach that.
                return;
            }

            if ( this.ItemID == 0xA57 ) // rolled
            {
                Direction dir = PlayerMobile.GetDirection4( from.Location, this.Location );

                if ( dir == Direction.North || dir == Direction.South )
                    this.ItemID = 0xA55;
                else
                    this.ItemID = 0xA56;
            }
            else // unrolled
            {
                this.ItemID = 0xA57;

                if ( !from.HasGump( typeof( LogoutGump ) ) )
                {
                    CampfireEntry entry = Campfire.GetEntry( from );

                    if ( entry != null && entry.Safe )
                        from.SendGump( new LogoutGump( entry, this ) );
                }
            }
        }
Example #13
0
		public override void OnComponentUsed( AddonComponent c, Mobile from )
		{			
			if ( from.InRange( Location, 2 ) )
			{
				if ( Utility.RandomBool() )
				{
					from.Location = Location;

					Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), new TimerStateCallback( Activate ), new object[] { c, from } );
				}
				else
					from.LocalOverheadMessage( MessageType.Regular, 0, 501777 ); // Hmm... you suspect that if you used this again, it might hurt.
			}
            else
				from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
		}
        public override void OnDoubleClick( Mobile from )
        {
            Direction dir;
            if ( from.Location != this.Location )
                dir = from.GetDirectionTo( this );
            else if ( this.East )
                dir = Direction.West;
            else
                dir = Direction.North;

            from.Direction = dir;

            bool canThrow = true;

            if ( !from.InRange( this, 4 ) || !from.InLOS( this ) )
                canThrow = false;
            else if ( this.East )
                canThrow = ( dir == Direction.Left || dir == Direction.West || dir == Direction.Up );
            else
                canThrow = ( dir == Direction.Up || dir == Direction.North || dir == Direction.Right );

            if ( canThrow )
                Throw( from );
            else
                from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
        }
		public override void OnDoubleClick( Mobile from )
		{
			if ( Utility.InRange( Location, from.Location, 2 ) )
				Effects.PlaySound( Location, Map, Utility.RandomMinMax( 0x562, 0x564 ) );
			else
				from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
		}
Example #16
0
 public override void OnDoubleClick( Mobile from )
 {
     if ( !IsChildOf( from.Backpack ) )
     {
         from.SendLocalizedMessage( 1040019 ); // The bola must be in your pack to use it.
     }
     else if ( !from.CanBeginAction( typeof( Bola ) ) )
     {
         from.SendLocalizedMessage( 1049624 ); // You have to wait a few moments before you can use another bola!
     }
     else if ( from.Target is BolaTarget )
     {
         from.SendLocalizedMessage( 1049631 ); // This bola is already being used.
     }
     else if ( from.FindItemOnLayer( Layer.OneHanded ) != null || from.FindItemOnLayer( Layer.TwoHanded ) != null )
     {
         from.SendLocalizedMessage( 1040015 ); // Your hands must be free to use this
     }
     else if ( from.Mounted )
     {
         from.SendLocalizedMessage( 1040016 ); // You cannot use this while riding a mount
     }
     else
     {
         from.Target = new BolaTarget( this );
         from.LocalOverheadMessage( MessageType.Emote, 0x3B2, 1049632 ); // * You begin to swing the bola...*
         from.NonlocalOverheadMessage( MessageType.Emote, 0x3B2, 1049633, from.Name ); // ~1_NAME~ begins to menacingly swing a bola...
     }
 }
Example #17
0
		public override void OnDoubleClick( Mobile from )
		{
			if ( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 1040019 ); // The bola must be in your pack to use it.
			}
			else if ( !from.CanBeginAction( typeof( Bola ) ) )
			{
				from.SendLocalizedMessage( 1049624 ); // You have to wait a few moments before you can use another bola!
			}
			else if ( from.Target is BolaTarget )
			{
				from.SendLocalizedMessage( 1049631 ); // This bola is already being used.
			}
			else if ( !HasFreeHands( from ) )
			{
				from.SendLocalizedMessage( 1040015 ); // Your hands must be free to use this
			}
			else if ( from.Mounted )
			{
				from.SendLocalizedMessage( 1040016 ); // You cannot use this while riding a mount
			}
			else if ( Server.Spells.Ninjitsu.AnimalForm.UnderTransformation( from ) )
			{
				from.SendLocalizedMessage( 1070902 ); // You can't use this while in an animal form!
			}
			else
			{
				EtherealMount.StopMounting( from );

				from.Target = new BolaTarget( this );
				from.LocalOverheadMessage( MessageType.Emote, 0x3B2, 1049632 ); // * You begin to swing the bola...*
				from.NonlocalOverheadMessage( MessageType.Emote, 0x3B2, 1049633, from.Name ); // ~1_NAME~ begins to menacingly swing a bola...
			}
		}
Example #18
0
        public override void OnDoubleClick( Mobile from )
        {
            if ( !IsChildOf( from.Backpack ) )
            {
                from.SendLocalizedMessage( 1040019 ); // The bola must be in your pack to use it.
            }
            else if ( !from.CanBeginAction( typeof( Bola ) ) )
            {
                from.SendLocalizedMessage( 1049624 ); // You have to wait a few moments before you can use another bola!
            }
            else if ( from.Target is BolaTarget )
            {
                from.SendLocalizedMessage( 1049631 ); // This bola is already being used.
            }
            else if ( !BasePotion.HasFreeHand( from ) )
            {
                from.SendMessage( "You need a free hand to throw this." );
            }
            else if ( from.Mounted )
            {
                from.SendLocalizedMessage( 1040016 ); // You cannot use this while riding a mount
            }
            else
            {
                EtherealMount.StopMounting( from );

                from.Target = new BolaTarget( this );
                from.LocalOverheadMessage( MessageType.Emote, 0x3B2, 1049632 ); // * You begin to swing the bola...*
                from.NonlocalOverheadMessage( MessageType.Emote, 0x3B2, 1049633, from.Name ); // ~1_NAME~ begins to menacingly swing a bola...
            }
        }
Example #19
0
		public override void OnComponentUsed( AddonComponent c, Mobile from )
		{
			if ( from.InRange( c.Location, 2 ) )
			{
				if ( m_Fruits > 0 )
				{
					Item fruit = Fruit;

					if ( fruit == null )
						return;

					if ( !from.PlaceInBackpack( fruit ) )
					{
						fruit.Delete();
						from.SendLocalizedMessage( 501015 ); // There is no room in your backpack for the fruit.
					}
					else
					{
						if ( --m_Fruits == 0 )
							Timer.DelayCall( TimeSpan.FromMinutes( 30 ), new TimerCallback( Respawn ) );

						from.SendLocalizedMessage( 501016 ); // You pick some fruit and put it in your backpack.
					}
				}
				else
					from.SendLocalizedMessage( 501017 ); // There is no more fruit on this tree
			}
			else
				from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
		}
Example #20
0
        public override void OnDoubleClick( Mobile from )
        {
            if ( !this.VerifyMove( from ) )
                return;

            if ( !from.InRange( this.GetWorldLocation(), 2 ) )
            {
                from.LocalOverheadMessage( MessageType.Regular, 0x3B2, true, "I can't reach that." ); // I can't reach that.
                return;
            }

            Point3D fireLocation = GetFireLocation( from );

            if ( fireLocation == Point3D.Zero )
            {
                from.SendAsciiMessage( "There is not a spot nearby to place your campfire." ); // There is not a spot nearby to place your campfire.
            }
            else if ( !from.CheckSkill( SkillName.Camping, 0.0, 100.0 ) )
            {
                from.SendAsciiMessage("You fail to ignite the campfire."); // You fail to ignite the campfire.
            }
            else
            {
                Consume();

                if ( !this.Deleted && this.Parent == null )
                    from.PlaceInBackpack( this );

                new Campfire(from).MoveToWorld( fireLocation, from.Map );
            }
        }
Example #21
0
        public override void OnDoubleClick( Mobile from )
        {
            from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1008155 ); // You peer into the heavens, seeking the moons...

            from.Send( new MessageLocalizedAffix( from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 1008146 + (int)Clock.GetMoonPhase( Map.Trammel, from.X, from.Y ), "", AffixType.Prepend, "Trammel : ", "" ) );
            from.Send( new MessageLocalizedAffix( from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 1008146 + (int)Clock.GetMoonPhase( Map.Felucca, from.X, from.Y ), "", AffixType.Prepend, "Felucca : ", "" ) );
        }
Example #22
0
        protected override void OnTarget( Mobile from, object target )
        {
            if( target is HitchingPost )
            {
                HitchingPost post = (HitchingPost)target;

                if( !from.InRange(post.GetWorldLocation(), 1) )
                    from.SendLocalizedMessage(500295);

                else
                {
                    from.LocalOverheadMessage(MessageType.Regular, from.EmoteHue, false, "*ties the rope to the hitching post ring*");
                    from.SendMessage("Target the pet you wish to hitch.");

                    from.Target = new PostToPetTarget();
                }
            }
            else if( target is BaseCreature )
                from.SendMessage("You must tie the rope to a hitching post before being able to hitch your pet.");

            else if( target is PlayerMobile )
                from.SendMessage("The person looks at you in disgust.");

            else if( target == from )
                from.SendMessage("That would be a stupid idea.");
        }
		public override bool Drink( Mobile from )
		{
			if ( from.Mana < from.ManaMax )
			{
				if ( from.BeginAction( typeof( BaseManaRefreshPotion ) ) )
				{
					from.Mana += Scale( from, (int)(Refresh * from.ManaMax) );

					BasePotion.PlayDrinkEffect( from );

					Delete();

					Timer.DelayCall<Mobile>( TimeSpan.FromSeconds( 20.0 ), new TimerStateCallback<Mobile>( ReleaseManaLock ), from );

					return true;
				}
				else
					from.LocalOverheadMessage( MessageType.Regular, 0x22, false, "You must wait 20 seconds before using another mana refresh potion." );

			}
			else
				from.SendMessage( "You decide against drinking this potion, as you already have full mana." );

			return false;
		}
		private bool CheckUse( Mobile from )
		{
			if ( !this.IsAccessibleTo( from ) )
				return false;

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

			if ( !from.CanBeginAction( typeof( FireHorn ) ) )
			{
				from.SendLocalizedMessage( 1049615 ); // You must take a moment to catch your breath.
				return false;
			}

			int sulfAsh = Core.AOS ? 4 : 15;
			if ( from.Backpack == null || from.Backpack.GetAmount( typeof( SulfurousAsh ) ) < sulfAsh )
			{
				from.SendLocalizedMessage( 1049617 ); // You do not have enough sulfurous ash.
				return false;
			}

			return true;
		}
Example #25
0
		public override void OnDoubleClick( Mobile from )
		{
			if ( from.InRange( GetWorldLocation(), 1 ) )
				UseGate( from );
			else
				from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that
		}
Example #26
0
		public override void OnDoubleClick( Mobile from )
		{
			if ( !from.InRange( GetWorldLocation(), 2 ) )
			from.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
			else if ( from is PlayerMobile )
			from.SendGump( new FoodPantryGump( (PlayerMobile)from, this ) );
		}
		public override void OnDoubleClick( Mobile from )
        {
            //			from.SendMessage ("The seed box is temporarily out of order.");
            //			return;
            if (this.RootParentEntity != from && !from.InRange( GetWorldLocation(), 2 ))
            {
                from.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
                return;
            }
           
                UseOuiJa(from, true);
            
            /*
            if (from.CanBeginAction(typeof(HalloweenOuiJaBoard2012)))
            {
                from.BeginAction(typeof(HalloweenOuiJaBoard2012));
                Timer.DelayCall<Mobile>(TimeSpan.FromSeconds(60.0), new TimerStateCallback<Mobile>(ReleaseOuijaLock), from);
            }
            else
            {
                from.SendMessage("You are too creeped out to use it again so soon!");
            }*/
            
            //Timer.DelayCall<Mobile>(TimeSpan.FromSeconds(Utility.RandomMinMax(HouseSystemController._MinPlaceDelay, HouseSystemController._MaxPlaceDelay)), new TimerStateCallback<Mobile>(ReleasePlacementLock), from);
        }
		public override void OnDoubleClick( Mobile from )
		{
			if ( !from.InRange( GetWorldLocation(), 2 ) )
				from.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
			else
				from.SendGump( new AlchemyBoxGump( from, this, AlchemyBoxGump.Pages.Start ) );
		}
Example #29
0
		public void Throw( Mobile from )
		{
			BaseKnife knife = from.Weapon as BaseKnife;

			if ( knife == null )
			{
				from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500751 ); // Try holding a knife...
				return;
			}

			from.Animate( from.Mounted ? 26 : 9, 7, 1, true, false, 0 );
			from.MovingEffect( this, knife.ItemID, 7, 1, false, false );
			from.PlaySound( 0x238 );

			double rand = Utility.RandomDouble();

			int message;
			if ( rand < 0.05 )
				message = 500752; // BULLSEYE! 50 Points!
			else if ( rand < 0.20 )
				message = 500753; // Just missed the center! 20 points.
			else if ( rand < 0.45 )
				message = 500754; // 10 point shot.
			else if ( rand < 0.70 )
				message = 500755; // 5 pointer.
			else if ( rand < 0.85 )
				message = 500756; // 1 point.  Bad throw.
			else
				message = 500757; // Missed.

			PublicOverheadMessage( MessageType.Regular, 0x3B2, message );
		}
Example #30
0
        protected override void OnTarget( Mobile from, object target )
        {
            if( target is BaseCreature )
            {
                BaseCreature pet = (BaseCreature)target;

                if( !from.InRange(m_Post.GetWorldLocation(), 2) )
                {
                    from.SendMessage("You must be closer to the post.");
                    from.Target = new unHitchTarget(m_Post);
                }
                else if( pet.Body.IsHuman )
                    from.SendMessage("The person looks at you in disgust.");
                else if( pet.ControlMaster != from )
                    from.SendMessage("That is not your pet.");
                else if( pet.Combatant != null && pet.InRange(pet.Combatant, 12) )
                    from.SendMessage("You cannot do that while your pet is fighting.");
                else if( pet.Controlled == true && pet.ControlMaster == from )
                {
                    string untie = String.Format("*unties {0} pet*", from.Female == true ? "her" : "his");

                    if( pet.Blessed == true )
                    {
                        pet.Blessed = false;
                        pet.CantWalk = false;
                        pet.ControlOrder = OrderType.Come;

                        from.LocalOverheadMessage(MessageType.Regular, from.EmoteHue, false, untie);
                        from.SendMessage("You have unhitched your pet.");
                        from.AddToBackpack(new HitchingRope());
                    }
                }
            }
        }