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

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

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

                if (obj != null && !obj.Completed)
                {
                    Item paints = new EnchantedPaints();

                    if (!player.PlaceInBackpack(paints))
                    {
                        paints.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 (qs.IsObjectiveInProgress(typeof(CaptureImagesObjective)))
                {
                    qs.AddConversation(new TomasDuringCollectingConversation());
                }
                else
                {
                    obj = qs.FindObjective(typeof(ReturnImagesObjective));

                    if (obj != null && !obj.Completed)
                    {
                        if (player.Backpack != null)
                        {
                            player.Backpack.ConsumeUpTo(typeof(EnchantedPaints), 1);
                        }

                        obj.Complete();
                    }
                }
            }
        }
Example #2
0
 public InternalTarget(EnchantedPaints paints) : base(-1, false, TargetFlags.None)
 {
     CheckLOS = false;
     m_Paints = paints;
 }