Exemple #1
0
            public NoteGump(ThiefNote note) : base(25, 25)
            {
                m_Note = note;

                this.Closable   = true;
                this.Disposable = true;
                this.Dragable   = true;
                this.Resizable  = false;

                AddPage(0);
                AddImage(0, 0, 9390);
                AddImage(114, 0, 9391);
                AddImage(0, 140, 9396);
                AddImage(285, 140, 9398);
                AddImage(171, 0, 9391);
                AddImage(228, 0, 9391);
                AddImage(285, 0, 9392);
                AddImage(114, 140, 9397);
                AddImage(171, 140, 9397);
                AddImage(228, 140, 9397);

                string describe = "<br><br>Keep this note with you at all times if you are going to pursue this job. If you are to steal something from a dungeon, you need to find the pedestal with the bag or box that a thief would normally attempt to steal. Use the bag or box on the pedestal to see if you successfully steal the item. If a town merchant is someone you need to pilfer from, find their coffer use your stealing skill on it to see if you steal the item from that. Be warned, you may be flagged a criminal and the guards will surely dispatch of you if caught. If you manage to escape with you life, and the item sought, then bring this note to the location specified in these instructions. If you lose this secret note, then find the thief guildmaster and they will give you a copy of the message.";

                AddHtml(28, 40, 342, 201, @"<BODY><BASEFONT Color=#111111><BIG>" + m_Note.NoteStory + describe + "</BIG></BASEFONT></BODY>", (bool)false, (bool)true);
            }
Exemple #2
0
        public override void OnDoubleClick(Mobile from)
        {
            if (from.InRange(this.GetWorldLocation(), 2))
            {
                bool LookInside = true;

                if (from.Backpack.FindItemByType(typeof(ThiefNote)) != null)
                {
                    Item      mail     = from.Backpack.FindItemByType(typeof(ThiefNote));
                    ThiefNote envelope = (ThiefNote)mail;

                    if (envelope.NoteOwner == from && envelope.NoteItemGot > 0 && HayTown == envelope.NoteDeliverTo && envelope.NoteDeliverType == 2)
                    {
                        LoggingFunctions.LogGeneric(from, "has stolen " + envelope.NoteItem + ".");
                        from.AddToBackpack(new Gold(envelope.NoteReward));
                        Titles.AwardFame(from, ((int)(envelope.NoteReward / 100)), true);
                        Titles.AwardKarma(from, -((int)(envelope.NoteReward / 100)), true);
                        Server.Items.ThiefNote.SetupNote(envelope, from);
                        from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You collected your reward.");
                        from.SendMessage("You found another secret note for you.");
                        from.SendSound(0x3D);
                        from.CloseGump(typeof(Server.Items.ThiefNote.NoteGump));
                        Server.Items.ThiefNote.ThiefTimeAllowed(from);
                        LookInside = false;
                    }
                }

                if (LookInside)
                {
                    string message = "There is nothing of interest in here.";

                    if (Utility.RandomMinMax(1, 20) == 1 && Stackable == false)
                    {
                        Server.Misc.ContainerFunctions.GiveRandomItem(from);
                        message = "You pull something out of the hay and it falls by your feet.";
                    }
                    Stackable = true;

                    from.SendSound(0x057);
                    from.SendMessage(message);
                }
            }
            else
            {
                from.SendLocalizedMessage(502138);                   // That is too far away for you to use
            }
        }
Exemple #3
0
        public static void SetupNote(ThiefNote note, Mobile m)
        {
            note.Hue    = Utility.RandomList(0x95E, 0x95D, 0x95B, 0x952, 0x957, 0x94D, 0x944, 0x945, 0x940, 0x93D, 0xB79);
            note.ItemID = Utility.RandomList(0x2DD, 0x201A);

            note.NoteOwner = m;

            note.NoteItemCategory = "";
            note.NoteItem         = QuestCharacters.QuestItems(true);
            note.NoteItemGot      = 0;
            note.NoteItemPerson   = ContainerFunctions.GetOwner("Pilfer");
            note.NoteDeliverType  = Utility.RandomMinMax(1, 2);

            if (Utility.RandomBool())               // STEAL FROM TOWN
            {
                int    rewardMod      = 1;
                string searchLocation = "the Land of Sosaria";
                switch (Utility.RandomMinMax(0, 13))
                {
                case 0:         searchLocation = "the Land of Sosaria";                 break;

                case 1:         searchLocation = "the Land of Sosaria";                 break;

                case 2:         searchLocation = "the Land of Sosaria";                 break;

                case 3:         searchLocation = "the Land of Lodoria";                 rewardMod = 2;  if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 4:         searchLocation = "the Land of Lodoria";                 rewardMod = 2;  if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 5:         searchLocation = "the Land of Lodoria";                 rewardMod = 2;  if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 6:         searchLocation = "the Serpent Island";                  rewardMod = 3;  if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 7:         searchLocation = "the Serpent Island";                  rewardMod = 3;  if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 8:         searchLocation = "the Serpent Island";                  rewardMod = 3;  if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 9:         searchLocation = "the Isles of Dread";                  rewardMod = 4;  if (!(CharacterDatabase.GetDiscovered(m, "the Isles of Dread")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 10:        searchLocation = "the Savaged Empire";                  rewardMod = 5;  if (!(CharacterDatabase.GetDiscovered(m, "the Savaged Empire")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 11:        searchLocation = "the Savaged Empire";                  rewardMod = 5;  if (!(CharacterDatabase.GetDiscovered(m, "the Savaged Empire")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 12:        searchLocation = "the Island of Umber Veil";    rewardMod = 2;  if (!(CharacterDatabase.GetDiscovered(m, "the Island of Umber Veil")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 13:        searchLocation = "the Bottle World of Kuldar";  rewardMod = 4;  if (!(CharacterDatabase.GetDiscovered(m, "the Bottle World of Kuldar")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;
                }

                if (!(CharacterDatabase.GetDiscovered(m, "the Land of Sosaria")) && searchLocation == "the Land of Sosaria")
                {
                    if (m.Skills.Cap == 11000)
                    {
                        searchLocation = "the Savaged Empire";
                    }
                    else
                    {
                        searchLocation = "the Land of Lodoria";
                    }
                }

                if (searchLocation == "the Land of Sosaria")
                {
                    rewardMod = 1;
                }

                int       aCount  = 0;
                ArrayList targets = new ArrayList();
                foreach (Item target in World.Items.Values)
                {
                    if (target is Coffer && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == searchLocation)
                    {
                        targets.Add(target); aCount++;
                    }
                }

                aCount = Utility.RandomMinMax(1, aCount);

                int xCount = 0;
                for (int i = 0; i < targets.Count; ++i)
                {
                    xCount++;

                    if (xCount == aCount)
                    {
                        Item   finding = ( Item )targets[i];
                        Coffer coffer  = (Coffer)finding;
                        note.NoteItemArea     = coffer.CofferTown;
                        note.NoteItemCategory = coffer.CofferType;
                        note.NoteReward       = (rewardMod * 500) + (Utility.RandomMinMax(0, 10) * 50);
                        note.NoteReward       = (int)((Server.Misc.MyServerSettings.QuestRewardModifier() * 0.01) * note.NoteReward);
                    }
                }
            }
            else             // STEAL FROM DUNGEON
            {
                string searchLocation = "the Land of Sosaria";
                switch (Utility.RandomMinMax(0, 15))
                {
                case 0:         searchLocation = "the Land of Sosaria";                 break;

                case 1:         searchLocation = "the Land of Sosaria";                 break;

                case 2:         searchLocation = "the Land of Sosaria";                 break;

                case 3:         searchLocation = "the Land of Lodoria";                 if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 4:         searchLocation = "the Land of Lodoria";                 if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 5:         searchLocation = "the Land of Lodoria";                 if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 6:         searchLocation = "the Serpent Island";                  if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 7:         searchLocation = "the Serpent Island";                  if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 8:         searchLocation = "the Serpent Island";                  if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 9:         searchLocation = "the Isles of Dread";                  if (!(CharacterDatabase.GetDiscovered(m, "the Isles of Dread")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 10:        searchLocation = "the Savaged Empire";                  if (!(CharacterDatabase.GetDiscovered(m, "the Savaged Empire")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 11:        searchLocation = "the Savaged Empire";                  if (!(CharacterDatabase.GetDiscovered(m, "the Savaged Empire")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 12:        searchLocation = "the Island of Umber Veil";    if (!(CharacterDatabase.GetDiscovered(m, "the Island of Umber Veil")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 13:        searchLocation = "the Bottle World of Kuldar";  if (!(CharacterDatabase.GetDiscovered(m, "the Bottle World of Kuldar")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;

                case 14:        searchLocation = "the Underworld";                              if (!(CharacterDatabase.GetDiscovered(m, "the Underworld")))
                    {
                        searchLocation = "the Underworld";
                    }
                    break;

                case 15:        searchLocation = "the Land of Ambrosia";                if (!(CharacterDatabase.GetDiscovered(m, "the Land of Ambrosia")))
                    {
                        searchLocation = "the Land of Sosaria";
                    }
                    break;
                }

                if (!(CharacterDatabase.GetDiscovered(m, "the Land of Sosaria")) && searchLocation == "the Land of Sosaria")
                {
                    if (m.Skills.Cap == 11000)
                    {
                        searchLocation = "the Savaged Empire";
                    }
                    else
                    {
                        searchLocation = "the Land of Lodoria";
                    }
                }

                int       aCount  = 0;
                ArrayList targets = new ArrayList();
                foreach (Item target in World.Items.Values)
                {
                    if (target is StealBase && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == searchLocation)
                    {
                        targets.Add(target); aCount++;
                    }
                }

                aCount = Utility.RandomMinMax(1, aCount);

                int xCount = 0;
                for (int i = 0; i < targets.Count; ++i)
                {
                    xCount++;

                    if (xCount == aCount)
                    {
                        Item finding = ( Item )targets[i];
                        note.NoteItemArea = Server.Misc.Worlds.GetRegionName(finding.Map, finding.Location);
                        int difficult = Server.Misc.Worlds.GetDifficultyLevel(finding.Location, finding.Map) + 2;
                        if (difficult < 2)
                        {
                            difficult = 2;
                        }
                        note.NoteReward = (difficult * 500) + (Utility.RandomMinMax(0, 10) * 50);
                    }
                }
            }

            string dropLocation = "the Land of Sosaria";

            switch (Utility.RandomMinMax(0, 13))
            {
            case 0:         dropLocation = "the Land of Sosaria";                   break;

            case 1:         dropLocation = "the Land of Sosaria";                   break;

            case 2:         dropLocation = "the Land of Sosaria";                   break;

            case 3:         dropLocation = "the Land of Lodoria";                   if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 4:         dropLocation = "the Land of Lodoria";                   if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 5:         dropLocation = "the Land of Lodoria";                   if (!(CharacterDatabase.GetDiscovered(m, "the Land of Lodoria")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 6:         dropLocation = "the Serpent Island";                    if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 7:         dropLocation = "the Serpent Island";                    if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 8:         dropLocation = "the Serpent Island";                    if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 9:         dropLocation = "the Isles of Dread";                    if (!(CharacterDatabase.GetDiscovered(m, "the Isles of Dread")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 10:        dropLocation = "the Savaged Empire";                    if (!(CharacterDatabase.GetDiscovered(m, "the Savaged Empire")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 11:        dropLocation = "the Savaged Empire";                    if (!(CharacterDatabase.GetDiscovered(m, "the Savaged Empire")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 12:        dropLocation = "the Island of Umber Veil";              if (!(CharacterDatabase.GetDiscovered(m, "the Island of Umber Veil")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;

            case 13:        dropLocation = "the Bottle World of Kuldar";    if (!(CharacterDatabase.GetDiscovered(m, "the Bottle World of Kuldar")))
                {
                    dropLocation = "the Land of Sosaria";
                }
                break;
            }

            if (!(CharacterDatabase.GetDiscovered(m, "the Land of Sosaria")) && dropLocation == "the Land of Sosaria")
            {
                if (m.Skills.Cap == 11000)
                {
                    dropLocation = "the Savaged Empire";
                }
                else
                {
                    dropLocation = "the Land of Lodoria";
                }
            }

            int       dCount = 0;
            ArrayList drops  = new ArrayList();

            foreach (Item target in World.Items.Values)
            {
                if (((note.NoteDeliverType == 1 && target is HollowStump) || (note.NoteDeliverType == 2 && target is HayCrate)) && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == dropLocation)
                {
                    drops.Add(target); dCount++;
                }
            }

            dCount = Utility.RandomMinMax(1, dCount);

            int sCount = 0;

            for (int i = 0; i < drops.Count; ++i)
            {
                sCount++;

                if (sCount == dCount)
                {
                    Item finding = ( Item )drops[i];

                    if (finding is HayCrate)
                    {
                        HayCrate hay = (HayCrate)finding;
                        note.NoteDeliverTo = hay.HayTown;
                    }
                    else if (finding is HollowStump)
                    {
                        HollowStump stump = (HollowStump)finding;
                        note.NoteDeliverTo = stump.StumpTown;
                    }
                }
            }

            string action = "recover";

            switch (Utility.RandomMinMax(0, 4))
            {
            case 0: action = "recover"; break;

            case 1: action = "steal"; break;

            case 2: action = "acquire"; break;

            case 3: action = "find"; break;

            case 4: action = "get"; break;
            }

            string drop = "drop";

            switch (Utility.RandomMinMax(0, 4))
            {
            case 0: drop = "leave"; break;

            case 1: drop = "place"; break;

            case 2: drop = "set"; break;

            case 3: drop = "put"; break;

            case 4: drop = "drop"; break;
            }

            string container = "crate of hay in";

            if (note.NoteDeliverType == 1)
            {
                container = "hollow stump near";
            }

            string location = note.NoteItemArea;

            if (note.NoteItemCategory != "" && note.NoteItemCategory != null)
            {
                location = "the " + note.NoteItemCategory + " in " + note.NoteItemArea;
            }

            note.NoteStory = note.NoteItemPerson + " wants you to " + action + " " + note.NoteItem + " from " + location + ".";
            note.NoteStory = note.NoteStory + " Once you have it, " + drop + " it in the " + container + " " + note.NoteDeliverTo + ".";
            note.NoteStory = note.NoteStory + " There you will also find your payment of " + note.NoteReward + " gold and instructions for your next job.";

            note.InvalidateProperties();
        }
Exemple #4
0
        public override void OnComponentUsed(AddonComponent ac, Mobile from)
        {
            if (from.Blessed)
            {
                from.SendMessage("You cannot open that while in this state.");
            }
            else if (!from.InRange(GetWorldLocation(), 2))
            {
                from.SendMessage("You will have to get closer to try and steal the item.");
            }
            else if (!from.CheckSkill(SkillName.Snooping, 0, 125))
            {
                if (from.CheckSkill(SkillName.RemoveTrap, 0, 100))
                {
                    from.SendMessage("You pull back just in time to avoid a trap!");
                }
                else
                {
                    int nReaction = Utility.RandomMinMax(1, 3);

                    if (nReaction == 1)
                    {
                        from.FixedParticles(0x374A, 10, 15, 5021, EffectLayer.Waist);
                        from.PlaySound(0x205);
                        int nPoison = Utility.RandomMinMax(0, 10);
                        if (nPoison > 9)
                        {
                            from.ApplyPoison(from, Poison.Deadly);
                        }
                        else if (nPoison > 7)
                        {
                            from.ApplyPoison(from, Poison.Greater);
                        }
                        else if (nPoison > 4)
                        {
                            from.ApplyPoison(from, Poison.Regular);
                        }
                        else
                        {
                            from.ApplyPoison(from, Poison.Lesser);
                        }
                        from.SendMessage("You accidentally trigger a poison trap!");
                        LoggingFunctions.LogTraps(from, "a pedestal poison trap");
                    }
                    else if (nReaction == 2)
                    {
                        from.FixedParticles(0x3709, 10, 30, 5052, EffectLayer.LeftFoot);
                        from.PlaySound(0x208);
                        Spells.SpellHelper.Damage(TimeSpan.FromSeconds(0.5), from, from, Utility.RandomMinMax(10, 80), 0, 100, 0, 0, 0);
                        from.SendMessage("You accidentally trigger a flame trap!");
                        LoggingFunctions.LogTraps(from, "a pedestal fire trap");
                    }
                    else if (nReaction == 3)
                    {
                        from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);
                        from.PlaySound(0x307);
                        Spells.SpellHelper.Damage(TimeSpan.FromSeconds(0.5), from, from, Utility.RandomMinMax(10, 80), 0, 100, 0, 0, 0);
                        from.SendMessage("You accidentally trigger an explosion trap!");
                        LoggingFunctions.LogTraps(from, "a pedestal explosion trap");
                    }
                }
            }
            else if (from.CheckSkill(SkillName.Stealing, 0, 125))
            {
                bool TakeBox = true;

                if (from.Backpack.FindItemByType(typeof(ThiefNote)) != null)
                {
                    Item      mail     = from.Backpack.FindItemByType(typeof(ThiefNote));
                    ThiefNote envelope = (ThiefNote)mail;

                    if (envelope.NoteOwner == from)
                    {
                        if (envelope.NoteItemArea == Server.Misc.Worlds.GetRegionName(from.Map, from.Location) && envelope.NoteItemGot == 0)
                        {
                            envelope.NoteItemGot = 1;
                            from.LocalOverheadMessage(MessageType.Emote, 1150, true, "You found " + envelope.NoteItem + ".");
                            from.SendSound(0x3D);
                            from.CloseGump(typeof(Server.Items.ThiefNote.NoteGump));
                            envelope.InvalidateProperties();
                            TakeBox = false;
                        }
                    }
                }

                if (TakeBox)
                {
                    if (BoxType == 1)
                    {
                        Item          Bags = new StealMetalBox();
                        StealMetalBox bag  = (StealMetalBox)Bags;
                        bag.BoxColor    = BoxColor;
                        bag.Hue         = BoxColor;
                        bag.Name        = BoxOrigin;
                        bag.BoxName     = BoxOrigin;
                        bag.BoxMarkings = BoxCarving;
                        FillMeUp(bag, from);
                        from.AddToBackpack(bag);
                    }
                    else if (BoxType == 2)
                    {
                        Item     Bags = new StealBox();
                        StealBox bag  = (StealBox)Bags;
                        bag.BoxColor    = BoxColor;
                        bag.Hue         = BoxColor;
                        bag.Name        = BoxOrigin;
                        bag.BoxName     = BoxOrigin;
                        bag.BoxMarkings = BoxCarving;
                        FillMeUp(bag, from);
                        from.AddToBackpack(bag);
                    }
                    else
                    {
                        Item     Bags = new StealBag();
                        StealBag bag  = (StealBag)Bags;
                        bag.BagColor    = BoxColor;
                        bag.Hue         = BoxColor;
                        bag.Name        = BoxOrigin;
                        bag.BagName     = BoxOrigin;
                        bag.BagMarkings = BoxCarving;
                        FillMeUp(bag, from);
                        from.AddToBackpack(bag);
                    }
                    Item Pedul = new StealBaseEmpty();
                    Pedul.ItemID = PedType;
                    Pedul.MoveToWorld(new Point3D(this.X, this.Y, this.Z), this.Map);
                    from.SendMessage("Your nimble fingers manage to steal the item.");
                    LoggingFunctions.LogGeneric(from, "has stolen an item from a pedestal.");

                    Titles.AwardFame(from, 2000, true);
                    Titles.AwardKarma(from, -2000, true);

                    this.Delete();
                }
            }
            else
            {
                from.SendMessage("You fail to steal the item.");
            }
        }