Example #1
0
        public static void FindTarget(Mobile m, int fee)
        {
            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;
            }

            int       aCount  = 0;
            Region    reg     = null;
            ArrayList targets = new ArrayList();

            foreach (Mobile target in World.Mobiles.Values)
            {
                if (target is BaseCreature)
                {
                    reg = Region.Find(target.Location, target.Map);
                    string tWorld = Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y);

                    if (target.EmoteHue != 123 && target.Karma < 0 && target.Fame < fee && (DifficultyLevel.GetDifficultyLevel(target.Location, target.Map) <= GetPlayerInfo.GetPlayerDifficulty(m)) && reg.IsPartOf(typeof(DungeonRegion)))
                    {
                        if (searchLocation == "the Land of Sosaria" && tWorld == searchLocation)
                        {
                            targets.Add(target); aCount++;
                        }
                        else if (searchLocation == "the Land of Lodoria" && tWorld == searchLocation)
                        {
                            targets.Add(target); aCount++;
                        }
                        else if (searchLocation == "the Serpent Island" && tWorld == searchLocation)
                        {
                            targets.Add(target); aCount++;
                        }
                        else if (searchLocation == "the Isles of Dread" && tWorld == searchLocation)
                        {
                            targets.Add(target); aCount++;
                        }
                        else if (searchLocation == "the Savaged Empire" && tWorld == searchLocation)
                        {
                            targets.Add(target); aCount++;
                        }
                        else if (searchLocation == "the Island of Umber Veil" && tWorld == searchLocation)
                        {
                            targets.Add(target); aCount++;
                        }
                        else if (searchLocation == "the Bottle World of Kuldar" && tWorld == searchLocation)
                        {
                            targets.Add(target); aCount++;
                        }
                        else if (searchLocation == "the Underworld" && tWorld == searchLocation)
                        {
                            targets.Add(target); aCount++;
                        }
                    }

                    if (aCount < 1)               // SAFETY CATCH IF IT FINDS NO CREATURES AT ALL...IT WILL FIND AT LEAST ONE IN SOSARIA //
                    {
                        if (target.Karma < 0 && target.Fame < fee && reg.IsPartOf(typeof(DungeonRegion)) && tWorld == "the Land of Sosaria")
                        {
                            targets.Add(target); aCount++;
                        }
                    }
                }
            }

            aCount = Utility.RandomMinMax(1, aCount);

            int xCount = 0;

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

                if (xCount == aCount)
                {
                    if (Utility.RandomMinMax(1, 2) == 1)                         // KILL SOMETHING
                    {
                        Mobile theone = ( Mobile )targets[i];
                        string kWorld = Worlds.GetMyWorld(theone.Map, theone.Location, theone.X, theone.Y);

                        string kexplorer = theone.GetType().ToString();
                        int    nFee      = theone.Fame / 5;
                        string kDollar   = ((int)((Server.Misc.DifficultyLevel.QuestRewardModifier() * 0.01) * nFee)).ToString();

                        string killName  = theone.Name;
                        string killTitle = theone.Title;
                        if (theone is Wyrms)
                        {
                            killName = "a wyrm"; killTitle = "";
                        }
                        if (theone is Dragons)
                        {
                            killName = "a dragon"; killTitle = "";
                        }
                        if (theone is BombWorshipper)
                        {
                            killName = "a worshipper of the bomb"; killTitle = "";
                        }
                        if (theone is Psionicist)
                        {
                            killName = "a psychic of the bomb"; killTitle = "";
                        }

                        string myexplorer = kexplorer + "#" + killTitle + "#" + killName + "#" + Server.Misc.Worlds.GetRegionName(theone.Map, theone.Location) + "#0#" + kDollar + "#" + kWorld + "#Monster";
                        CharacterDatabase.SetQuestInfo(m, "StandardQuest", myexplorer);

                        string theStory = myexplorer + "#" + StandardQuestFunctions.QuestSentence(m);                           // ADD THE STORY PART

                        CharacterDatabase.SetQuestInfo(m, "StandardQuest", theStory);
                    }
                    else                     // FIND SOMETHING
                    {
                        Mobile theone = ( Mobile )targets[i];
                        string kWorld = Worlds.GetMyWorld(theone.Map, theone.Location, theone.X, theone.Y);

                        string kexplorer = theone.GetType().ToString();
                        int    nFee      = theone.Fame / 3;
                        nFee = nFee / 100;
                        nFee = nFee * 100;
                        string kDollar = ((int)((Server.Misc.DifficultyLevel.QuestRewardModifier() * 0.01) * nFee)).ToString();

                        string ItemToFind = QuestCharacters.QuestItems();

                        string myexplorer = "##" + ItemToFind + "#" + Server.Misc.Worlds.GetRegionName(theone.Map, theone.Location) + "#0#" + kDollar + "#" + kWorld + "#Item";
                        CharacterDatabase.SetQuestInfo(m, "StandardQuest", myexplorer);

                        string theStory = myexplorer + "#" + StandardQuestFunctions.QuestSentence(m);                           // ADD THE STORY PART

                        CharacterDatabase.SetQuestInfo(m, "StandardQuest", theStory);
                    }
                }
            }
        }
Example #2
0
        public override void OnDoubleClick(Mobile from)
        {
            string GoToWorld = Worlds.GetMyWorld(m_MapDest, m_PointDest, m_PointDest.X, m_PointDest.Y);

            bool CanUseMap = false;

            if (GoToWorld == "the Land of Sosaria")
            {
                CanUseMap = true;
            }
            else if (GoToWorld == "the Island of Umber Veil" && CharacterDatabase.GetDiscovered(from, "the Island of Umber Veil"))
            {
                CanUseMap = true;
            }
            else if (GoToWorld == "the Land of Ambrosia" && CharacterDatabase.GetDiscovered(from, "the Land of Ambrosia"))
            {
                CanUseMap = true;
            }
            else if (GoToWorld == "the Land of Lodoria" && CharacterDatabase.GetDiscovered(from, "the Land of Lodoria"))
            {
                CanUseMap = true;
            }
            else if (GoToWorld == "the Serpent Island" && CharacterDatabase.GetDiscovered(from, "the Serpent Island"))
            {
                CanUseMap = true;
            }
            else if (GoToWorld == "the Isles of Dread" && CharacterDatabase.GetDiscovered(from, "the Isles of Dread"))
            {
                CanUseMap = true;
            }
            else if (GoToWorld == "the Savaged Empire" && CharacterDatabase.GetDiscovered(from, "the Savaged Empire"))
            {
                CanUseMap = true;
            }
            else if (GoToWorld == "the Bottle World of Kuldar" && CharacterDatabase.GetDiscovered(from, "the Bottle World of Kuldar"))
            {
                CanUseMap = true;
            }

            if (from.Skills[SkillName.Tracking].Value < 80 && from.Skills[SkillName.Cartography].Value < 80)
            {
                from.SendMessage("You must be a adept ranger or cartographer to use this map.");
                return;
            }
            else if (from.Region.IsPartOf(typeof(BardTownRegion)) ||
                     from.Region.IsPartOf(typeof(BardDungeonRegion)))
            {
                from.SendMessage("This won't lead you out of this place.");
                return;
            }
            else if (!Server.Misc.Worlds.IsMainRegion(Server.Misc.Worlds.GetRegionName(from.Map, from.Location)) &&
                     !from.Region.IsPartOf(typeof(OutDoorRegion)) &&
                     !from.Region.IsPartOf(typeof(OutDoorBadRegion)) &&
                     !from.Region.IsPartOf(typeof(VillageRegion)) &&
                     !from.Region.IsPartOf(typeof(PublicRegion)))
            {
                from.SendMessage("You can only use this map outdoors.");
                return;
            }
            else if (CanUseMap == false)
            {
                from.SendMessage("Not knowing how to get to this world, you throw the map away.");
                this.Delete();
                return;
            }
            else if (IsChildOf(from.Backpack) && Charges > 0)
            {
                ConsumeCharge(from);
                MapTeleport(from, m_PointDest, m_MapDest);
                return;
            }
            else if (from.InRange(this.GetWorldLocation(), 3) && Charges > 0)
            {
                ConsumeCharge(from);
                InternalItem builtMap = new InternalItem();
                builtMap.Name   = this.Name;
                builtMap.ItemID = this.ItemID;
                MapRangerDoor rangerDoor = (MapRangerDoor)builtMap;
                rangerDoor.m_PointDest = m_PointDest;
                rangerDoor.m_MapDest   = m_MapDest;
                builtMap.MoveToWorld(this.Location, this.Map);
                from.AddToBackpack(this);
                MapTeleport(from, m_PointDest, m_MapDest);
            }
            else if (!from.InRange(this.GetWorldLocation(), 3) && Charges > 0)
            {
                from.SendLocalizedMessage(502138);                   // That is too far away for you to use
                return;
            }
            else
            {
                from.SendMessage("This map is too worn from over use, and is no longer of any good.");
                this.Delete();
                return;
            }
        }
        public static void FindInnocentTarget(Mobile m)
        {
            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";                 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;
            }

            int       aCount  = 0;
            Region    reg     = null;
            ArrayList targets = new ArrayList();

            foreach (Mobile target in World.Mobiles.Values)
            {
                if (target is BaseVendor)
                {
                    reg = Region.Find(target.Location, target.Map);
                    string tWorld = Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y);

                    if (target.Blessed == false && reg.IsPartOf(typeof(VillageRegion)))
                    {
                        if (searchLocation == "the Land of Sosaria" && tWorld == searchLocation)
                        {
                            targets.Add(target); aCount++;
                        }
                        else if (searchLocation == "the Land of Lodoria" && tWorld == searchLocation)
                        {
                            targets.Add(target); aCount++;
                        }
                        else if (searchLocation == "the Serpent Island" && tWorld == searchLocation)
                        {
                            targets.Add(target); aCount++;
                        }
                        else if (searchLocation == "the Isles of Dread" && tWorld == searchLocation)
                        {
                            targets.Add(target); aCount++;
                        }
                        else if (searchLocation == "the Savaged Empire" && tWorld == searchLocation)
                        {
                            targets.Add(target); aCount++;
                        }
                        else if (searchLocation == "the Island of Umber Veil" && tWorld == searchLocation)
                        {
                            targets.Add(target); aCount++;
                        }
                        else if (searchLocation == "the Bottle World of Kuldar" && tWorld == 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)
                {
                    Mobile theVictim = ( Mobile )targets[i];
                    string kWorld    = Worlds.GetMyWorld(theVictim.Map, theVictim.Location, theVictim.X, theVictim.Y);

                    string kVictim = theVictim.GetType().ToString();
                    int    nFee    = 1000;
                    string kDollar = ((int)((Server.Misc.MyServerSettings.QuestRewardModifier() * 0.01) * nFee)).ToString();

                    string myexplorer = kVictim + "#" + theVictim.Title + "#" + theVictim.Name + "#" + Server.Misc.Worlds.GetRegionName(theVictim.Map, theVictim.Location) + "#0#" + kDollar + "#" + kWorld + "#Innocent";
                    CharacterDatabase.SetQuestInfo(m, "AssassinQuest", myexplorer);

                    string theStory = myexplorer + "#" + AssassinFunctions.QuestSentence(m);                       // ADD THE STORY PART

                    CharacterDatabase.SetQuestInfo(m, "AssassinQuest", theStory);
                }
            }
        }
Example #4
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();
        }
Example #5
0
        public static void FindTarget(Mobile m, int fee)
        {
            PlayerMobile PC = (PlayerMobile)m;

            int PirateHunt = 0;
            int WorldPick  = Utility.RandomMinMax(0, 14);

            if (Utility.RandomMinMax(1, 8) == 1 && 4000 < fee)
            {
                PirateHunt = 1; WorldPick = Utility.RandomMinMax(0, 6);
            }

            string searchLocation = "the Land of Sosaria";

            switch (WorldPick)
            {
            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 Isles of Dread";                  if (!(CharacterDatabase.GetDiscovered(m, "the Isles of Dread")))
                {
                    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 Serpent Island";                  if (!(CharacterDatabase.GetDiscovered(m, "the Serpent Island")))
                {
                    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;
            }

            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;
            Region    reg     = null;
            ArrayList targets = new ArrayList();

            foreach (Mobile target in World.Mobiles.Values)
            {
                if (target is BaseCreature)
                {
                    reg = Region.Find(target.Location, target.Map);

                    if (PirateHunt == 1)
                    {
                        if (searchLocation == "the Land of Sosaria")
                        {
                            if (target is PirateCaptain && reg.IsPartOf(typeof(PirateRegion)) && target.Map == Map.Sosaria && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == searchLocation)
                            {
                                targets.Add(target); aCount++;
                            }
                        }
                        else if (searchLocation == "the Land of Lodoria")
                        {
                            if ((target is AncientLich || target is ElfPirateCaptain) && reg.IsPartOf(typeof(PirateRegion)) && target.Map == Map.Lodor && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == searchLocation)
                            {
                                targets.Add(target); aCount++;
                            }
                        }
                        else if (searchLocation == "the Isles of Dread")
                        {
                            if (target is PirateCaptain && reg.IsPartOf(typeof(PirateRegion)) && target.Map == Map.IslesDread && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == searchLocation)
                            {
                                targets.Add(target); aCount++;
                            }
                        }
                    }
                    else
                    {
                        if (searchLocation == "the Land of Sosaria")
                        {
                            if (SkipMe(target) == true && target.Karma < 0 && target.Fame < fee && target.WhisperHue == 999 && Server.Misc.Worlds.IsMainRegion(Server.Misc.Worlds.GetRegionName(target.Map, target.Location)) && target.Map == Map.Sosaria && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == searchLocation)
                            {
                                targets.Add(target); aCount++;
                            }
                        }
                        else if (searchLocation == "the Land of Lodoria")
                        {
                            if (SkipMe(target) == true && target.Karma < 0 && target.Fame < fee && target.WhisperHue == 999 && Server.Misc.Worlds.IsMainRegion(Server.Misc.Worlds.GetRegionName(target.Map, target.Location)) && target.Map == Map.Lodor && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == searchLocation)
                            {
                                targets.Add(target); aCount++;
                            }
                        }
                        else if (searchLocation == "the Serpent Island")
                        {
                            if (SkipMe(target) == true && target.Karma < 0 && target.Fame < fee && target.WhisperHue == 999 && Server.Misc.Worlds.IsMainRegion(Server.Misc.Worlds.GetRegionName(target.Map, target.Location)) && target.Map == Map.SerpentIsland && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == searchLocation)
                            {
                                targets.Add(target); aCount++;
                            }
                        }
                        else if (searchLocation == "the Isles of Dread")
                        {
                            if (SkipMe(target) == true && target.Karma < 0 && target.Fame < fee && target.WhisperHue == 999 && Server.Misc.Worlds.IsMainRegion(Server.Misc.Worlds.GetRegionName(target.Map, target.Location)) && target.Map == Map.IslesDread && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == searchLocation)
                            {
                                targets.Add(target); aCount++;
                            }
                        }
                        else if (searchLocation == "the Savaged Empire")
                        {
                            if (SkipMe(target) == true && target.Karma < 0 && target.Fame < fee && target.WhisperHue == 999 && Server.Misc.Worlds.IsMainRegion(Server.Misc.Worlds.GetRegionName(target.Map, target.Location)) && target.Map == Map.SavagedEmpire && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == searchLocation)
                            {
                                targets.Add(target); aCount++;
                            }
                        }
                        else if (searchLocation == "the Island of Umber Veil")
                        {
                            if (SkipMe(target) == true && target.Karma < 0 && target.Fame < fee && target.WhisperHue == 999 && Server.Misc.Worlds.IsMainRegion(Server.Misc.Worlds.GetRegionName(target.Map, target.Location)) && target.Map == Map.Sosaria && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == searchLocation)
                            {
                                targets.Add(target); aCount++;
                            }
                        }
                        else if (searchLocation == "the Bottle World of Kuldar")
                        {
                            if (SkipMe(target) == true && target.Karma < 0 && target.Fame < fee && target.WhisperHue == 999 && Server.Misc.Worlds.IsMainRegion(Server.Misc.Worlds.GetRegionName(target.Map, target.Location)) && target.Map == Map.Sosaria && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == searchLocation)
                            {
                                targets.Add(target); aCount++;
                            }
                        }
                        else if (searchLocation == "the Underworld")
                        {
                            if (SkipMe(target) == true && target.Karma < 0 && target.Fame < fee && target.WhisperHue == 999 && Server.Misc.Worlds.IsMainRegion(Server.Misc.Worlds.GetRegionName(target.Map, target.Location)) && target.Map == Map.Underworld && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == searchLocation)
                            {
                                targets.Add(target); aCount++;
                            }
                        }
                    }

                    if (aCount < 1)               // SAFETY CATCH IF IT FINDS NOT CREATURES AT ALL...IT WILL FIND AT LEAST ONE IN SOSARIA //
                    {
                        if (target.Karma < 0 && target.Fame < fee && target.WhisperHue == 999 && Server.Misc.Worlds.IsMainRegion(Server.Misc.Worlds.GetRegionName(target.Map, target.Location)) && target.Map == Map.Sosaria && Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y) == "the Land of Sosaria")
                        {
                            targets.Add(target); aCount++;
                        }
                    }
                }
            }

            aCount = Utility.RandomMinMax(1, aCount);

            int xCount = 0;

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

                if (xCount == aCount)
                {
                    if (Utility.RandomMinMax(1, 3) != 1)                         // KILL SOMETHING
                    {
                        Mobile theone = ( Mobile )targets[i];
                        string kWorld = Worlds.GetMyWorld(theone.Map, theone.Location, theone.X, theone.Y);

                        int    nFee      = theone.Fame / 2;
                        string kexplorer = theone.GetType().ToString();
                        string kDollar   = nFee.ToString();

                        string killName  = theone.Name;
                        string killTitle = theone.Title;
                        if (theone is Wyrms)
                        {
                            killName = "a wyrm"; killTitle = "";
                        }
                        if (theone is RidingDragon || theone is Dragons)
                        {
                            killName = "a dragon"; killTitle = "";
                        }
                        if (theone is Daemon)
                        {
                            killName = "a daemon"; killTitle = "";
                        }
                        if (theone is Balron)
                        {
                            killName = "a balron"; killTitle = "";
                        }

                        string myexplorer = kexplorer + "#" + killTitle + "#" + killName + "#the high seas#0#" + kDollar + "#" + kWorld + "#Monster";
                        string useTitle   = killTitle;

                        if (theone is AncientLich || theone is PirateCaptain || theone is ElfPirateCaptain)
                        {
                            Region argh = Region.Find(theone.Location, theone.Map);
                            nFee = (theone.Fame / 10) * 3;
                            if (nFee > 2000)
                            {
                                nFee = 2000;
                            }
                            int nLow = (int)(nFee * 0.75);
                            nFee       = (int)(Utility.RandomMinMax(nLow, nFee) * 10);
                            kDollar    = ((int)((Server.Misc.MyServerSettings.QuestRewardModifier() * 0.01) * nFee)).ToString();
                            useTitle   = argh.Name;
                            useTitle   = useTitle.Replace("the Waters of", "of");
                            myexplorer = kexplorer + "#" + useTitle + "#the Pirate Captain#the high seas#0#" + kDollar + "#" + kWorld + "#Monster";
                        }

                        CharacterDatabase.SetQuestInfo(m, "FishingQuest", myexplorer);

                        string theStory = myexplorer + "#" + FishingQuestFunctions.QuestSentence(PC);                           // ADD THE STORY PART

                        CharacterDatabase.SetQuestInfo(m, "FishingQuest", theStory);
                    }
                    else                     // FIND SOMETHING
                    {
                        Mobile theone = ( Mobile )targets[i];
                        string kWorld = Worlds.GetMyWorld(theone.Map, theone.Location, theone.X, theone.Y);

                        string kexplorer = theone.GetType().ToString();

                        int qFame = m.Fame;
                        if (qFame < 1000)
                        {
                            qFame = 1000;
                        }
                        else if (qFame > 10000)
                        {
                            qFame = 10000;
                        }

                        int nFee = (int)(((Utility.RandomMinMax(500, qFame) / 10) * 10) / 2);

                        string kDollar = ((int)((Server.Misc.MyServerSettings.QuestRewardModifier() * 0.01) * nFee)).ToString();

                        string ItemToFind = QuestCharacters.QuestItems(true);

                        string myexplorer = "##" + ItemToFind + "#the high seas#0#" + kDollar + "#" + kWorld + "#Item";
                        CharacterDatabase.SetQuestInfo(m, "FishingQuest", myexplorer);

                        string theStory = myexplorer + "#" + FishingQuestFunctions.QuestSentence(PC);                           // ADD THE STORY PART

                        CharacterDatabase.SetQuestInfo(m, "FishingQuest", theStory);
                    }
                }
            }
        }
Example #6
0
        public static string GetGateName(int gate, Mobile m)
        {
            PlayerMobile pm = (PlayerMobile)m;

            string world = Worlds.GetMyWorld(m.Map, m.Location, m.X, m.Y);

            string sGate = "";

            if (world == "the Bottle World of Kuldar" && !(CharacterDatabase.GetDiscovered(m, "the Bottle World of Kuldar")))
            {
            }
            else if (gate == 1 && CharacterDatabase.GetDiscovered(m, "the Land of Sosaria"))
            {
                sGate = "Sosaria - Central";
            }
            else if (gate == 2 && CharacterDatabase.GetDiscovered(m, "the Land of Sosaria"))
            {
                sGate = "Sosaria - Clues";
            }
            else if (gate == 3 && CharacterDatabase.GetDiscovered(m, "the Land of Sosaria"))
            {
                sGate = "Sosaria - Devil Guard";
            }
            else if (gate == 4 && CharacterDatabase.GetDiscovered(m, "the Land of Sosaria"))
            {
                sGate = "Sosaria - East";
            }
            else if (gate == 5 && CharacterDatabase.GetDiscovered(m, "the Land of Sosaria"))
            {
                sGate = "Sosaria - Frozen Isles";
            }
            else if (gate == 6 && CharacterDatabase.GetDiscovered(m, "the Land of Sosaria"))
            {
                sGate = "Sosaria - Lost Glade";
            }
            else if (gate == 7 && CharacterDatabase.GetDiscovered(m, "the Land of Sosaria"))
            {
                sGate = "Sosaria - Montor";
            }
            else if (gate == 8 && CharacterDatabase.GetDiscovered(m, "the Land of Sosaria"))
            {
                sGate = "Sosaria - Moon";
            }
            else if (gate == 9 && CharacterDatabase.GetDiscovered(m, "the Land of Sosaria"))
            {
                sGate = "Sosaria - West";
            }
            else if (gate == 10 && CharacterDatabase.GetDiscovered(m, "the Land of Sosaria"))
            {
                sGate = "Sosaria - Yew";
            }

            else if (gate == 11 && CharacterDatabase.GetDiscovered(m, "the Land of Ambrosia"))
            {
                sGate = "Isle of Fire";
            }
            else if (gate == 12 && CharacterDatabase.GetDiscovered(m, "the Island of Umber Veil"))
            {
                sGate = "Lost Isle";
            }

            else if (gate == 13 && CharacterDatabase.GetDiscovered(m, "the Land of Ambrosia"))
            {
                sGate = "Land of Ambrosia";
            }
            else if (gate == 14 && CharacterDatabase.GetDiscovered(m, "the Island of Umber Veil"))
            {
                sGate = "Island of Umber Veil";
            }
            else if (gate == 15 && CharacterDatabase.GetDiscovered(m, "the Isles of Dread"))
            {
                sGate = "Isles of Dread";
            }

            else if (gate == 16 && CharacterDatabase.GetDiscovered(m, "the Land of Lodoria"))
            {
                sGate = "Lodoria - Greensky";
            }
            else if (gate == 17 && CharacterDatabase.GetDiscovered(m, "the Land of Lodoria"))
            {
                sGate = "Lodoria - Islegem";
            }
            else if (gate == 18 && CharacterDatabase.GetDiscovered(m, "the Land of Lodoria"))
            {
                sGate = "Lodoria - Portshine";
            }
            else if (gate == 19 && CharacterDatabase.GetDiscovered(m, "the Land of Lodoria"))
            {
                sGate = "Lodoria - South";
            }
            else if (gate == 20 && CharacterDatabase.GetDiscovered(m, "the Land of Lodoria"))
            {
                sGate = "Lodoria - Springvale";
            }
            else if (gate == 21 && CharacterDatabase.GetDiscovered(m, "the Land of Lodoria"))
            {
                sGate = "Lodoria - Whisper";
            }
            else if (gate == 22 && CharacterDatabase.GetDiscovered(m, "the Land of Lodoria"))
            {
                sGate = "Lodoria - Winterlands";
            }

            else if (gate == 23 && CharacterDatabase.GetDiscovered(m, "the Serpent Island"))
            {
                sGate = "Serpent Island - North";
            }
            else if (gate == 24 && CharacterDatabase.GetDiscovered(m, "the Serpent Island"))
            {
                sGate = "Serpent Island - South";
            }
            else if (gate == 25 && CharacterDatabase.GetDiscovered(m, "the Serpent Island"))
            {
                sGate = "Serpent Island - West";
            }

            else if (gate == 26 && CharacterDatabase.GetDiscovered(m, "the Savaged Empire"))
            {
                sGate = "Savaged Empire - North";
            }
            else if (gate == 27 && CharacterDatabase.GetDiscovered(m, "the Savaged Empire"))
            {
                sGate = "Savaged Empire - South";
            }
            else if (gate == 28 && CharacterDatabase.GetDiscovered(m, "the Savaged Empire"))
            {
                sGate = "Savaged Empire - West";
            }

            else if (gate == 29 && CharacterDatabase.GetDiscovered(m, "the Bottle World of Kuldar"))
            {
                sGate = "Bottle World of Kuldar";
            }
            else if (gate == 30 && CharacterDatabase.GetDiscovered(m, "the Bottle World of Kuldar"))
            {
                sGate = "Black Knight's Vault";
            }

            return(sGate);
        }
Example #7
0
        public static void PickSearchLocation(CourierMail scroll, string DungeonNow, Mobile from, string alignment, string homeworld)
        {
            string QuestItem = Server.Misc.QuestCharacters.QuestItems();

            scroll.SearchItem = QuestItem;

            string QuestStory = Server.Misc.QuestCharacters.EpicQuestStory(QuestItem, alignment);

            string thisWorld = "the Land of Sosaria";
            string thisPlace = "the Dungeon of Doom";
            Map    thisMap   = Map.Trammel;

            int       aCount  = 0;
            ArrayList targets = new ArrayList();

            foreach (Item target in World.Items.Values)
            {
                if (target is SearchBase && (DifficultyLevel.GetDifficultyLevel(target.Location, target.Map) <= GetPlayerInfo.GetPlayerDifficulty(from)))
                {
                    string tWorld = Worlds.GetMyWorld(target.Map, target.Location, target.X, target.Y);
                    if (tWorld == "the Land of Sosaria")
                    {
                        targets.Add(target); aCount++;
                    }
                    else if (CharacterDatabase.GetDiscovered(from, tWorld))
                    {
                        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];
                    thisWorld          = Worlds.GetMyWorld(finding.Map, finding.Location, finding.X, finding.Y);
                    thisMap            = finding.Map;
                    thisPlace          = Server.Misc.Worlds.GetRegionName(finding.Map, finding.Location);
                    scroll.MsgComplete = 0;
                    scroll.MsgReward   = Server.Misc.DifficultyLevel.GetDifficultyLevel(finding.Location, finding.Map) + 2;
                    if (scroll.MsgReward < 2)
                    {
                        scroll.MsgReward = 2;
                    }
                }
            }

            string Word1 = "Legends";

            switch (Utility.RandomMinMax(1, 4))
            {
            case 1: Word1 = "Rumors"; break;

            case 2: Word1 = "Myths"; break;

            case 3: Word1 = "Tales"; break;

            case 4: Word1 = "Stories"; break;
            }
            string Word2 = "lost";

            switch (Utility.RandomMinMax(1, 4))
            {
            case 1: Word2 = "kept"; break;

            case 2: Word2 = "seen"; break;

            case 3: Word2 = "taken"; break;

            case 4: Word2 = "hidden"; break;
            }
            string Word3 = "deep in";

            switch (Utility.RandomMinMax(1, 4))
            {
            case 1: Word3 = "within"; break;

            case 2: Word3 = "somewhere in"; break;

            case 3: Word3 = "somehow in"; break;

            case 4: Word3 = "far in"; break;
            }
            string Word4 = "centuries ago";

            switch (Utility.RandomMinMax(1, 4))
            {
            case 1: Word4 = "thousands of years ago"; break;

            case 2: Word4 = "decades ago"; break;

            case 3: Word4 = "millions of years ago"; break;

            case 4: Word4 = "many years ago"; break;
            }

            scroll.SearchDungeon = thisPlace;
            scroll.SearchWorld   = thisWorld;
            scroll.DungeonMap    = thisMap;

            string gold = (scroll.MsgReward * 1000).ToString();

            if (alignment == "neutral")
            {
                gold = (scroll.MsgReward * 1500).ToString();
            }
            string heard  = "I have heard that you could perhaps help me with something of the utmost importance.";
            string reward = "Do this for me, and I can reward you " + gold + " gold.";

            if (alignment != "evil")
            {
                switch (Utility.RandomMinMax(0, 5))
                {
                case 0: heard = "I have heard that you could perhaps help me with something of the utmost importance.";         break;

                case 1: heard = RandomThings.GetRandomName() + " has told me about you, and that maybe you can help.";          break;

                case 2: heard = "After speaking to my friend, " + RandomThings.GetRandomName() + ", they mentioned that maybe you can assist me with something.";       break;

                case 3: heard = "I hear that you are one I could trust for this important task ahead.";         break;

                case 4: heard = "The " + RandomThings.GetRandomJob() + " in " + RandomThings.GetRandomCity() + " mentioned that you could perhaps help me with something.";     break;

                case 5: heard = "There is a dire situation I think you may be able to help with.";      break;
                }
            }
            else if (alignment == "evil")
            {
                reward = "I think that " + gold + " gold will make this worth your time.";
                switch (Utility.RandomMinMax(0, 5))
                {
                case 0: heard = "I have heard that you are one that can serve me in my purposes.";      break;

                case 1: heard = RandomThings.GetRandomName() + " has told me about you, and that you would serve me well.";             break;

                case 2: heard = "After speaking to my servant, " + RandomThings.GetRandomName() + ", they mentioned that maybe you would do my bidding.";       break;

                case 3: heard = "I hear whispers of your ambitions, and that maybe we can both benefit from what I am about to ask.";   break;

                case 4: heard = "Those in " + RandomThings.GetRandomCity() + " sometimes speak your name in hush curses, which is why I have sent this message to you.";        break;

                case 5: heard = "There is an item I need for my plans, and I think you are one that can obtain it with little notice by others.";       break;
                }
            }

            string intro = from.Name + ",<br><br>" + heard;

            string EntranceLocation = Worlds.GetAreaEntrance(scroll.SearchDungeon, scroll.DungeonMap);

            scroll.SearchMessage = intro + " " + reward + " " + QuestStory + " " + Word1 + " tell of " + QuestItem + " being " + Word2 + " " + Word3;

            scroll.SearchMessage = scroll.SearchMessage + " " + scroll.SearchDungeon + " " + Word4 + " in " + scroll.SearchWorld + " at the below sextant coordinates.<br><br>" + EntranceLocation;

            scroll.SearchMessage = scroll.SearchMessage + "<br><br>When you find it, bring this message back to me. I am in " + homeworld + " at the below sextant coordinates.<br><br>" + scroll.ForWhere;

            scroll.SearchMessage = scroll.SearchMessage + "<br><br>- " + scroll.ForWho;

            scroll.InvalidateProperties();
        }
Example #8
0
        public void FindMessage(Mobile m)
        {
            if (Deleted || !m.Alive)
            {
                return;
            }

            CharacterDatabase DB = Server.Items.CharacterDatabase.GetDB(m);

            string msgQuest = DB.MessageQuest;

            string myHomeWorld = "the Land of Sosaria";

            bool GiveMail = true;

            if (msgQuest != "" && msgQuest != null)
            {
                ArrayList targets = new ArrayList();
                foreach (Item item in World.Items.Values)
                {
                    if (item is CourierMail)
                    {
                        if (((CourierMail)item).owner == m)
                        {
                            GiveMail = false;
                            m.AddToBackpack(item);
                            m.PlaySound(0x249);
                            SayTo(m, "Hmmm...I already gave you a message from " + msgQuest + ". Here is a another if you lost it.");
                        }
                    }
                }
            }

            if (GiveMail)
            {
                CourierMail envelope = new CourierMail(m);
                envelope.owner = m;
                string alignment = "good";

                int c = 0;

                ArrayList npcs = new ArrayList();
                foreach (Mobile msg in World.Mobiles.Values)
                {
                    if (msg is EpicCharacter && msg.Name != "the Great Earth Serpent")
                    {
                        string tWorld = Worlds.GetMyWorld(msg.Map, msg.Location, msg.X, msg.Y);

                        if ((((EpicCharacter)msg).MyAlignment == "neutral" || ((EpicCharacter)msg).MyAlignment == "evil") && (m.Karma < 0 || ((PlayerMobile)m).KarmaLocked == true))
                        {
                            if (tWorld == "the Land of Sosaria")
                            {
                                npcs.Add(msg); c++;
                            }
                            else if (CharacterDatabase.GetDiscovered(m, tWorld))
                            {
                                npcs.Add(msg); c++;
                            }
                        }
                        else if ((((EpicCharacter)msg).MyAlignment == "neutral" || ((EpicCharacter)msg).MyAlignment == "good") && m.Karma >= 0)
                        {
                            if (tWorld == "the Land of Sosaria")
                            {
                                npcs.Add(msg); c++;
                            }
                            else if (CharacterDatabase.GetDiscovered(m, tWorld))
                            {
                                npcs.Add(msg); c++;
                            }
                        }
                        else
                        {
                            if (tWorld == "the Land of Sosaria")
                            {
                                npcs.Add(msg); c++;
                            }
                            else if (CharacterDatabase.GetDiscovered(m, tWorld))
                            {
                                npcs.Add(msg); c++;
                            }
                        }
                    }
                }

                int o = Utility.RandomMinMax(0, c);

                for (int i = 0; i < npcs.Count; ++i)
                {
                    EpicCharacter dude = ( EpicCharacter )npcs[i];

                    if (i == o)
                    {
                        Point3D WhoLoc = new Point3D(dude.MyX, dude.MyY, 0);
                        Map     WhoMap = dude.MyWorld;

                        string my_location = "";

                        int  xLong = 0, yLat = 0;
                        int  xMins = 0, yMins = 0;
                        bool xEast = false, ySouth = false;

                        if (Sextant.Format(WhoLoc, WhoMap, ref xLong, ref yLat, ref xMins, ref yMins, ref xEast, ref ySouth))
                        {
                            my_location = String.Format("{0}° {1}'{2}, {3}° {4}'{5}", yLat, yMins, ySouth ? "S" : "N", xLong, xMins, xEast ? "E" : "W");
                        }

                        myHomeWorld           = Server.Misc.Worlds.GetMyWorld(WhoMap, WhoLoc, dude.MyX, dude.MyY);
                        envelope.ForWho       = dude.Name + " " + dude.Title;
                        envelope.ForWhere     = my_location;
                        envelope.ForAlignment = dude.MyAlignment;
                        alignment             = dude.MyAlignment;
                        DB.MessageQuest       = dude.Name;
                    }
                }

                PickSearchLocation(envelope, "No Dungeon Yet", m, alignment, myHomeWorld);

                m.AddToBackpack(envelope);
                m.PlaySound(0x249);
                SayTo(m, "Hmmm...I do have a message for you. Here you go.");
            }
        }