예제 #1
0
파일: Dryad.cs 프로젝트: nogu3ira/xrunuo
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            PlayerMobile player = from as PlayerMobile;

            if (player != null)
            {
                UzeraanTurmoilQuest qs = player.Quest as UzeraanTurmoilQuest;

                if (qs != null && dropped is Apple && UzeraanTurmoilQuest.HasLostFertileDirt(from))
                {
                    FocusTo(from);

                    Item fertileDirt = new QuestFertileDirt();

                    if (!player.PlaceInBackpack(fertileDirt))
                    {
                        fertileDirt.Delete();
                        player.SendLocalizedMessage(1046260);                           // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
                        return(false);
                    }
                    else
                    {
                        dropped.Consume();
                        qs.AddConversation(new DryadAppleConversation());
                        return(dropped.Deleted);
                    }
                }
            }

            return(base.OnDragDrop(from, dropped));
        }
예제 #2
0
        public override void OnTalk(PlayerMobile player, bool contextMenu)
        {
            var qs = player.Quest;

            if (qs is UzeraanTurmoilQuest)
            {
                if (UzeraanTurmoilQuest.HasLostFertileDirt(player))
                {
                    FocusTo(player);
                    qs.AddConversation(new LostFertileDirtConversation(false));
                }
                else
                {
                    var obj = qs.FindObjective(typeof(FindDryadObjective));

                    if (obj != null && !obj.Completed)
                    {
                        FocusTo(player);

                        Item fertileDirt = new QuestFertileDirt();

                        if (!player.PlaceInBackpack(fertileDirt))
                        {
                            fertileDirt.Delete();
                            player.SendLocalizedMessage(1046260);
                            // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
                        }
                        else
                        {
                            obj.Complete();
                        }
                    }
                    else if (contextMenu)
                    {
                        FocusTo(player);
                        SayTo(player, 1049357); // I have nothing more for you at this time.
                    }
                }
            }
        }
예제 #3
0
		public override void OnTalk( PlayerMobile player, bool contextMenu )
		{
			QuestSystem qs = player.Quest;

			if ( qs is UzeraanTurmoilQuest )
			{
				if ( UzeraanTurmoilQuest.HasLostFertileDirt( player ) )
				{
					FocusTo( player );
					qs.AddConversation( new LostFertileDirtConversation( false ) );
				}
				else
				{
					QuestObjective obj = qs.FindObjective( typeof( FindDryadObjective ) );

					if ( obj != null && !obj.Completed )
					{
						FocusTo( player );

						Item fertileDirt = new QuestFertileDirt();

						if ( !player.PlaceInBackpack( fertileDirt ) )
						{
							fertileDirt.Delete();
							player.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
						}
						else
						{
							obj.Complete();
						}
					}
					else if ( contextMenu )
					{
						FocusTo( player );
						SayTo( player, 1049357 ); // I have nothing more for you at this time.
					}
				}
			}
		}
예제 #4
0
		public override bool OnDragDrop( Mobile from, Item dropped )
		{
			PlayerMobile player = from as PlayerMobile;

			if ( player != null )
			{
				UzeraanTurmoilQuest qs = player.Quest as UzeraanTurmoilQuest;

				if ( qs != null && dropped is Apple && UzeraanTurmoilQuest.HasLostFertileDirt( from ) )
				{
					FocusTo( from );

					Item fertileDirt = new QuestFertileDirt();

					if ( !player.PlaceInBackpack( fertileDirt ) )
					{
						fertileDirt.Delete();
						player.SendLocalizedMessage( 1046260 ); // You need to clear some space in your inventory to continue with the quest.  Come back here when you have more space in your inventory.
						return false;
					}
					else
					{
						dropped.Consume();
						qs.AddConversation( new DryadAppleConversation() );
						return dropped.Deleted;
					}
				}
			}

			return base.OnDragDrop( from, dropped );
		}