private static Item RandomSpellbook(SuccessRating rating)
        {
            Spellbook item = null;

            switch (Utility.Random(5))
            {
            default: item = new Spellbook(); break;

            case 1: item = new NecromancerSpellbook(); break;

            case 2: item = new BookOfBushido(); break;

            case 3: item = new BookOfChivalry(); break;

            case 4: item = new BookOfNinjitsu(); break;
            }
            if (item == null)
            {
                return(null);
            }
            else
            {
                switch (item.SpellbookType)
                {
                case SpellbookType.Regular:
                {
                    switch (rating)
                    {
                    default:
                    { item.Content = 0xFFFF; break; }

                    case SuccessRating.Success:
                    { item.Content = 0xFFFFFFFF; break; }

                    case SuccessRating.CompleteSuccess:
                    { item.Content = 0xFFFFFFFFFFFF; break; }

                    case SuccessRating.ExceptionalSuccess:
                    { item.Content = ulong.MaxValue; break; }
                    }
                    break;
                }

                default: item.Content = (1ul << item.BookCount) - 1; break;
                }
            }
            return(item);
        }
Exemple #2
0
        private static void BaseWarrior()
        {
            Spellbook ninjaBook = new BookOfNinjitsu();

            ninjaBook.LootType = LootType.Blessed;
            PackItem(ninjaBook);

            Spellbook paladinBook = new BookOfChivalry((ulong)0x3FF);

            paladinBook.LootType = LootType.Blessed;
            PackItem(paladinBook);

            EquipItem(new Robe(Utility.RandomMetalHue()));
            EquipItem(new ThighBoots(0x8FD));
            BaseItems();
        }
Exemple #3
0
        private static void SetSkills(Mobile m, SkillNameValue[] skills, int prof)
        {
            switch (prof)
            {
            case 1:     // Warrior
            {
                skills = new[]
                {
                    new SkillNameValue(SkillName.Anatomy, 30), new SkillNameValue(SkillName.Healing, 30),
                    new SkillNameValue(SkillName.Swords, 30), new SkillNameValue(SkillName.Tactics, 30)
                };

                break;
            }

            case 2:     // Magician
            {
                skills = new[]
                {
                    new SkillNameValue(SkillName.EvalInt, 30), new SkillNameValue(SkillName.Wrestling, 30),
                    new SkillNameValue(SkillName.Magery, 30), new SkillNameValue(SkillName.Meditation, 30)
                };

                break;
            }

            case 3:     // Blacksmith
            {
                skills = new[]
                {
                    new SkillNameValue(SkillName.Mining, 30), new SkillNameValue(SkillName.ArmsLore, 30),
                    new SkillNameValue(SkillName.Blacksmith, 30), new SkillNameValue(SkillName.Tinkering, 30)
                };

                break;
            }

            case 4:     // Necromancer
            {
                skills = new[]
                {
                    new SkillNameValue(SkillName.Necromancy, 30),
                    new SkillNameValue(SkillName.SpiritSpeak, 30), new SkillNameValue(SkillName.Swords, 30),
                    new SkillNameValue(SkillName.Meditation, 20)
                };

                break;
            }

            case 5:     // Paladin
            {
                skills = new[]
                {
                    new SkillNameValue(SkillName.Chivalry, 30), new SkillNameValue(SkillName.Swords, 30),
                    new SkillNameValue(SkillName.Focus, 30), new SkillNameValue(SkillName.Tactics, 30)
                };

                break;
            }

            case 6:     //Samurai
            {
                skills = new[]
                {
                    new SkillNameValue(SkillName.Bushido, 30), new SkillNameValue(SkillName.Swords, 30),
                    new SkillNameValue(SkillName.Anatomy, 30), new SkillNameValue(SkillName.Healing, 30)
                };
                break;
            }

            case 7:     //Ninja
            {
                skills = new[]
                {
                    new SkillNameValue(SkillName.Ninjitsu, 30), new SkillNameValue(SkillName.Hiding, 30),
                    new SkillNameValue(SkillName.Fencing, 30), new SkillNameValue(SkillName.Stealth, 30)
                };
                break;
            }

            default:
            {
                if (!ValidSkills(skills))
                {
                    return;
                }

                break;
            }
            }

            var addSkillItems = true;
            var elf           = (m.Race == Race.Elf);
            var human         = (m.Race == Race.Human);
            var gargoyle      = (m.Race == Race.Gargoyle);

            switch (prof)
            {
            case 1:     // Warrior
            {
                if (elf)
                {
                    EquipItem(new LeafChest());
                }
                else if (human)
                {
                    EquipItem(new LeatherChest());
                }
                else if (gargoyle)
                {
                    EquipItem(new GargishLeatherChest());
                }

                break;
            }

            case 4:     // Necromancer
            {
                Container regs = new BagOfNecroReagents(50);

                if (!Core.AOS)
                {
                    foreach (var item in regs.Items)
                    {
                        item.LootType = LootType.Newbied;
                    }
                }

                PackItem(regs);

                regs.LootType = LootType.Regular;

                if (elf || human)
                {
                    EquipItem(new BoneHelm());
                }

                if (elf)
                {
                    EquipItem(new ElvenMachete());
                    EquipItem(NecroHue(new LeafChest()));
                    EquipItem(NecroHue(new LeafArms()));
                    EquipItem(NecroHue(new LeafGloves()));
                    EquipItem(NecroHue(new LeafGorget()));
                    EquipItem(NecroHue(new LeafGorget()));
                    EquipItem(NecroHue(new ElvenPants()));         //TODO: Verify the pants
                    EquipItem(new ElvenBoots());
                }
                else if (human)
                {
                    EquipItem(new BoneHarvester());
                    EquipItem(NecroHue(new LeatherChest()));
                    EquipItem(NecroHue(new LeatherArms()));
                    EquipItem(NecroHue(new LeatherGloves()));
                    EquipItem(NecroHue(new LeatherGorget()));
                    EquipItem(NecroHue(new LeatherLegs()));
                    EquipItem(NecroHue(new Skirt()));
                    EquipItem(new Sandals(0x8FD));
                }
                else if (gargoyle)
                {
                    EquipItem(new GlassSword());
                    EquipItem(NecroHue(new GargishLeatherChest()));
                    EquipItem(NecroHue(new GargishLeatherArms()));
                    EquipItem(NecroHue(new GargishLeatherLegs()));
                    EquipItem(NecroHue(new GargishLeatherKilt()));
                }

                Spellbook
                    book = new NecromancerSpellbook(
                    (ulong)0x8981);             // animate dead, evil omen, pain spike, summon familiar, wraith form

                PackItem(book);

                book.LootType = LootType.Blessed;

                addSkillItems = false;
                break;
            }

            case 5:     // Paladin
            {
                if (elf)
                {
                    EquipItem(new ElvenMachete());
                    EquipItem(new WingedHelm());
                    EquipItem(new LeafGorget());
                    EquipItem(new LeafArms());
                    EquipItem(new LeafChest());
                    EquipItem(new LeafLegs());
                    EquipItem(new ElvenBoots());         //Verify hue
                }
                else if (human)
                {
                    EquipItem(new Broadsword());
                    EquipItem(new Helmet());
                    EquipItem(new PlateGorget());
                    EquipItem(new RingmailArms());
                    EquipItem(new RingmailChest());
                    EquipItem(new RingmailLegs());
                    EquipItem(new ThighBoots(0x748));
                    EquipItem(new Cloak(0xCF));
                    EquipItem(new BodySash(0xCF));
                }
                else if (gargoyle)
                {
                    EquipItem(new DreadSword());
                    EquipItem(new GargishPlateChest());
                    EquipItem(new GargishPlateArms());
                    EquipItem(new GargishPlateLegs());
                    EquipItem(new GargishPlateKilt());
                }

                Spellbook book = new BookOfChivalry((ulong)0x3FF);
                book.LootType = LootType.Blessed;
                PackItem(book);

                addSkillItems = false;
                break;
            }

            case 6:     // Samurai
            {
                if (elf || human)
                {
                    EquipItem(new HakamaShita(0x2C3));
                    EquipItem(new Hakama(0x2C3));
                    EquipItem(new SamuraiTabi(0x2C3));
                    EquipItem(new TattsukeHakama(0x22D));
                    EquipItem(new Bokuto());

                    if (elf)
                    {
                        EquipItem(new RavenHelm());
                    }
                    else
                    {
                        EquipItem(new LeatherJingasa());
                    }
                }
                else if (gargoyle)
                {
                    EquipItem(new GlassSword());
                    EquipItem(new GargishPlateChest());
                    EquipItem(new GargishPlateArms());
                    EquipItem(new GargishPlateLegs());
                    EquipItem(new GargishPlateKilt());
                }

                PackItem(new Scissors());
                PackItem(new Bandage(50));

                Spellbook book = new BookOfBushido();
                PackItem(book);

                addSkillItems = false;
                break;
            }

            case 7:     // Ninja
            {
                var hues = new[] { 0x1A8, 0xEC, 0x99, 0x90, 0xB5, 0x336, 0x89 };
                //TODO: Verify that's ALL the hues for that above.

                if (elf || human)
                {
                    EquipItem(new Kasa());
                    EquipItem(new TattsukeHakama(hues[Utility.Random(hues.Length)]));
                    EquipItem(new HakamaShita(0x2C3));
                    EquipItem(new NinjaTabi(0x2C3));

                    if (elf)
                    {
                        EquipItem(new AssassinSpike());
                    }
                    else
                    {
                        EquipItem(new Tekagi());
                    }
                }
                else if (gargoyle)
                {
                    EquipItem(new GargishDagger());

                    var hue = hues[Utility.Random(hues.Length)];

                    EquipItem(new GargishClothChestArmor(hue));
                    EquipItem(new GargishClothArmsArmor(hue));
                    EquipItem(new GargishClothLegsArmor(hue));
                    EquipItem(new GargishClothKiltArmor(hue));
                }

                PackItem(new SmokeBomb());

                Spellbook book = new BookOfNinjitsu();
                PackItem(book);

                addSkillItems = false;
                break;
            }
            }

            for (var i = 0; i < skills.Length; ++i)
            {
                var snv = skills[i];

                if (snv.Value > 0 && (snv.Name != SkillName.Stealth || prof == 7) && snv.Name != SkillName.RemoveTrap &&
                    snv.Name != SkillName.Spellweaving)
                {
                    var skill = m.Skills[snv.Name];

                    if (skill != null)
                    {
                        skill.BaseFixedPoint = snv.Value * 10;

                        if (addSkillItems)
                        {
                            AddSkillItems(snv.Name, m);
                        }
                    }
                }
            }
        }
        private static void SetSkills(Mobile m, SkillNameValue[] skills, int prof)
        {
            switch (prof)
            {
            case 1:                     // Warrior
            {
                skills = new SkillNameValue[]
                {
                    new SkillNameValue(SkillName.Anatomy, 30),
                    new SkillNameValue(SkillName.Healing, 45),
                    new SkillNameValue(SkillName.Swords, 35),
                    new SkillNameValue(SkillName.Tactics, 50)
                };

                break;
            }

            case 2:                     // Magician
            {
                skills = new SkillNameValue[]
                {
                    new SkillNameValue(SkillName.EvalInt, 30),
                    new SkillNameValue(SkillName.Wrestling, 30),
                    new SkillNameValue(SkillName.Magery, 50),
                    new SkillNameValue(SkillName.Meditation, 50)
                };

                break;
            }

            case 3:                     // Blacksmith
            {
                skills = new SkillNameValue[]
                {
                    new SkillNameValue(SkillName.Mining, 30),
                    new SkillNameValue(SkillName.ArmsLore, 30),
                    new SkillNameValue(SkillName.Blacksmith, 50),
                    new SkillNameValue(SkillName.Tinkering, 50)
                };

                break;
            }

            case 4:                     // Necromancer
            {
                skills = new SkillNameValue[]
                {
                    new SkillNameValue(SkillName.Necromancy, 50),
                    new SkillNameValue(SkillName.Focus, 30),
                    new SkillNameValue(SkillName.SpiritSpeak, 30),
                    new SkillNameValue(SkillName.Swords, 30),
                    new SkillNameValue(SkillName.Tactics, 20)
                };

                break;
            }

            case 5:                     // Paladin
            {
                skills = new SkillNameValue[]
                {
                    new SkillNameValue(SkillName.Chivalry, 51),
                    new SkillNameValue(SkillName.Swords, 49),
                    new SkillNameValue(SkillName.Focus, 30),
                    new SkillNameValue(SkillName.Tactics, 30)
                };

                break;
            }

            case 6:                     //Samurai
            {
                skills = new SkillNameValue[]
                {
                    new SkillNameValue(SkillName.Bushido, 50),
                    new SkillNameValue(SkillName.Swords, 50),
                    new SkillNameValue(SkillName.Anatomy, 30),
                    new SkillNameValue(SkillName.Healing, 30),
                };
                break;
            }

            case 7:                     //Ninja
            {
                skills = new SkillNameValue[]
                {
                    new SkillNameValue(SkillName.Ninjitsu, 50),
                    new SkillNameValue(SkillName.Hiding, 50),
                    new SkillNameValue(SkillName.Fencing, 30),
                    new SkillNameValue(SkillName.Stealth, 30),
                };
                break;
            }

            default:
            {
                if (!ValidSkills(skills))
                {
                    return;
                }

                break;
            }
            }

            bool addSkillItems = true;

            switch (prof)
            {
            case 1:                     // Warrior
            {
                EquipItem(new LeatherChest());
                break;
            }

            case 4:                     // Necromancer
            {
                Container regs = new BagOfNecroReagents(50);

                if (!Core.AOS)
                {
                    foreach (Item item in regs.Items)
                    {
                        item.LootType = LootType.Newbied;
                    }
                }

                PackItem(regs);

                regs.LootType = LootType.Regular;

                EquipItem(new BoneHarvester());
                EquipItem(new BoneHelm());

                EquipItem(NecroHue(new LeatherChest()));
                EquipItem(NecroHue(new LeatherArms()));
                EquipItem(NecroHue(new LeatherGloves()));
                EquipItem(NecroHue(new LeatherGorget()));
                EquipItem(NecroHue(new LeatherLegs()));
                EquipItem(NecroHue(new Skirt()));
                EquipItem(new Sandals(0x8FD));

                Spellbook book = new NecromancerSpellbook((ulong)0x8981);                           // animate dead, evil omen, pain spike, summon familiar, wraith form

                PackItem(book);

                book.LootType = LootType.Blessed;

                addSkillItems = false;

                break;
            }

            case 5:                     // Paladin
            {
                EquipItem(new Broadsword());
                EquipItem(new Helmet());
                EquipItem(new PlateGorget());
                EquipItem(new RingmailArms());
                EquipItem(new RingmailChest());
                EquipItem(new RingmailLegs());
                EquipItem(new ThighBoots(0x748));
                EquipItem(new Cloak(0xCF));
                EquipItem(new BodySash(0xCF));

                Spellbook book = new BookOfChivalry((ulong)0x3FF);

                PackItem(book);

                book.LootType = LootType.Blessed;

                break;
            }

            case 6:                     // Samurai
            {
                addSkillItems = false;
                EquipItem(new HakamaShita(0x2C3));
                EquipItem(new Hakama(0x2C3));
                EquipItem(new SamuraiTabi(0x2C3));
                EquipItem(new TattsukeHakama(0x22D));
                EquipItem(new Bokuto());
                EquipItem(new LeatherJingasa());
                EquipItem(new Scissors());
                EquipItem(new Bandage(50));

                Spellbook book = new BookOfBushido();
                PackItem(book);

                break;
            }

            case 7:                     // Ninja
            {
                addSkillItems = false;
                EquipItem(new Kasa());

                int[] hues = new int[] { 0x1A8, 0xEC, 0x99, 0x90, 0xB5, 0x336, 0x89 };
                //TODO: Verify that's ALL the hues for that above.

                EquipItem(new TattsukeHakama(hues[Utility.Random(hues.Length)]));

                EquipItem(new HakamaShita(0x2C3));
                EquipItem(new NinjaTabi(0x2C3));
                EquipItem(new Tekagi());
                //EquipItem( new Smokebomb() );

                Spellbook book = new BookOfNinjitsu( );
                PackItem(book);

                break;
            }
            }

            for (int i = 0; i < skills.Length; ++i)
            {
                SkillNameValue snv = skills[i];

                if (snv.Value > 0 && snv.Name != SkillName.Stealth && snv.Name != SkillName.RemoveTrap)
                {
                    Skill skill = m.Skills[snv.Name];

                    if (skill != null)
                    {
                        skill.BaseFixedPoint = snv.Value * 10;

                        if (addSkillItems)
                        {
                            AddSkillItems(snv.Name);
                        }
                    }
                }
            }
        }
Exemple #5
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is Mobile)
                {
                    Mobile targ = (Mobile)targeted;
                    if (from != targ)
                    {
                        from.SendMessage("You may only set your own body to GM style.");
                    }

                    else
                    {
                        m_Mobile = from;

                        CommandLogging.WriteLine(from, "{0} {1} is assuming a GM body", from.AccessLevel, CommandLogging.Format(from));

                        Container pack = from.Backpack;

                        ArrayList ItemsToDelete = new ArrayList();

                        foreach (Item item in from.Items)
                        {
                            if (item.Layer != Layer.Bank && item.Layer != Layer.Hair && item.Layer != Layer.FacialHair && item.Layer != Layer.Mount && item.Layer != Layer.Backpack)
                            {
                                ItemsToDelete.Add(item);
                            }
                        }
                        foreach (Item item in ItemsToDelete)
                        {
                            item.Delete();
                        }

                        if (pack == null)
                        {
                            pack         = new Backpack();
                            pack.Movable = false;

                            from.AddItem(pack);
                        }
                        else
                        {
                            pack.Delete();
                            pack         = new Backpack();
                            pack.Movable = false;

                            from.AddItem(pack);
                        }

                        from.Hunger  = 20;
                        from.Thirst  = 20;
                        from.Fame    = 0;
                        from.Karma   = 0;
                        from.Kills   = 0;
                        from.Hidden  = true;
                        from.Blessed = true;
                        from.Hits    = from.HitsMax;
                        from.Mana    = from.ManaMax;
                        from.Stam    = from.StamMax;

                        if (from.AccessLevel >= AccessLevel.Counselor)
                        {
                            EquipItem(new StaffRing());
                            Spellbook book1 = new Spellbook((ulong)18446744073709551615);
                            Spellbook book2 = new NecromancerSpellbook((ulong)0xffff);
                            Spellbook book3 = new BookOfChivalry();
                            Spellbook book4 = new BookOfBushido();
                            Spellbook book5 = new BookOfNinjitsu();

                            PackItem(new GMHidingStone());

                            PackItem(book1);
                            PackItem(book2);
                            PackItem(book3);
                            PackItem(book4);
                            PackItem(book5);
                            from.RawStr = 100;
                            from.RawDex = 100;
                            from.RawInt = 100;
                            from.Hits   = from.HitsMax;
                            from.Mana   = from.ManaMax;
                            from.Stam   = from.StamMax;

                            for (int i = 0; i < targ.Skills.Length; ++i)
                            {
                                targ.Skills[i].Base = 120;
                            }
                        }

                        if (from.AccessLevel == AccessLevel.Counselor)
                        {
                            EquipItem(new CounselorRobe());
                            EquipItem(new ThighBoots(3));
                            from.Title = "[Counselor]";
                        }

                        if (from.AccessLevel == AccessLevel.GameMaster)
                        {
                            EquipItem(new GMRobe());
                            EquipItem(new ThighBoots(39));
                            from.Title = "[GM]";
                        }

                        if (from.AccessLevel == AccessLevel.Seer)
                        {
                            EquipItem(new SeerRobe());
                            EquipItem(new ThighBoots(467));
                            from.Title = "[Seer]";
                        }

                        if (from.AccessLevel == AccessLevel.Administrator)
                        {
                            EquipItem(new AdminRobe());
                            EquipItem(new ThighBoots(1001));
                            from.Title = "[Admin]";
                        }

                        if (from.AccessLevel == AccessLevel.Developer)
                        {
                            EquipItem(new AdminRobe());
                            EquipItem(new ThighBoots(1001));
                            from.Title = "[Developer]";
                        }

                        if (from.AccessLevel == AccessLevel.Owner)
                        {
                            EquipItem(new AdminRobe());
                            EquipItem(new ThighBoots(1001));
                            from.Title = "[Owner]";
                        }
                    }
                }
            }