Esempio n. 1
0
        public override bool CanDrop(PlayerMobile player)
        {
            TheGraveDiggerQuest qs = player.Quest as TheGraveDiggerQuest;

            if (qs == null)
            {
                return(true);
            }

            return(!(qs.IsObjectiveInProgress(typeof(ReturnToDrunkObjective))));
        }
Esempio n. 2
0
        public override bool CanDrop(PlayerMobile player)
        {
            TheGraveDiggerQuest qs = player.Quest as TheGraveDiggerQuest;

            if (qs == null)
            {
                return(true);
            }

            return(!(qs.IsObjectiveInProgress(typeof(FindYeastObjective)) ||
                     qs.IsObjectiveInProgress(typeof(FindYeastObjective)) ||
                     qs.IsObjectiveInProgress(typeof(FindRiceFlavorSticksObjective)) ||
                     qs.IsObjectiveInProgress(typeof(FindPureGrainAlcoholObjective)) ||
                     qs.IsObjectiveInProgress(typeof(FindVincentObjective))));
        }
Esempio n. 3
0
        public override void OnTalk(PlayerMobile player, bool contextMenu)
        {
            Direction = GetDirectionTo(player);

            QuestSystem qs = player.Quest;

            if (qs is TheGraveDiggerQuest)
            {
                if (qs.IsObjectiveInProgress(typeof(FindYeastObjective)) || qs.IsObjectiveInProgress(typeof(FindAsianOilObjective)) || qs.IsObjectiveInProgress(typeof(FindRiceFlavorSticksObjective)) || qs.IsObjectiveInProgress(typeof(FindPureGrainAlcoholObjective)))
                {
                    qs.AddConversation(new DuringCollectingConversation());
                }
                else if (qs.IsObjectiveInProgress(typeof(FindVincentObjective)) || qs.IsObjectiveInProgress(typeof(VincentsLittleGirlObjective)) || qs.IsObjectiveInProgress(typeof(ReturnToVincentObjective)))
                {
                    qs.AddConversation(new DuringBrewingConversation());
                }
                else
                {
                    QuestObjective obj = qs.FindObjective(typeof(ReturnToDrunkObjective));

                    //obj = qs.FindObjective( typeof( ReturnToDrunkObjective ) );

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

                        if (player.Backpack != null)
                        {
                            player.Backpack.ConsumeUpTo(typeof(VincentsBrew), 1);
                        }

                        if (GiveReward(player))
                        {
                            qs.AddConversation(new EndConversation());
                        }
                        else
                        {
                            qs.AddConversation(new FullEndConversation(true));
                        }
                    }
                    else
                    {
                        obj = qs.FindObjective(typeof(MakeRoomObjective));

                        if (obj != null && !obj.Completed)
                        {
                            if (GiveReward(player))
                            {
                                obj.Complete();
                                qs.AddConversation(new EndConversation());
                            }
                            else
                            {
                                qs.AddConversation(new FullEndConversation(false));
                            }
                        }
                    }
                }
            }
            else
            {
                QuestSystem newQuest = new TheGraveDiggerQuest(player);

                if (qs == null && QuestSystem.CanOfferQuest(player, typeof(TheGraveDiggerQuest)))
                {
                    newQuest.SendOffer();
                }
                else
                {
                    newQuest.AddConversation(new DontOfferConversation());
                }
            }
        }
Esempio n. 4
0
		public override void OnTalk( PlayerMobile player, bool contextMenu )
		{
			Direction = GetDirectionTo( player );

			QuestSystem qs = player.Quest;

			if ( qs is TheGraveDiggerQuest )
			{
				if ( qs.IsObjectiveInProgress( typeof( FindYeastObjective ) ) || qs.IsObjectiveInProgress( typeof( FindAsianOilObjective ) ) || qs.IsObjectiveInProgress( typeof( FindRiceFlavorSticksObjective ) ) || qs.IsObjectiveInProgress( typeof( FindPureGrainAlcoholObjective ) ) )
				{
					qs.AddConversation( new DuringCollectingConversation() );
				}
				else if ( qs.IsObjectiveInProgress( typeof( FindVincentObjective ) ) || qs.IsObjectiveInProgress( typeof( VincentsLittleGirlObjective ) ) || qs.IsObjectiveInProgress( typeof( ReturnToVincentObjective ) ) )
				{
					qs.AddConversation( new DuringBrewingConversation() );
				}
				else
				{
					QuestObjective obj = qs.FindObjective( typeof( ReturnToDrunkObjective ) );

					//obj = qs.FindObjective( typeof( ReturnToDrunkObjective ) );

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

						if ( player.Backpack != null )
						{
							player.Backpack.ConsumeUpTo( typeof( VincentsBrew ), 1 );
						}

						if ( GiveReward( player ) )
						{
							qs.AddConversation( new EndConversation() );
						}
						else
						{
							qs.AddConversation( new FullEndConversation( true ) );
						}
					}
					else
					{
						obj = qs.FindObjective( typeof( MakeRoomObjective ) );

						if ( obj != null && !obj.Completed )
						{
							if ( GiveReward( player ) )
							{
								obj.Complete();
								qs.AddConversation( new EndConversation() );
							}
							else
							{
								qs.AddConversation( new FullEndConversation( false ) );
							}
						}
					}
				}
			}
			else
			{
				QuestSystem newQuest = new TheGraveDiggerQuest( player );

				if ( qs == null && QuestSystem.CanOfferQuest( player, typeof( TheGraveDiggerQuest ) ) )
				{
					newQuest.SendOffer();
				}
				else
				{
					newQuest.AddConversation( new DontOfferConversation() );
				}
			}
		}