public override bool OnBeforeDeath()
        {
            Frozen = true;
            Yell(Utility.RandomBool() ? "The Dark Lord welcomes me fool..." : "Why..?");
            AddLoot(LootPack.FilthyRich, 2);
            AddLoot(LootPack.Rich, 2);
            AddLoot(LootPack.Average, 2);
            AddLoot(LootPack.Gems, 5);
            PackItem(new Gold(1400, 1900));

            if (0.05 >= Utility.RandomDouble())
            {
                var scroll = new SkillScroll();
                scroll.Randomize();
                PackItem(scroll);
            }
            if (0.1 >= Utility.RandomDouble())
            {
                PackItem(new covenpaint());
            }

            if (0.5 >= Utility.RandomDouble())
            {
                PackItem(new ChaosScroll());
            }

            return base.OnBeforeDeath();
        }
		public override bool OnBeforeDeath()
		{
			AddLoot(LootPack.FilthyRich, 2);
			AddLoot(LootPack.Rich, 2);
			AddLoot(LootPack.Average, 2);
			AddLoot(LootPack.Gems, 5);

			PackItem(new Gold(1400, 1900));

			if (0.05 >= Utility.RandomDouble())
			{
				var scroll = new SkillScroll();
				scroll.Randomize();
				PackItem(scroll);
			}

			if (0.1 >= Utility.RandomDouble())
			{
				PackItem(new CultistPaint());
			}

			/*if (0.0002 >= Utility.RandomDouble())
            {
                SpecialHairDye hairdye = new SpecialHairDye();
                hairdye.Name = "cultist hair treatment";
                PackItem(hairdye);
            }*/

			return true;
		}
Beispiel #3
0
		public override void GenerateLoot()
		{
			AddLoot( LootPack.FilthyRich );
			AddLoot( LootPack.Rich );
            if (0.02 >= Utility.RandomDouble())
            { SkillScroll scroll = new SkillScroll(); scroll.Randomize(); PackItem(scroll); }
		}
        public override void OnDeath(Container c)
        {
            if (Utility.RandomDouble() >= 0.15)
            {
                var scroll = new SkillScroll();
                scroll.Randomize();
                c.DropItem(scroll);

            }
            if (Utility.RandomDouble() >= 0.15)
            {
                var scroll = new SkillScroll();
                scroll.Randomize();
                c.DropItem(scroll);

            }

            c.DropItem(new Platinum { Amount = 25 });
            c.DropItem(new GargoyleRune());
            if (Utility.RandomDouble() < 0.5)
            {
                c.DropItem(new GargoyleRune());
            }
            if (Utility.RandomDouble() < 0.1)
            {
                c.DropItem(new GargoyleRune());
            }

            base.OnDeath(c);
        }
Beispiel #5
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadEncodedInt();

            switch (version)
            {
            case 1:
            {
                m_Flags      = (PeacemakingSkillScrollFlags)reader.ReadEncodedInt();
                m_ExpireDate = reader.ReadDateTime();
                goto case 0;
            }

            case 0:
            {
                m_SkillBonus = reader.ReadInt();
                break;
            }
            }

            //We save it just in case, then delete it afterwards
            if (Expires && DateTime.UtcNow >= m_ExpireDate)
            {
                AddToCleanup(this);
            }
            SkillScroll.ConvertSkillScroll(this, m_OldSkills[0]);
        }
		public override void GenerateLoot()
		{
			AddLoot( LootPack.Rich );
			AddLoot( LootPack.MedScrolls, 2 );

		if ( 0.04 > Utility.RandomDouble() )// 2 percent - multipy number x 100 to get percent
            { SkillScroll scroll = new SkillScroll(); scroll.Randomize(); PackItem(scroll); }
		}
		public override void GenerateLoot()
		{
			AddLoot( LootPack.Poor, Utility.Random( 1, 1 ) );
			AddLoot( LootPack.Meager );

            if (0.02 >= Utility.RandomDouble())
            { SkillScroll scroll = new SkillScroll(); scroll.Randomize(); PackItem(scroll); }
		}
		public override void GenerateLoot()
		{
			AddLoot( LootPack.Average, 2 );
			AddLoot( LootPack.Gems, 2 );

            if ( 0.06 > Utility.RandomDouble() )// 6 percent 
                { SkillScroll scroll = new SkillScroll(); scroll.Randomize(); PackItem(scroll); }
		}
Beispiel #9
0
        public override void GenerateLoot()
        {
            AddLoot(LootPack.UltraRich, 4);
            AddLoot(LootPack.FilthyRich);

            var scroll = new SkillScroll();
            scroll.Randomize();
            PackItem(scroll);
        }
		public override void GenerateLoot()
		{
			AddLoot( LootPack.Rich );
			AddLoot( LootPack.Average, 2 );
			AddLoot( LootPack.MedScrolls, 2 );
			AddLoot( LootPack.Potions );

		if ( 0.04 > Utility.RandomDouble() ) // 4% chance
            { SkillScroll scroll = new SkillScroll(); scroll.Randomize(); PackItem(scroll); }
		}
Beispiel #11
0
		public override void GenerateLoot()
		{
			AddLoot( LootPack.Rich, 9 );
            if (0.02 >= Utility.RandomDouble())
            { SkillScroll scroll = new SkillScroll(); scroll.Randomize(); PackItem(scroll); }
			AddPackedLoot( LootPack.RichProvisions, typeof( Pouch ) );
			AddPackedLoot( LootPack.MeagerProvisions, typeof( Bag ) );
			if ( 0.5 > Utility.RandomDouble() )
				AddPackedLoot( LootPack.AverageProvisions, typeof( Backpack ) );
		}
Beispiel #12
0
		public override void GenerateLoot()
		{
			AddLoot( LootPack.Average, 2 );
			if ( Utility.Random( 250 ) == 0 )
				PackItem( new OrcishPickaxe() );
			else
				PackItem( new Shovel() );

            if (0.02 >= Utility.RandomDouble())
            { SkillScroll scroll = new SkillScroll(); scroll.Randomize(); PackItem(scroll); }
		}
Beispiel #13
0
				public override void GenerateLoot()
		{
			AddLoot( LootPack.FilthyRich, 2 );
			AddLoot( LootPack.Rich, 2 );
			AddLoot( LootPack.Average, 2 );
			AddLoot( LootPack.HighScrolls );
			AddLoot( LootPack.Gems, 5 );

            if (0.10 >= Utility.RandomDouble())
            { SkillScroll scroll = new SkillScroll(); scroll.Randomize(); PackItem(scroll); }
		}
Beispiel #14
0
        public override void GenerateLoot()
        {
            AddLoot(LootPack.FilthyRich, 8);

            if (0.08 > Utility.RandomDouble()) // 2 percent - multiply number x 100 to get percent
            {
                var scroll = new SkillScroll();
                scroll.Randomize();
                PackItem(scroll);
            }
        }
Beispiel #15
0
        public override void GenerateLoot()
        {
            AddLoot(LootPack.Average);
            AddLoot(LootPack.LowScrolls);

            if (0.02 >= Utility.RandomDouble())
            {
                var scroll = new SkillScroll();
                scroll.Randomize();
                PackItem(scroll);
            }
        }
Beispiel #16
0
        public SkillScrollUI(
            PlayerMobile user,
            Gump parent                  = null,
            SkillScroll scroll           = null,
            Action <GumpButton> onAccept = null,
            Action <GumpButton> onCancel = null)
            : base(user, parent, null, 100, null, null, 23001, onAccept, onCancel)
        {
            _SkillScroll = scroll;

            CanMove = true;
            Modal   = false;
        }
Beispiel #17
0
        public OgreMage() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Hue = 1502;
            Body = 83;
            BaseSoundID = 427;

            Alignment = Alignment.Giantkin;

            SetStr(945, 1023);
            SetDex(66, 75);
            SetInt(536, 675);

            SetHits(670, 792);

            SetDamage(25, 32);


            SetSkill(SkillName.MagicResist, 125.1, 140.0);
            SetSkill(SkillName.Tactics, 90.1, 100.0);
            SetSkill(SkillName.Wrestling, 90.1, 100.0);

            SetSkill(SkillName.Magery, 90.1, 110.0);

            SetSkill(SkillName.EvalInt, 90.1, 100.0);
            SetSkill(SkillName.Meditation, 90.1, 110.0);


            Fame = 15000;
            Karma = -15000;

            VirtualArmor = 75;

            var weapon = new Club();

            weapon.DamageLevel = (WeaponDamageLevel) Utility.Random(1, 5);
            weapon.DurabilityLevel = (WeaponDurabilityLevel) Utility.Random(0, 5);
            weapon.AccuracyLevel = (WeaponAccuracyLevel) Utility.Random(0, 5);

            PackItem(weapon);

            PackArmor(0, 5);
            PackWeapon(0, 5);
            PackGold(1100, 1400);

            if (0.04 > Utility.RandomDouble()) // 2 percent - multipy number x 100 to get percent
            {
                var scroll = new SkillScroll();
                scroll.Randomize();
                PackItem(scroll);
            }
        }
        public SkillScrollUI(
			PlayerMobile user,
			Gump parent = null,
			SkillScroll scroll = null,
			Action<GumpButton> onAccept = null,
			Action<GumpButton> onCancel = null)
			: base(user, parent, null, 100, null, null, 23001, onAccept, onCancel)
		{
            _SkillScroll = scroll;

			CanMove = true;
			Modal = false;

		}
		public override void OnResponse( NetState sender, RelayInfo info ) {
            if (info.ButtonID != 0)
            {
                _from.CloseGump(_gumpToClose.GetType());

                SkillScroll scroll = new SkillScroll();
                _from.AddToBackpack(scroll);
            }
            else
            {
                _from.SendGump(_gumpToClose);
            }

		}
Beispiel #20
0
        public override void GenerateLoot()
        {
            AddLoot(LootPack.FilthyRich);
            AddLoot(LootPack.Average);
            AddLoot(LootPack.MedScrolls);
            AddPackedLoot(LootPack.AverageProvisions, typeof(Bag));
            AddPackedLoot(LootPack.RichProvisions, typeof(Pouch));

            if (0.08 > Utility.RandomDouble()) // 2 percent - multipy number x 100 to get percent
            {
                var scroll = new SkillScroll();
                scroll.Randomize();
                PackItem(scroll);
            }
        }
        public override bool OnBeforeDeath()
        {
            if (1.00 > Utility.RandomDouble())
            {
                PackItem(new Gold(Utility.RandomMinMax(800, 1200)));
            }

            if (0.06 > Utility.RandomDouble()) // 2 percent - multipy number x 100 to get percent
            {
                var scroll = new SkillScroll();
                scroll.Randomize();
                PackItem(scroll);
            }
            return base.OnBeforeDeath();
        }
Beispiel #22
0
        public static Item CreateRandomSkillScroll()
        {
            Item skillscroll = null;
            int  roll        = Utility.Random(49);

            if (roll == 0)
            {
                skillscroll = new ClothingBlessDeed();
            }
            else
            {
                skillscroll = new SkillScroll();
            }
            return(skillscroll);
        }
Beispiel #23
0
		public override void GenerateLoot()
		{
			AddLoot( LootPack.Rich, 3 );
			AddLoot( LootPack.MedScrolls, 2 );
            if (0.02 >= Utility.RandomDouble())
            { SkillScroll scroll = new SkillScroll(); scroll.Randomize(); PackItem(scroll); }

			  if (0.002 > Utility.RandomDouble())// 2 percent - multipy number x 100 to get percent

                switch (Utility.Random(2))
                { // rolls and number it gives it a case. if the number is , say , 3 it will pack that item
                    case 0: PackItem(new BlackDyeTub()); break;
                    case 1: PackItem(new Sandals(1175)); break;
                }
        }
Beispiel #24
0
        public override void OnDeath(Container c)
        {
            var scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            base.OnDeath(c);
        }
		public override bool OnBeforeDeath()
		{
			AddLoot(LootPack.FilthyRich, 2);
			AddLoot(LootPack.Rich, 2);
			AddLoot(LootPack.Average, 2);
			AddLoot(LootPack.Gems, 5);

			PackItem(new Gold(1400, 1900));

			if (0.05 >= Utility.RandomDouble())
			{
				var scroll = new SkillScroll();
				scroll.Randomize();
				PackItem(scroll);
			}

			if (0.1 >= Utility.RandomDouble())
			{
				PackItem(new CultistPaint());
			}

			if (0.01 > Utility.RandomDouble())
			{
			    int ItemID = 0;
                switch (Utility.Random(7))
                {
                    case 0: ItemID = 7026; break;
                    case 1: ItemID = 5102; break;
                    case 2: ItemID = 5104; break;
                    case 3: ItemID = 5099; break;
                    case 4: ItemID = 5100; break;
                    case 5: ItemID = 5134; break;
                    case 6: ItemID = 5139; break;
                }
				PackItem(new AncientArmorNew(ItemID));
			}

			return true;
		}
Beispiel #26
0
 public static void ConvertSkillScrollOperation(Item scroll, SkillName skillname)
 {
     try
     {
         var convertedScroll = new SkillScroll(1);
         convertedScroll.SkillName = skillname;
         if (scroll.Parent != null)
         {
             if (scroll.Parent is Container)
             {
                 var scrollParent = (Container)scroll.Parent;
                 scrollParent.AddItem(convertedScroll);
                 convertedScroll.X = scroll.X;
                 convertedScroll.Y = scroll.Y;
                 convertedScroll.Z = scroll.Z;
                 if (scroll.IsLockedDown)
                 {
                     BaseHouse house = BaseHouse.FindHouseAt(scroll.RootParentEntity as Item);
                     if (house == null)
                     {
                         LoggingCustom.Log("LOG_ScrollFail.txt",
                                           scroll + "\t" + skillname + "\t" + scroll.Location + "\tHOUSE WAS NULL!");
                     }
                     else
                     {
                         house.Release(house.Owner, scroll);
                         house.LockDown(house.Owner, convertedScroll);
                         LoggingCustom.Log("LOG_ScrollFail.txt",
                                           scroll + "\t" + skillname + "\t" + scroll.Location + "\tLOCKED DOWN IN CONTAINER");
                     }
                 }
                 if (scroll.RootParentEntity is PlayerVendor)
                 {
                     var pv = scroll.RootParentEntity as PlayerVendor;
                     if (pv.Owner != null)
                     {
                         pv.Owner.BankBox.AddItem(convertedScroll);
                         LoggingCustom.Log("LOG_ScrollVendor.txt",
                                           scroll + "\t" + skillname + "\t" + scroll.Location + "\t" + scroll.RootParentEntity);
                     }
                 }
                 scroll.Delete();
             }
             else
             {
                 LoggingCustom.Log("LOG_ScrollFail.txt", scroll + "\t" + skillname + "\t" + scroll.Location);
             }
             if (scroll.RootParentEntity != null)
             {
                 LoggingCustom.Log("LOG_ScrollConvert.txt",
                                   skillname + "\towner: " + scroll.RootParentEntity + "\t" + scroll.RootParentEntity.Location);
             }
         }
         else if (scroll.Map == Map.Felucca)
         {
             LoggingCustom.Log("LOG_ScrollConvert.txt", skillname + "\towner: null\t" + scroll.Location);
             convertedScroll.MoveToWorld(scroll.Location, scroll.Map);
             if (scroll.IsLockedDown)
             {
                 BaseHouse house = BaseHouse.FindHouseAt(scroll);
                 house.Release(house.Owner, scroll);
                 house.LockDown(house.Owner, convertedScroll);
                 LoggingCustom.Log("LOG_ScrollFail.txt",
                                   scroll + "\t" + skillname + "\t" + scroll.Location + "\tlockdown on house floor");
             }
             scroll.Delete();
         }
         else
         {
             LoggingCustom.Log("LOG_ScrollFail.txt", scroll + "\t" + skillname + "\t" + scroll.Location);
         }
     }
     catch (Exception e)
     {
         LoggingCustom.Log("LOG_ScrollFail.txt", e.Message + "\n" + e.StackTrace);
     }
 }
        public override bool OnBeforeDeath()
        {
            AddLoot(LootPack.FilthyRich, 3);
            AddLoot(LootPack.Rich, 3);
            AddLoot(LootPack.MedScrolls, 3);
            AddLoot(LootPack.HighScrolls, 2);
            PackItem(new Gold(1400, 1800));

            if (0.05 >= Utility.RandomDouble())
            {
                var scroll = new SkillScroll();
                scroll.Randomize();
                PackItem(scroll);
            }
            if (0.05 >= Utility.RandomDouble())
                PackItem(new BoneContainer());
            return base.OnBeforeDeath();
        }
        public override void OnDeath(Container c)
        {
            c.DropItem(new Platinum {Amount = 50});
            c.DropItem(new GargoyleRune());
            if (Utility.RandomDouble() < 0.5)
            {
                c.DropItem(new GargoyleRune());
            }
            if (Utility.RandomDouble() < 0.1)
            {
                c.DropItem(new GargoyleRune());
            }

            var scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            if (Utility.RandomDouble() < 0.01)
            {
                c.DropItem(new LummoxStatue{ Hue = Hue });
            }

            base.OnDeath(c);
        }
Beispiel #29
0
        private void Fill()
        {
            if (m_Filled)
            {
                return;
            }

            m_Filled = true;

            TrapType  = TrapType.ExplosionTrap;
            TrapPower = m_Level * 25;
            TrapLevel = m_Level;
            Locked    = true;

            switch (m_Level)
            {
            case 1:
                RequiredSkill = 36;
                break;

            case 2:
                RequiredSkill = 76;
                break;

            case 3:
                RequiredSkill = 84;
                break;

            case 4:
                RequiredSkill = 92;
                break;

            case 5:
                RequiredSkill = 100;
                break;
            }

            LockLevel    = RequiredSkill - 10;
            MaxLockLevel = RequiredSkill + 40;

            DropItem(new Gold(m_Level * 200));

            for (int i = 0; i < m_Level; ++i)
            {
                DropItem(Loot.RandomScroll(0, 63, SpellbookType.Regular));
                DropItem(new Platinum(PseudoSeerStone.ParagonChestPlatinumPerLevel));
            }

            for (int i = 0; i < m_Level * 2; ++i)
            {
                Item item = Loot.RandomArmorOrShieldOrWeapon();

                if (item is BaseWeapon)
                {
                    var weapon = (BaseWeapon)item;

                    int damageLevel = PseudoSeerStone.GetDamageLevel(m_Level);

                    if (PseudoSeerStone.HighestDamageLevelSpawn < damageLevel)
                    {
                        /*if (damageLevel == 5 && PseudoSeerStone.ReplaceVanqWithSkillScrolls)
                         * {
                         *      DropItem(PuzzleChest.CreateRandomSkillScroll());
                         * }*/

                        int platAmount = PseudoSeerStone.PlatinumPerMissedDamageLevel *
                                         (damageLevel - PseudoSeerStone.Instance._HighestDamageLevelSpawn);

                        if (platAmount > 0)
                        {
                            DropItem(new Platinum(platAmount));
                        }

                        damageLevel = PseudoSeerStone.Instance._HighestDamageLevelSpawn;
                    }

                    weapon.DamageLevel     = (WeaponDamageLevel)damageLevel;
                    weapon.DurabilityLevel = (WeaponDurabilityLevel)PseudoSeerStone.GetDurabilityLevel(m_Level);
                    weapon.AccuracyLevel   = (WeaponAccuracyLevel)PseudoSeerStone.GetAccuracyLevel(m_Level);

                    if (0.02 * m_Level >= Utility.RandomDouble())
                    {
                        weapon.Slayer = (SlayerName)Utility.Random(28);
                    }

                    DropItem(item);
                }
                else if (item is BaseArmor)
                {
                    var armor = (BaseArmor)item;

                    armor.ProtectionLevel = (ArmorProtectionLevel)Utility.Random(6);
                    armor.Durability      = (ArmorDurabilityLevel)Utility.Random(6);

                    DropItem(item);
                }
                else if (item is BaseHat)
                {
                    DropItem(item);
                }
                else if (item is BaseJewel)
                {
                    DropItem(item);
                }
            }

            if (Utility.RandomDouble() <= 0.05)
            {
                var scroll = new SkillScroll();
                scroll.Randomize();
                DropItem(scroll);
            }

            for (int i = 0; i < m_Level; i++)
            {
                Item item = Loot.RandomPossibleReagent(Expansion);
                item.Amount = Utility.RandomMinMax(40, 60);

                DropItem(item);
            }

            for (int i = 0; i < m_Level; i++)
            {
                Item item = Loot.RandomGem();
                DropItem(item);
            }

            DropItem(new TreasureMap(m_Level + 1, Map.Felucca));
        }
Beispiel #30
0
        public override void OnDeath(Container c)
        {
            GetLootingRights(DamageEntries, HitsMax)
                .Where(e => e.m_HasRight && e.m_Mobile is PlayerMobile)
                .Select(e => (PlayerMobile) e.m_Mobile)
                .ForEach(PlayerMobile.ChampionTitleInfo.AwardHarrowerTitle);

            _Tentacles.Where(t => !t.Deleted).ForEach(t => t.Kill());
            _Tentacles.Clear();

            if (!NoKillAwards && _GateItem != null)
            {
                _GateItem.Delete();
            }

            var scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            base.OnDeath(c);
        }
Beispiel #31
0
        public static Item CreateRandomSkillScroll()
        {
            Item skillscroll = null;
            int roll = Utility.Random(49);
            if (roll == 0)
            {
                skillscroll = new ClothingBlessDeed();
            }
            else
                skillscroll = new SkillScroll();
            return skillscroll;
		}
Beispiel #32
0
        public override bool OnBeforeDeath()
        {
            Say("NO, THIS CANNOT BE!!");
            Say("I AM UNDONNNEEEEEEE......");

            Effects.SendLocationEffect(Location, Map, 0x36BD, 30, 10, 0x835, 0);
            Effects.SendLocationEffect(Location, Map, 0x36BD, 30, 10, 0x835, 0);
            Effects.SendLocationEffect(Location, Map, 0x36BD, 30, 10, 0x835, 0);

            AddLoot(LootPack.FilthyRich, 3);
            AddLoot(LootPack.MedScrolls, 2);
            PackItem(new Gold(1500));
            if (0.009 > Utility.RandomDouble())// 2 percent - multipy number x 100 to get percent
            {

                switch (Utility.Random(2))
                { // rolls and number it gives it a case. if the number is , say , 3 it will pack that item
                    case 0: PackItem(new BlackDyeTub()); break;
                    case 1: PackItem(new Sandals(1175)); break;
                }
            }
            if (0.05 > Utility.RandomDouble())
            {
                Spellbook spellbook = new Spellbook();
                spellbook.Hue = 1157;
                spellbook.LootType = LootType.Regular;
                spellbook.Name = "red book of spells";
                PackItem(spellbook);
            }
            if (0.10 >= Utility.RandomDouble())
            { SkillScroll scroll = new SkillScroll(); scroll.Randomize(); PackItem(scroll); }
            return true;
        }
Beispiel #33
0
 public static void ConvertSkillScrollOperation(Item scroll, SkillName skillname)
 {
     try
     {
         var convertedScroll = new SkillScroll(1);
         convertedScroll.SkillName = skillname;
         if (scroll.Parent != null)
         {
             if (scroll.Parent is Container)
             {
                 var scrollParent = (Container) scroll.Parent;
                 scrollParent.AddItem(convertedScroll);
                 convertedScroll.X = scroll.X;
                 convertedScroll.Y = scroll.Y;
                 convertedScroll.Z = scroll.Z;
                 if (scroll.IsLockedDown)
                 {
                     BaseHouse house = BaseHouse.FindHouseAt(scroll.RootParentEntity as Item);
                     if (house == null)
                     {
                         LoggingCustom.Log("LOG_ScrollFail.txt",
                             scroll + "\t" + skillname + "\t" + scroll.Location + "\tHOUSE WAS NULL!");
                     }
                     else
                     {
                         house.Release(house.Owner, scroll);
                         house.LockDown(house.Owner, convertedScroll);
                         LoggingCustom.Log("LOG_ScrollFail.txt",
                             scroll + "\t" + skillname + "\t" + scroll.Location + "\tLOCKED DOWN IN CONTAINER");
                     }
                 }
                 if (scroll.RootParentEntity is PlayerVendor)
                 {
                     var pv = scroll.RootParentEntity as PlayerVendor;
                     if (pv.Owner != null)
                     {
                         pv.Owner.BankBox.AddItem(convertedScroll);
                         LoggingCustom.Log("LOG_ScrollVendor.txt",
                             scroll + "\t" + skillname + "\t" + scroll.Location + "\t" + scroll.RootParentEntity);
                     }
                 }
                 scroll.Delete();
             }
             else
             {
                 LoggingCustom.Log("LOG_ScrollFail.txt", scroll + "\t" + skillname + "\t" + scroll.Location);
             }
             if (scroll.RootParentEntity != null)
             {
                 LoggingCustom.Log("LOG_ScrollConvert.txt",
                     skillname + "\towner: " + scroll.RootParentEntity + "\t" + scroll.RootParentEntity.Location);
             }
         }
         else if (scroll.Map == Map.Felucca)
         {
             LoggingCustom.Log("LOG_ScrollConvert.txt", skillname + "\towner: null\t" + scroll.Location);
             convertedScroll.MoveToWorld(scroll.Location, scroll.Map);
             if (scroll.IsLockedDown)
             {
                 BaseHouse house = BaseHouse.FindHouseAt(scroll);
                 house.Release(house.Owner, scroll);
                 house.LockDown(house.Owner, convertedScroll);
                 LoggingCustom.Log("LOG_ScrollFail.txt",
                     scroll + "\t" + skillname + "\t" + scroll.Location + "\tlockdown on house floor");
             }
             scroll.Delete();
         }
         else
         {
             LoggingCustom.Log("LOG_ScrollFail.txt", scroll + "\t" + skillname + "\t" + scroll.Location);
         }
     }
     catch (Exception e)
     {
         LoggingCustom.Log("LOG_ScrollFail.txt", e.Message + "\n" + e.StackTrace);
     }
 }
        public override void OnDeath(Container c)
        {
            if (Utility.RandomDouble() < 0.25)
            {
                var rand = Utility.Random(0, 5);
                switch (rand)
                {
                    case 0:
                        c.DropItem(new WardenArms {Identified = true});
                        break;
                    case 1:
                        c.DropItem(new WardenChest {Identified = true});
                        break;
                    case 2:
                        c.DropItem(new WardenGloves {Identified = true});
                        break;
                    case 3:
                        c.DropItem(new WardenLegs {Identified = true});
                        break;
                    case 4:
                        c.DropItem(new WardenMempo {Identified = true});
                        break;
                }
            }

            var scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            c.DropItem(new TitleScroll("The Warden"));

            if (0.01 > Utility.RandomDouble())
            {
                c.DropItem(new HueScroll(2049));
            }
            base.OnDeath(c);
        }
Beispiel #35
0
        public override void OnDeath(Container c)
        {
            var scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            scroll = new SkillScroll();
            scroll.Randomize();
            c.DropItem(scroll);

            if (IsQuest)
            {
                c.DropItem(new BannerOfTrinsicDeed() {Weight = 20});
            }

            base.OnDeath(c);
        }