Example #1
0
		public override bool OnDragDrop( Mobile from, Item dropped )
		{
			if ( !this.IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 1060640 ); // The item must be in your backpack to use it.
				return false;
			}

			Key key = dropped as Key;

			if ( key == null || key.KeyValue == 0 )
			{
				from.SendLocalizedMessage( 501689 ); // Only non-blank keys can be put on a keyring.
				return false;
			}
			else if ( this.Keys.Count >= MaxKeys )
			{
				from.SendLocalizedMessage( 1008138 ); // This keyring is full.
				return false;
			}
			else
			{
				Add( key );
				from.SendLocalizedMessage( 501691 ); // You put the key on the keyring.
				return true;
			}
		}
Example #2
0
		public override void OnDoubleClickSecureTrade( Mobile from )
		{
			if ( !from.InRange( GetWorldLocation(), 2 ) )
			{
				from.SendLocalizedMessage( 500446 ); // That is too far away.
			}
			else if ( m_Entries.Count == 0 )
			{
				from.SendLocalizedMessage( 1062381 ); // The book is empty.
			}
			else
			{
				from.SendGump( new BOBGump( (PlayerMobile)from, this ) );

				SecureTradeContainer cont = GetSecureTradeCont();

				if ( cont != null )
				{
					SecureTrade trade = cont.Trade;

					if ( trade != null && trade.From.Mobile == from )
						trade.To.Mobile.SendGump( new BOBGump( (PlayerMobile)(trade.To.Mobile), this ) );
					else if ( trade != null && trade.To.Mobile == from )
						trade.From.Mobile.SendGump( new BOBGump( (PlayerMobile)(trade.From.Mobile), this ) );
				}
			}
		}
Example #3
0
		public virtual void OnTarget( Mobile from, object obj )
		{
			if ( Deleted )
				return;

			SwampDragon pet = obj as SwampDragon;

			if ( pet == null || pet.HasBarding )
			{
				from.SendLocalizedMessage( 1053025 ); // That is not an unarmored swamp dragon.
			}
			else if ( !pet.Controlled || pet.ControlMaster != from )
			{
				from.SendLocalizedMessage( 1053026 ); // You can only put barding on a tamed swamp dragon that you own.
			}
			else if ( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 1060640 ); // The item must be in your backpack to use it.
			}
			else
			{
				pet.BardingExceptional = this.Exceptional;
				pet.BardingCrafter = this.Crafter;
				pet.BardingHP = pet.BardingMaxHP;
				pet.BardingResource = this.Resource;
				pet.HasBarding = true;
				pet.Hue = this.Hue;

				this.Delete();

				from.SendLocalizedMessage( 1053027 ); // You place the barding on your swamp dragon.  Use a bladed item on your dragon to remove the armor.
			}
		}
Example #4
0
        public override bool OnMoveOver( Mobile m )
        {
            if ( !base.OnMoveOver( m ) )
                return false;

            PlayerMobile pm = m as PlayerMobile;

            if ( m is BaseCreature )
                pm = ( (BaseCreature) m ).ControlMaster as PlayerMobile;

            if ( pm != null && pm.SacredQuest )
            {
                // May the Virtues guide thine quest.
                m.SendLocalizedMessage( 1112227 );

                return true;
            }
            else
            {
                // Thou must be on a Sacred Quest to pass through.
                m.SendLocalizedMessage( 1112226 );

                return false;
            }
        }
		public bool ValidatePlacement( Mobile from, Point3D loc )
		{
			if ( from.AccessLevel >= AccessLevel.GameMaster )
				return true;

			if ( !from.InRange( this.GetWorldLocation(), 1 ) )
			{
				from.SendLocalizedMessage( 500446 ); // That is too far away.
				return false;
			}

			Map map = from.Map;

			if ( map == null )
				return false;

			BaseHouse house = BaseHouse.FindHouseAt( loc, map, 20 );

			if ( house != null && !house.IsFriend( from ) )
			{
				from.SendLocalizedMessage(500269); // You cannot build that there.
				return false;
			}

			if ( !map.CanFit( loc, 20 ) )
			{
				from.SendLocalizedMessage( 500269 ); // You cannot build that there.
				return false;
			}

			return true;
		}
		private void DestroyFurniture( Mobile from, Item item )
		{
			if ( !from.InRange( item.GetWorldLocation(), 3 ) )
			{
				from.SendLocalizedMessage( 500446 ); // That is too far away.
				return;
			}
			else if ( !item.IsChildOf( from.Backpack ) && !item.Movable )
			{
				from.SendLocalizedMessage( 500462 ); // You can't destroy that while it is here.
				return;
			}

			from.SendLocalizedMessage( 500461 ); // You destroy the item.
			Effects.PlaySound( item.GetWorldLocation(), item.Map, 0x3B3 );

			if ( item is Container )
			{
				if ( item is TrapableContainer )
					(item as TrapableContainer).ExecuteTrap( from );

				((Container)item).Destroy();
			}
			else
			{
				item.Delete();
			}
		}
        public void AddRune(Mobile from, RecallRune dropped)
        {
            if (Entries.Count < 16)
            {
                RecallRune rune = dropped;

                if (rune.Marked && rune.TargetMap != null)
                {
                    Entries.Add(new RunebookEntry(rune.Target, rune.TargetMap, rune.Description, rune.House));

                    dropped.Delete();

                    from.Send(new PlaySound(0x42, GetWorldLocation()));

                    string desc = rune.Description;

                    if (desc == null || (desc = desc.Trim()).Length == 0)
                        desc = "(nondescript)";

                    from.SendMessage(desc);
                }
                else
                {
                    from.SendLocalizedMessage(502409); // This rune does not have a marked location.
                }
            }
            else
            {
                from.SendLocalizedMessage(502401); // This runebook is full.
            }
        }
Example #8
0
		public override void OnDoubleClick( Mobile from )
		{
			if ( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
			}
			else
			{
				this.Delete();

				Item i = null;

				switch ( Utility.Random( (from.BAC >= 5) ? 6 : 5) )
				{
					case 0: i = new OrigamiButterfly();	break;
					case 1: i = new OrigamiSwan();		break;
					case 2: i = new OrigamiFrog();		break;
					case 3: i = new OrigamiShape();		break;
					case 4: i = new OrigamiSongbird();	break;
					case 5: i = new OrigamiFish();		break;
				}

				if( i != null )
					from.AddToBackpack( i );

				from.SendLocalizedMessage( 1070822 ); // You fold the paper into an interesting shape.
			}
		}
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 );
                }
            }
        }
        public override void OnDoubleClick( Mobile from )
        {
            if ( !IsChildOf( from.Backpack ) )
            {
                from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
            }
            else if ( from.AccessLevel >= AccessLevel.GameMaster )
            {
                from.SendLocalizedMessage( 503248 );//Your godly powers allow you to place this vendor whereever you wish.

                Mobile v = new PlayerVendor( from );
                v.Location = from.Location;
                v.Direction = from.Direction & Direction.Mask;
                v.Map = from.Map;
                v.SayTo( from, 503246 ); // Ah! it feels good to be working again.

                this.Delete();
            }
            else
            {
                BaseHouse house = BaseHouse.FindHouseAt( from );
                if ( house == null && from.Region is HouseRegion )
                {
                    //allow placement in tents
                    house = ((HouseRegion)from.Region).House;
                    if ( house != null && !(house is Tent) )
                        house = null;
                }

                if ( house == null )
                {
                    from.SendLocalizedMessage( 503240 );//Vendors can only be placed in houses.
                }
                else if ( !house.IsOwner( from ) )
                {
                    from.SendLocalizedMessage( 503242 ); // You must ask the owner of this house to make you a friend in order to place this vendor here,
                }
                else
                {
                    IPooledEnumerable eable = from.GetMobilesInRange( 0 );
                    foreach ( Mobile m in eable )
                    {
                        if ( !m.Player )
                        {
                            from.SendAsciiMessage( "There is something blocking that location." );
                            eable.Free();
                            return;
                        }
                    }

                    Mobile v = new PlayerVendor( from );
                    v.Location = from.Location;
                    v.Direction = from.Direction & Direction.Mask;
                    v.Map = from.Map;
                    v.SayTo( from, 503246 ); // Ah! it feels good to be working again.

                    this.Delete();
                }
            }
        }
		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 #12
0
		public static void Resurrect( Mobile from )
		{
			if ( from.Alive )
				return;

			PlayerMobile pm = from as PlayerMobile;

			if ( pm == null )
				return;

			if ( from.Criminal )
			{
				from.SendLocalizedMessage( 1052007 ); // You cannot use this ability while flagged as a criminal.
			}
			else if ( !VirtueHelper.IsSeeker( from, VirtueName.Sacrifice ) )
			{
				from.SendLocalizedMessage( 1052004 ); // You cannot use this ability.
			}
			else if ( pm.AvailableResurrects <= 0 )
			{
				from.SendLocalizedMessage( 1052005 ); // You do not have any resurrections left.
			}
			else
			{
				/*
				 * We need to wait for them to accept the gump or they can just use
				 * Sacrifice and cancel to have items in their backpack for free.
				 */
				from.CloseGump( typeof( ResurrectGump ) );
				from.SendGump( new ResurrectGump( from, true ) );
			}
		}
Example #13
0
			protected override void OnTarget(Mobile from, object targeted)
			{
				if(targeted is Mobile)
				{
                    if (targeted is PirateCaptain)
					{
                        PirateCaptain cap = (PirateCaptain)targeted;

						if(cap.Hits > cap.HitsMax / 10)
						{
                            from.SendLocalizedMessage(1116756); //The pirate seems to have too much fight left to be bound.
						}
						else if(cap.TryBound(from, m_Rope.Quest))
						{
							m_Rope.BoundMobile = cap;
                            m_Rope.Quest.OnBound(cap);
                            cap.OnBound(m_Rope.Quest);

                            from.SendLocalizedMessage(1116721); //You begin binding the pirate.

                            m_Rope.DoDelayedDelete(from);
						} 	
					}
					else
					{
                        from.SendMessage("They cannot by bound by that!");
					}
				}
				else
				{
                    from.SendMessage("They cannot by bound by that!");
				}
			}
		public override bool OnMoveOver( Mobile m )
		{
			if ( m.AccessLevel > AccessLevel.Player )
				return true;

			bool sendMessage = m.Player;

			if ( m is BaseCreature )
				m = ((BaseCreature)m).ControlMaster;

			PlayerMobile pm = m as PlayerMobile;

			if ( pm != null )
			{
				QuestSystem qs = pm.Quest;

				if ( qs is DarkTidesQuest )
				{
					QuestObjective obj = qs.FindObjective( typeof( SpeakCavePasswordObjective ) );

					if ( obj != null && obj.Completed )
					{
						if ( sendMessage )
							m.SendLocalizedMessage( 1060648 ); // With Horus' permission, you are able to pass through the barrier.

						return true;
					}
				}
			}

			if ( sendMessage )
				m.SendLocalizedMessage( 1060649, "", 0x66D ); // Without the permission of the guardian Horus, the magic of the barrier prevents your passage.

			return false;
		}
Example #15
0
        public static void GiveArtifactTo(Mobile m)
        {
            var item = Activator.CreateInstance(m_Artifacts[Utility.Random(m_Artifacts.Length)]) as Item;

            if (item == null)
            {
                return;
            }

            if (m.AddToBackpack(item))
            {
                m.SendLocalizedMessage(1072223); // An item has been placed in your backpack.
                m.SendLocalizedMessage(1062317);
                    // For your valor in combating the fallen beast, a special artifact has been bestowed on you.
            }
            else if (m.BankBox.TryDropItem(m, item, false))
            {
                m.SendLocalizedMessage(1072224); // An item has been placed in your bank box.
                m.SendLocalizedMessage(1062317);
                    // For your valor in combating the fallen beast, a special artifact has been bestowed on you.
            }
            else
            {
                // Item was placed at feet by m.AddToBackpack
                m.SendLocalizedMessage(1072523);
                    // You find an artifact, but your backpack and bank are too full to hold it.
            }
        }
Example #16
0
		public virtual void EndSummon( Mobile from )
		{
			if ( m_Chyloth != null && !m_Chyloth.Deleted )
			{
				from.SendLocalizedMessage( 1050010 ); // The ferry man has already been summoned.  There is no need to ring for him again.
			}
			else if ( m_Dragon != null && !m_Dragon.Deleted )
			{
				from.SendLocalizedMessage( 1050017 ); // The ferryman has recently been summoned already.  You decide against ringing the bell again so soon.
			}
			else if ( m_Summoning )
			{
				m_Summoning = false;

				Point3D loc = GetWorldLocation();

				loc.Z -= 16;

				Effects.SendLocationParticles( EffectItem.Create( loc, Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 0, 0, 2023, 0 );
				Effects.PlaySound( loc, Map, 0x1FE );

				m_Chyloth = new Chyloth();

				m_Chyloth.Direction = (Direction)(7 & (4 + (int)from.GetDirectionTo( loc )));
				m_Chyloth.MoveToWorld( loc, Map );

				m_Chyloth.Bell = this;
				m_Chyloth.AngryAt = from;
				m_Chyloth.BeginGiveWarning();
				m_Chyloth.BeginRemove( TimeSpan.FromSeconds( 40.0 ) );
			}
		}
		public override void Drink( Mobile from )
		{
			if ( Core.AOS && (from.Paralyzed || from.Frozen || (from.Spell != null && from.Spell.IsCasting)) )
			{
				from.SendLocalizedMessage( 1062725 ); // You can not use that potion while paralyzed.
				return;
			}

			int delay = GetDelay( from );

			if ( delay > 0 )
			{
				from.SendLocalizedMessage( 1072529, String.Format( "{0}\t{1}", delay, delay > 1 ? "seconds." : "second." ) ); // You cannot use that for another ~1_NUM~ ~2_TIMEUNITS~
				return;
			}

			ThrowTarget targ = from.Target as ThrowTarget;

			if ( targ != null && targ.Potion == this )
				return;

			from.RevealingAction();

			if ( !m_Users.Contains( from ) )
				m_Users.Add( from );

			from.Target = new ThrowTarget( this );
		}
Example #18
0
		public override void OnDoubleClick( Mobile from )
		{
			if ( IsChildOf( from.Backpack ) || Parent == from )
			{
				if ( UsesRemaining > 0 )
				{
					CraftSystem system = this.CraftSystem;
	
					int num = system.CanCraft( from, this, null );
	
					if ( num > 0 )
					{
						from.SendLocalizedMessage( num );
					}
					else
					{
						CraftContext context = system.GetContext( from );
	
						from.SendGump( new CraftGump( from, system, this, null ) );
					}
				}
				else
					from.SendLocalizedMessage( 1072306 ); // You must wait a moment for it to recharge.
			}
			else
			{
				from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
			}
		}
Example #19
0
        public override void OnDoubleClick( Mobile from )
        {
            if ( !IsChildOf( from.Backpack ) )
            {
                from.SendLocalizedMessage( 1042010 ); // You must have the object in your backpack to use it.
            }
            else if ( m_CooldownTable.ContainsKey( from ) )
            {
                Timer resetTimer = m_CooldownTable[from];
                TimeSpan left = resetTimer.Next - DateTime.Now;

                if ( left >= TimeSpan.FromMinutes( 1.0 ) )
                    from.SendLocalizedMessage( 1079265, left.Minutes.ToString() ); // You must wait ~1_minutes~ minutes before you can use this item.
                else
                    from.SendLocalizedMessage( 1079263, left.Seconds.ToString() ); // You must wait ~1_seconds~ seconds before you can use this item.
            }
            else if ( from.Mana == from.ManaMax )
            {
                from.SendLocalizedMessage( 1095127 ); // You are already at full mana!
            }
            else
            {
                from.SendLocalizedMessage( 1095128 ); // The sour draught instantly restores some of your mana!
                from.PlaySound( 0x3C );

                from.Mana += Utility.RandomMinMax( 25, 40 );

                m_CooldownTable[from] = Timer.DelayCall( Cooldown, new TimerStateCallback<Mobile>( RemoveCooldown ), from );

                Delete();
            }
        }
Example #20
0
		public override void OnHit( Mobile attacker, Mobile defender, int damage )
		{
			if( !Validate( attacker ) || !CheckMana( attacker, true ) )
				return;

			ClearCurrentAbility( attacker );

			if( Server.Items.ParalyzingBlow.IsImmune( defender ) )	//After mana consumption intentional
			{
				attacker.SendLocalizedMessage( 1070804 ); // Your target resists paralysis.
				defender.SendLocalizedMessage( 1070813 ); // You resist paralysis.
				return;
			}

			attacker.SendLocalizedMessage( 1063356 ); // You cripple your target with a nerve strike!
			defender.SendLocalizedMessage( 1063357 ); // Your attacker dealt a crippling nerve strike!

			attacker.PlaySound( 0x204 );
			defender.FixedEffect( 0x376A, 9, 32 );
			defender.FixedParticles( 0x37C4, 1, 8, 0x13AF, 0, 0, EffectLayer.Waist );

			AOS.Damage( defender, attacker, (int)(15.0 * (attacker.Skills[SkillName.Bushido].Value - 50.0) / 70.0 + 10), 100, 0, 0, 0, 0 );	//10-25

			defender.Freeze( TimeSpan.FromSeconds( 2.0 ) );
			Server.Items.ParalyzingBlow.BeginImmunity( defender, Server.Items.ParalyzingBlow.FreezeDelayDuration );
		}
Example #21
0
		public void DoCure( Mobile from )
		{
			bool cure = false;

			CureLevelInfo[] info = LevelInfo;

			for ( int i = 0; i < info.Length; ++i )
			{
				CureLevelInfo li = info[i];

				if ( li.Poison == from.Poison && Scale( from, li.Chance ) > Utility.RandomDouble() )
				{
					cure = true;
					break;
				}
			}

			if ( cure && from.CurePoison( from ) )
			{
				from.SendLocalizedMessage( 500231 ); // You feel cured of poison!

				from.FixedEffect( 0x373A, 10, 15 );
				from.PlaySound( 0x1E0 );
			}
			else if ( !cure )
			{
				from.SendLocalizedMessage( 500232 ); // That potion was not strong enough to cure your ailment!
			}
		}
Example #22
0
         protected override void OnTarget( Mobile from, object target )
         {
            if ( target is RecallRune )
            {
               RecallRune t = ( RecallRune )target;

               if ( t.Marked == true )
               {
                  from.Location = t.Target;
                  from.Map = t.TargetMap;
               }
	       else
		  from.SendLocalizedMessage( 502354 ); // Target is not marked.
            }
            else
	    if ( target is Runebook )
	    {
		RunebookEntry e = ((Runebook)target).Default;

		if ( e != null )
		{
		   from.Location = e.Location;
		   from.Map = e.Map;
		}
		else
		   from.SendLocalizedMessage( 502354 ); // Target is not marked.
            }
            else
            {
               from.SendMessage( "That can not be done,!" );
            }
         }
Example #23
0
		public override void OnDoubleClick( Mobile from )
		{
			if ( !IsChildOf( from ) )
				return;

			if ( m_UsesRemaining < 1 )
			{
				// You have no fukiya darts!
				from.SendLocalizedMessage( 1063325 );
			}
			else if ( m_Using )
			{
				// You are already using that fukiya.
				from.SendLocalizedMessage( 1063326 );
			}
			else if ( !BasePotion.HasFreeHand( from ) )
			{
				// You must have a free hand to use a fukiya.
				from.SendLocalizedMessage( 1063327 );
			}
			else
			{
				from.BeginTarget( 5, false, TargetFlags.Harmful, new TargetCallback( OnTarget ) );
			}
		}
		public override void Drink( Mobile from )
		{
			if( Core.SE && (from.Paralyzed || from.Frozen || (from.Spell != null && from.Spell.IsCasting)) )
			{
				from.SendLocalizedMessage( 1062725 ); // You can not use a purple potion while paralyzed.
				return;
			}
			else if( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( CommonLocs.MustBeInPack );
				return;
			}

			ThrowTarget targ = from.Target as ThrowTarget;

			if( targ != null && targ.Potion == this )
				return;

			if( from.Serial != 0x6D3 )
				from.RevealingAction();

			if( m_Users == null )
				m_Users = new ArrayList();

			if( !m_Users.Contains( from ) )
				m_Users.Add( from );

			from.Target = new ThrowTarget( this );

			if( m_Timer == null )
			{
				from.SendLocalizedMessage( 500236 ); // You should throw it now!
				m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 0.75 ), TimeSpan.FromSeconds( 1.0 ), 4, new TimerStateCallback( Detonate_OnTick ), new object[] { from, 3 } );
			}
		}
Example #25
0
        protected void OnTarget( Mobile from, object targeted )
        {
            if ( from.Backpack == null || !IsChildOf( from.Backpack ) )
            {
                from.SendLocalizedMessage( 1080063 ); // This must be in your backpack to use it.
                return;
            }

            if ( targeted is MagicVines )
            {
                MagicVines vines = targeted as MagicVines;

                if ( from.InRange( vines, 1 ) )
                {
                    vines.OnAcidSac( from );
                    Consume();
                }
                else
                {
                    from.SendLocalizedMessage( 1076766 ); // That is too far away.
                }
            }
            else
            {
                from.SendLocalizedMessage( 1046439 ); // That is not a valid target.
            }
        }
Example #26
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 #27
0
	public override bool OnMoveOver( Mobile m )
	{
		if ( m.NetState == null || !m.NetState.SupportsExpansion( Expansion.ML ) )
		{
			m.SendLocalizedMessage( 1072608 ); // You must upgrade to the Mondain's Legacy expansion in order to enter here.				
			return true;
		}	
		else if ( !MondainsLegacy.BlightedGrove && (int) m.AccessLevel < (int) AccessLevel.GameMaster )
		{
			m.SendLocalizedMessage( 1042753, "Blighted Grove" ); // ~1_SOMETHING~ has been temporarily disabled.
			return true;
		}
		
		BoneMachete machete = GetBoneMachete( m );
		
		if ( machete != null )
		{
			if ( Utility.RandomDouble() < 0.75 || machete.Insured || machete.LootType == LootType.Blessed )
			{
				m.SendLocalizedMessage( 1075008 ); // Your bone handled machete has grown dull but you still manage to force your way past the venomous branches.
			}
			else
			{
				machete.Delete();
				m.SendLocalizedMessage( 1075007 ); // Your bone handled machete snaps in half as you force your way through the poisonous undergrowth.
			}
			
			return base.OnMoveOver( m );
		}
		else
			m.SendLocalizedMessage( 1074275 ); // You are unable to push your way through the tangling roots of the mighty tree.
			
		return true;
	}
Example #28
0
        public override void OnDoubleClick(Mobile from)
        {
            if (from.Map == Map.Trammel)
            {
                //Now where am I at?
                //from.SendMessage(11, "You are at {0} {1} {2} in {3}.", from.X, from.Y, from.Z, from.Map);

                from.SendLocalizedMessage(1005680); //teleporting to Felucca
                from.MoveToWorld(from.Location, Map.Felucca);
            }
            else
                if (from.Map == Map.Felucca)
                {
                    from.SendLocalizedMessage(502353); //Strange, that did not seem to work.

                    //To switch from Trammel to Felucca, remove the above line and add the two lines below.
                    //from.SendLocalizedMessage(1005681); //teleporting to Trammel
                    //from.MoveToWorld(from.Location, Map.Trammel);
                    //502353); //Strange, that did not seem to work.
                    //502369); //You hesitate, and decide to start again.
                }
                else
                {
                    from.SendLocalizedMessage(1042766); //Waaaaaaah!  I am lost!
                    //1010217);	 //I'm lost!
                    //1042766);  //Waaaaaaah!  I am lost!
                    //10495430); //You decide against traveling to Felucca while you are still young.
                    //501816);	 //You are too far away to do that.
                }
        }
Example #29
0
		public bool UseGate( Mobile m )
		{
			if ( m.Criminal )
			{
				m.SendLocalizedMessage( 1005561, "", 0x22 ); // Thou'rt a criminal and cannot escape so easily.
				return false;
			}
			else if ( SpellHelper.CheckCombat( m ) )
			{
				m.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle??
				return false;
			}
			else if ( m.Spell != null )
			{
				m.SendLocalizedMessage( 1049616 ); // You are too busy to do that at the moment.
				return false;
			}
			else
			{
				m.CloseGump( typeof( MoongateGump ) );
				m.SendGump( new MoongateGump( m, this ) );

				if ( !m.Hidden || m.AccessLevel == AccessLevel.Player )
					Effects.PlaySound( m.Location, m.Map, 0x20E );

				return true;
			}
		}
	public override void OnDoubleClick( Mobile from )
	{
		if ( m_IsRewardItem && !RewardSystem.CheckIsUsableBy( from, this, null ) )
			return;
		
		if ( m_UsesRemaining > 0 )
		{
			from.SendLocalizedMessage( 1072357 ); // Select an object to engrave.
			from.Target = new TargetWeapon( this );
		}
		else 
		{
			if ( from.Skills.Tinkering.Value == 0 )
			{
				from.SendLocalizedMessage( 1076179 ); // Since you have no tinkering skill, you will need to find an NPC tinkerer to repair this for you.					
			}
			else if ( from.Skills.Tinkering.Value < 75.0 )
			{		
				from.SendLocalizedMessage( 1076178 ); // Your tinkering skill is too low to fix this yourself.  An NPC tinkerer can help you repair this for a fee.
			}
			else
			{					
				Item diamond = from.Backpack.FindItemByType( typeof( BlueDiamond ) );	
				
				if ( diamond != null )
					from.SendGump( new ConfirmGump( this, null ) );	
				else					
					from.SendLocalizedMessage( 1076166 ); // You do not have a blue diamond needed to recharge the engraving tool.	
			}
			
			from.SendLocalizedMessage( 1076163 ); // There are no charges left on this engraving tool.
		}		
	}