コード例 #1
0
        public override void OnTalk(PlayerMobile player, bool contextMenu)
        {
            QuestSystem qs = player.Quest;

            if (qs is TheGraveDiggerQuest)
            {
                Direction = GetDirectionTo(player);

                QuestObjective obj = qs.FindObjective(typeof(FindVincentObjective));

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

                    if (player.Backpack != null)
                    {
                        player.Backpack.ConsumeUpTo(typeof(Yeast), 1);
                        player.Backpack.ConsumeUpTo(typeof(AsianOil), 1);
                        player.Backpack.ConsumeUpTo(typeof(RiceFlavorSticks), 1);
                        player.Backpack.ConsumeUpTo(typeof(PureGrainAlcohol), 1);
                    }
                }
                else if (qs.IsObjectiveInProgress(typeof(VincentsLittleGirlObjective)))
                {
                    qs.AddConversation(new DuringSearchConversation());
                }
                else
                {
                    obj = qs.FindObjective(typeof(ReturnToVincentObjective));

                    if (obj != null && !obj.Completed)
                    {
                        Item brew = new VincentsBrew();

                        if (!player.PlaceInBackpack(brew))
                        {
                            brew.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();
                        }
                    }
                }
            }
        }
コード例 #2
0
ファイル: Vincent.cs プロジェクト: romeov007/imagine-uo
		public override void OnTalk( PlayerMobile player, bool contextMenu )
		{
			QuestSystem qs = player.Quest;

			if ( qs is TheGraveDiggerQuest )
			{
				Direction = GetDirectionTo( player );

				QuestObjective obj = qs.FindObjective( typeof( FindVincentObjective ) );

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

					if ( player.Backpack != null )
					{
						player.Backpack.ConsumeUpTo( typeof( Yeast ), 1 );
						player.Backpack.ConsumeUpTo( typeof( AsianOil ), 1 );
						player.Backpack.ConsumeUpTo( typeof( RiceFlavorSticks ), 1 );
						player.Backpack.ConsumeUpTo( typeof( PureGrainAlcohol ), 1 );
					}
				}
				else if ( qs.IsObjectiveInProgress( typeof( VincentsLittleGirlObjective ) ) )
				{
					qs.AddConversation( new DuringSearchConversation() );
				}
				else
				{
					obj = qs.FindObjective( typeof( ReturnToVincentObjective ) );

					if ( obj != null && !obj.Completed )
					{
						Item brew = new VincentsBrew();

						if ( !player.PlaceInBackpack( brew ) )
						{
							brew.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();
						}
					}
				}
			}
		}