I'm doing a little project for a friend's RunUO 2.5 server. I'm trying to fix the random trinket system so that it will actually drop blessed items no matter what monster drops them. I have been able to fix it for a single mob by doing this:
Code:
public override void OnDeath( Container c )
        {
            switch ( Utility.Random( 47 ) )
            {
                case 0: c.DropItem( new AttackChanceDeed() ); break;
                case 1: c.DropItem( new BlessDeed() ); break;
                case 2: c.DropItem( new  BonusDexDeed() ); break;
                case 3: c.DropItem( new BonusHitsDeed() ); break;
                case 4: c.DropItem( new  BonusIntDeed() ); break;
                case 5: c.DropItem( new BonusManaDeed() ); break;
                case 6: c.DropItem( new BonusStamDeed() ); break;
                case 7: c.DropItem( new BonusStrDeed() ); break;
                case 8: c.DropItem( new DefendChanceDeed() ); break;
                case 9: c.DropItem( new DurabilityBonusDeed() ); break;
                case 10: c.DropItem( new EnhancePotionsDeed() ); break;
                case 11: c.DropItem( new CastSpeedDeed() ); break;
                case 12: c.DropItem( new CastRecoveryDeed() ); break;
                case 13: c.DropItem( new HitColdAreaDeed() ); break;
                case 14: c.DropItem( new HitDispelDeed() ); break;
                case 15: c.DropItem( new HitEnergyAreaDeed() ); break;
                case 16: c.DropItem( new HitFireAreaDeed() ); break;
                case 17: c.DropItem( new HitFireballDeed() ); break;
                case 18: c.DropItem( new  HitHarmDeed() ); break;
                case 19: c.DropItem( new HitLeechHitsDeed() ); break;
                case 20: c.DropItem( new HitLightningDeed() ); break;
                case 21: c.DropItem( new HitLowerAttackDeed() ); break;
                case 22: c.DropItem( new HitLowerDefendDeed() ); break;
                case 23: c.DropItem( new HitMagicArrowDeed() ); break;
                case 24: c.DropItem( new  HitLeechManaDeed() ); break;
                case 25: c.DropItem( new HitPhysicalAreaDeed() ); break;
                case 26: c.DropItem( new  HitPoisonAreaDeed() ); break;
                case 27: c.DropItem( new HitLeechStamDeed() ); break;
                case 28: c.DropItem( new LowerManaCostDeed() ); break;
                case 29: c.DropItem( new LowerRegCostDeed() ); break;
                case 30: c.DropItem( new LuckDeed() ); break;
                case 31: c.DropItem( new NightSightDeed() ); break;
                case 32: c.DropItem( new RegenHitsDeed() ); break;
                case 33: c.DropItem( new RegenManaDeed() ); break;
                case 34: c.DropItem( new RegenStamDeed() ); break;
                case 35: c.DropItem( new ResistColdBonusDeed() ); break;
                case 36: c.DropItem( new ResistEnergyBonusDeed() ); break;
                case 37: c.DropItem( new ResistFireBonusDeed() ); break;
                case 38: c.DropItem( new ResistPhysicalBonusDeed() ); break;
                case 39: c.DropItem( new ResistPoisonBonusDeed() ); break;
                case 40: c.DropItem( new SelfRepairDeed() ); break;
                case 41: c.DropItem( new SpellChannelingDeed() ); break;
                case 42: c.DropItem( new SpellDamageDeed() ); break;
                case 43: c.DropItem( new WeaponSpeedDeed() ); break;
                case 44: c.DropItem( new UseBestSkillDeed() ); break;
                case 45: c.DropItem( new WeaponDamageDeed() ); break;
                case 46: c.DropItem( new ReflectPhysicalDeed() ); break;
                //case 47: c.DropItem( new () ); break;
            }
        }

But, I want the RandomTrinket system to drop these deeds as well. Here is my edit area of basecreature currently:
Code:
                if (Utility.RandomDouble() < .05 ) //5% drop rate
                {
                    Bag bag = new Bag();
                    bag.Hue = 1174;
                    bag.Name = "Relique";
                    bag.DropItem(RandomTrinket.Trinket());
                    c.DropItem(bag);
                    System.Console.WriteLine("Trinket Random System");                   
                }

This is where it creates the bags and distributes them onto the corpses. This part is working perfectly. We can get relique bags to drop on every monster this way. What I am having trouble with is that the bags sometimes drop empty because some of the loot on the list is blessed. Is there any way to get this blessed loot to drop globally like this as well?
 
I ran into this recently and was told that Blessed items need help to drop as loot. The c.DropItem. Hammerhand gave me help over on this thread: https://www.servuo.com/threads/ques...-able-to-add-item-to-critter.4824/#post-31274 I did not realize it was Blessed loot problem until he pointed it out to me.

Then I found a loot system on RunUO that does everything I need even easier ha ha: https://www.servuo.com/archive/loot-system.673/

I found these to work.
Code:
     ----------------------------------------
     
          #region loot test
     public override void OnDeath (Container c) // (random chance)
  {
  base.OnDeath(c);
  switch (Utility.Random(4))
  {
  case 0: c.DropItem(new SuperSlayerDeeds()); break;
  case 1: c.DropItem(new LesserSlayerDeed()); break;
  case 2: c.DropItem(new SlayerRemovalDeed()); break;
  case 3: c.DropItem(new MinorArtifactDeed()); break;
  }
  }
      #endregion
     
     
     ----------------------------------------
     
      #region loot test
     public override void OnDeath (Container c) // (random chance)
  {
  base.OnDeath(c);
  if (0.50 > Utility.RandomDouble()) // 50% chance to drop
  {   
  c.DropItem(new SuperSlayerDeeds());   
  }
  }
      #endregion
       
       
----------------------------------------


  #region loot test
      public override void OnDeath (Container c) // (drops everytime)
  {
  base.OnDeath(c);
  {   
  c.DropItem(new SuperSlayerDeeds());   
  }
  }
     #endregion
 
Not sure if this would work but maybe..

item dropitem = RandomTrinket.Trinket();
dropitem.LootType = LootType.NotBlessed (sorry dont have scripst handy where im at)
c.DropItem(bag)
dropitem.LootType = LootType.Blessed;

ill try it out when I get home if I remember. I am pretty sure that the loot type is checked when you do the c.DropItem(bag); So this might be a work around.
 
Back