public override void Open(Mobile from, bool checkSelfLoot)
        {
            if (!from.InRange(this.GetWorldLocation(), 2))
            {
                return;
            }

            PlayerMobile player = from as PlayerMobile;

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

                if (qs is UzeraanTurmoilQuest)
                {
                    QuestObjective obj = qs.FindObjective(typeof(FindApprenticeObjective));

                    if (obj != null && !obj.Completed)
                    {
                        Item scroll = new SchmendrickScrollOfPower();

                        if (player.PlaceInBackpack(scroll))
                        {
                            player.SendLocalizedMessage(1049147, "", 0x22); // You find the scroll and put it in your pack.
                            obj.Complete();
                        }
                        else
                        {
                            player.SendLocalizedMessage(1049146, "", 0x22); // You find the scroll, but can't pick it up because your pack is too full.  Come back when you have more room in your pack.
                            scroll.Delete();
                        }

                        return;
                    }
                }
            }

            from.SendLocalizedMessage(1049143, "", 0x22); // This is the corpse of a wizard's apprentice.  You can't bring yourself to search it without a good reason.
        }
예제 #2
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            if (dropped is BlankScroll && UzeraanTurmoilQuest.HasLostScrollOfPower(from))
            {
                FocusTo(from);

                Item scroll = new SchmendrickScrollOfPower();

                if (!from.PlaceInBackpack(scroll))
                {
                    scroll.Delete();
                    from.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();
                    from.SendLocalizedMessage(1049346); // Schmendrick scribbles on the scroll for a few moments and hands you the finished product.
                    return(dropped.Deleted);
                }
            }

            return(base.OnDragDrop(from, dropped));
        }