Exemple #1
0
        public override void OnDoubleClick(Mobile m)
        {
            if (m is PlayerMobile)
            {
                var pm = m as PlayerMobile;

                if (QuestHelper.HasQuest <AForcedSacraficeQuest2>(pm))
                {
                    if (!TownCryerSystem.UnderMysteriousPotionEffects(pm))
                    {
                        pm.SendGump(new ConfirmCallbackGump(pm, 1158286, 1158287, null, null, confirm: (mob, o) =>
                        {
                            TownCryerSystem.AddMysteriousPotionEffects(mob);

                            mob.FixedParticles(0x376A, 9, 32, 5007, EffectLayer.Waist);
                            mob.PlaySound(0x1E3);

                            BasePotion.PlayDrinkEffect(mob);

                            Delete();
                        }));
                    }
                    else
                    {
                        pm.SendLocalizedMessage(1158289); // You have already used this.
                    }
                }
                else
                {
                    pm.SendLocalizedMessage(1158285); // You must be on the "A Forced Sacrifice" quest to use this item.
                }
            }
        }
Exemple #2
0
        protected override void BeginLockpick(Mobile from, ILockpickable item)
        {
            if (from is PlayerMobile &&
                item.Locked &&
                QuestHelper.HasQuest <TheTreasureChaseQuest>((PlayerMobile)from) &&
                item is TreasureMapChest &&
                ((TreasureMapChest)item).TreasureMap is BuriedRichesTreasureMap)
            {
                var chest = (TreasureMapChest)item;

                from.PlaySound(0x241);

                Timer.DelayCall(TimeSpan.FromMilliseconds(200), () =>
                {
                    if (item.Locked && from.InRange(chest.GetWorldLocation(), 1))
                    {
                        from.CheckTargetSkill(SkillName.Lockpicking, item, 0, 100);

                        // Success! Pick the lock!
                        from.PrivateOverheadMessage(MessageType.Regular, 1154, 1158252, from.NetState); // *Your recent study of Treasure Hunting helps you pick the lock...*
                        chest.SendLocalizedMessageTo(from, 502076);                                     // The lock quickly yields to your skill.
                        from.PlaySound(0x4A);
                        item.LockPick(from);
                    }
                });
            }
            else
            {
                base.BeginLockpick(from, item);
            }
        }
Exemple #3
0
 public override void OnBeginDig(Mobile from)
 {
     if (Completed)
     {
         from.SendLocalizedMessage(503028); // The treasure for this map has already been found.
     }
     else if (Decoder != from)
     {
         from.SendLocalizedMessage(503031); // You did not decode this map and have no clue where to look for the treasure.
     }
     else if (!from.CanBeginAction(typeof(TreasureMap)))
     {
         from.SendLocalizedMessage(503020); // You are already digging treasure.
     }
     else if (from.Map != Facet)
     {
         from.SendLocalizedMessage(1010479); // You seem to be in the right place, but may be on the wrong facet!
     }
     else if (from is PlayerMobile && !QuestHelper.HasQuest <TheTreasureChaseQuest>((PlayerMobile)from))
     {
         from.SendLocalizedMessage(1158257); // You must be on the "The Treasure Chase" quest offered via the Town Cryer to dig up this treasure.
     }
     else
     {
         from.SendLocalizedMessage(503033); // Where do you wish to dig?
         from.Target = new TreasureMap.DigTarget(this);
     }
 }
Exemple #4
0
        public override bool CanOffer()
        {
            if (Owner.Skills.Musicianship.Value < 90.0 || Owner.Skills[Mastery.Skill].Value < 90.0)
            {
                Owner.SendLocalizedMessage(1115703);                   // Your skills in this focus area are less than the required master level. (90 minimum)
                return(false);
            }

            if (QuestHelper.HasQuest <BaseBardMasteryQuest>(Owner))
            {
                Owner.SendLocalizedMessage(1115702);                   // You must quit your other mastery quests before engaging on a new one.
                return(false);
            }

            return(true);
        }
Exemple #5
0
        public override void Decode(Mobile from)
        {
            if (QuestHelper.HasQuest <TheTreasureChaseQuest>((PlayerMobile)from))
            {
                from.CheckSkill(SkillName.Cartography, 0, 100);
                Decoder = from;

                DisplayTo(from);

                from.SendLocalizedMessage(1158243); // Your time studying Treasure Hunting: A Practical Approach helps you decode the map...
            }
            else
            {
                from.PrivateOverheadMessage(MessageType.Regular, 0x21, 1157850, from.NetState); // *You don't make anything of it.*
                //m.PrivateOverheadMessage(MessageType.Regular, 1154, 1158244, m.NetState); // *You decide to visit the Provisioner at the Adventurer's Supplies in Vesper before trying to decode the map...*
            }
        }