Exemple #1
0
        public override bool CanDrop(PlayerMobile player)
        {
            CollectorQuest qs = player.Quest as CollectorQuest;

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

            /*return !( qs.IsObjectiveInProgress( typeof( CaptureImagesObjective ) )
            || qs.IsObjectiveInProgress( typeof( ReturnImagesObjective ) ) );*/
            return(false);
        }
Exemple #2
0
        public override void OnTalk(PlayerMobile player, bool contextMenu)
        {
            Direction = GetDirectionTo(player);

            QuestSystem qs = player.Quest;

            if (qs is CollectorQuest)
            {
                if (qs.IsObjectiveInProgress(typeof(FishPearlsObjective)))
                {
                    qs.AddConversation(new ElwoodDuringFishConversation());
                }
                else
                {
                    QuestObjective obj = qs.FindObjective(typeof(ReturnPearlsObjective));

                    if (obj != null && !obj.Completed)
                    {
                        obj.Complete();
                    }
                    else if (qs.IsObjectiveInProgress(typeof(FindAlbertaObjective)))
                    {
                        qs.AddConversation(new ElwoodDuringPainting1Conversation());
                    }
                    else if (qs.IsObjectiveInProgress(typeof(SitOnTheStoolObjective)))
                    {
                        qs.AddConversation(new ElwoodDuringPainting2Conversation());
                    }
                    else
                    {
                        obj = qs.FindObjective(typeof(ReturnPaintingObjective));

                        if (obj != null && !obj.Completed)
                        {
                            obj.Complete();
                        }
                        else if (qs.IsObjectiveInProgress(typeof(FindGabrielObjective)))
                        {
                            qs.AddConversation(new ElwoodDuringAutograph1Conversation());
                        }
                        else if (qs.IsObjectiveInProgress(typeof(FindSheetMusicObjective)))
                        {
                            qs.AddConversation(new ElwoodDuringAutograph2Conversation());
                        }
                        else if (qs.IsObjectiveInProgress(typeof(ReturnSheetMusicObjective)))
                        {
                            qs.AddConversation(new ElwoodDuringAutograph3Conversation());
                        }
                        else
                        {
                            obj = qs.FindObjective(typeof(ReturnAutographObjective));

                            if (obj != null && !obj.Completed)
                            {
                                obj.Complete();
                            }
                            else if (qs.IsObjectiveInProgress(typeof(FindTomasObjective)))
                            {
                                qs.AddConversation(new ElwoodDuringToys1Conversation());
                            }
                            else if (qs.IsObjectiveInProgress(typeof(CaptureImagesObjective)))
                            {
                                qs.AddConversation(new ElwoodDuringToys2Conversation());
                            }
                            else if (qs.IsObjectiveInProgress(typeof(ReturnImagesObjective)))
                            {
                                qs.AddConversation(new ElwoodDuringToys3Conversation());
                            }
                            else
                            {
                                obj = qs.FindObjective(typeof(ReturnToysObjective));

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

                                    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 CollectorQuest(player);

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