NytemareTV
Member
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:
But, I want the RandomTrinket system to drop these deeds as well. Here is my edit area of basecreature currently:
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?
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?