예제 #1
0
    //called when the camers needs to focus on a certain character
    void MoveToPosition()
    {
        _currTime = (Time.time - _startTime) / _moveSpeed;

        if (_currTime > 1)
        {
            _currTime                   = 1;
            _myCurrMode                 = CameraModes.FREE;
            GameUpdate.UISubscribe     -= MoveToPosition;
            GameUpdate.PlayerSubscribe += PlayerControl;
            _moving = false;
            //Debug.Log("Done Moving");
        }
        //Debug.Log("moving");
        transform.position = RandomThings.Interpolate(_currTime, _startPos, _targetPos);
    }
예제 #2
0
    //IFadeable Interface
    //Fades out UI to no alpha
    public void FadeOutUI()
    {
        _fadeCurrTime = (Time.time - _startTime) / _moveFadeSpeed;
        if (_fadeCurrTime >= 1)
        {
            _abilityMenu.alpha          = 0;
            _abilityMenu.blocksRaycasts = false;
            _descHolder.alpha           = 0;
            _hidden = true;
            _moving = false;
            GameUpdate.UISubscribe -= FadeOutUI;
        }

        _abilityMenu.alpha = RandomThings.Interpolate(_fadeCurrTime, _abilityMenu.alpha, 0);
        _descHolder.alpha  = RandomThings.Interpolate(_fadeCurrTime, _descHolder.alpha, 0);
    }
예제 #3
0
    public void MoveUI()
    {
        _currTime = (Time.time - _startTime) / _speedDelta;
        //Debug.Log("MovingUI on");
        if (_currTime > 1)
        {
            _currTime = 1;
            //Debug.Log("details on");
            GameUpdate.UISubscribe -= MoveUI;
        }


        //move UI on screen
        Vector3 newPos = _myRect.anchoredPosition;

        newPos.x = RandomThings.Interpolate(_currTime, _myRect.anchoredPosition.x, _movePos.x);
        _myRect.anchoredPosition = newPos;
    }
예제 #4
0
        public MagicPigment() : base(0x4C5A)
        {
            string OwnerName = RandomThings.GetRandomName();

            if (OwnerName.EndsWith("s"))
            {
                OwnerName = OwnerName + "'";
            }
            else
            {
                OwnerName = OwnerName + "'s";
            }

            string ItemName = LootPackEntry.MagicItemAdj("start", false, false, ItemID);

            Weight = 2.0;
            Name   = OwnerName + " " + ItemName + " paints";
        }
예제 #5
0
    //called when the cmaera needs to zoom in to show detail on a character
    void ZoomOn()
    {
        _currTime = (Time.time - _startTime) / _zoomSpeed;


        //Debug.Log("zooming");

        transform.position = RandomThings.Interpolate(_currTime, _startPos, _targetPos);

        if (_currTime > 1)
        {
            transform.position      = _targetPos;
            _currTime               = 1;
            _myCurrMode             = CameraModes.NONE;
            GameUpdate.UISubscribe -= ZoomOn;
            _moving = false;
        }
    }
예제 #6
0
        public UnknownReagent() : base(0x0EFC)
        {
            RegAmount = Utility.RandomMinMax(1, 10);
            string sContainer = "jar of reagents";

            switch (Utility.RandomMinMax(0, 4))
            {
            case 0: ItemID = 0x1005; sContainer = "jar of reagents"; break;

            case 1: ItemID = 0x1006; sContainer = "jar of reagents"; break;

            case 2: ItemID = 0x1007; sContainer = "jar of reagents"; break;

            case 3: ItemID = 0x9C8; sContainer = "jug of reagents"; break;

            case 4: ItemID = 0x5748; sContainer = "bottle of reagents"; break;
            }

            string sLiquid = "a strange";

            switch (Utility.RandomMinMax(0, 6))
            {
            case 0: sLiquid = "an odd"; break;

            case 1: sLiquid = "an unusual"; break;

            case 2: sLiquid = "a bizarre"; break;

            case 3: sLiquid = "a curious"; break;

            case 4: sLiquid = "a peculiar"; break;

            case 5: sLiquid = "a strange"; break;

            case 6: sLiquid = "a weird"; break;
            }
            Name      = sLiquid + " " + sContainer;
            Hue       = RandomThings.GetRandomColor(0);
            Weight    = 1.0;
            Amount    = 1;
            Stackable = false;
        }
예제 #7
0
    void MoveUp()
    {
        _currTime = (Time.time - _startTime) / _fadespeed;

        _group.alpha = RandomThings.Interpolate(_currTime, 1, 0);

        Vector3 movepos = UIHolder.UIInstance.GetBattleUI.BattleCamera.WorldToScreenPoint(_objectWorldPos);


        movepos += (Vector3.up * _movespeed) * _currTime;

        _myRect.position = movepos;

        if (_currTime >= 1)
        {
            GameUpdate.UISubscribe -= MoveUp;
            Destroy(this.gameObject);
            Debug.Log("text destroyed");
        }
    }
예제 #8
0
        public static string GetRumor(MuseumBook book, int item, bool talk)
        {
            int    goal   = book.RumorGoal;
            string locate = "held by a powerful creature";

            if (goal == 2)
            {
                locate = "lost somewhere";
            }

            string world   = book.RumorWorld;
            string dungeon = book.RumorDungeon;
            string from    = book.RumorFrom;

            if (talk)
            {
                string who = "I heard";
                switch (Utility.RandomMinMax(0, 5))
                {
                case 0: who = "I heard";                                                                                                                                                                                                break;

                case 1: who = "I learned";                                                                                                                                                                                              break;

                case 2: who = "I found out";                                                                                                                                                                                    break;

                case 3: who = "The " + RandomThings.GetRandomJob() + " in " + RandomThings.GetRandomCity() + " told me";                                break;

                case 4: who = "I overheard some " + RandomThings.GetRandomJob() + " say";                                                                                               break;

                case 5: who = "My friend told me";                                                                                                                                                                              break;
                }
                return(who + " that the " + MuseumBook.AntiqueInfo(item, 4, book) + " may be " + locate + " within " + dungeon + " in " + world + ".");
            }

            if (world != "")
            {
                return("" + from + " has told you that the " + MuseumBook.AntiqueInfo(item, 4, book) + " may be " + locate + " within " + dungeon + " in " + world + ".");
            }

            return("");
        }
예제 #9
0
        public QuestTake() : base(0x1A97)
        {
            Weight = 1.0;
            Name   = "Journal of " + RandomThings.GetRandomName() + " the ";
            if (Utility.RandomBool())
            {
                Name = Name + RandomThings.GetBoyGirlJob(0);
            }
            else
            {
                Name = Name + RandomThings.GetBoyGirlJob(1);
            }

            Movable = false;

            ItemID = Utility.RandomList(0x1A97, 0x1A98, 0x1AA3, 0x2205, 0x220F, 0x2219, 0x2223, 0x222D, 0x2255, 0x225C, 0x225D, 0x225E, 0x225F, 0x5688, 0x5689);
            if (ItemID == 0x1A97 || ItemID == 0x1A98 || ItemID == 0x1AA3 || ItemID == 0x5688 || ItemID == 0x5689)
            {
                Hue = Utility.RandomColor(0);
            }
        }
예제 #10
0
        public MagicBelt()
        {
            Resource = CraftResource.None;
            switch (Utility.Random(3))
            {
            case 0: Name = "belt";                  ItemID = 0x2790;                break;

            case 1: Name = "loin cloth";    ItemID = 0x2B68;                break;

            case 2: Name = "apron";                 ItemID = 0x153b;                break;
            }
            Hue = RandomThings.GetRandomColor(0);
            if (Utility.RandomBool())
            {
                Hue = RandomThings.GetRandomSpecialColor();
            }
            Layer  = Layer.Waist;
            Weight = 2.0;

            //Name = LootPackEntry.MagicItemAdj( "start", false, false, ItemID ) + " " + Name;
        }
예제 #11
0
        public static string MakeThisTask()
        {
            string task = null;

            switch (Utility.RandomMinMax(0, 2))
            {
            case 0: task = Server.Misc.RandomThings.MadeUpCity();                                                                                                   break;

            case 1: task = Server.Misc.RandomThings.MadeUpDungeon();                                                                                                break;

            case 2: task = "the " + RandomThings.GetRandomKingdomName() + " " + RandomThings.GetRandomKingdom();    break;
            }

            switch (Utility.RandomMinMax(0, 10))
            {
            case 0:         task = "Redraw this map of " + task;                            break;

            case 1:         task = "Decipher this map of " + task;                          break;

            case 2:         task = "Clean up this map of " + task;                          break;

            case 3:         task = "Verify this map of " + task;                            break;

            case 4:         task = "Copy this map of " + task;                                      break;

            case 5:         task = "Make an atlas for these maps of " + task;       break;

            case 6:         task = "Draw a trail map to " + task;                           break;

            case 7:         task = "Decode this treasure map for " + task;          break;

            case 8:         task = "Take this map of " + task + " and make it a larger scale";              break;

            case 9:         task = "Take this map of " + task + " and make it a smaller scale";             break;

            case 10:        task = "Encode this treasure map for " + task;          break;
            }

            return(task);
        }
예제 #12
0
        public UnusualDyes(int amount) : base(0x282F)
        {
            Weight    = 0.01;
            Stackable = true;
            Amount    = amount;
            switch (Utility.RandomMinMax(0, 6))
            {
            case 0: Name = "an odd jar of dye"; break;

            case 1: Name = "an unusual jar of dye"; break;

            case 2: Name = "a bizarre jar of dye"; break;

            case 3: Name = "a curious jar of dye"; break;

            case 4: Name = "a peculiar jar of dye"; break;

            case 5: Name = "a strange jar of dye"; break;

            case 6: Name = "a weird jar of dye"; break;
            }
            Hue      = RandomThings.GetRandomSpecialColor();
            DyeColor = Hue;
        }
예제 #13
0
        public override void OnDoubleClick(Mobile from)
        {
            if (from.Blessed)
            {
                from.SendMessage("You cannot look through that while in this state.");
            }
            else if (!from.InRange(GetWorldLocation(), 3))
            {
                from.SendMessage("You will have to get closer to it!");
            }
            else if (m_Uses < 5)
            {
                m_Uses++;
                if (Server.Misc.GetPlayerInfo.LuckyPlayer(from.Luck) && Utility.RandomBool())
                {
                    m_Uses--;
                }

                from.PlaySound(0x2E5);
                from.SendMessage("You pull something from the treasure hoard!");

                Item item = null;

                switch (Utility.Random(17))
                {
                case 0:
                    item = Loot.RandomArty();
                    break;

                case 1:
                    item = DungeonLoot.RandomSlayer();
                    break;

                case 2:
                    item = Loot.RandomSArty();
                    break;

                case 3:
                    if (Server.Misc.GetPlayerInfo.EvilPlay(from) == true && Utility.RandomMinMax(0, 10) == 10)
                    {
                        item = DungeonLoot.RandomEvil();
                    }
                    else
                    {
                        item = Loot.RandomRelic();
                        if (item is DDRelicWeapon && Server.Misc.GetPlayerInfo.OrientalPlay(from) == true)
                        {
                            Server.Items.DDRelicWeapon.MakeOriental(item);
                        }
                        else if (item is DDRelicStatue && Server.Misc.GetPlayerInfo.OrientalPlay(from) == true)
                        {
                            Server.Items.DDRelicStatue.MakeOriental(item);
                        }
                        else if (item is DDRelicBanner && item.ItemID != 0x2886 && item.ItemID != 0x2887 && Server.Misc.GetPlayerInfo.OrientalPlay(from) == true)
                        {
                            Server.Items.DDRelicBanner.MakeOriental(item);
                        }
                    }
                    break;

                case 4:
                    item = DungeonLoot.RandomRare();
                    if (item.Stackable == true)
                    {
                        item.Amount = Utility.RandomMinMax(5, 20);
                    }
                    break;

                case 5:
                    item = DungeonLoot.RandomLoreBooks();
                    break;

                case 6:
                    if (Utility.Random(4) != 1)
                    {
                        item = Loot.RandomScroll(0, 7, SpellbookType.Regular);
                    }
                    else
                    {
                        item = Loot.RandomScroll(0, 17, SpellbookType.Necromancer);
                    }
                    break;

                case 7:
                    int luckMod = from.Luck; if (luckMod > 2000)
                    {
                        luckMod = 2000;
                    }

                    if ((Region.Find(from.Location, from.Map)).IsPartOf("the Ancient Crash Site") ||
                        (Region.Find(from.Location, from.Map)).IsPartOf("the Ancient Sky Ship"))
                    {
                        item = new DDXormite((luckMod + Utility.RandomMinMax(333, 666)));
                    }
                    else if (Worlds.GetMyWorld(from.Map, from.Location, from.X, from.Y) == "the Mines of Morinia")
                    {
                        item = new Crystals((luckMod + Utility.RandomMinMax(200, 400)));
                    }
                    else if (Worlds.GetMyWorld(from.Map, from.Location, from.X, from.Y) == "the Underworld")
                    {
                        item = new DDJewels((luckMod + Utility.RandomMinMax(500, 1000)));
                    }
                    else
                    {
                        item = new Gold((luckMod + Utility.RandomMinMax(1000, 2000)));
                    }
                    break;

                case 8:
                case 9:
                case 10:
                case 11:
                    item = Loot.RandomArmorOrShieldOrWeaponOrJewelry(Server.LootPackEntry.IsInTokuno(from));
                    ContainerFunctions.LootMutate(from, Server.LootPack.GetRegularLuckChance(from), item, null, Utility.RandomMinMax(5, 10));
                    break;

                case 12:
                    item = Loot.RandomInstrument();

                    int attributeCount;
                    int min, max;
                    Server.Misc.ContainerFunctions.GetRandomAOSStats(out attributeCount, out min, out max, 6);

                    BaseInstrument instr = (BaseInstrument)item;

                    int cHue = 0;
                    int cUse = 0;

                    switch (instr.Resource)
                    {
                    case CraftResource.AshTree: cHue = MaterialInfo.GetMaterialColor("ash", "", 0); cUse = 20; break;

                    case CraftResource.CherryTree: cHue = MaterialInfo.GetMaterialColor("cherry", "", 0); cUse = 40; break;

                    case CraftResource.EbonyTree: cHue = MaterialInfo.GetMaterialColor("ebony", "", 0); cUse = 60; break;

                    case CraftResource.GoldenOakTree: cHue = MaterialInfo.GetMaterialColor("gold", "", 0); cUse = 80; break;

                    case CraftResource.HickoryTree: cHue = MaterialInfo.GetMaterialColor("hickory", "", 0); cUse = 100; break;

                    case CraftResource.MahoganyTree: cHue = MaterialInfo.GetMaterialColor("mahogany", "", 0); cUse = 120; break;

                    case CraftResource.DriftwoodTree: cHue = MaterialInfo.GetMaterialColor("driftwood", "", 0); cUse = 120; break;

                    case CraftResource.OakTree: cHue = MaterialInfo.GetMaterialColor("oak", "", 0); cUse = 140; break;

                    case CraftResource.PineTree: cHue = MaterialInfo.GetMaterialColor("pine", "", 0); cUse = 160; break;

                    case CraftResource.RosewoodTree: cHue = MaterialInfo.GetMaterialColor("rosewood", "", 0); cUse = 180; break;

                    case CraftResource.WalnutTree: cHue = MaterialInfo.GetMaterialColor("walnute", "", 0); cUse = 200; break;
                    }

                    if (!(Server.Misc.Worlds.IsOnSpaceship(from.Location, from.Map)))
                    {
                        if (cHue > 0)
                        {
                            item.Hue = cHue;
                        }
                        else if (Utility.RandomMinMax(1, 4) == 1)
                        {
                            item.Hue = RandomThings.GetRandomColor(0);
                        }
                        Server.Misc.MorphingTime.MakeOrientalItem(item, from);
                        item.Name = LootPackEntry.MagicItemName(item, from, Region.Find(from.Location, from.Map));
                    }
                    else
                    {
                        string newName = "odd alien";
                        switch (Utility.RandomMinMax(0, 6))
                        {
                        case 0: newName = "odd"; break;

                        case 1: newName = "unusual"; break;

                        case 2: newName = "bizarre"; break;

                        case 3: newName = "curious"; break;

                        case 4: newName = "peculiar"; break;

                        case 5: newName = "strange"; break;

                        case 6: newName = "weird"; break;
                        }

                        switch (Utility.RandomMinMax(1, 4))
                        {
                        case 1: item = new Pipes();             item.Name = newName + " " + Server.Misc.RandomThings.GetRandomAlienRace() + " pipes";           break;

                        case 2: item = new Pipes();             item.Name = newName + " " + Server.Misc.RandomThings.GetRandomAlienRace() + " pan flute";       break;

                        case 3: item = new Fiddle();    item.Name = newName + " " + Server.Misc.RandomThings.GetRandomAlienRace() + " violin";          break;

                        case 4: item = new Fiddle();    item.Name = newName + " " + Server.Misc.RandomThings.GetRandomAlienRace() + " fiddle";          break;
                        }

                        BaseInstrument lute = (BaseInstrument)item;
                        lute.Resource = CraftResource.None;

                        item.Hue = Server.Misc.RandomThings.GetRandomColor(0);
                    }

                    instr.UsesRemaining = instr.UsesRemaining + cUse;

                    BaseRunicTool.ApplyAttributesTo((BaseInstrument)item, attributeCount, min, max);

                    SlayerName slayer = BaseRunicTool.GetRandomSlayer();

                    instr.Quality = InstrumentQuality.Regular;
                    if (Utility.RandomMinMax(1, 4) == 1)
                    {
                        instr.Quality = InstrumentQuality.Exceptional;
                    }

                    if (Utility.RandomMinMax(1, 4) == 1)
                    {
                        instr.Slayer = slayer;
                    }

                    break;

                case 13:
                    item = Loot.RandomGem();
                    break;

                case 14:
                    item = Loot.RandomPotion();
                    break;

                case 15:
                    item = Loot.RandomWand(); Server.Misc.MaterialInfo.ColorMetal(item, 0); string wandOwner = ""; if (Utility.RandomMinMax(1, 3) == 1)
                    {
                        wandOwner = Server.LootPackEntry.MagicWandOwner() + " ";
                    }
                    item.Name = wandOwner + item.Name;
                    break;

                case 16:
                    m_Uses = 6;                             // STOP GIVING LOOT WHEN THEY GET A CONTAINER
                    int chestLuck = Server.Misc.GetPlayerInfo.LuckyPlayerArtifacts(from.Luck);
                    if (chestLuck < 3)
                    {
                        chestLuck = 3;
                    }
                    if (chestLuck > 8)
                    {
                        chestLuck = 8;
                    }
                    item        = new LootChest(Utility.RandomMinMax(3, chestLuck));
                    item.ItemID = Utility.RandomList(0x9AB, 0xE40, 0xE41, 0xE7C);
                    item.Hue    = Utility.RandomList(0x961, 0x962, 0x963, 0x964, 0x965, 0x966, 0x967, 0x968, 0x969, 0x96A, 0x96B, 0x96C, 0x96D, 0x96E, 0x96F, 0x970, 0x971, 0x972, 0x973, 0x974, 0x975, 0x976, 0x977, 0x978, 0x979, 0x97A, 0x97B, 0x97C, 0x97D, 0x97E, 0x4AA);

                    Region reg = Region.Find(from.Location, from.Map);

                    string box = "hoard chest";
                    switch (Utility.RandomMinMax(0, 7))
                    {
                    case 0: box = "hoard chest";            break;

                    case 1: box = "treasure chest";         break;

                    case 2: box = "secret chest";           break;

                    case 3: box = "fabled chest";           break;

                    case 4: box = "legendary chest";        break;

                    case 5: box = "mythical chest";         break;

                    case 6: box = "lost chest";                     break;

                    case 7: box = "stolen chest";           break;
                    }

                    if (Server.Misc.Worlds.IsOnSpaceship(from.Location, from.Map))
                    {
                        Server.Misc.ContainerFunctions.MakeSpaceCrate(((LockableContainer)item));
                        box = item.Name;
                    }

                    switch (Utility.RandomMinMax(0, 1))
                    {
                    case 0: item.Name = box + " from " + Server.Misc.Worlds.GetRegionName(from.Map, from.Location);       break;

                    case 1: item.Name = box + " of " + HoardName;   break;
                    }
                    int xTraCash = Utility.RandomMinMax(5000, 8000);

                    int zone = 0;
                    if (Worlds.IsOnSpaceship(from.Location, from.Map))
                    {
                        zone = 1;
                    }
                    else if (Worlds.GetMyWorld(from.Map, from.Location, from.X, from.Y) == "the Underworld")
                    {
                        zone = 2;
                    }

                    ContainerFunctions.AddGoldToContainer(xTraCash, (LootChest)item, zone);
                    int artychance = GetPlayerInfo.LuckyPlayerArtifacts(from.Luck) + 10;
                    if (Utility.RandomMinMax(0, 100) < artychance)
                    {
                        ((LootChest)item).DropItem(Loot.RandomArty());
                    }
                    break;
                }

                if (item != null)
                {
                    if (Worlds.IsOnSpaceship(from.Location, from.Map))
                    {
                        Server.Misc.MorphingTime.MakeSpaceAceItem(item, from);
                    }

                    if (item is Container)
                    {
                        item.MoveToWorld(from.Location, from.Map);
                    }
                    else
                    {
                        from.AddToBackpack(item);
                    }
                }
                else
                {
                    if (Worlds.IsOnSpaceship(from.Location, from.Map))
                    {
                        item = new DDXormite((from.Luck + Utility.RandomMinMax(333, 666)));
                    }
                    else if (Worlds.GetMyWorld(from.Map, from.Location, from.X, from.Y) == "the Underworld")
                    {
                        item = new DDJewels((from.Luck + Utility.RandomMinMax(500, 1000)));
                    }
                    else
                    {
                        item = new Gold((from.Luck + Utility.RandomMinMax(1000, 2000)));
                    }
                    if (item != null)
                    {
                        from.AddToBackpack(item);
                    }
                }
            }
            else
            {
                from.SendMessage("There is nothing else worth taking from this pile!");
                this.Delete();
            }
        }
예제 #14
0
        public BarFlyWizardWest() : base( )
        {
            if (Utility.RandomMinMax(1, 2) == 1)
            {
                Body = 401;
                Name = NameList.RandomName("female");
            }
            else
            {
                Body             = 400;
                Name             = NameList.RandomName("male");
                FacialHairItemID = Utility.RandomList(0, 0, 8254, 8255, 8256, 8257, 8267, 8268, 8269);
            }

            Blessed   = true;
            CantWalk  = true;
            Direction = Direction.West;
            Title     = TavernPatrons.GetTitle();
            Hue       = Utility.RandomSkinHue();
            Utility.AssignRandomHair(this);
            SpeechHue = Utility.RandomDyedHue();
            NameHue   = Utility.RandomOrangeHue();

            SetStr(161, 175);
            SetDex(151, 165);
            SetInt(386, 400);

            SetHits(160, 175);

            SetDamage(8, 10);

            SetDamageType(ResistanceType.Physical, 100);

            SetResistance(ResistanceType.Physical, 35, 45);
            SetResistance(ResistanceType.Fire, 25, 30);
            SetResistance(ResistanceType.Cold, 25, 30);
            SetResistance(ResistanceType.Poison, 10, 20);
            SetResistance(ResistanceType.Energy, 10, 20);

            SetSkill(SkillName.DetectHidden, 80.0);
            SetSkill(SkillName.EvalInt, 125.0);
            SetSkill(SkillName.Poisoning, 60.0, 82.5);
            SetSkill(SkillName.MagicResist, 83.5, 92.5);
            SetSkill(SkillName.Magery, 125.0);
            SetSkill(SkillName.Tactics, 125.0);
            SetSkill(SkillName.Wrestling, 100);

            Fame         = 0;
            Karma        = 0;
            VirtualArmor = 30;

            PackItem(new BlackStaff());

            int aHue = RandomThings.GetRandomColor(0);

            AddItem(new Boots(Utility.RandomNeutralHue()));
            if (1 == Utility.RandomMinMax(1, 2))
            {
                AddItem(new Cloak(aHue));
            }

            int iArmor = Utility.RandomMinMax(1, 3);

            if (iArmor == 1)
            {
                Item cloth1 = new Robe();
                cloth1.Hue = aHue;
                AddItem(cloth1);
                Item cloth2 = new WizardsHat();
                cloth2.Hue = aHue;
                AddItem(cloth2);
            }
            else if (iArmor == 2)
            {
                Item cloth1 = new Robe();
                cloth1.Hue = aHue;
                AddItem(cloth1);
            }
            else
            {
                Item cloth1 = new FancyShirt();
                cloth1.Hue = aHue;
                AddItem(cloth1);
                Item cloth2 = new LongPants();
                cloth2.Hue = Utility.RandomNeutralHue();
                AddItem(cloth2);
            }

            int HairColor = Utility.RandomHairHue();

            HairHue       = HairColor;
            FacialHairHue = HairColor;
        }
예제 #15
0
        public HighSeasRelic() : base(0x41FD)
        {
            Hue = Utility.RandomList(0xB97, 0xB98, 0xB99, 0xB9A, 0xB88);

            switch (Utility.RandomMinMax(0, 20))
            {
            case 0: Name     = "anchor";                                ItemID = 0x897;         Weight = 100.0;         RelicGoldValue = Utility.RandomMinMax(80, 200);
                RelicFlipID1 = 0x897;   RelicFlipID2 = 0x898;   Server.Misc.MaterialInfo.ColorPlainMetal(this);       break;

            case 1: Name     = "ruined barrel";                 ItemID = 0x1EB5;        Weight = 20.0;          RelicGoldValue = Utility.RandomMinMax(20, 80);
                RelicFlipID1 = 0x1EB5;  RelicFlipID2 = 0x1EB5;  break;

            case 2: Name     = "old cannon ball";               ItemID = 0x0E73;        Weight = 10.0;          RelicGoldValue = Utility.RandomMinMax(10, 20);
                RelicFlipID1 = 0x0E73;  RelicFlipID2 = 0x0E73;  break;

            case 3: Name     = "old cannon balls";              ItemID = 0x0E74;        Weight = 50.0;          RelicGoldValue = Utility.RandomMinMax(20, 40);
                RelicFlipID1 = 0x0E74;  RelicFlipID2 = 0x0E74;  break;

            case 4: Name     = "broken clock";                  ItemID = 0x0C1F;        Weight = 2.0;           RelicGoldValue = Utility.RandomMinMax(20, 40);
                RelicFlipID1 = 0x0C1F;  RelicFlipID2 = 0x0C1F;  break;

            case 5: Name     = "model ship";                    ItemID = 0x14F3;        Weight = 5.0;           RelicGoldValue = Utility.RandomMinMax(60, 130);
                RelicFlipID1 = 0x14F3;  RelicFlipID2 = 0x14F4;  break;

            case 6: Name     = "mounted lobster";               ItemID = 0x46BC;        Weight = 2.0;           RelicGoldValue = Utility.RandomMinMax(40, 80);
                RelicFlipID1 = 0x46BC;  RelicFlipID2 = 0x46BD;  break;

            case 7: Name     = "mounted crab";                  ItemID = 0x46BA;        Weight = 2.0;           RelicGoldValue = Utility.RandomMinMax(40, 80);
                RelicFlipID1 = 0x46BA;  RelicFlipID2 = 0x46BB;  break;

            case 8: Name     = "ruined spyglass";               ItemID = 0x14F5;        Weight = 1.0;           RelicGoldValue = Utility.RandomMinMax(20, 40);
                RelicFlipID1 = 0x14F5;  RelicFlipID2 = 0x14F6;  break;

            case 9: Name     = "soggy rope";                    ItemID = 0x14F8;        Weight = 10.0;          RelicGoldValue = Utility.RandomMinMax(10, 30);
                RelicFlipID1 = 0x14F8;  RelicFlipID2 = 0x14FA;  break;

            case 10: Name    = "worn flogging whip";   ItemID = 0x166E;        Weight = 2.0;           RelicGoldValue = Utility.RandomMinMax(10, 30);
                RelicFlipID1 = 0x166E;  RelicFlipID2 = 0x166E;  break;

            case 11: Name    = "cracked hourglass";    ItemID = 0x1810;        Weight = 2.0;           RelicGoldValue = Utility.RandomMinMax(20, 40);
                RelicFlipID1 = 0x1810;  RelicFlipID2 = 0x1813;  break;

            case 12: Name    = "keg of rum";                   ItemID = 0x1AD6;        Weight = 20.0;          RelicGoldValue = Utility.RandomMinMax(50, 120);
                RelicFlipID1 = 0x1AD6;  RelicFlipID2 = 0x1AD7;  Hue = 0x96D;    break;

            case 13: Name    = "warped oars";                  ItemID = 0x1E2A;        Weight = 10.0;          RelicGoldValue = Utility.RandomMinMax(40, 100);
                RelicFlipID1 = 0x1E2A;  RelicFlipID2 = 0x1E2B;  break;

            case 14: Name    = "ruined fishing net";   ItemID = 0x1EA3;        Weight = 10.0;          RelicGoldValue = Utility.RandomMinMax(30, 90);
                RelicFlipID1 = 0x1EA3;  RelicFlipID2 = 0x1EA4;  break;

            case 15: Name    = "rotten fishing net";   ItemID = 0x1EA5;        Weight = 10.0;          RelicGoldValue = Utility.RandomMinMax(30, 90);
                RelicFlipID1 = 0x1EA5;  RelicFlipID2 = 0x1EA6;  break;

            case 16: Name    = "bottle of rum";                ItemID = 0xE26;         Weight = 1.0;           RelicGoldValue = Utility.RandomMinMax(10, 30);
                RelicFlipID1 = 0xE26;   RelicFlipID2 = 0xEFE;   break;

            case 17: Name    = "broken globe";                 ItemID = 0x1047;        Weight = 1.0;           RelicGoldValue = Utility.RandomMinMax(20, 40);
                RelicFlipID1 = 0x1047;  RelicFlipID2 = 0x1048;  break;

            case 18: Name    = "busted sextant";               ItemID = 0x1057;        Weight = 1.0;           RelicGoldValue = Utility.RandomMinMax(10, 30);
                RelicFlipID1 = 0x1057;  RelicFlipID2 = 0x1058;  break;

            case 19: Name    = "ruined pirate hat";    ItemID = 0x171B;        Weight = 1.0;           RelicGoldValue = Utility.RandomMinMax(10, 30);
                RelicFlipID1 = 0x171B;  RelicFlipID2 = 0x171B;  break;

            case 20: Name      = "the captain's log";
                Hue            = Utility.RandomColor(0);
                ItemID         = Utility.RandomList(0xFBD, 0xFBE, 0xFEF, 0xFF0, 0xFF1, 0xFF2, 0x42BF, 0xE3B, 0xEFA, 0x2253, 0x2254, 0x42BF);
                Weight         = 1.0;
                RelicGoldValue = Utility.RandomMinMax(50, 130);
                RelicFlipID1   = ItemID;  RelicFlipID2 = ItemID;  break;
            }

            string boat = RandomThings.GetRandomShipName("", 0);

            RelicOrigin = "Recovered From " + boat;
        }
예제 #16
0
        public ElfEvilSailorMinstrel() : base(AIType.AI_Archer, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            SpeechHue = Utility.RandomDyedHue();

            switch (Utility.RandomMinMax(0, 8))
            {
            case 0: Title = "the drow bard"; break;

            case 1: Title = "the drow minstrel"; break;

            case 2: Title = "the drow troubadour"; break;

            case 3: Title = "the drow musician"; break;

            case 4: Title = "the drow balladeer"; break;

            case 5: Title = "the drow buccaneer"; break;

            case 6: Title = "the drow pirate"; break;

            case 7: Title = "the drow buccaneer"; break;

            case 8: Title = "the drow pirate"; break;
            }

            Race    = Race.Elf;
            Hue     = 1316;
            HairHue = 1150;

            if (this.Female = Utility.RandomBool())
            {
                Body = 606;
                Name = NameList.RandomName("elf_female");
                AddItem(new Skirt(RandomThings.GetRandomColor(0)));
                Utility.AssignRandomHair(this);
            }
            else
            {
                Body = 605;
                Name = NameList.RandomName("elf_male");
                AddItem(new ShortPants(RandomThings.GetRandomColor(0)));
                Utility.AssignRandomHair(this);
            }

            SetStr(86, 100);
            SetDex(81, 95);
            SetInt(61, 75);

            SetDamage(10, 23);

            SetSkill(SkillName.Archery, 80.1, 90.0);
            SetSkill(SkillName.Wrestling, 66.0, 97.5);
            SetSkill(SkillName.MagicResist, 25.0, 47.5);
            SetSkill(SkillName.Tactics, 65.0, 87.5);

            Fame  = 2000;
            Karma = -2000;

            AddItem(new ElvenBoots(0x6F8));
            Item armor = new LeatherChest(); armor.Hue = 0x6F8; AddItem(armor);

            AddItem(new FancyShirt(0));

            switch (Utility.Random(2))
            {
            case 0: AddItem(new LongPants(0xBB4)); break;

            case 1: AddItem(new ShortPants(0xBB4)); break;
            }

            switch (Utility.Random(2))
            {
            case 0: AddItem(new Bandana(0x846)); break;

            case 1: AddItem(new SkullCap(0x846)); break;
            }

            switch (Utility.Random(2))
            {
            case 0: AddItem(new Crossbow()); PackItem(new Bolt(Utility.RandomMinMax(5, 15))); break;

            case 1: AddItem(new Bow()); PackItem(new Arrow(Utility.RandomMinMax(5, 15))); break;
            }

            switch (Utility.Random(5))
            {
            case 0: PackItem(new BambooFlute());  SpeechHue = 0x504; break;

            case 1: PackItem(new Drums());                SpeechHue = 0x38; break;

            case 2: PackItem(new Tambourine());   SpeechHue = 0x52; break;

            case 3: PackItem(new LapHarp());              SpeechHue = 0x45; break;

            case 4: PackItem(new Lute());                 SpeechHue = 0x4C; break;
            }
        }
예제 #17
0
        public MagicRobe()
        {
            Resource = CraftResource.None;
            Name     = "robe";
            Hue      = RandomThings.GetRandomColor(0);
            if (Utility.RandomBool())
            {
                Hue = RandomThings.GetRandomSpecialColor();
            }
            Layer  = Layer.OuterTorso;
            Weight = 3.0;

            switch (Utility.RandomMinMax(1, 20))
            {
            case 1: ItemID = Utility.RandomList(0x230E, 0x230D); Name = "gilded dress"; break;

            case 2: ItemID = Utility.RandomList(0x1F00, 0x1EFF); Name = "fancy dress"; break;

            case 3: ItemID = Utility.RandomList(0x1F01, 0x1F02); Name = "dress"; break;

            case 4: ItemID = Utility.RandomList(0x1F03, 0x1F04, 0x26AE); Name = "robe"; break;

            case 5: ItemID = Utility.RandomList(0x204E); Name = "shroud"; break;

            case 6: ItemID = Utility.RandomList(0x2B69, 0x3160); Name = "assassin robe"; break;

            case 7: ItemID = Utility.RandomList(0x2B70, 0x3167); Name = "magistrate robe"; break;

            case 8: ItemID = Utility.RandomList(0x2B6C, 0x3163); Name = "gilded robe"; break;

            case 9: ItemID = Utility.RandomList(0x2FB9, 0x3173); Name = "assassin shroud"; break;

            case 10: ItemID = Utility.RandomList(0x2FBA, 0x3174); Name = "necromancer robe"; break;

            case 11: ItemID = Utility.RandomList(0x3175, 0x3178); Name = "sorcerer robe"; break;

            case 12: ItemID = Utility.RandomList(0x2B6A, 0x3161); Name = "fancy robe"; break;

            case 13: ItemID = Utility.RandomList(0x2B6E, 0x3165); Name = "ornate robe"; break;

            case 14: ItemID = Utility.RandomList(0x2B73, 0x316A); Name = "royal robe"; break;

            case 15: ItemID = Utility.RandomList(0x2FC6, 0x2FC7); Name = "spider robe"; break;

            case 16: ItemID = Utility.RandomList(0x2B6B, 0x3162); Name = "jester coat"; break;

            case 17: ItemID = Utility.RandomList(0x201B, 0x201C); Name = "dragon robe"; break;

            case 18: ItemID = Utility.RandomList(0x201F, 0x2020); Name = "chaos robe"; break;

            case 19: ItemID = Utility.RandomList(0x201D, 0x201E); Name = "vampire robe"; break;

            case 20: ItemID = Utility.RandomList(0x2799, 0x27E4);
                switch (Utility.RandomMinMax(1, 5))
                {
                case 1: Name = "sorcerer robe"; break;

                case 2: Name = "magician robe"; break;

                case 3: Name = "conjurer robe"; break;

                case 4: Name = "mage robe"; break;

                case 5: Name = "warlock robe"; break;
                }
                break;
            }

            //Name = LootPackEntry.MagicItemAdj( "start", false, false, ItemID ) + " " + Name;
        }
예제 #18
0
        public static Item CreateArtifact(string arty)
        {
            Item artifact   = null;
            int  AddBonuses = 1;

            if (arty == "random")
            {
                arty = "any";
                int HighSearch = 300 + 3;                 // THERE ARE 300 ARTIFACTS SO CHANGE THE SECOND NUMBER TO THE NUMBER OF CATEGORIES LISTED BELOW...
                switch (Utility.RandomMinMax(1, HighSearch))
                {
                case 3:         arty = "invulnerable";  break;
                }
            }

            if (arty == "driftwood")               // ONLY FOR SEA TRAVELERS
            {
                artifact = CreateWoodItem();
                if (artifact != null)
                {
                    artifact.Hue = 0x5B2; artifact.Name = "runed driftwood " + artifact.Name;
                }
            }
            else if (arty == "kelp")               // ONLY FOR SEA TRAVELERS
            {
                artifact = CreateLeatherArmor("any");
                if (artifact != null)
                {
                    artifact.Hue = 0x483; artifact.Name = artifact.Name.Replace("leather", "kelp woven");
                }
            }
            else if (arty == "barnacle")               // ONLY FOR SEA TRAVELERS
            {
                artifact = CreatePlateArmor("any");
                if (Utility.RandomMinMax(1, 3) == 1)
                {
                    artifact = CreateMetalShield();
                }
                if (artifact != null)
                {
                    artifact.Name = "barnacled " + artifact.Name; artifact.Hue = 0xB91;
                }
            }
            else if (arty == "bronzed")               // ONLY FOR SEA TRAVELERS
            {
                artifact = CreateMetalItem("female");
                if (artifact != null)
                {
                    artifact.Name = "bronzed " + artifact.Name + " of the valkyrie"; artifact.Hue = 2418;
                }
            }
            else if (arty == "neptune")               // ONLY FOR SEA TRAVELERS
            {
                switch (Utility.RandomMinMax(0, 4))
                {
                case 1: artifact = CreateArmorItem("any"); break;

                case 2: artifact = CreateBowItem(); break;

                case 3: artifact = CreateMetalShield(); break;

                case 4: artifact = CreateMetalWeapon(); break;
                }
                if (artifact is PlateLegs)
                {
                    artifact.ItemID = 0x2B6B;
                }
                else if (artifact is PlateArms)
                {
                    artifact.ItemID = 0x2B6C;
                }
                else if (artifact is PlateChest)
                {
                    artifact.ItemID = 0x2B67;
                }
                else if (artifact is PlateHelm)
                {
                    artifact.ItemID = 0x140E; artifact.Name = "helm";
                }

                if (artifact != null)
                {
                    artifact.Name = artifact.Name + " of Neptune"; artifact.Hue = 0x84C;
                }
            }
            else if (arty == "invulnerable")
            {
                artifact = CreateMetalProtection("any");
                if (artifact != null)
                {
                    artifact.Hue = 0x4F2; artifact.Name = artifact.Name + " of invulnerability";
                }
            }
            else
            {
                artifact   = Loot.RandomArty();
                AddBonuses = 0;
            }

            while (artifact == null)
            {
                artifact = Loot.RandomArty();
            }

            if (AddBonuses == 1)
            {
                if (artifact is BaseWeapon)
                {
                    PowerArtifactWeapon(artifact, arty);
                }
                else if (artifact is BaseShield)
                {
                    PowerArtifactShield(artifact, arty);
                }
                else if (artifact is BaseArmor)
                {
                    PowerArtifactArmor(artifact, arty);
                }
                else if (artifact is BaseJewel)
                {
                    PowerArtifactJewel(artifact, arty);
                }
            }

            if (MyServerSettings.GetUnidentifiedChance() >= Utility.RandomMinMax(1, 100))
            {
                LockableContainer box = new UnidentifiedArtifact();
                box.DropItem(artifact);
                box.ItemID = artifact.ItemID;
                box.Hue    = artifact.Hue;
                box.Name   = RandomThings.GetOddityAdjective() + " artifact";
                return(box);
            }
            return(artifact);
        }
예제 #19
0
        public WereWolf() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            SpeechHue = Utility.RandomDyedHue();
            Hue       = Utility.RandomSkinHue();

            if (this.Female = Utility.RandomBool())
            {
                this.Body = 0x191;
                this.Name = NameList.RandomName("female");
                Utility.AssignRandomHair(this);
                HairHue = Utility.RandomHairHue();
            }
            else
            {
                this.Body = 0x190;
                this.Name = NameList.RandomName("male");
                Utility.AssignRandomHair(this);
                int HairColor = Utility.RandomHairHue();
                FacialHairItemID = Utility.RandomList(0, 8254, 8255, 8256, 8257, 8267, 8268, 8269);
                HairHue          = HairColor;
                FacialHairHue    = HairColor;
            }

            SetStr(80, 120);
            SetDex(80, 120);
            SetInt(30, 50);

            SetDamage(8, 10);

            SetDamageType(ResistanceType.Physical, 100);

            SetResistance(ResistanceType.Physical, 35, 45);
            SetResistance(ResistanceType.Fire, 25, 30);
            SetResistance(ResistanceType.Cold, 25, 30);
            SetResistance(ResistanceType.Poison, 10, 20);
            SetResistance(ResistanceType.Energy, 10, 20);

            SetSkill(SkillName.DetectHidden, 80.0);
            SetSkill(SkillName.Anatomy, 125.0);
            SetSkill(SkillName.Poisoning, 60.0, 82.5);
            SetSkill(SkillName.MagicResist, 83.5, 92.5);
            SetSkill(SkillName.Swords, 125.0);
            SetSkill(SkillName.Wrestling, 125.0);
            SetSkill(SkillName.Tactics, 125.0);

            Fame  = 8000;
            Karma = -8000;

            VirtualArmor = 5;

            if (Utility.RandomMinMax(0, 1) == 1)
            {
                switch (Utility.Random(5))
                {
                case 0: AddItem(new StuddedChest( ));         AddItem(new StuddedArms( ));          AddItem(new StuddedLegs( ));          AddItem(new StuddedGorget( ));        AddItem(new StuddedGloves( )); break;

                case 1: AddItem(new PlateChest( ));           AddItem(new PlateArms( ));            AddItem(new PlateLegs( ));            AddItem(new PlateGorget( ));          AddItem(new PlateGloves( )); break;

                case 2: AddItem(new ChainChest( ));           AddItem(new RingmailArms( ));         AddItem(new ChainLegs( ));            AddItem(new RingmailGloves( )); break;

                case 3: AddItem(new RingmailChest( ));        AddItem(new RingmailArms( ));         AddItem(new RingmailLegs( ));         AddItem(new RingmailGloves( )); break;

                case 4: AddItem(new BoneChest( ));            AddItem(new BoneArms( ));                     AddItem(new BoneLegs( ));                     AddItem(new BoneGloves( )); break;
                }

                switch (Utility.Random(9))
                {
                case 0: AddItem(new PlateHelm( )); break;

                case 1: AddItem(new Bascinet( )); break;

                case 2: AddItem(new ChainCoif( )); break;

                case 3: AddItem(new CloseHelm( )); break;

                case 4: AddItem(new OrcHelm( )); break;

                case 5: AddItem(new NorseHelm( )); break;

                case 6: AddItem(new BoneHelm( )); break;
                }

                AddItem(new Boots( ));

                switch (Utility.Random(7))
                {
                case 0: AddItem(new BattleAxe()); break;

                case 1: AddItem(new VikingSword()); break;

                case 2: AddItem(new Halberd()); break;

                case 3: AddItem(new DoubleAxe()); break;

                case 4: AddItem(new ExecutionersAxe()); break;

                case 5: AddItem(new WarAxe()); break;

                case 6: AddItem(new TwoHandedAxe()); break;
                }

                switch (Utility.RandomMinMax(0, 5))
                {
                case 0: Title = "the warrior"; break;

                case 1: Title = "the berserker"; break;

                case 2: Title = "the barbarian"; break;

                case 3: Title = "the fighter"; break;

                case 4: Title = "the knight"; break;

                case 5: Title = "the champion"; break;
                }
            }
            else
            {
                switch (Utility.RandomMinMax(0, 4))
                {
                case 0: Title = "the thief"; break;

                case 1: Title = "the rogue"; break;

                case 2: Title = "the robber"; break;

                case 3: Title = "the brigand"; break;

                case 4: Title = "the bandit"; break;
                }

                AddItem(new Boots(Utility.RandomNeutralHue()));
                AddItem(new FancyShirt(RandomThings.GetRandomColor(0)));
                AddItem(new LongPants(Utility.RandomNeutralHue()));
                AddItem(new SkullCap(RandomThings.GetRandomColor(0)));

                switch (Utility.Random(7))
                {
                case 0: AddItem(new Longsword()); break;

                case 1: AddItem(new Cutlass()); break;

                case 2: AddItem(new Broadsword()); break;

                case 3: AddItem(new Axe()); break;

                case 4: AddItem(new Club()); break;

                case 5: AddItem(new Dagger()); break;

                case 6: AddItem(new Spear()); break;
                }
            }

            if (Utility.RandomBool())
            {
                Morph();
            }
        }
예제 #20
0
        public SailorWizard() : base(AIType.AI_Mage, FightMode.Aggressor, 10, 1, 0.2, 0.4)
        {
            if (this.Female = Utility.RandomBool())
            {
                Body = 0x191;
                Name = NameList.RandomName("female");
                switch (Utility.RandomMinMax(0, 8))
                {
                case 0: Title = "the wizard"; break;

                case 1: Title = "the sorceress"; break;

                case 2: Title = "the mage"; break;

                case 3: Title = "the conjurer"; break;

                case 4: Title = "the magician"; break;

                case 5: Title = "the sailor"; break;

                case 6: Title = "the fisherman"; break;

                case 7: Title = "the sailor"; break;

                case 8: Title = "the fisherman"; break;
                }

                Utility.AssignRandomHair(this);
                HairHue = Utility.RandomHairHue();
            }
            else
            {
                Body = 0x190;
                Name = NameList.RandomName("male");
                switch (Utility.RandomMinMax(0, 8))
                {
                case 0: Title = "the wizard"; break;

                case 1: Title = "the sorcerer"; break;

                case 2: Title = "the mage"; break;

                case 3: Title = "the conjurer"; break;

                case 4: Title = "the magician"; break;

                case 5: Title = "the sailor"; break;

                case 6: Title = "the fisherman"; break;

                case 7: Title = "the sailor"; break;

                case 8: Title = "the fisherman"; break;
                }

                Utility.AssignRandomHair(this);
                int HairColor = Utility.RandomHairHue();
                FacialHairItemID = Utility.RandomList(0, 8254, 8255, 8256, 8257, 8267, 8268, 8269);
                HairHue          = HairColor;
                FacialHairHue    = HairColor;
            }

            Hue = Utility.RandomSkinHue();

            int clothHue = Utility.RandomMinMax(0, 12);

            Robe robe = new Robe( );

            robe.Hue = RandomThings.GetRandomColor(clothHue);
            AddItem(robe);

            if (50 > Utility.Random(100))
            {
                WizardsHat hat = new WizardsHat( );
                hat.Hue = RandomThings.GetRandomColor(clothHue);
                AddItem(hat);
            }

            Item boots = new ThighBoots( );

            boots.Hue = Utility.RandomNeutralHue();
            AddItem(boots);

            SetStr(76, 100);
            SetDex(76, 95);
            SetInt(36, 60);

            SetHits(46, 60);

            SetDamage(7, 11);

            SetDamageType(ResistanceType.Physical, 50);
            SetDamageType(ResistanceType.Cold, 50);

            SetResistance(ResistanceType.Physical, 25, 30);
            SetResistance(ResistanceType.Cold, 15, 25);
            SetResistance(ResistanceType.Poison, 10, 20);

            SetSkill(SkillName.EvalInt, 55.1, 70.0);
            SetSkill(SkillName.Magery, 55.1, 70.0);
            SetSkill(SkillName.MagicResist, 55.1, 70.0);
            SetSkill(SkillName.Tactics, 45.1, 60.0);
            SetSkill(SkillName.Wrestling, 45.1, 55.0);

            Fame  = 2500;
            Karma = 2500;

            VirtualArmor = 28;

            PackReg(Utility.RandomMinMax(2, 8));
            PackReg(Utility.RandomMinMax(2, 8));
            PackReg(Utility.RandomMinMax(2, 8));
        }
예제 #21
0
            public void should_throw_an_exception_when_accessing_a_non_existing_property()
            {
                dynamic randomThings = new RandomThings();

                Check.ThatCode(() => randomThings.Foo).Throws <KeyNotFoundException>();
            }
예제 #22
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();
        }
예제 #23
0
        public BarFlyWarriorWest() : base( )
        {
            if (Utility.RandomMinMax(1, 2) == 1)
            {
                Body = 401;
                Name = NameList.RandomName("female");
            }
            else
            {
                Body             = 400;
                Name             = NameList.RandomName("male");
                FacialHairItemID = Utility.RandomList(0, 0, 8254, 8255, 8256, 8257, 8267, 8268, 8269);
            }

            Direction = Direction.West;
            Blessed   = true;
            CantWalk  = true;
            Title     = TavernPatrons.GetTitle();
            Hue       = Utility.RandomSkinHue();
            Utility.AssignRandomHair(this);
            SpeechHue = Utility.RandomDyedHue();
            NameHue   = Utility.RandomOrangeHue();

            SetStr(386, 400);
            SetDex(151, 165);
            SetInt(161, 175);

            SetHits(300, 400);

            SetDamage(8, 10);

            SetDamageType(ResistanceType.Physical, 100);

            SetResistance(ResistanceType.Physical, 35, 45);
            SetResistance(ResistanceType.Fire, 25, 30);
            SetResistance(ResistanceType.Cold, 25, 30);
            SetResistance(ResistanceType.Poison, 10, 20);
            SetResistance(ResistanceType.Energy, 10, 20);

            SetSkill(SkillName.DetectHidden, 80.0);
            SetSkill(SkillName.Anatomy, 125.0);
            SetSkill(SkillName.Poisoning, 60.0, 82.5);
            SetSkill(SkillName.MagicResist, 83.5, 92.5);
            SetSkill(SkillName.Swords, 125.0);
            SetSkill(SkillName.Tactics, 125.0);
            SetSkill(SkillName.Wrestling, 100);

            Fame         = 0;
            Karma        = 0;
            VirtualArmor = 30;

            PackItem(new Longsword());

            AddItem(new Boots(Utility.RandomNeutralHue()));
            if (1 == Utility.RandomMinMax(1, 2))
            {
                AddItem(new Cloak(RandomThings.GetRandomColor(0)));
            }

            int aHue = Utility.RandomList(0x973, 0x966, 0x96D, 0x972, 0x8A5, 0x979, 0x89F, 0x8AB, 0, Utility.RandomMetalHue(), Utility.RandomMetalHue(), Utility.RandomMetalHue(), Utility.RandomMetalHue(), Utility.RandomMetalHue(), Utility.RandomMetalHue(), Utility.RandomMetalHue());
            int lHue = Utility.RandomList(0x8AC, 0x845, 0x851, 0x47E, 0x4AA, 0xB85, 0x497, 0x89F, 0x483, 0, Utility.RandomMetalHue(), Utility.RandomMetalHue(), Utility.RandomMetalHue(), Utility.RandomMetalHue(), Utility.RandomMetalHue(), Utility.RandomMetalHue(), Utility.RandomMetalHue());

            int iArmor = Utility.RandomMinMax(1, 4);

            if (iArmor == 1)
            {
                Item cloth1 = new PlateArms();
                cloth1.Hue = aHue;
                AddItem(cloth1);
                Item cloth2 = new PlateGorget();
                cloth2.Hue = aHue;
                AddItem(cloth2);
                Item cloth3 = new PlateLegs();
                cloth3.Hue = aHue;
                AddItem(cloth3);
                Item cloth4 = new PlateChest();
                cloth4.Hue = aHue;
                AddItem(cloth4);
            }
            else if (iArmor == 2)
            {
                Item cloth1 = new ChainChest();
                cloth1.Hue = aHue;
                AddItem(cloth1);
                Item cloth2 = new ChainLegs();
                cloth2.Hue = aHue;
                AddItem(cloth2);
                Item cloth3 = new RingmailArms();
                cloth3.Hue = aHue;
                AddItem(cloth3);
                Item cloth4 = new PlateGorget();
                cloth4.Hue = aHue;
                AddItem(cloth4);
            }
            else if (iArmor == 3)
            {
                Item cloth1 = new StuddedChest();
                cloth1.Hue = lHue;
                AddItem(cloth1);
                Item cloth2 = new StuddedArms();
                cloth2.Hue = lHue;
                AddItem(cloth2);
                Item cloth3 = new StuddedLegs();
                cloth3.Hue = lHue;
                AddItem(cloth3);
                Item cloth4 = new StuddedGorget();
                cloth4.Hue = lHue;
                AddItem(cloth4);
            }
            else
            {
                Item cloth1 = new LeatherArms();
                cloth1.Hue = lHue;
                AddItem(cloth1);
                Item cloth2 = new LeatherChest();
                cloth2.Hue = lHue;
                AddItem(cloth2);
                Item cloth3 = new LeatherGorget();
                cloth3.Hue = lHue;
                AddItem(cloth3);
                Item cloth4 = new LeatherLegs();
                cloth4.Hue = lHue;
                AddItem(cloth4);
            }

            int HairColor = Utility.RandomHairHue();

            HairHue       = HairColor;
            FacialHairHue = HairColor;
        }
예제 #24
0
        public MagicHat()
        {
            Weight = 1.0;
            Name   = "hat";

            Resource = CraftResource.None;

            int myHat = Utility.RandomMinMax(0, 20);

            switch (myHat)
            {
            case 0: ItemID = 5914; Name = "feathered hat"; break;

            case 1: ItemID = 5916; Name = "jester hat"; break;

            case 2: ItemID = 5911; Name = "straw hat"; break;

            case 3: ItemID = 5910; Name = "tall straw hat"; break;

            case 4: ItemID = 5908; Name = "wide brim hat"; break;

            case 5: ItemID = 5912; Name = "wizard hat"; break;

            case 6: ItemID = 5915; Name = "tricorne hat"; break;

            case 7: ItemID = 5907; Name = "floppy hat"; break;

            case 8: ItemID = 5444; Name = "skullcap"; break;

            case 9: ItemID = 5909; Name = "bonnet"; break;

            case 10: ItemID = 0x278F; Name = "executioners hood"; break;

            case 11: ItemID = 0x1540; Name = "bandana"; break;

            case 12: ItemID = 0x1549; Name = "shaman mask"; break;

            case 13: ItemID = 0x154B; Name = "tribal mask"; break;

            case 14: ItemID = 0x2B71; Name = "hood"; break;

            case 15: ItemID = 0x3176; Name = "cowl"; break;

            case 16: ItemID = 0x2FC3; Name = "witch hat"; break;

            case 17: ItemID = 0x2FBC; Name = "pirate hat"; break;

            case 18: ItemID = 5445; Name = "bearskin cap"; break;

            case 19: ItemID = 5447; Name = "dearskin cap"; break;

            case 20: ItemID = 0x2B6D; Name = "wolfskin cap"; break;
            }

            if (myHat < 18)
            {
                Hue = RandomThings.GetRandomColor(0);
            }
            else
            {
                Hue = Utility.RandomList(0, 0x497, 0x47E, 0x4A6, 0x4A7, 0x4A8, 0x4A9);
            }

            if (Utility.RandomBool())
            {
                Hue = RandomThings.GetRandomSpecialColor();
            }

            Layer = Layer.Helm;

            //Name = LootPackEntry.MagicItemAdj( "start", false, false, ItemID ) + " " + Name;
        }
예제 #25
0
        public SOS(string world, int level) : base(0x14ED)
        {
            if (level < 1)
            {
                level = MessageInABottle.GetRandomLevel();
            }

            if (world == "the Town of Skara Brae")
            {
                world = "the Land of Sosaria";
            }                                                                                      // NO SOSs IN SKARA BRAE
            else if (world == "the Moon of Luna")
            {
                world = "the Land of Sosaria";
            }                                                                                     // NO SOSs ON THE MOON
            else if (world == "the Underworld")
            {
                world = "the Land of Sosaria";
            }                                                                                   // NO SOSs IN THE UNDERWORLD

            Weight = 1.0;

            Point3D loc = Worlds.GetRandomLocation(world, "sea");
            Map     map = Worlds.GetMyDefaultMap(world);

            MapWorld    = world;
            m_Level     = level;
            m_TargetMap = map;

            m_TargetLocation = loc;

            UpdateHue();

            ShipName = RandomThings.GetRandomShipName("", 0);

            string Beast = "a sea dragon";

            switch (Utility.Random(12))
            {
            case 0: Beast = "a gigantic monster"; break;

            case 1: Beast = "a sea hag"; break;

            case 2: Beast = "a leviathan"; break;

            case 3: Beast = "a sea dragon"; break;

            case 4: Beast = "a sea giant"; break;

            case 5: Beast = "a storm giant"; break;

            case 6: Beast = "a sea serpent"; break;

            case 7: Beast = "a demon of the sea"; break;

            case 8: Beast = "a rotting squid"; break;

            case 9: Beast = "a giant beast"; break;

            case 10: Beast = "a dragon turtle"; break;

            case 11: Beast = "a huge creature"; break;
            }

            if (IsAncient)
            {
                ShipStory = "This parchment is very old and almost crumbles in your hand. You know that whoever wrote this has been dead for possibly centuries, but it reads... ";
            }

            switch (Utility.Random(5))
            {
            case 0: ShipStory = ShipStory + "We were sailing in " + MapWorld + " when " + Beast + " rose from the depths of the ocean and attacked our ship! The hull has taken alot of damage and '" + ShipName + "' is slowly sinking into the depths of the sea! Whoever finds this, send a ship to the coordinates below! Hurry! I am not sure how long we will last out here!"; break;

            case 1: ShipStory = ShipStory + "If ya never seen " + Beast + " before, consider yerself lucky. There be little warning before they hit our ship, '" + ShipName + "', while sailing in " + MapWorld + ". We thought we hit a reef but we were wrong. It tore the ship apart. Only me and " + QuestCharacters.ParchmentWriter() + " managed to survive the onslaught of the beast. Now we sit here, on some island. The coordinates I last remember is where your ship went down. We may be close to there if you can send a ship. There be gold for payment if you do."; break;

            case 2: ShipStory = ShipStory + "I am writing this with my dying strength on board '" + ShipName + "'. " + QuestCharacters.ParchmentWriter() + " the Pirate came upon us in the night while far from land in " + MapWorld + ". We didn't stand a chance. We tried to outrun er but the wind was against us to be sure. He set our ship ablaze and fled off into the distance. Now we slowly sink into the ocean. If you find this, I wrote our coordinates below. You may still get here in time to save the others. If you can, tell " + QuestCharacters.ParchmentWriter() + " my tale so they never live wondering my fate. They live somewhere in " + RandomThings.GetRandomCity() + "."; break;

            case 3: ShipStory = ShipStory + "'" + ShipName + "' be sinking far from land. What we thought was a merchant ship was actually a war ship in disguise. They be hunting us pirates on the high seas in " + MapWorld + "...and today our luck ran out. Their cannons ripped through our sails, and tore holes in our hull. They killed most of the crew, where only " + Utility.RandomMinMax(3, 16) + " of us survived. They be gone now, but the sharks started circling the wreck. I just saw " + QuestCharacters.ParchmentWriter() + " being pulled below the waves, blood gushing up from below. I be on the largest piece of flotsam and can only hope I survive till ya get here."; break;

            case 4: ShipStory = ShipStory + "I knew " + QuestCharacters.ParchmentWriter() + " weren't no good at being a captain of '" + ShipName + "'. Now this probably be our end here in " + MapWorld + ". We be under attack by " + Beast + " and we have no chance of making it to " + RandomThings.GetRandomCity() + " now. I fear that me never see me wife again. If ye find this note, please find us before we sink. I have an ancient artifact I could trade for yer help."; break;
            }
        }
예제 #26
0
 public RobeOfTeleportation()
 {
     Name    = "Robe Of Teleportation";
     Hue     = RandomThings.GetRandomColor(0);
     Charges = 50;
 }
예제 #27
0
        public void MakeVillain(QuestTome book)
        {
            book.VillainHue  = 0;
            book.VillainBody = 0;
            bool color = false;

            int enemy = Utility.RandomMinMax(1, 10);

            if (enemy == 1)
            {
                switch (Utility.RandomMinMax(0, 3))
                {
                case 0: book.VillainType = "ArchFiend";                 book.VillainName = NameList.RandomName("daemon");             book.VillainBody = Utility.RandomList(9, 320);        color = true;   book.VillainCategory = "a daemon";              break;

                case 1: book.VillainType = "ArchFiend";                 book.VillainName = NameList.RandomName("demonic");    book.VillainBody = Utility.RandomList(191, 427);      color = true;
                    switch (Utility.RandomMinMax(0, 2))
                    {
                    case 0: book.VillainCategory = "a balron"; break;

                    case 1: book.VillainCategory = "a balor";  break;

                    case 2: book.VillainCategory = "a balrog"; break;
                    }
                    break;

                case 2: book.VillainType = "ArchFiend";                 book.VillainName = NameList.RandomName("devil");              book.VillainBody = Utility.RandomList(765, 804, 436, 88, 138);        book.VillainCategory = "a devil";               break;

                case 3: book.VillainType = "Succubus";                  book.VillainName = NameList.RandomName("goddess");    book.VillainBody = 174; color = true;
                    switch (Utility.RandomMinMax(0, 2))
                    {
                    case 0: book.VillainCategory = "a succubus"; break;

                    case 1: book.VillainCategory = "a demoness"; break;

                    case 2: book.VillainCategory = "a daemoness"; break;
                    }
                    break;
                }
            }
            else if (enemy == 2)
            {
                book.VillainCategory = "a giant";
                book.VillainName     = NameList.RandomName("giant");

                switch (Utility.RandomMinMax(0, 17))
                {
                case 0:         book.VillainType = "AbyssGiant";                break;

                case 1:         book.VillainType = "CloudGiant";                break;

                case 2:         book.VillainType = "FireGiant";                 break;

                case 3:         book.VillainType = "ForestGiant";               break;

                case 4:         book.VillainType = "FrostGiant";                break;

                case 5:         book.VillainType = "HillGiant";                 break;

                case 6:         book.VillainType = "HillGiantShaman";   break;

                case 7:         book.VillainType = "IceGiant";                  break;

                case 8:         book.VillainType = "JungleGiant";               break;

                case 9:         book.VillainType = "LavaGiant";                 break;

                case 10:        book.VillainType = "MountainGiant";             break;

                case 11:        book.VillainType = "SandGiant";                 break;

                case 12:        book.VillainType = "StarGiant";                 break;

                case 13:        book.VillainType = "StoneGiant";                break;

                case 14:        book.VillainType = "StormGiant";                break;

                case 15:        book.VillainType = "AncientCyclops";    book.VillainName = NameList.RandomName("greek");              book.VillainCategory = "a cyclops";     break;

                case 16:        book.VillainType = "AncientEttin";              book.VillainCategory = "an ettin";      break;

                case 17:        book.VillainType = "OgreLord";                  book.VillainCategory = "an ogre";       break;
                }
            }
            else if (enemy == 3)
            {
                book.VillainCategory = "a dragon";
                book.VillainName     = NameList.RandomName("dragon");
                switch (Utility.RandomMinMax(0, 24))
                {
                case 0:         book.VillainType = "Dragon";                                    book.VillainBody = Utility.RandomList(12, 59);        color = true;   break;

                case 1:         book.VillainType = "AncientWyrm";                               break;

                case 2:         book.VillainType = "ShadowWyrm";                                break;

                case 3:         book.VillainType = "VolcanicDragon";                    break;

                case 4:         book.VillainType = "VoidDragon";                                break;

                case 5:         book.VillainType = "AshDragon";                                 break;

                case 6:         book.VillainType = "CrystalDragon";                             break;

                case 7:         book.VillainType = "ElderDragon";                               break;

                case 8:         book.VillainType = "PrimevalAmberDragon";               break;

                case 9:         book.VillainType = "VolcanicDragon";                    break;

                case 10:        book.VillainType = "PrimevalBlackDragon";               break;

                case 11:        book.VillainType = "PrimevalDragon";                    break;

                case 12:        book.VillainType = "PrimevalFireDragon";                break;

                case 13:        book.VillainType = "PrimevalGreenDragon";               break;

                case 14:        book.VillainType = "PrimevalNightDragon";               break;

                case 15:        book.VillainType = "PrimevalRedDragon";                 break;

                case 16:        book.VillainType = "PrimevalRoyalDragon";               break;

                case 17:        book.VillainType = "PrimevalRunicDragon";               break;

                case 18:        book.VillainType = "PrimevalSilverDragon";              break;

                case 19:        book.VillainType = "PrimevalStygianDragon";             break;

                case 20:        book.VillainType = "PrimevalVolcanicDragon";    break;

                case 21:        book.VillainType = "VampiricDragon";                    break;

                case 22:        book.VillainType = "PrimevalAbysmalDragon";             break;

                case 23:        book.VillainType = "AncientDrake";                              book.VillainCategory = "a drake";       break;

                case 24:        book.VillainType = "AncientWyvern";                             book.VillainCategory = "a wyvern";      break;
                }
            }
            else if (enemy == 4)
            {
                book.VillainCategory = "a beholder";
                Mobile m = new Beholder();
                book.VillainType = "Beholder";
                book.VillainName = m.Name;
                book.VillainHue  = m.Hue;
                m.Delete();
            }
            else if (enemy == 5)
            {
                if (Utility.RandomBool())
                {
                    book.VillainCategory = "a gargoyle";
                    book.VillainType     = "StygianGargoyleLord";
                    book.VillainName     = NameList.RandomName("gargoyle name");
                }
                else
                {
                    book.VillainCategory = "a sphinx";
                    book.VillainType     = "AncientSphinx";
                    book.VillainName     = NameList.RandomName("drakkul");
                }
            }
            else if (enemy == 6)
            {
                if (Utility.RandomBool())
                {
                    book.VillainCategory = "a reptilian humanoid";
                    Mobile m = new Sleestax();
                    book.VillainType = "Sleestax";
                    book.VillainName = m.Name;
                    book.VillainHue  = m.Hue;
                    m.Delete();
                }
                else
                {
                    book.VillainCategory = "a serpentoid";
                    book.VillainType     = "OphidianKnight";
                    book.VillainName     = NameList.RandomName("lizardman");
                    book.VillainBody     = 306;
                }
            }
            else if (enemy == 7)
            {
                if (Utility.RandomBool())
                {
                    book.VillainCategory = "an arachnid";
                    book.VillainType     = "AbyssCrawler";
                    book.VillainName     = NameList.RandomName("goblin");
                    book.VillainBody     = 173;
                }
                else
                {
                    book.VillainCategory = "an insectoid";
                    book.VillainType     = "AntaurKing";
                    book.VillainName     = NameList.RandomName("goblin");
                    book.VillainBody     = 784;
                }
            }
            else if (enemy == 8)
            {
                if (Utility.RandomBool())
                {
                    book.VillainCategory = "a reaper";
                    Mobile m = new EvilEnt();
                    book.VillainType = "EvilEnt";
                    book.VillainName = m.Name;
                    book.VillainHue  = m.Hue;
                    m.Delete();
                }
                else
                {
                    book.VillainCategory = "an elemental";
                    book.VillainType     = "CrystalGoliath";
                    book.VillainName     = NameList.RandomName("urk");
                    book.VillainBody     = 753;
                }
            }
            else if (enemy == 9)
            {
                switch (Utility.RandomMinMax(0, 4))
                {
                case 0:         book.VillainType = "Dracolich";                                 book.VillainName = NameList.RandomName("dragon");                     book.VillainBody = Utility.RandomList(104, 323);              book.VillainCategory = "a dracolich";           break;

                case 1:         book.VillainType = "AncientLich";                               book.VillainName = NameList.RandomName("ancient lich");       book.VillainCategory = "a lich";                        break;

                case 2:         book.VillainType = "AncientFleshGolem";                 book.VillainName = NameList.RandomName("greek");                      book.VillainBody = 999;                                                                 book.VillainCategory = "a flesh golem";         break;

                case 3:         book.VillainType = "GrundulVarg";                               book.VillainName = NameList.RandomName("ancient lich");       book.VillainBody = Utility.RandomList(768, 65, 107);  book.VillainCategory = "a dread lord";          break;

                case 4:         book.VillainType = "GrundulVarg";                               book.VillainName = NameList.RandomName("greek");                      book.VillainBody = Utility.RandomList(768, 65, 107);  book.VillainCategory = "a death knight";        break;
                }
            }
            else
            {
                switch (Utility.RandomMinMax(0, 3))
                {
                case 0:         book.VillainType = "Watcher";                                   book.VillainName = NameList.RandomName("drakkul");            book.VillainCategory = "a watcher";                     break;

                case 1:         book.VillainType = "Cerberus";                                  book.VillainName = NameList.RandomName("greek");                      book.VillainCategory = "a cerberus";            break;

                case 2:         book.VillainType = "Styguana";                                  book.VillainName = NameList.RandomName("lizardman");          book.VillainCategory = "a styguana";            break;

                case 3:         book.VillainType = "HellBeast";                                 book.VillainName = NameList.RandomName("imp");                        book.VillainCategory = "a hell beast";          break;
                }
            }

            book.VillainHue = 0; if (color)
            {
                book.VillainHue = Utility.RandomColor(0);
            }

            book.VillainTitle = RandomThings.RandomEvilTitle();
        }
예제 #28
0
        public ElfSailorMinstrel() : base(AIType.AI_Archer, FightMode.Aggressor, 10, 1, 0.2, 0.4)
        {
            SpeechHue = Utility.RandomDyedHue();

            switch (Utility.RandomMinMax(0, 8))
            {
            case 0: Title = "the elf bard"; break;

            case 1: Title = "the elf minstrel"; break;

            case 2: Title = "the elf troubadour"; break;

            case 3: Title = "the elf musician"; break;

            case 4: Title = "the elf balladeer"; break;

            case 5: Title = "the elf sailor"; break;

            case 6: Title = "the elf fisherman"; break;

            case 7: Title = "the elf sailor"; break;

            case 8: Title = "the elf fisherman"; break;
            }

            Race    = Race.Elf;
            Hue     = Utility.RandomSkinHue();
            HairHue = Utility.RandomHairHue();

            if (this.Female = Utility.RandomBool())
            {
                Body = 606;
                Name = NameList.RandomName("elf_female");
                AddItem(new Skirt(RandomThings.GetRandomColor(0)));
                Utility.AssignRandomHair(this);
            }
            else
            {
                Body = 605;
                Name = NameList.RandomName("elf_male");
                AddItem(new ShortPants(RandomThings.GetRandomColor(0)));
                Utility.AssignRandomHair(this);
            }

            SetStr(86, 100);
            SetDex(81, 95);
            SetInt(61, 75);

            SetDamage(10, 23);

            SetSkill(SkillName.Archery, 80.1, 90.0);
            SetSkill(SkillName.Wrestling, 66.0, 97.5);
            SetSkill(SkillName.MagicResist, 25.0, 47.5);
            SetSkill(SkillName.Tactics, 65.0, 87.5);

            Fame  = 2000;
            Karma = 2000;

            AddItem(new Boots(Utility.RandomNeutralHue()));
            AddItem(new FancyShirt(RandomThings.GetRandomColor(0)));

            switch (Utility.Random(4))
            {
            case 0: AddItem(new FeatheredHat(RandomThings.GetRandomColor(0))); break;

            case 1: AddItem(new FloppyHat(RandomThings.GetRandomColor(0))); break;

            case 2: AddItem(new StrawHat(RandomThings.GetRandomColor(0))); break;

            case 3: AddItem(new SkullCap(RandomThings.GetRandomColor(0))); break;
            }

            switch (Utility.Random(2))
            {
            case 0: AddItem(new Crossbow()); PackItem(new Bolt(Utility.RandomMinMax(5, 15))); break;

            case 1: AddItem(new Bow()); PackItem(new Arrow(Utility.RandomMinMax(5, 15))); break;
            }

            switch (Utility.Random(5))
            {
            case 0: PackItem(new BambooFlute());  SpeechHue = 0x504; break;

            case 1: PackItem(new Drums());                SpeechHue = 0x38; break;

            case 2: PackItem(new Tambourine());   SpeechHue = 0x52; break;

            case 3: PackItem(new LapHarp());              SpeechHue = 0x45; break;

            case 4: PackItem(new Lute());                 SpeechHue = 0x4C; break;
            }
        }
예제 #29
0
        public ElfMinstrel() : base(AIType.AI_Archer, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            SpeechHue = Utility.RandomDyedHue();

            switch (Utility.RandomMinMax(0, 4))
            {
            case 0: Title = "the drow bard"; break;

            case 1: Title = "the drow minstrel"; break;

            case 2: Title = "the drow troubadour"; break;

            case 3: Title = "the drow musician"; break;

            case 4: Title = "the drow balladeer"; break;
            }

            Hue     = 1316;
            Race    = Race.Elf;
            HairHue = 1150;

            if (this.Female = Utility.RandomBool())
            {
                Body = 606;
                Name = NameList.RandomName("dark_elf_prefix_female") + NameList.RandomName("dark_elf_suffix_female");
                AddItem(new Skirt(RandomThings.GetRandomColor(0)));
                Utility.AssignRandomHair(this);
            }
            else
            {
                Body = 605;
                Name = NameList.RandomName("dark_elf_prefix_male") + NameList.RandomName("dark_elf_suffix_male");
                AddItem(new ShortPants(RandomThings.GetRandomColor(0)));
                Utility.AssignRandomHair(this);
                int HairColor = Utility.RandomHairHue();
            }

            SetStr(86, 100);
            SetDex(81, 95);
            SetInt(61, 75);

            SetDamage(10, 23);

            SetSkill(SkillName.Archery, 80.1, 90.0);
            SetSkill(SkillName.Wrestling, 66.0, 97.5);
            SetSkill(SkillName.MagicResist, 25.0, 47.5);
            SetSkill(SkillName.Tactics, 65.0, 87.5);

            Fame  = 2000;
            Karma = -2000;

            AddItem(new Boots(Utility.RandomNeutralHue()));
            AddItem(new FancyShirt(RandomThings.GetRandomColor(0)));

            switch (Utility.Random(4))
            {
            case 0: AddItem(new FeatheredHat(RandomThings.GetRandomColor(0))); break;

            case 1: AddItem(new FloppyHat(RandomThings.GetRandomColor(0))); break;

            case 2: AddItem(new StrawHat(RandomThings.GetRandomColor(0))); break;

            case 3: AddItem(new SkullCap(RandomThings.GetRandomColor(0))); break;
            }

            switch (Utility.Random(2))
            {
            case 0: AddItem(new Crossbow()); PackItem(new Bolt(Utility.RandomMinMax(5, 15))); break;

            case 1: AddItem(new Bow()); PackItem(new Arrow(Utility.RandomMinMax(5, 15))); break;
            }

            switch (Utility.Random(5))
            {
            case 0: PackItem(new BambooFlute());  SpeechHue = 0x504; break;

            case 1: PackItem(new Drums());                SpeechHue = 0x38; break;

            case 2: PackItem(new Tambourine());   SpeechHue = 0x52; break;

            case 3: PackItem(new LapHarp());              SpeechHue = 0x45; break;

            case 4: PackItem(new Lute());                 SpeechHue = 0x4C; break;
            }

            Server.Misc.IntelligentAction.GiveAdventureGear(this);
        }
예제 #30
0
        public SailorArcher() : base(AIType.AI_Archer, FightMode.Aggressor, 10, 1, 0.2, 0.4)
        {
            SpeechHue = Utility.RandomDyedHue();

            switch (Utility.RandomMinMax(0, 4))
            {
            case 0: Title = "the sailor"; break;

            case 1: Title = "the fisherman"; break;

            case 2: Title = "the mariner"; break;

            case 3: Title = "the archer"; break;

            case 4: Title = "the seafarer"; break;
            }

            Hue = Utility.RandomSkinHue();

            if (this.Female = Utility.RandomBool())
            {
                Body = 0x191;
                Name = NameList.RandomName("female");
                AddItem(new Skirt(RandomThings.GetRandomColor(0)));
                Utility.AssignRandomHair(this);
                HairHue = Utility.RandomHairHue();
            }
            else
            {
                Body = 0x190;
                Name = NameList.RandomName("male");
                AddItem(new ShortPants(RandomThings.GetRandomColor(0)));
                Utility.AssignRandomHair(this);
                int HairColor = Utility.RandomHairHue();
                FacialHairItemID = Utility.RandomList(0, 8254, 8255, 8256, 8257, 8267, 8268, 8269);
                HairHue          = HairColor;
                FacialHairHue    = HairColor;
            }

            SetStr(86, 100);
            SetDex(81, 95);
            SetInt(61, 75);

            SetDamage(10, 23);

            SetSkill(SkillName.Archery, 80.1, 90.0);
            SetSkill(SkillName.Wrestling, 66.0, 97.5);
            SetSkill(SkillName.MagicResist, 25.0, 47.5);
            SetSkill(SkillName.Tactics, 65.0, 87.5);

            Fame  = 2000;
            Karma = 2000;

            AddItem(new Boots(Utility.RandomNeutralHue()));
            AddItem(new FancyShirt(RandomThings.GetRandomColor(0)));
            AddItem(new SkullCap(RandomThings.GetRandomColor(0)));

            int lHue = Utility.RandomMetalHue();

            if (Utility.RandomMinMax(1, 3) == 3)
            {
                Item cloth1 = new StuddedChest();
                cloth1.Hue = lHue;
                AddItem(cloth1);
                Item cloth2 = new StuddedArms();
                cloth2.Hue = lHue;
                AddItem(cloth2);
                Item cloth3 = new StuddedLegs();
                cloth3.Hue = lHue;
                AddItem(cloth3);
                Item cloth4 = new StuddedGorget();
                cloth4.Hue = lHue;
                AddItem(cloth4);
            }
            else
            {
                Item cloth1 = new LeatherArms();
                cloth1.Hue = lHue;
                AddItem(cloth1);
                Item cloth2 = new LeatherChest();
                cloth2.Hue = lHue;
                AddItem(cloth2);
                Item cloth3 = new LeatherGorget();
                cloth3.Hue = lHue;
                AddItem(cloth3);
                Item cloth4 = new LeatherLegs();
                cloth4.Hue = lHue;
                AddItem(cloth4);
            }

            switch (Utility.Random(2))
            {
            case 0: AddItem(new Crossbow()); PackItem(new Bolt(Utility.RandomMinMax(15, 55))); break;

            case 1: AddItem(new Bow()); PackItem(new Arrow(Utility.RandomMinMax(15, 55))); break;
            }
        }