Ejemplo n.º 1
0
		public override void OnDoubleClick( Mobile from )
		{	
			if ( from.InRange( GetWorldLocation(), 2 ) )
			{
				if ( BlueMageControl.IsBlueMage( from ) )
				{
					if ( from.HasGump( typeof( BlueQuitGump ) ) )
						from.CloseGump( typeof( BlueQuitGump ) );

					from.SendGump( new BlueQuitGump( from ) );
				}
				else
				{
					if ( from.AccessLevel == AccessLevel.Player )
						from.SendMessage( "Please speak to Ben in New Haven" );
					else
					{
						if ( from.HasGump( typeof( BlueAcceptGump ) ) )
							from.CloseGump( typeof( BlueAcceptGump ) );
						
						from.SendGump( new BlueAcceptGump( from ) );
					}
				}
			}

		}
Ejemplo n.º 2
0
		public override void OnDoubleClick( Mobile from )
		{
			if( m_Owner == from && !from.HasGump( typeof( TentManagementGump ) ) && !from.HasGump( typeof( ConfirmTentPlacementGump ) ) )
			{
				from.SendGump( new TentManagementGump( from, this ) );
			}
			else
			{
				from.SendMessage( "This is not your tent!" );
			}
		}
Ejemplo n.º 3
0
		public override void OnDoubleClick( Mobile from )
		{
			PlayerMobile m;

			if ( m_Points < 1 )
			{
				from.SendMessage("That is empty!");
			}
			else if ( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
			}
			else if ( from.HasGump( typeof( IncreaseSkillsGump ) ) )
			{
				from.SendMessage( "You may not have more than one Skill Gump running." );
			}
			else
			{
				if ( from is PlayerMobile )
				{
					m = from as PlayerMobile;
					m.SendGump( new IncreaseSkillsGump( m, this, true, 0 ) );
				}
			}
		}
Ejemplo n.º 4
0
 public override void OnDoubleClick(Mobile from)
 {
     if (!from.HasGump(typeof(TithingGump)))
     {
         from.SendGump(new TithingGump(from, 0));
     }
 }
Ejemplo n.º 5
0
		public override bool OnMoveOver( Mobile m )
		{
			if ( !m.HasGump( typeof( ConfirmExitInstanceGump ) ) )
				m.SendGump( new ConfirmExitInstanceGump( this ) );

			return base.OnMoveOver( m );
		}
Ejemplo n.º 6
0
		public override void OnDoubleClick( Mobile from )
		{
			if (from.HasGump( typeof (CraftRequestGump) ) )
				from.CloseGump( typeof (CraftRequestGump) );
			
			from.SendGump( new CraftRequestGump( 1, this, from, ref m_orders ));
		}
Ejemplo n.º 7
0
		public static void Notify( Mobile m )
		{
			if ( m.HasGump( typeof( ErrorsGump ) ) )
				new ErrorsGump( m );
			else
				new ErrorsNotifyGump( m );
		}
Ejemplo n.º 8
0
		public HelpGump( Mobile from )
			: base( 0, 0 )
		{
			_from = from;

			if( from.HasGump( typeof( HelpGump ) ) )
				from.CloseGump( typeof( HelpGump ) );

			AddPage( 0 );
			AddBackground( 10, 10, 430, 350, 9250 );
			AddAlphaRegion( 25, 50, 400, 265 );
			AddLabel( 100, 30, LabelHue, "Help Menu" );

			AddLabel( 345, 320, LabelHue, "Cancel" );
			AddButton( 395, 320, 4020, 4022, 0, GumpButtonType.Reply, 0 );

			AddHtml( 70, 60, 350, 75, @"<u>General Question:</u> Select this option if you have a general gameplay question. This encompasses questions about the shard's custom systems, command usage, and skill usage.", true, true );
			AddHtml( 70, 145, 350, 75, @"<u>Harrassment:</u> Use this option if another player is harrassing you, verbally or with game mechanics (i.e. luring monsters to attack you). Please be aware that we take all harrassment claims seriously, and it is inadvisable to report illegitimate claims of this type.", true, true );
			AddHtml( 70, 230, 350, 75, @"<u>Other:</u> Select this page type if your question or concern does not fall under any of the others. Use this category for suggestions, bug reports, and account management questions as well.", true, true );

			int x = 35, y = 85;

			for( int i = 1; i < 4; i++, y += 85 )
			{
				AddButton( x, y, 4005, 4007, i, GumpButtonType.Reply, 0 );
			}
		}
Ejemplo n.º 9
0
		public override void OnUse( Mobile from )
		{
			if ( from.HasGump( typeof( MonkStrikeGump ) ) )
				from.CloseGump( typeof( MonkStrikeGump ) );

			from.SendGump( new MonkStrikeGump( from ) );
		}
Ejemplo n.º 10
0
 protected override void OnTargetFinish( Mobile from )
 {
     if ( !m_Plant.Deleted && m_Plant.PlantStatus < PlantStatus.DecorativePlant && from.InRange( m_Plant.GetWorldLocation(), 3 ) && m_Plant.IsUsableBy( from ) && !from.HasGump( typeof(MainPlantGump) ) )
     {
         from.SendGump( new MainPlantGump( m_Plant ) );
     }
 }
Ejemplo n.º 11
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 ) );
                }
            }
        }
Ejemplo n.º 12
0
		public static void Notify( Mobile m )
		{
			if ( m.HasGump( typeof( ErrorsGump ) ) )
				ErrorsGump.SendTo( m );
			else
				ErrorsNotifyGump.SendTo( m );
		}
Ejemplo n.º 13
0
		public override void OnDoubleClick( Mobile from )
		{
			BaseHouse house = BaseHouse.FindHouseAt( this );
			if ( !( house == null || !house.IsOwner( from ) || !house.IsCoOwner( from ) ) && !from.HasGump( typeof(FlameCloseGump) ) )
			{
				from.SendGump( new FlameCloseGump( this ) );
			}
		}
Ejemplo n.º 14
0
        public void Resend( Mobile from )
        {
            AddOnEditor_Att addoneditor = (AddOnEditor_Att)XmlAttach.FindAttachment(from, typeof(AddOnEditor_Att));

            if( from.HasGump(typeof(AddOnEditor)) ) {
                from.CloseGump(typeof(AddOnEditor));
            }
            from.SendGump( new AddOnEditor( from, addoneditor) );
        }
		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.HasGump( typeof(CarpetGump) ) )
				from.SendMessage( "You are already choosing a style of carpet." );
			else
				BoundingBoxPicker.Begin( from, new BoundingBoxCallback( BoundingBox_Callback ), null );
		}
Ejemplo n.º 16
0
		public override void OnDoubleClick( Mobile from )
		{
			if ( Parent != from )
				return;

			if ( from.HasGump( typeof( MonkStrikeGump ) ) )
				from.CloseGump( typeof( MonkStrikeGump ) );

			from.SendGump( new MonkStrikeGump( from ) );
		}
Ejemplo n.º 17
0
 private static void Notify(Mobile m)
 {
     if (m.HasGump(typeof (ErrorsGump)))
     {
         new ErrorsGump(m);
     }
     else
     {
         new ErrorsNotifyGump(m);
     }
 }
Ejemplo n.º 18
0
        public GameInfoGump(Mobile m, BaseGame game, bool endgame)
            : base(200, 200)
        {
            m_Game = game;
            m_User = m;

            if (m_User.HasGump(this.GetType()))
            {
                m_User.CloseGump(this.GetType());
            }
            
            MakeGump(endgame);
        }
Ejemplo n.º 19
0
        public override bool OnMoveOver( Mobile m )
        {
            if ( !m_AllowedPlayers.Contains( m ) )
            {
                m.SendLocalizedMessage( 1113573 ); // This instance has been reserved for another party.
            }
            else
            {
                if ( !m.HasGump( typeof( ConfirmJoinInstanceGump ) ) )
                    m.SendGump( new ConfirmJoinInstanceGump( m_Instance ) );
            }

            return base.OnMoveOver( m );
        }
Ejemplo n.º 20
0
        public GameAdminGump(Mobile m, BaseGame game)
            : base(200, 200)
        {
            m_Game = game;
            m_User = m;

            if (m_User == null)
                return;
            if (m_User.HasGump(this.GetType()))
            {
                m_User.CloseGump(this.GetType());
            }

            MakeGump();
        }
Ejemplo n.º 21
0
		public override void OnDoubleClick(Mobile from)
		{
			if(RootParent != null || !from.InRange(GetWorldLocation(), 3) || Movable || IsLockedDown || IsSecure)
				return;
			else if (from.Backpack != null && m_Span == 0)
			{
				Item key = from.Backpack.FindItemByType(typeof(MagicKey));
				
				if(key == null)
				{
					if(from.HasGump(typeof(MagicKey.MagicKeyConfirmGump)))
						from.CloseGump(typeof(MagicKey.MagicKeyConfirmGump));

                    from.SendGump(new MagicKeyConfirmGump(this));
				}
			}
		}
		public static bool RefreshGump( Mobile player, object o )
		{
			if( player.HasGump( typeof( ObjectPropertyListGump ) ) )
			{
				ObjectPropertyListGump gump = (ObjectPropertyListGump)player.FindGump( typeof( ObjectPropertyListGump ) );
				
				//if this gump that's up is showing this list entry, or if none was specified, then refresh
				if( o == null || gump.Object == o )
				{
					//then, resend this gump!
					player.SendGump( new ObjectPropertyListGump( gump ) );
					return true;
				}
			}
			
			return false;
		}
Ejemplo n.º 23
0
		public static bool RefreshGump( Mobile player, ItemStore store )
		{
			//if this mobile has an item store gump up
			if( player.HasGump( typeof( ItemStoreGump ) ) )
			{
				ItemStoreGump gump = (ItemStoreGump)player.FindGump( typeof( ItemStoreGump ) );
				
				//if this gump that's up is showing this store, or if no store was specified
				if( store == null || gump.Store == store )
				{
					//then, resend this gump!
					player.SendGump( new ItemStoreGump( gump ) );
					return true;
				}
			}
			
			return false;
		}
		public static bool RefreshGump( Mobile player, StashEntry stashentry )
		{
			//if this mobile has a stash entry gump up
			if( player.HasGump( typeof( StashEntryGump ) ) )
			{
				StashEntryGump gump = (StashEntryGump)player.FindGump( typeof( StashEntryGump ) );
				
				//if this gump that's up is showing this list entry, or if none was specified, then refresh
				if( stashentry == null || gump.StashEntry == stashentry )
				{
					//then, resend this gump!
					player.SendGump( new StashEntryGump( gump ) );
					return true;
				}
			}
			
			return false;
		}
Ejemplo n.º 25
0
		public void Refresh(Mobile from)
        {
		
			SpellBarScroll scroll = (SpellBarScroll)XmlAttach.FindAttachment(from, typeof(SpellBarScroll));
			
			if ( scroll == null )
			{
				XmlAttach.AttachTo(from, new SpellBarScroll());
				//e.Mobile.SendGump(new Test_Gump(attachment));
				return;
			
			}
			
			int xo = scroll.Xo;
			int yo = scroll.Yo;
					  
			if ( from.HasGump(typeof(SpellBarGump.SpellBar_BarGump)) )
			{
				from.CloseGump(typeof(SpellBarGump.SpellBar_BarGump));
			}
			
			from.SendGump( new SpellBarGump.SpellBar_BarGump ( from, scroll, xo, yo ) );  
        }
Ejemplo n.º 26
0
        public GameInfoGump(Mobile m, BaseGame game)
            : base(200, 200)
        {
            m_Game = game;
            m_User = m;

            if (m_User.HasGump(this.GetType()))
            {
                m_User.CloseGump(this.GetType());
            }

            if (m is PlayerMobile)
            {
                PlayerMobile user = m as PlayerMobile;
                if (user.GameInfoGumpType == GameInfoGumpType.Extended)
                    MakeGump(false);
                else if (user.GameInfoGumpType == GameInfoGumpType.Compact)
                    MakeCompactGump();
            }
            else
            {
                MakeGump(false);
            }
        }
Ejemplo n.º 27
0
		// Use OnLocationChanged instead of OnEnter because it can be that we enter a house region even though we're not actually inside the house
		public override void OnLocationChanged( Mobile m, Point3D oldLocation )
		{
			if ( m_Recursion )
				return;

			base.OnLocationChanged( m, oldLocation );

			m_Recursion = true;

			if ( m is BaseCreature && ((BaseCreature)m).NoHouseRestrictions )
			{
			}
			else if ( m is BaseCreature && ((BaseCreature)m).IsHouseSummonable && !(BaseCreature.Summoning || m_House.IsInside( oldLocation, 16 )) )
			{
			}
			else if ( (m_House.Public || !m_House.IsAosRules) && m_House.IsBanned( m ) && m_House.IsInside( m ) )
			{
				m.Location = m_House.BanLocation;

				if( !Core.SE )
					m.SendLocalizedMessage( 501284 ); // You may not enter.
			}
			else if ( m_House.IsAosRules && !m_House.Public && !m_House.HasAccess( m ) && m_House.IsInside( m ) )
			{
				m.Location = m_House.BanLocation;

				if( !Core.SE )
					m.SendLocalizedMessage( 501284 ); // You may not enter.
			}
			else if ( m_House.IsCombatRestricted( m ) && m_House.IsInside( m ) && !m_House.IsInside( oldLocation, 16 ) )
			{
				m.Location = m_House.BanLocation;
				m.SendLocalizedMessage( 1061637 ); // You are not allowed to access this.
			}
			else if ( m_House is HouseFoundation )
			{
				HouseFoundation foundation = (HouseFoundation)m_House;

				if ( foundation.Customizer != null && foundation.Customizer != m && m_House.IsInside( m ) )
					m.Location = m_House.BanLocation;
			}

			if ( m_House.InternalizedVendors.Count > 0 && m_House.IsInside( m ) && !m_House.IsInside( oldLocation, 16 ) && m_House.IsOwner( m ) && m.Alive && !m.HasGump( typeof( NoticeGump ) ) )
			{
				/* This house has been customized recently, and vendors that work out of this
				 * house have been temporarily relocated.  You must now put your vendors back to work.
				 * To do this, walk to a location inside the house where you wish to station
				 * your vendor, then activate the context-sensitive menu on your avatar and
				 * select "Get Vendor".
				 */
				m.SendGump( new NoticeGump( 1060635, 30720, 1061826, 32512, 320, 180, null, null ) );
			}

			m_Recursion = false;
		}
Ejemplo n.º 28
0
		public override bool OnDragLift( Mobile from )
		{
			if ( from.HasGump( typeof( RunebookGump ) ) )
			{
                from.SendMessage("Fermez tous vos livre de runes avant d'en ramasser un.");
				return false;
			}
			
			foreach ( Mobile m in m_Openers )
				if ( IsOpen( m ) )
					m.CloseGump( typeof( RunebookGump ) );
				
			m_Openers.Clear();
			
			return true;
		}
Ejemplo n.º 29
0
		public override bool OnMoveInto( Mobile from, Direction d, Point3D newLocation, Point3D oldLocation )
		{
			if ( !base.OnMoveInto( from, d, newLocation, oldLocation ) )
				return false;

			if ( from is BaseCreature && ((BaseCreature)from).NoHouseRestrictions )
			{
			}
			else if ( from is BaseCreature && !((BaseCreature)from).Controlled ) // Untamed creatures cannot enter public houses
			{
				return false;
			}
			else if ( from is BaseCreature && ((BaseCreature)from).IsHouseSummonable && !(BaseCreature.Summoning || m_House.IsInside( oldLocation, 16 )) )
			{
				return false;
			}
			else if ( from is BaseCreature && !((BaseCreature)from).Controlled && m_House.IsAosRules && !m_House.Public)
			{
				return false;
			}
			else if ( (m_House.Public || !m_House.IsAosRules) && m_House.IsBanned( from ) && m_House.IsInside( newLocation, 16 ) )
			{
				from.Location = m_House.BanLocation;

				if( !Core.SE )
					from.SendLocalizedMessage( 501284 ); // You may not enter.

				return false;
			}
			else if ( m_House.IsAosRules && !m_House.Public && !m_House.HasAccess( from ) && m_House.IsInside( newLocation, 16 ) )
			{
				if( !Core.SE )
					from.SendLocalizedMessage( 501284 ); // You may not enter.

				return false;
			}
			else if ( m_House.IsCombatRestricted( from ) && !m_House.IsInside( oldLocation, 16 ) && m_House.IsInside( newLocation, 16 ) )
			{
				from.SendLocalizedMessage( 1061637 ); // You are not allowed to access this.
				return false;
			}
			else if ( m_House is HouseFoundation )
			{
				HouseFoundation foundation = (HouseFoundation)m_House;

				if ( foundation.Customizer != null && foundation.Customizer != from && m_House.IsInside( newLocation, 16 ) )
					return false;
			}

			if ( m_House.InternalizedVendors.Count > 0 && m_House.IsInside( from ) && !m_House.IsInside( oldLocation, 16 ) && m_House.IsOwner( from ) && from.Alive && !from.HasGump( typeof( NoticeGump ) ) )
			{
				/* This house has been customized recently, and vendors that work out of this
				 * house have been temporarily relocated.  You must now put your vendors back to work.
				 * To do this, walk to a location inside the house where you wish to station
				 * your vendor, then activate the context-sensitive menu on your avatar and
				 * select "Get Vendor".
				 */
				from.SendGump( new NoticeGump( 1060635, 30720, 1061826, 32512, 320, 180, null, null ) );
			}

			return true;
		}
Ejemplo n.º 30
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!from.HasGump(typeof(QuestGiver_gump)))
            {
                from.SendGump(new QuestGiver_gump(from));
            }

            //base.OnDoubleClick(from);
        }