public override Item Dupe( int amount )
        {
            Spellbook book = new NecromancerSpellbook();

            book.Content = this.Content;

            return base.Dupe( book, amount );
        }
        public override Item Dupe(int amount)
        {
            Spellbook book = new NecromancerSpellbook();

            book.Content = this.Content;

            return(base.Dupe(book, amount));
        }
Beispiel #3
0
        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;
            bool elf = (m.Race == Race.Elf);

            switch ( prof )
            {
                case 1: // Warrior
                {
                    if ( elf )
                        EquipItem( new LeafChest() );
                    else
                        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 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
                    {
                        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 ) );
                    }

                    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
                    {
                        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;

                    addSkillItems = false;

                    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() );

                    if ( elf )
                        EquipItem( new RavenHelm() );
                    else
                        EquipItem( new LeatherJingasa() );

                    PackItem( new Scissors() );
                    PackItem( 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 ) );

                    if ( elf )
                        EquipItem( new AssassinSpike() );
                    else
                        EquipItem( new Tekagi() );

                    PackItem( 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 || prof == 7 ) && snv.Name != SkillName.RemoveTrap && snv.Name != SkillName.Spellweaving )
                {
                    Skill skill = m.Skills[snv.Name];

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

                        if ( addSkillItems )
                            AddSkillItems( snv.Name, m );
                    }
                }
            }
        }
        private void MoveParticipants()
        {
            m_Region = new DuelRegion(this);
            m_Region.Register();

            List<Item> fieldstoremove = new List<Item>();

            IPooledEnumerable ip = Map.GetItemsInBounds(Area2D);

            foreach (Item item in ip)
                if (item != null && item.GetType().IsDefined(typeof(DispellableFieldAttribute), false))
                    fieldstoremove.Add(item);

            ip.Free();

            foreach (Item item in fieldstoremove)
                if(!item.Deleted)
                    item.Delete();

            for(int i = 0; i < Participants.Length; i++)
            {
                Mobile m = Participants[i];

                    if (DuelType is DDDuelType)
                    m.SendLocalizedMessage(1060398, DuelSystem.GoldCost2v2.ToString()); // ~1_AMOUNT~ gold has been withdrawn from your bank box.

                else
                    m.SendLocalizedMessage(1060398, DuelSystem.GoldCost.ToString()); // ~1_AMOUNT~ gold has been withdrawn from your bank box.

                m.Frozen = true;
                m.Hidden = false;
                m.Map = Map;
                m.Hits = m.HitsMax;
                m.Mana = m.ManaMax;
                m.Stam = m.StamMax;

                TransformationSpellHelper.RemoveContext(m, true);
                for(int j = m.StatMods.Count -1; j >= 0; j--)
                {
                    StatMod st = m.StatMods[j];
                    if (st.Name.StartsWith("[Magic]"))
                        m.StatMods.RemoveAt(j);
                }
                if (m.Spell != null && m.Spell.IsCasting)
                    m.Spell.OnCasterHurt();
                Targeting.Target.Cancel(m);
                m.CloseGump(typeof(SummonFamiliarGump));
                List<Item> armthis = new List<Item>();
                MoveMob(m, 1);

                SunnySystem.Undress(m, ItemNotAllowed);

                if (SpellWatch)
                {
                    SpellWatcher sw = new SpellWatcher(m);
                    SpellWatchList.Add(sw);
                }

                if (DuelType is TMFDuelType || DuelType is UMFDuelType)
                {
                    DuelBlockAddon dba = new DuelBlockAddon();
                    if (m == Starter)
                        blockadd0 = dba;
                    else
                        blockadd1 = dba;
                    dba.MoveToWorld(m.Location, m.Map);

                    if (DuelType is UMFDuelType)
                    {
                        armthis.Add(new Spellbook(ulong.MaxValue));
                        if (m.Skills[SkillName.Magery].Value > 80)
                        {
                            NecromancerSpellbook book = new NecromancerSpellbook();
                            book.Content = 0x1FFFF;
                            armthis.Add(book);
                        }
                        GoldRing ring = new GoldRing();
                        ring.Attributes.LowerRegCost = 100;
                        ring.LootType = LootType.Cursed;
                        armthis.Add(ring);
                    }
                }

                if (DuelType is UDFDuelType)
                {
                    armthis.Add(new Bandage(75));

                    if (m.Skills[SkillName.Chivalry].Value > 80)
                    {
                        BookOfChivalry bookch = new BookOfChivalry();
                        bookch.Content = 1023;
                        armthis.Add(bookch);
                    }

                    if (m.Skills[SkillName.Necromancy].Value > 80)
                    {
                        NecromancerSpellbook book = new NecromancerSpellbook();
                        book.Content = 0x1FFFF;
                        armthis.Add(book);
                    }

                    GoldRing ring = new GoldRing();
                    ring.Attributes.LowerRegCost = 100;
                    armthis.Add(ring);

                    if (m.Skills[SkillName.Fencing].Value > 80)
                    {
                        armthis.Add(new BladedStaff());
                        armthis.Add(new DoubleBladedStaff());
                        armthis.Add(new Pike());
                        armthis.Add(new Pitchfork());
                        armthis.Add(new ShortSpear());
                        armthis.Add(new Spear());
                        armthis.Add(new Kryss());
                        armthis.Add(new WarFork());
                    }

                    if (m.Skills[SkillName.Swords].Value > 80)
                    {
                        //armthis.Add(new BoneHarvester());
                        armthis.Add(new Broadsword());
                        //armthis.Add(new Pike());
                        armthis.Add(new CrescentBlade());
                        //armthis.Add(new Cutlass());
                        armthis.Add(new Katana());
                        armthis.Add(new Longsword());
                        armthis.Add(new Scimitar());
                        //armthis.Add(new VikingSword());
                        //armthis.Add(new Bardiche());
                        //armthis.Add(new Halberd());
                        armthis.Add(new BattleAxe());
                        armthis.Add(new Pickaxe());
                        //armthis.Add(new WarAxe());
                    }

                    if (m.Skills[SkillName.Macing].Value > 80)
                    {
                        armthis.Add(new Club());
                        armthis.Add(new HammerPick());
                        armthis.Add(new Mace());
                        armthis.Add(new Maul());
                        armthis.Add(new Scepter());
                        armthis.Add(new WarHammer());
                        armthis.Add(new WarMace());
                    }

                    if (m.Skills[SkillName.Archery].Value > 80)
                    {
                        armthis.Add(new Bolt(50));
                        armthis.Add(new Arrow(50));
                        armthis.Add(new Bow());
                        armthis.Add(new CompositeBow());
                        armthis.Add(new Crossbow());
                        armthis.Add(new HeavyCrossbow());
                        armthis.Add(new RepeatingCrossbow());
                    }

                    if (m.Skills[SkillName.Parry].Value > 80)
                        armthis.Add(new MetalKiteShield());
                }

                if (armthis.Count > 0)
                    SunnySystem.ArmPlayer(m, armthis);
            }

            m_Wall = new DuelWall();
            if (m_Wid != 0)
                m_Wall.ItemID = m_Wid;
            m_Wall.Hue = m_Wue;
            m_Wall.MoveToWorld(Locations[1], Map);

            new DuelTimer(this, 10, TimeSpan.FromSeconds(1.0)).Start();
        }
        public override void IncreaseTier()
        {
            base.IncreaseTier();

            List<object> list = new List<object>();
            Item c;

            // don't know names above lev 6
            switch ( this.Tier )
            {
                case 1:
                    c = new BookOfChivalry();
                    c.MoveToWorld(new Point3D(2924, 979, -18), this.Map);
                    c.Movable = false;
                    list.Add(c);

                    c = new Longsword();
                    c.MoveToWorld(new Point3D(2923, 980, -18), this.Map);
                    c.Movable = false;
                    c.ItemID = 0x26CF;
                    list.Add(c);

                    c = new Shirt();
                    c.MoveToWorld(new Point3D(2924, 978, -18), this.Map);
                    c.Movable = false;
                    c.ItemID = 0x2662;
                    c.Name = "Crisp White Shirt";
                    list.Add(c);
                    break;
                case 2:
                    c = new GraveDust();
                    c.MoveToWorld(new Point3D(2921, 972, -17), this.Map);
                    c.Movable = false;
                    list.Add(c);

                    c = new NoxCrystal();
                    c.MoveToWorld(new Point3D(2921, 972, -17), this.Map);
                    c.Movable = false;
                    list.Add(c);

                    c = new Static(0xF91);
                    c.MoveToWorld(new Point3D(2921, 972, -17), this.Map);
                    c.Movable = false;
                    list.Add(c);

                    c = new NecromancerSpellbook();
                    c.MoveToWorld(new Point3D(2922, 972, -18), this.Map);
                    c.Movable = false;
                    list.Add(c);

                    c = new AnimateDeadScroll();
                    c.MoveToWorld(new Point3D(2923, 972, -18), this.Map);
                    c.Movable = false;
                    list.Add(c);

                    c = new HorrificBeastScroll();
                    c.MoveToWorld(new Point3D(2923, 972, -18), this.Map);
                    c.Movable = false;
                    list.Add(c);

                    c = new VampiricEmbraceScroll();
                    c.MoveToWorld(new Point3D(2923, 971, -20), this.Map);
                    c.Movable = false;
                    list.Add(c);

                    c = new Static(0xFDD);
                    c.MoveToWorld(new Point3D(2922, 971, -21), this.Map);
                    list.Add(c);

                    c = new Static(0xFDE);
                    c.MoveToWorld(new Point3D(2923, 971, -21), this.Map);
                    list.Add(c);

                    break;
                case 3:
                    c = new JesterSuit();
                    c.MoveToWorld(new Point3D(2919, 985, -16), this.Map);
                    c.Movable = false;
                    list.Add(c);

                    c = new LocalizedStatic(0xE74, 1073424);
                    c.MoveToWorld(new Point3D(2919, 984, -11), this.Map);
                    c.Movable = false;
                    c.Weight = 50.0;
                    c.Hue = 0x113;
                    list.Add(c);

                    c = new JesterHat();
                    c.MoveToWorld(new Point3D(2919, 983, -13), this.Map);
                    c.Movable = false;
                    c.Hue = 0x113;
                    list.Add(c);

                    break;
                case 4:
                    c = new Static(0xD25);
                    c.MoveToWorld(new Point3D(2916, 984, -13), this.Map);
                    c.Movable = false;
                    list.Add(c);

                    c = new Static(0x20D9);
                    c.MoveToWorld(new Point3D(2916, 982, -12), this.Map);
                    c.Name = "Gargoyle";
                    list.Add(c);

                    c = new Static(0x2132);
                    c.MoveToWorld(new Point3D(2914, 982, -9), this.Map);
                    list.Add(c);

                    c = new Static(0x25B6);
                    c.MoveToWorld(new Point3D(2913, 982, -13), this.Map);
                    list.Add(c);

                    c = new Static(0x25B6);
                    c.MoveToWorld(new Point3D(2913, 982, -13), this.Map);
                    list.Add(c);

                    c = new Static(0x222E);
                    c.MoveToWorld(new Point3D(2915, 983, -14), this.Map);
                    list.Add(c);

                    c = new Static(0x2211);
                    c.MoveToWorld(new Point3D(2914, 984, -13), this.Map);
                    list.Add(c);

                    break;
                case 5:
                    c = new LocalizedStatic(0xE30, 1073421);
                    c.MoveToWorld(new Point3D(2911, 983, -12), this.Map);
                    c.Weight = 10.0;
                    list.Add(c);

                    c = new LocalizedStatic(0x2937, 1073422);
                    c.MoveToWorld(new Point3D(2911, 984, -13), this.Map);
                    list.Add(c);

                    c = new LocalizedStatic(0x12AA, 1073423);
                    c.MoveToWorld(new Point3D(2911, 985, -14), this.Map);
                    list.Add(c);

                    c = new Static(0xEAF);
                    c.MoveToWorld(new Point3D(2910, 985, -21), this.Map);
                    c.Weight = 5.0;
                    list.Add(c);

                    c = new Static(0xEAE);
                    c.MoveToWorld(new Point3D(2910, 986, -21), this.Map);
                    c.Weight = 5.0;
                    list.Add(c);

                    break;
                case 6:
                    c = new Tessen();
                    c.MoveToWorld(new Point3D(2910, 966, -17), this.Map);
                    c.Movable = false;
                    list.Add(c);

                    c = new Shuriken();
                    c.MoveToWorld(new Point3D(2910, 965, -17), this.Map);
                    c.Movable = false;
                    list.Add(c);

                    c = new Static(0x2855);
                    c.MoveToWorld(new Point3D(2910, 964, -16), this.Map);
                    c.Weight = 5.0;
                    list.Add(c);

                    c = new Static(0x241D);
                    c.MoveToWorld(new Point3D(2910, 963, -20), this.Map);
                    c.Weight = 5.0;
                    list.Add(c);

                    c = new Static(0x2409);
                    c.MoveToWorld(new Point3D(2910, 963, -17), this.Map);
                    list.Add(c);

                    c = new Static(0x2416);
                    c.MoveToWorld(new Point3D(2909, 965, -17), this.Map);
                    list.Add(c);

                    break;
                case 7:
                    c = new Static(0x3069);
                    c.MoveToWorld(new Point3D(2914, 964, -21), this.Map);
                    list.Add(c);

                    c = new Static(0x306A);
                    c.MoveToWorld(new Point3D(2913, 964, -21), this.Map);
                    list.Add(c);

                    c = new Static(0x306B);
                    c.MoveToWorld(new Point3D(2912, 964, -21), this.Map);
                    list.Add(c);

                    c = new ElvenLoveseatEastAddon();
                    c.MoveToWorld(new Point3D(2913, 966, -21), this.Map);
                    c.Movable = false;
                    list.Add(c);

                    c = new Static(0x2CFC);
                    c.MoveToWorld(new Point3D(2912, 963, -21), this.Map);
                    list.Add(c);

                    c = new LocalizedStatic(0x2D74, 1073425);
                    c.MoveToWorld(new Point3D(2914, 963, -21), this.Map);
                    list.Add(c);

                    break;
                case 8:
                    c = new Static(0x2);
                    c.MoveToWorld(new Point3D(2905, 970, -15), this.Map);
                    list.Add(c);

                    c = new Static(0x3);
                    c.MoveToWorld(new Point3D(2905, 969, -15), this.Map);
                    list.Add(c);

                    c = new OrderShield();
                    c.MoveToWorld(new Point3D(2905, 971, -17), this.Map);
                    c.Movable = false;
                    list.Add(c);

                    c = new Static(0x1579);
                    c.MoveToWorld(new Point3D(2904, 971, -21), this.Map);
                    list.Add(c);

                    c = new Static(0x1613);
                    c.MoveToWorld(new Point3D(2908, 969, -21), this.Map);
                    list.Add(c);

                    c = new Static(0x1614);
                    c.MoveToWorld(new Point3D(2908, 968, -21), this.Map);
                    list.Add(c);

                    break;
                case 9:
                    c = new Static(0x1526);
                    c.MoveToWorld(new Point3D(2905, 976, -15), this.Map);
                    list.Add(c);

                    c = new Static(0x1527);
                    c.MoveToWorld(new Point3D(2905, 975, -15), this.Map);
                    list.Add(c);

                    c = new Static(0x151A);
                    c.MoveToWorld(new Point3D(2905, 972, -21), this.Map);
                    list.Add(c);

                    c = new Static(0x151A);
                    c.MoveToWorld(new Point3D(2905, 977, -21), this.Map);
                    list.Add(c);

                    c = new Static(0x151A);
                    c.MoveToWorld(new Point3D(2908, 972, -21), this.Map);
                    list.Add(c);

                    c = new Static(0x151A);
                    c.MoveToWorld(new Point3D(2908, 977, -21), this.Map);
                    list.Add(c);

                    c = new Static(0x1514);
                    c.MoveToWorld(new Point3D(2904, 975, -17), this.Map);
                    list.Add(c);

                    break;
                case 10:
                    c = new Static(0x15C5);
                    c.MoveToWorld(new Point3D(2904, 982, -21), this.Map);
                    list.Add(c);

                    c = new Static(0x15C5);
                    c.MoveToWorld(new Point3D(2904, 979, -21), this.Map);
                    list.Add(c);

                    c = new Static(0x157B);
                    c.MoveToWorld(new Point3D(2904, 981, -21), this.Map);
                    list.Add(c);

                    c = new Static(0x14E3);
                    c.MoveToWorld(new Point3D(2905, 980, -21), this.Map);
                    list.Add(c);

                    c = new Static(0x14E4);
                    c.MoveToWorld(new Point3D(2905, 981, -21), this.Map);
                    list.Add(c);

                    c = new Static(0x14E5);
                    c.MoveToWorld(new Point3D(2906, 981, -21), this.Map);
                    list.Add(c);

                    c = new Static(0x14E6);
                    c.MoveToWorld(new Point3D(2906, 980, -21), this.Map);
                    list.Add(c);

                    c = new ChaosShield();
                    c.MoveToWorld(new Point3D(2905, 978, -19), this.Map);
                    c.Movable = false;
                    list.Add(c);

                    break;
                case 11:
                    c = new FemaleStuddedChest();
                    c.MoveToWorld(new Point3D(2912, 976, -16), this.Map);
                    c.Movable = false;
                    c.Hue = 0x497;
                    list.Add(c);

                    c = new Static(0x1EA8);
                    c.MoveToWorld(new Point3D(2913, 973, -13), this.Map);
                    c.Hue = 0x497;
                    list.Add(c);

                    c = new Static(0x20F8);
                    c.MoveToWorld(new Point3D(2913, 975, -11), this.Map);
                    c.Hue = 0x113;
                    list.Add(c);

                    c = new Static(0x20E9);
                    c.MoveToWorld(new Point3D(2912, 974, -11), this.Map);
                    c.Name = "Troll";
                    list.Add(c);

                    c = new Static(0x2607);
                    c.MoveToWorld(new Point3D(2913, 974, -11), this.Map);
                    list.Add(c);

                    c = new Static(0x25F9);
                    c.MoveToWorld(new Point3D(2912, 975, -11), this.Map);
                    list.Add(c);

                    break;
                case 12:
                    c = new Static(0x1D8A);
                    c.MoveToWorld(new Point3D(2915, 976, -13), this.Map);
                    list.Add(c);

                    c = new Static(0x1D8B);
                    c.MoveToWorld(new Point3D(2916, 976, -13), this.Map);
                    list.Add(c);

                    c = new Static(0x234D);
                    c.MoveToWorld(new Point3D(2915, 975, -10), this.Map);
                    list.Add(c);

                    c = new WizardsHat();
                    c.MoveToWorld(new Point3D(2915, 974, -13), this.Map);
                    c.Movable = false;
                    list.Add(c);
                    break;
            }

            if (list.Count > 0)
                this.Tiers.Add(list);
        }
Beispiel #6
0
        private static void	AddSkillItems(SkillName skill, Mobile m)
        {
            bool elf = (m.Race == Race.Elf);
            bool human = (m.Race == Race.Human);
            bool gargoyle = (m.Race == Race.Gargoyle);

            switch ( skill )
            {
                case SkillName.Alchemy:
                    {
                        PackItem(new Bottle(4));
                        PackItem(new MortarPestle());

                        int hue = Utility.RandomPinkHue();

                        if (elf)
                        {
                            if (m.Female)
                                EquipItem(new FemaleElvenRobe(hue));
                            else
                                EquipItem(new MaleElvenRobe(hue));
                        }
                        else
                        {
                            EquipItem(new Robe(Utility.RandomPinkHue()));
                        }
                        break;
                    }
                case SkillName.Anatomy:
                    {
                        PackItem(new Bandage(3));

                        int hue = Utility.RandomYellowHue();

                        if (elf)
                        {
                            if (m.Female)
                                EquipItem(new FemaleElvenRobe(hue));
                            else
                                EquipItem(new MaleElvenRobe(hue));
                        }
                        else
                        {
                            EquipItem(new Robe(hue));
                        }
                        break;
                    }
                case SkillName.AnimalLore:
                    {
                        int hue = Utility.RandomBlueHue();

                        if (elf)
                        {
                            EquipItem(new WildStaff());

                            if (m.Female)
                                EquipItem(new FemaleElvenRobe(hue));
                            else
                                EquipItem(new MaleElvenRobe(hue));
                        }
                        else
                        {
                            EquipItem(new ShepherdsCrook());
                            EquipItem(new Robe(hue));
                        }
                        break;
                    }
                case SkillName.Archery:
                    {
                        PackItem(new Arrow(25));

                        if (elf)
                            EquipItem(new ElvenCompositeLongbow());
                        else if (human)
                            EquipItem(new Bow());
					
                        break;
                    }
                case SkillName.ArmsLore:
                    {
                        if (elf)
                        {
                            switch ( Utility.Random(3) )
                            {
                                case 0:
                                    EquipItem(new Leafblade());
                                    break;
                                case 1:
                                    EquipItem(new RuneBlade());
                                    break;
                                case 2:
                                    EquipItem(new DiamondMace());
                                    break;
                            }
                        }
                        else if (human)
                        {
                            switch ( Utility.Random(3) )
                            {
                                case 0:
                                    EquipItem(new Kryss());
                                    break;
                                case 1:
                                    EquipItem(new Katana());
                                    break;
                                case 2:
                                    EquipItem(new Club());
                                    break;
                            }
                        }
                        else if (gargoyle)
                        {
                            switch( Utility.Random(3) )
                            {
                                case 0:
                                    EquipItem(new BloodBlade());
                                    break;
                                case 1:
                                    EquipItem(new GlassSword());
                                    break;
                                case 2:
                                    EquipItem(new DiscMace());
                                    break;
                            }
                        }

                        break;
                    }
                case SkillName.Begging:
                    {
                        if (elf)
                            EquipItem(new WildStaff());
                        else if (human)
                            EquipItem(new GnarledStaff());
                        else if (gargoyle)
                            EquipItem(new SerpentStoneStaff());

                        break;
                    }
                case SkillName.Blacksmith:
                    {
                        PackItem(new Tongs());
                        PackItem(new Pickaxe());
                        PackItem(new Pickaxe());
                        PackItem(new IronIngot(50));
					
                        if (human || elf)
                        {
                            EquipItem(new HalfApron(Utility.RandomYellowHue()));
                        }

                        break;
                    }
                case SkillName.Bushido:
                    {
                        if (human || elf)
                        {
                            EquipItem(new Hakama());
                            EquipItem(new Kasa());
                        }

                        EquipItem(new BookOfBushido());
                        break;
                    }
                case SkillName.Fletching:
                    {
                        PackItem(new Board(14));
                        PackItem(new Feather(5));
                        PackItem(new Shaft(5));
                        break;
                    }
                case SkillName.Camping:
                    {
                        PackItem(new Bedroll());
                        PackItem(new Kindling(5));
                        break;
                    }
                case SkillName.Carpentry:
                    {
                        PackItem(new Board(10));
                        PackItem(new Saw());

                        if (human || elf)
                        {
                            EquipItem(new HalfApron(Utility.RandomYellowHue()));
                        }

                        break;
                    }
                case SkillName.Cartography:
                    {
                        PackItem(new BlankMap());
                        PackItem(new BlankMap());
                        PackItem(new BlankMap());
                        PackItem(new BlankMap());
                        PackItem(new Sextant());
                        break;
                    }
                case SkillName.Cooking:
                    {
                        PackItem(new Kindling(2));
                        PackItem(new RawLambLeg());
                        PackItem(new RawChickenLeg());
                        PackItem(new RawFishSteak());
                        PackItem(new SackFlour());
                        PackItem(new Pitcher(BeverageType.Water));
                        break;
                    }
                case SkillName.Chivalry:
                    {
                        if (Core.ML)
                            PackItem(new BookOfChivalry((ulong)0x3FF));

                        break;
                    }
                case SkillName.DetectHidden:
                    {
                        if (human || elf)
                            EquipItem(new Cloak(0x455));

                        break;
                    }
                case SkillName.Discordance:
                    {
                        PackInstrument();
                        break;
                    }
                case SkillName.Fencing:
                    {
                        if (elf)
                            EquipItem(new Leafblade());
                        else if (human)
                            EquipItem(new Kryss());
                        else if (gargoyle)
                            EquipItem(new BloodBlade());

                        break;
                    }
                case SkillName.Fishing:
                    {
                        EquipItem(new FishingPole());

                        int hue = Utility.RandomYellowHue();

                        if (elf)
                        {
                            Item i = new Circlet();
                            i.Hue = hue;
                            EquipItem(i);
                        }
                        else if (human)
                        {
                            EquipItem(new FloppyHat(hue));
                        }

                        break;
                    }
                case SkillName.Healing:
                    {
                        PackItem(new Bandage(50));
                        PackItem(new Scissors());
                        break;
                    }
                case SkillName.Herding:
                    {
                        if (elf)
                            EquipItem(new WildStaff());
                        else
                            EquipItem(new ShepherdsCrook());

                        break;
                    }
                case SkillName.Hiding:
                    {
                        if (human || elf)
                            EquipItem(new Cloak(0x455));

                        break;
                    }
                case SkillName.Inscribe:
                    {
                        PackItem(new BlankScroll(2));
                        PackItem(new BlueBook());
                        break;
                    }
                case SkillName.ItemID:
                    {
                        if (elf)
                            EquipItem(new WildStaff());
                        else if (human)
                            EquipItem(new GnarledStaff());
                        else if (gargoyle)
                            EquipItem(new SerpentStoneStaff());

                        break;
                    }
                case SkillName.Lockpicking:
                    {
                        PackItem(new Lockpick(20));
                        break;
                    }
                case SkillName.Lumberjacking:
                    {
                        if (human || elf)
                            EquipItem(new Hatchet());
                        else if (gargoyle)
                            EquipItem(new DualShortAxes());

                        break;
                    }
                case SkillName.Macing:
                    {
                        if (elf)
                            EquipItem(new DiamondMace());
                        else if (human)
                            EquipItem(new Club());
                        else if (gargoyle)
                            EquipItem(new DiscMace());

                        break;
                    }
                case SkillName.Magery:
                    {
                        BagOfAllReagents regs = new BagOfAllReagents(30);

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

                        PackItem(regs);

                        regs.LootType = LootType.Regular;

                        PackScroll(0);
                        PackScroll(1);
                        PackScroll(2);

                        Spellbook book = new Spellbook((ulong)0x382A8C38);
                        book.LootType = LootType.Blessed;
                        EquipItem(book);

                        if (elf)
                        {
                            EquipItem(new Circlet());

                            if (m.Female)
                                EquipItem(new FemaleElvenRobe(Utility.RandomBlueHue()));
                            else
                                EquipItem(new MaleElvenRobe(Utility.RandomBlueHue()));
                        }
                        else
                        {
                            if (human)
                                EquipItem(new WizardsHat());

                            EquipItem(new Robe(Utility.RandomBlueHue()));
                        }

                        break;
                    }
                case SkillName.Mining:
                    {
                        PackItem(new Pickaxe());
                        break;
                    }
                case SkillName.Musicianship:
                    {
                        PackInstrument();
                        break;
                    }
                case SkillName.Necromancy:
                    {
                        if (Core.ML)
                        {
                            Container regs = new BagOfNecroReagents(50);

                            PackItem(regs);

                            regs.LootType = LootType.Regular;
                        }

                        // RunUO fix
                        Spellbook book = new NecromancerSpellbook((ulong)0x8981); // animate dead, evil omen, pain spike, summon familiar, wraith form
                        book.LootType = LootType.Blessed;
                        PackItem(book);

                        break;
                    }
                case SkillName.Ninjitsu:
                    {
                        if (human || elf)
                        {
                            EquipItem(new Hakama(0x2C3));	//Only ninjas get the hued one.
                            EquipItem(new Kasa());
                        }

                        EquipItem(new BookOfNinjitsu());
                        break;
                    }
                case SkillName.Parry:
                    {
                        if (human || elf)
                            EquipItem(new WoodenShield());
                        else if (gargoyle)
                            EquipItem(new GargishWoodenShield());

                        break;
                    }
                case SkillName.Peacemaking:
                    {
                        PackInstrument();
                        break;
                    }
                case SkillName.Poisoning:
                    {
                        PackItem(new LesserPoisonPotion());
                        PackItem(new LesserPoisonPotion());
                        break;
                    }
                case SkillName.Provocation:
                    {
                        PackInstrument();
                        break;
                    }
                case SkillName.Snooping:
                    {
                        PackItem(new Lockpick(20));
                        break;
                    }
                case SkillName.SpiritSpeak:
                    {
                        if (human || elf)
                        {
                            EquipItem(new Cloak(0x455));
                        }

                        break;
                    }
                case SkillName.Stealing:
                    {
                        PackItem(new Lockpick(20));
                        break;
                    }
                case SkillName.Swords:
                    {
                        if (elf)
                            EquipItem(new RuneBlade());
                        else if (human)
                            EquipItem(new Katana());
                        else if (gargoyle)
                            EquipItem(new GlassSword());

                        break;
                    }
                case SkillName.Tactics:
                    {
                        if (elf)
                            EquipItem(new RuneBlade());
                        else if (human)
                            EquipItem(new Katana());
                        else if (gargoyle)
                            EquipItem(new GlassSword());

                        break;
                    }
                case SkillName.Tailoring:
                    {
                        PackItem(new BoltOfCloth());
                        PackItem(new SewingKit());
                        break;
                    }
                case SkillName.Tracking:
                    {
                        if (human || elf)
                        {
                            if (m_Mobile != null)
                            {
                                Item shoes = m_Mobile.FindItemOnLayer(Layer.Shoes);

                                if (shoes != null)
                                    shoes.Delete();
                            }

                            int hue = Utility.RandomYellowHue();

                            if (elf)
                                EquipItem(new ElvenBoots(hue));
                            else
                                EquipItem(new Boots(hue));

                            EquipItem(new SkinningKnife());
                        }
                        else if (gargoyle)
                            PackItem(new SkinningKnife());

                        break;
                    }
                case SkillName.Veterinary:
                    {
                        PackItem(new Bandage(5));
                        PackItem(new Scissors());
                        break;
                    }
                case SkillName.Wrestling:
                    {
                        if (elf)
                            EquipItem(new LeafGloves());
                        else if (human)
                            EquipItem(new LeatherGloves());
                        else if (gargoyle)
                        {
                            // Why not give them arm armor?
                            EquipItem(new GargishLeatherArms());
                        }

                        break;
                    }
                case SkillName.Throwing:
                    {
                        if (gargoyle)
                            EquipItem(new Boomerang());

                        break;
                    }
            }
        }
        /// <summary>
        /// This is the function gives weaponry to players.
        /// </summary>
        private static void ArmPlayer(CTFPlayerGameData pgd)
        {
            Mobile m = pgd.Mob;

            if (!m.Alive)
                m.Resurrect();

            for (int i = m.Items.Count - 1; i >= 0; --i)
            {
                Item item = (Item)m.Items[i];
                if (item.Layer == Layer.OuterTorso)
                {
                    item.Delete();
                    break;
                }
            }

            List<Item> armthis = new List<Item>();

            if(GiveRobe)
                armthis.Add(new CTFRobe(pgd.Team));

            Item rankedCloth = null;
            CTFTeam team = pgd.Team;

            // 21 Ranks
            switch (CTFData.GetRank(m))
            {
                default:
                case 0: rankedCloth = new JesterHat(team.Hue); break;
                case 1: rankedCloth = new TallStrawHat(team.Hue); break;
                case 2: rankedCloth = new FloppyHat(team.Hue); break;
                case 3: rankedCloth = new WideBrimHat(team.Hue); break;
                case 4: rankedCloth = new Cap(team.Hue); break;
                case 5: rankedCloth = new SkullCap(team.Hue); break;
                case 6: rankedCloth = new FlowerGarland(team.Hue); break;
                case 7: rankedCloth = new StrawHat(team.Hue); break;
                case 8: rankedCloth = new FeatheredHat(team.Hue); break;
                case 9: rankedCloth = new TricorneHat(team.Hue); break;
                case 10: rankedCloth = new TribalMask(team.Hue); break;
                case 11: rankedCloth = new HornedTribalMask(team.Hue); break;
                case 12: rankedCloth = new BearMask(team.Hue); break;
                case 13: rankedCloth = new DeerMask(team.Hue); break;
                case 14: rankedCloth = new OrcishKinMask(team.Hue); break;
                case 15: rankedCloth = new SavageMask(team.Hue); break;
                case 16: rankedCloth = new WizardsHat(team.Hue); break;
                case 17: rankedCloth = new Bandana(team.Hue); break;
                case 18: rankedCloth = new ClothNinjaHood(team.Hue); break;
                case 19: rankedCloth = new Kasa(team.Hue); break;
                case 20:
                    rankedCloth = new BoneHelm();
                    rankedCloth.Hue = team.Hue;
                    ((BaseArmor)rankedCloth).ArmorAttributes.MageArmor = 1;
                    break;
            }
            if (rankedCloth != null)
            {
                rankedCloth.Movable = false;
                armthis.Add(rankedCloth);
            }

            //Alchemy removed by Blady
            /* 			if (m.Skills[SkillName.Alchemy].Value >= (m_MinSupplySkill + 15)) //80 Alchemy req - by Blady
            {
                for (int i = 0; i < 6; i++) //Amount reduced to 6 by Blady - used to be 10
                {
                    armthis.Add(new ExplosionPotion());
                    armthis.Add(new GreaterHealPotion());
                    armthis.Add(new GreaterCurePotion());
                    armthis.Add(new GreaterAgilityPotion());
                    armthis.Add(new RefreshPotion());
                    armthis.Add(new GreaterStrengthPotion());
                }
            } */

            if (m.Skills[SkillName.Chivalry].Value >= m_MinSupplySkill)
            {
                BookOfChivalry book = new BookOfChivalry();
                book.Content = 1023;//all spells
                armthis.Add(book);
            }

            if (m.Skills[SkillName.Necromancy].Value >= m_MinSupplySkill)
            {
                NecromancerSpellbook book = new NecromancerSpellbook();
                book.Content = 0x1FFFF;
                armthis.Add(book);
            }

            if (m.Skills[SkillName.Magery].Value >= m_MinSupplySkill)
            {
                GnarledStaff gs = new GnarledStaff();
                gs.Attributes.SpellChanneling = 1;
                gs.WeaponAttributes.MageWeapon = 20;
                armthis.Add(gs);

                Spellbook book = new Spellbook();
                book.Content = ulong.MaxValue;
                armthis.Add(book);
            }

            if (m.Skills[SkillName.Healing].Value >= m_MinSupplySkill)
                armthis.Add(new Bandage(1000));

            if (m.Skills[SkillName.Fencing].Value >= m_MinSupplySkill)
            {
                Spear sp = new Spear();
                sp.Attributes.SpellChanneling = 1;
                armthis.Add(sp);

                ShortSpear ssp = new ShortSpear();
                ssp.Attributes.SpellChanneling = 1;
                armthis.Add(ssp);

                WarFork wf = new WarFork();
                wf.Attributes.SpellChanneling = 1;
                armthis.Add(wf);

                Kryss k = new Kryss();
                k.Attributes.SpellChanneling = 1;
                armthis.Add(k);
            }

            if (m.Skills[SkillName.Swords].Value >= m_MinSupplySkill)
            {
                if (m.Skills[SkillName.Lumberjacking].Value >= m_MinSupplySkill)
                {
                    ExecutionersAxe ea = new ExecutionersAxe();
                    ea.Attributes.SpellChanneling = 1;
                    armthis.Add(ea);
                }

                Katana k = new Katana();
                k.Attributes.SpellChanneling = 1;
                armthis.Add(k);

                Longsword ls = new Longsword();
                ls.Attributes.SpellChanneling = 1;
                armthis.Add(ls);

                Cleaver c = new Cleaver();
                c.Attributes.SpellChanneling = 1;
                armthis.Add(c);

                BoneHarvester bh = new BoneHarvester();
                bh.Attributes.SpellChanneling = 1;
                armthis.Add(bh);
            }

            if (m.Skills[SkillName.Macing].Value >= m_MinSupplySkill)
            {
                WarAxe wa = new WarAxe();
                wa.Attributes.SpellChanneling = 1;
                armthis.Add(wa);

                HammerPick hp = new HammerPick();
                hp.Attributes.SpellChanneling = 1;
                armthis.Add(hp);

                QuarterStaff qs = new QuarterStaff();
                qs.Attributes.SpellChanneling = 1;
                armthis.Add(qs);
            }

            if (m.Skills[SkillName.Archery].Value >= m_MinSupplySkill)
            {
                Bow b = new Bow();
                b.Attributes.SpellChanneling = 1;
                armthis.Add(b);

                Crossbow xb = new Crossbow();
                xb.Attributes.SpellChanneling = 1;
                armthis.Add(xb);

                CompositeBow cb = new CompositeBow();
                cb.Attributes.SpellChanneling = 1;
                armthis.Add(cb);

                armthis.Add(new Arrow(150));
                armthis.Add(new Bolt(150));
            }

            if (m.Skills[SkillName.Poisoning].Value >= m_MinSupplySkill)
            {
                for (int i = 0; i < 2; i++)
                    armthis.Add(new GreaterPoisonPotion());
            }

            if (m.Skills[SkillName.Parry].Value >= m_MinSupplySkill)
            {
                MetalKiteShield ks = new MetalKiteShield();
                ks.Attributes.SpellChanneling = 1;
                armthis.Add(ks);
            }

            SunnySystem.ArmPlayer(m, armthis);
        }
Beispiel #8
0
        protected override void OnAfterDeath( Container c )
        {
            NecromancerSpellbook book = new NecromancerSpellbook();
            book.Content = ( 1ul << book.BookCount ) - 1;
            c.DropItem( book );

            base.OnAfterDeath( c );
        }
Beispiel #9
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;

						if ( pack == null )
						{
							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]";
						}
					}
				}
			}
Beispiel #10
0
        public override void IncreaseTier()
        {
            base.IncreaseTier();

            List <object> list = new List <object>();
            Item          c;

            // don't know names above lev 6
            switch (Tier)
            {
            case 1:
                c = new BookOfChivalry();
                c.MoveToWorld(new Point3D(2924, 979, -18), Map);
                c.Movable = false;
                list.Add(c);

                c = new Longsword();
                c.MoveToWorld(new Point3D(2923, 980, -18), Map);
                c.Movable = false;
                c.ItemID  = 0x26CF;
                list.Add(c);

                c = new Shirt();
                c.MoveToWorld(new Point3D(2924, 978, -18), Map);
                c.Movable = false;
                c.ItemID  = 0x2662;
                c.Name    = "Crisp White Shirt";
                list.Add(c);
                break;

            case 2:
                c = new GraveDust();
                c.MoveToWorld(new Point3D(2921, 972, -17), Map);
                c.Movable = false;
                list.Add(c);

                c = new NoxCrystal();
                c.MoveToWorld(new Point3D(2921, 972, -17), Map);
                c.Movable = false;
                list.Add(c);

                c = new Static(0xF91);
                c.MoveToWorld(new Point3D(2921, 972, -17), Map);
                c.Movable = false;
                list.Add(c);

                c = new NecromancerSpellbook();
                c.MoveToWorld(new Point3D(2922, 972, -18), Map);
                c.Movable = false;
                list.Add(c);

                c = new AnimateDeadScroll();
                c.MoveToWorld(new Point3D(2923, 972, -18), Map);
                c.Movable = false;
                list.Add(c);

                c = new HorrificBeastScroll();
                c.MoveToWorld(new Point3D(2923, 972, -18), Map);
                c.Movable = false;
                list.Add(c);

                c = new VampiricEmbraceScroll();
                c.MoveToWorld(new Point3D(2923, 971, -20), Map);
                c.Movable = false;
                list.Add(c);

                c = new Static(0xFDD);
                c.MoveToWorld(new Point3D(2922, 971, -21), Map);
                list.Add(c);

                c = new Static(0xFDE);
                c.MoveToWorld(new Point3D(2923, 971, -21), Map);
                list.Add(c);

                break;

            case 3:
                c = new JesterSuit();
                c.MoveToWorld(new Point3D(2919, 985, -16), Map);
                c.Movable = false;
                list.Add(c);

                c = new LocalizedStatic(0xE74, 1073424);
                c.MoveToWorld(new Point3D(2919, 984, -11), Map);
                c.Movable = false;
                c.Weight  = 50.0;
                c.Hue     = 0x113;
                list.Add(c);

                c = new JesterHat();
                c.MoveToWorld(new Point3D(2919, 983, -13), Map);
                c.Movable = false;
                c.Hue     = 0x113;
                list.Add(c);

                break;

            case 4:
                c = new Static(0xD25);
                c.MoveToWorld(new Point3D(2916, 984, -13), Map);
                c.Movable = false;
                list.Add(c);

                c = new Static(0x20D9);
                c.MoveToWorld(new Point3D(2916, 982, -12), Map);
                c.Name = "Gargoyle";
                list.Add(c);

                c = new Static(0x2132);
                c.MoveToWorld(new Point3D(2914, 982, -9), Map);
                list.Add(c);

                c = new Static(0x25B6);
                c.MoveToWorld(new Point3D(2913, 982, -13), Map);
                list.Add(c);

                c = new Static(0x25B6);
                c.MoveToWorld(new Point3D(2913, 982, -13), Map);
                list.Add(c);

                c = new Static(0x222E);
                c.MoveToWorld(new Point3D(2915, 983, -14), Map);
                list.Add(c);

                c = new Static(0x2211);
                c.MoveToWorld(new Point3D(2914, 984, -13), Map);
                list.Add(c);

                break;

            case 5:
                c = new LocalizedStatic(0xE30, 1073421);
                c.MoveToWorld(new Point3D(2911, 983, -12), Map);
                c.Weight = 10.0;
                list.Add(c);

                c = new LocalizedStatic(0x2937, 1073422);
                c.MoveToWorld(new Point3D(2911, 984, -13), Map);
                list.Add(c);

                c = new LocalizedStatic(0x12AA, 1073423);
                c.MoveToWorld(new Point3D(2911, 985, -14), Map);
                list.Add(c);

                c = new Static(0xEAF);
                c.MoveToWorld(new Point3D(2910, 985, -21), Map);
                c.Weight = 5.0;
                list.Add(c);

                c = new Static(0xEAE);
                c.MoveToWorld(new Point3D(2910, 986, -21), Map);
                c.Weight = 5.0;
                list.Add(c);

                break;

            case 6:
                c = new Tessen();
                c.MoveToWorld(new Point3D(2910, 966, -17), Map);
                c.Movable = false;
                list.Add(c);

                c = new Shuriken();
                c.MoveToWorld(new Point3D(2910, 965, -17), Map);
                c.Movable = false;
                list.Add(c);

                c = new Static(0x2855);
                c.MoveToWorld(new Point3D(2910, 964, -16), Map);
                c.Weight = 5.0;
                list.Add(c);

                c = new Static(0x241D);
                c.MoveToWorld(new Point3D(2910, 963, -20), Map);
                c.Weight = 5.0;
                list.Add(c);

                c = new Static(0x2409);
                c.MoveToWorld(new Point3D(2910, 963, -17), Map);
                list.Add(c);

                c = new Static(0x2416);
                c.MoveToWorld(new Point3D(2909, 965, -17), Map);
                list.Add(c);

                break;

            case 7:
                c = new Static(0x3069);
                c.MoveToWorld(new Point3D(2914, 964, -21), Map);
                list.Add(c);

                c = new Static(0x306A);
                c.MoveToWorld(new Point3D(2913, 964, -21), Map);
                list.Add(c);

                c = new Static(0x306B);
                c.MoveToWorld(new Point3D(2912, 964, -21), Map);
                list.Add(c);

                c = new ElvenLoveseatEastAddon();
                c.MoveToWorld(new Point3D(2913, 966, -21), Map);
                c.Movable = false;
                list.Add(c);

                c = new Static(0x2CFC);
                c.MoveToWorld(new Point3D(2912, 963, -21), Map);
                list.Add(c);

                c = new LocalizedStatic(0x2D74, 1073425);
                c.MoveToWorld(new Point3D(2914, 963, -21), Map);
                list.Add(c);


                break;

            case 8:
                c = new Static(0x2);
                c.MoveToWorld(new Point3D(2905, 970, -15), Map);
                list.Add(c);

                c = new Static(0x3);
                c.MoveToWorld(new Point3D(2905, 969, -15), Map);
                list.Add(c);

                c = new OrderShield();
                c.MoveToWorld(new Point3D(2905, 971, -17), Map);
                c.Movable = false;
                list.Add(c);

                c = new Static(0x1579);
                c.MoveToWorld(new Point3D(2904, 971, -21), Map);
                list.Add(c);

                c = new Static(0x1613);
                c.MoveToWorld(new Point3D(2908, 969, -21), Map);
                list.Add(c);

                c = new Static(0x1614);
                c.MoveToWorld(new Point3D(2908, 968, -21), Map);
                list.Add(c);

                break;

            case 9:
                c = new Static(0x1526);
                c.MoveToWorld(new Point3D(2905, 976, -15), Map);
                list.Add(c);

                c = new Static(0x1527);
                c.MoveToWorld(new Point3D(2905, 975, -15), Map);
                list.Add(c);

                c = new Static(0x151A);
                c.MoveToWorld(new Point3D(2905, 972, -21), Map);
                list.Add(c);

                c = new Static(0x151A);
                c.MoveToWorld(new Point3D(2905, 977, -21), Map);
                list.Add(c);

                c = new Static(0x151A);
                c.MoveToWorld(new Point3D(2908, 972, -21), Map);
                list.Add(c);

                c = new Static(0x151A);
                c.MoveToWorld(new Point3D(2908, 977, -21), Map);
                list.Add(c);

                c = new Static(0x1514);
                c.MoveToWorld(new Point3D(2904, 975, -17), Map);
                list.Add(c);

                break;

            case 10:
                c = new Static(0x15C5);
                c.MoveToWorld(new Point3D(2904, 982, -21), Map);
                list.Add(c);

                c = new Static(0x15C5);
                c.MoveToWorld(new Point3D(2904, 979, -21), Map);
                list.Add(c);

                c = new Static(0x157B);
                c.MoveToWorld(new Point3D(2904, 981, -21), Map);
                list.Add(c);

                c = new Static(0x14E3);
                c.MoveToWorld(new Point3D(2905, 980, -21), Map);
                list.Add(c);

                c = new Static(0x14E4);
                c.MoveToWorld(new Point3D(2905, 981, -21), Map);
                list.Add(c);

                c = new Static(0x14E5);
                c.MoveToWorld(new Point3D(2906, 981, -21), Map);
                list.Add(c);

                c = new Static(0x14E6);
                c.MoveToWorld(new Point3D(2906, 980, -21), Map);
                list.Add(c);

                c = new ChaosShield();
                c.MoveToWorld(new Point3D(2905, 978, -19), Map);
                c.Movable = false;
                list.Add(c);

                break;

            case 11:
                c = new FemaleStuddedChest();
                c.MoveToWorld(new Point3D(2912, 976, -16), Map);
                c.Movable = false;
                c.Hue     = 0x497;
                list.Add(c);

                c = new Static(0x1EA8);
                c.MoveToWorld(new Point3D(2913, 973, -13), Map);
                c.Hue = 0x497;
                list.Add(c);

                c = new Static(0x20F8);
                c.MoveToWorld(new Point3D(2913, 975, -11), Map);
                c.Hue = 0x113;
                list.Add(c);

                c = new Static(0x20E9);
                c.MoveToWorld(new Point3D(2912, 974, -11), Map);
                c.Name = "Troll";
                list.Add(c);

                c = new Static(0x2607);
                c.MoveToWorld(new Point3D(2913, 974, -11), Map);
                list.Add(c);

                c = new Static(0x25F9);
                c.MoveToWorld(new Point3D(2912, 975, -11), Map);
                list.Add(c);

                break;

            case 12:
                c = new Static(0x1D8A);
                c.MoveToWorld(new Point3D(2915, 976, -13), Map);
                list.Add(c);

                c = new Static(0x1D8B);
                c.MoveToWorld(new Point3D(2916, 976, -13), Map);
                list.Add(c);

                c = new Static(0x234D);
                c.MoveToWorld(new Point3D(2915, 975, -10), Map);
                list.Add(c);

                c = new WizardsHat();
                c.MoveToWorld(new Point3D(2915, 974, -13), Map);
                c.Movable = false;
                list.Add(c);
                break;
            }

            if (list.Count > 0)
            {
                Tiers.Add(list);
            }
        }
Beispiel #11
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            if (!e.Handled && Active)
            {
                Mobile m = e.Mobile;

                if (!Creatures && !m.Player)
                {
                    return;
                }

                if (!m.InRange(GetWorldLocation(), m_Range))
                {
                    return;
                }

                // Scriptiz : on vérifie si le mot clé est présent
                if (m_Keyword == null)
                {
                    return;
                }
                if (e.Speech.ToLower().IndexOf(m_Keyword.ToLower()) < 0)
                {
                    return;
                }

                // On vérifie que chaque joueur possède bien la nécro requise, le spirit speak requis
                // le karma requis, et que le groupe possède suffisament de nécro
                List <PlayerMobile> necros = new List <PlayerMobile>();
                double totalNecro          = 0;
                foreach (Mobile mob in this.GetMobilesInRange(m_Range))
                {
                    PlayerMobile pm = mob as PlayerMobile;
                    if (pm == null)
                    {
                        continue;
                    }
                    if (pm.AccessLevel > AccessLevel.Player)
                    {
                        continue;
                    }
                    if (!pm.Alive)
                    {
                        continue;
                    }

                    // Si un joueur ne possède pas le montant de nécro requis, on annule le transfert
                    Skill sk = m.Skills[SkillName.Necromancy];
                    if (sk == null || sk.Base < m_PlayerNecroRequired)
                    {
                        pm.SendMessage("Votre connaissance des arts nécromants est trop faible pour continuer.");
                        return;
                    }

                    // On ajoute le montant de nécro du joueur au total nécro pour vérif ultérieure
                    totalNecro += sk.Base;

                    // Si un joueur ne possède pas le montant de Spirit Speak requis, on annule le transfert
                    sk = pm.Skills[SkillName.SpiritSpeak];
                    if (sk == null || sk.Base < m_PlayerSpiritRequired)
                    {
                        pm.SendMessage("Votre connaissance du monde des morts est trop faible pour continuer.");
                        return;
                    }

                    // Si le joueur ne possède pas assez de Karma négatif, on annule le transfert
                    if (pm.Karma > m_PlayerKarmaRequired)
                    {
                        pm.SendMessage("Vous n'êtes pas encore assez impur pour continuer.");
                        return;
                    }

                    necros.Add(pm); // On ajoute le PM a la liste des PJ qui se présentent
                }

                // S'il n'y a pas assez de nécro on annule le transfert
                if (necros.Count < m_NumNecroRequired)
                {
                    foreach (PlayerMobile pm in necros)
                    {
                        if (pm != null)
                        {
                            pm.SendMessage("Vous n'êtes pas assez pour activer cette salle.");
                        }
                    }

                    return;
                }

                // Si le montant de nécro de l'ensemble des joueurs n'est pas suffisant on annule le transfert
                if (totalNecro < m_GroupNecroRequired)
                {
                    foreach (PlayerMobile pm in necros)
                    {
                        if (pm != null)
                        {
                            pm.SendMessage("Vos connaissances des arts nécromants réunies ne parviennent pas à activer cette salle.");
                        }
                    }

                    return;
                }

                // On regarde si tous les nécros ont les sorts que l'on peut trouver dans la salle
                bool allHaveSpells = true;
                foreach (PlayerMobile pm in necros)
                {
                    if (pm == null)
                    {
                        continue;
                    }

                    bool haveNecroBook = false;
                    foreach (Item i in pm.Items)
                    {
                        if (i is NecromancerSpellbook)
                        {
                            haveNecroBook = true;
                            NecromancerSpellbook nsb = (NecromancerSpellbook)i;
                            if (m_SpellId1 != -1 && !nsb.HasSpell(m_SpellId1))
                            {
                                allHaveSpells = false;
                            }
                            else if (m_SpellId2 != -1 && !nsb.HasSpell(m_SpellId2))
                            {
                                allHaveSpells = false;
                            }
                            else if (m_SpellId3 != -1 && !nsb.HasSpell(m_SpellId3))
                            {
                                allHaveSpells = false;
                            }
                            else if (m_SpellId4 != -1 && !nsb.HasSpell(m_SpellId4))
                            {
                                allHaveSpells = false;
                            }
                            else if (m_SpellId5 != -1 && !nsb.HasSpell(m_SpellId5))
                            {
                                allHaveSpells = false;
                            }
                            else if (m_SpellId6 != -1 && !nsb.HasSpell(m_SpellId6))
                            {
                                allHaveSpells = false;
                            }
                            if (!allHaveSpells)
                            {
                                break;
                            }
                        }
                    }
                    if (!haveNecroBook)
                    {
                        pm.SendMessage("Vous devez équiper votre livre afin d'ouvrir le passage.");
                        return;
                    }
                    if (!allHaveSpells)
                    {
                        break;
                    }
                }

                // S'ils ont tous les sorts que l'on peut trouver, on annule le transfert
                if (allHaveSpells)
                {
                    foreach (PlayerMobile pm in necros)
                    {
                        if (pm != null)
                        {
                            pm.SendMessage("Vous possédez déjà tous ce que vous pourriez trouver ici.");
                        }
                    }

                    return;
                }

                // Si tout est bon on téléporte les nécros !
                e.Handled = true;
                foreach (PlayerMobile pm in necros)
                {
                    if (pm != null)
                    {
                        StartTeleport(pm);
                    }
                }
            }
        }