Hi I am trying to make paragon monster drop in a few setting like common, rare, epic, and legendary.

I wonder if there is a way I want to set it how the drop rate like common be normal, and rare less drop rate, epic even less, and legendary very rare.

What I am trying to do is set more than 1 type that you can make a setting like 5% drop rate for one set, and 1% drop rate for other set then so on like more than one type of set.

I found the scripts if somebody want to get involve, and help then awesome I'd appreciated it very much!

I know the drop rate is also in basecreature.cs I think, but I will go ahead post paragon.cs

Code:
using System;
using Server.Items;

namespace Server.Mobiles
{
    public class Paragon
    {
        public static double ChestChance = .10;// Chance that a paragon will carry a paragon chest
        public static double ChocolateIngredientChance = .20;// Chance that a paragon will drop a chocolatiering ingredient
        public static Map[] Maps = new Map[]                   // Maps that paragons will spawn on
        {
            Map.Ilshenar
        };
        public static Type[] Artifacts = new Type[]
        {
            typeof(GoldBricks), typeof(PhillipsWoodenSteed),
            typeof(AlchemistsBauble), typeof(ArcticDeathDealer),
            typeof(BlazeOfDeath), typeof(BowOfTheJukaKing),
            typeof(BurglarsBandana), typeof(CavortingClub),
            typeof(EnchantedTitanLegBone), typeof(GwennosHarp),
            typeof(IolosLute), typeof(LunaLance),
            typeof(NightsKiss), typeof(NoxRangersHeavyCrossbow),
            typeof(OrcishVisage), typeof(PolarBearMask),
            typeof(ShieldOfInvulnerability), typeof(StaffOfPower),
            typeof(VioletCourage), typeof(HeartOfTheLion),
            typeof(WrathOfTheDryad), typeof(PixieSwatter),
            typeof(GlovesOfThePugilist)
        };
        public static int Hue = 0x501;// Paragon hue

        // Buffs
        public static double HitsBuff = 5.0;
        public static double StrBuff = 1.05;
        public static double IntBuff = 1.20;
        public static double DexBuff = 1.20;
        public static double SkillsBuff = 1.20;
        public static double SpeedBuff = 1.20;
        public static double FameBuff = 1.40;
        public static double KarmaBuff = 1.40;
        public static int DamageBuff = 5;
        public static void Convert(BaseCreature bc)
        {
            if (bc.IsParagon ||
                !bc.CanBeParagon)
                return;

            bc.Hue = Hue;

            if (bc.HitsMaxSeed >= 0)
                bc.HitsMaxSeed = (int)(bc.HitsMaxSeed * HitsBuff);

            bc.RawStr = (int)(bc.RawStr * StrBuff);
            bc.RawInt = (int)(bc.RawInt * IntBuff);
            bc.RawDex = (int)(bc.RawDex * DexBuff);

            bc.Hits = bc.HitsMax;
            bc.Mana = bc.ManaMax;
            bc.Stam = bc.StamMax;

            for (int i = 0; i < bc.Skills.Length; i++)
            {
                Skill skill = (Skill)bc.Skills[i];

                if (skill.Base > 0.0)
                    skill.Base *= SkillsBuff;
            }

            bc.PassiveSpeed /= SpeedBuff;
            bc.ActiveSpeed /= SpeedBuff;
            bc.CurrentSpeed = bc.PassiveSpeed;

            bc.DamageMin += DamageBuff;
            bc.DamageMax += DamageBuff;

            if (bc.Fame > 0)
                bc.Fame = (int)(bc.Fame * FameBuff);

            if (bc.Fame > 32000)
                bc.Fame = 32000;

            // TODO: Mana regeneration rate = Sqrt( buffedFame ) / 4

            if (bc.Karma != 0)
            {
                bc.Karma = (int)(bc.Karma * KarmaBuff);

                if (Math.Abs(bc.Karma) > 32000)
                    bc.Karma = 32000 * Math.Sign(bc.Karma);
            }
        }

        public static void UnConvert(BaseCreature bc)
        {
            if (!bc.IsParagon)
                return;

            bc.Hue = 0;

            if (bc.HitsMaxSeed >= 0)
                bc.HitsMaxSeed = (int)(bc.HitsMaxSeed / HitsBuff);

            bc.RawStr = (int)(bc.RawStr / StrBuff);
            bc.RawInt = (int)(bc.RawInt / IntBuff);
            bc.RawDex = (int)(bc.RawDex / DexBuff);

            bc.Hits = bc.HitsMax;
            bc.Mana = bc.ManaMax;
            bc.Stam = bc.StamMax;

            for (int i = 0; i < bc.Skills.Length; i++)
            {
                Skill skill = (Skill)bc.Skills[i];

                if (skill.Base > 0.0)
                    skill.Base /= SkillsBuff;
            }

            bc.PassiveSpeed *= SpeedBuff;
            bc.ActiveSpeed *= SpeedBuff;
            bc.CurrentSpeed = bc.PassiveSpeed;

            bc.DamageMin -= DamageBuff;
            bc.DamageMax -= DamageBuff;

            if (bc.Fame > 0)
                bc.Fame = (int)(bc.Fame / FameBuff);
            if (bc.Karma != 0)
                bc.Karma = (int)(bc.Karma / KarmaBuff);
        }

        public static bool CheckConvert(BaseCreature bc)
        {
            return CheckConvert(bc, bc.Location, bc.Map);
        }

        public static bool CheckConvert(BaseCreature bc, Point3D location, Map m)
        {
            if (!Core.AOS)
                return false;

            if (Array.IndexOf(Maps, m) == -1)
                return false;

            if (bc is BaseChampion || bc is Harrower || bc is BaseVendor || bc is BaseEscortable || bc is Clone || bc.IsParagon)
                return false;

            int fame = bc.Fame;

            if (fame > 32000)
                fame = 32000;

            double chance = 1 / Math.Round(20.0 - (fame / 3200));

            return (chance > Utility.RandomDouble());
        }

        public static bool CheckArtifactChance(Mobile m, BaseCreature bc)
        {
            if (!Core.AOS)
                return false;

            double fame = (double)bc.Fame;

            if (fame > 32000)
                fame = 32000;

            double chance = 1 / (Math.Max(10, 100 * (0.83 - Math.Round(Math.Log(Math.Round(fame / 6000, 3) + 0.001, 10), 3))) * (100 - Math.Sqrt(m.Luck)) / 100.0);

            return chance > Utility.RandomDouble();
        }

        public static void GiveArtifactTo(Mobile m)
        {
            Item item = (Item)Activator.CreateInstance(Artifacts[Utility.Random(Artifacts.Length)]);

            if (m.AddToBackpack(item))
                m.SendMessage("As a reward for slaying the mighty paragon, an artifact has been placed in your backpack.");
            else
                m.SendMessage("As your backpack is full, your reward for destroying the legendary paragon has been placed at your feet.");
        }
    }
}
 
O.K. I found a possibility I notice Champ spawn has many different variety of drops that drop at a different chance, and rate.

This is from Barracoon.cs
Code:
public override Type[] UniqueList
        {
            get
            {
                return new Type[] { typeof(FangOfRactus) };
            }
        }
        public override Type[] SharedList
        {
            get
            {
                return new Type[]
                {
                    typeof(EmbroideredOakLeafCloak),
                    typeof(DjinnisRing),
                    typeof(DetectiveBoots),
                    typeof(GauntletsOfAnger)
                };
            }
        }

Now the problem is adding this to paragon to make it effect on paragon.

Here this is from Base Champion.cs

Code:
 public virtual Item GetArtifact()
        {
            double random = Utility.RandomDouble();
            if (0.05 >= random)
                return this.CreateArtifact(this.UniqueList);
            else if (0.15 >= random)
                return this.CreateArtifact(this.SharedList);
            else if (0.30 >= random)
                return this.CreateArtifact(this.DecorativeList);
            return null;
        }

Alright we'll looks like I've made progress, but it looks like it will take a lot of work to change it into paragons. If anybody want to join me for the project it'll be great, and rewarding I believe.
[doublepost=1526707076][/doublepost]O.K. I got a better idea how to make it work maybe I've already got one custom mob that drop artifacts in backpack, and I figure if I can make this work with more than 1 type of drop rate like for an example artifacts rarity 11, and artifacts rarity 12 in two separate group, and if I successfully make this work I could probably put that in paragon.cs to make it work some how.

Code:
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Items;
namespace Server.Mobiles
{
    [CorpseName("a Deed Collectors corpse")]
    public class DeedCollectors : BaseCreature
    {
       
         public override bool CanFlee { get { return false; } }
       
        private static Type[] m_ArtifactRarity11 = new Type[]
            {
                 typeof( WeaponSpeedIncreaseDeed ),
                typeof( WeaponDamageIncreaseDeed ),
                typeof( UseBestSkillIncreaseDeed ),
                typeof( SpellDamageIncreaseDeed ),
                typeof( SpellChannelingIncreaseDeed ),
                typeof( RegenStamIncreaseDeed ),
                typeof( RegenManaIncreaseDeed ),
                typeof( RegenHitsIncreaseDeed ),
                typeof( ReflectPhysicalIncreaseDeed ),
                typeof( MageWeaponIncreaseDeed ),
                typeof( LuckIncreaseDeed ),
                typeof( LowerRegCostIncreaseDeed ),
                typeof( LowerManaCostIncreaseDeed ),
                typeof( HitPoisonAreaIncreaseDeed ),
                typeof( HitPhysicalAreaIncreaseDeed ),
                typeof( HitMagicArrowIncreaseDeed ),
                typeof( HitLowerDefendIncreaseDeed ),
                typeof( HitLowerAttackIncreaseDeed ),
                typeof( HitLightningIncreaseDeed ),
                typeof( HitLeechStamIncreaseDeed ),
                typeof( HitLeechManaIncreaseDeed ),
                typeof( HitLeechHitsIncreaseDeed ),
                typeof( HitHarmIncreaseDeed ),
                typeof(SelfRepairDeed),
                typeof( HitFireballIncreaseDeed ),
                typeof( HitFireAreaIncreaseDeed ),
                typeof( HitEnergyAreaIncreaseDeed ),
                typeof( HitDispelIncreaseDeed ),
                typeof( HitColdAreaIncreaseDeed ),
                typeof( DefendChanceIncreaseDeed ),
                typeof( CastSpeedIncreaseDeed ),
                typeof( BonusStrIncreaseDeed ),
                typeof( BonusStamIncreaseDeed ),
                typeof( BonusManaIncreaseDeed ),
                typeof( BonusIntIncreaseDeed ),
                typeof( BonusHitsIncreaseDeed ),
                typeof( BonusDexIncreaseDeed ),
                typeof( AttackChanceIncreaseDeed ),
                typeof( PetColdlResistanceBonusPotion ),
                typeof( PetControlSlotsBonusPotion ),
                typeof( PetDamageMaxBonusPotion ),
                typeof( PetDamageMinBonusPotion ),
                typeof( PetEnergyResistanceBonusPotion ),
                typeof( PetFireResistanceBonusPotion ),
                typeof( PetHitsPointBonusPotion ),
                typeof( PetManaPointBonusPotion ),
                typeof( PetPhysicalResistanceBonusPotion ),
                typeof( PetPoisonResistanceBonusPotion ),
                typeof( PetStamPointBonusPotion )
            };
        public override WeaponAbility GetWeaponAbility()
        {
            switch (Utility.Random(3))
            {
                default:
                case 0: return WeaponAbility.DoubleStrike;
                case 1: return WeaponAbility.WhirlwindAttack;
                case 2: return WeaponAbility.CrushingBlow;
            }
        }
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);
            Mobile mobile = DemonKnight.FindRandomPlayer(this);
if (mobile != null)
{
            double chance = Utility.RandomDouble();
            if (chance < 0.5) // 5% chance for drop
            {
                mobile.AddToBackpack(Loot.Construct(m_ArtifactRarity11[Utility.Random(m_ArtifactRarity11.Length)]));
                mobile.SendLocalizedMessage(1062317); // For your valor in combating the fallen beast, a special reward has been bestowed on you.
            }
}
        }
        [Constructable]
        public DeedCollectors() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name = "the Deed Collectors";
            Body = 318;
            BaseSoundID = 0x165;
            SetStr(500);
            SetDex(100);
            SetInt(1000);
            SetHits(200000);
            SetMana(5000);
            SetDamage(20, 30);
            SetDamageType(ResistanceType.Physical, 20);
            SetDamageType(ResistanceType.Fire, 20);
            SetDamageType(ResistanceType.Cold, 20);
            SetDamageType(ResistanceType.Poison, 20);
            SetDamageType(ResistanceType.Energy, 20);
            SetResistance(ResistanceType.Physical, 30);
            SetResistance(ResistanceType.Fire, 30);
            SetResistance(ResistanceType.Cold, 30);
            SetResistance(ResistanceType.Poison, 30);
            SetResistance(ResistanceType.Energy, 30);
            SetSkill(SkillName.Necromancy, 120, 120.0);
            SetSkill(SkillName.SpiritSpeak, 120.0, 120.0);
            SetSkill(SkillName.DetectHidden, 80.0);
            SetSkill(SkillName.EvalInt, 100.0);
            SetSkill(SkillName.Magery, 100.0);
            SetSkill(SkillName.Meditation, 120.0);
            SetSkill(SkillName.MagicResist, 150.0);
            SetSkill(SkillName.Tactics, 100.0);
            SetSkill(SkillName.Wrestling, 120.0);
            Fame = 10000;
            Karma = -12000;
            VirtualArmor = 64;
        }
        public override void GenerateLoot()
        {
            AddLoot(LootPack.SuperBoss, 10);
            this.PackItem(new Gold(50000));
           
            AddLoot(LootPack.HighScrolls, Utility.RandomMinMax(0, 1));
        }
        public override bool BardImmune { get { return !Core.SE; } }
        public override bool Unprovokable { get { return Core.SE; } }
        public override bool AreaPeaceImmune { get { return Core.SE; } }
        public override Poison PoisonImmune { get { return Poison.Lethal; } }
        public override int TreasureMapLevel { get { return 1; } }
        private static bool m_InHere;
        public override void OnDamage(int amount, Mobile from, bool willKill)
        {
            if (from != null && from != this && !m_InHere)
            {
                m_InHere = true;
                AOS.Damage(from, this, Utility.RandomMinMax(0, 0), 100, 0, 0, 0, 0);
                MovingEffect(from, 0xECA, 10, 0, false, false, 0, 0);
                PlaySound(0x491);
                if (0.05 > Utility.RandomDouble())
                    Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerStateCallback(CreateBones_Callback), from);
                m_InHere = false;
            }
        }
        public virtual void CreateBones_Callback(object state)
        {
            Mobile from = (Mobile)state;
            Map map = from.Map;
            if (map == null)
                return;
            int count = Utility.RandomMinMax(0, 0);
            for (int i = 0; i < count; ++i)
            {
                int x = from.X + Utility.RandomMinMax(-1, 1);
                int y = from.Y + Utility.RandomMinMax(-1, 1);
                int z = from.Z;
                if (!map.CanFit(x, y, z, 16, false, true))
                {
                    z = map.GetAverageZ(x, y);
                    if (z == from.Z || !map.CanFit(x, y, z, 16, false, true))
                        continue;
                }
                UnholyBone bone = new UnholyBone();
                bone.Hue = 0;
                bone.Name = "unholy bones";
                bone.ItemID = Utility.Random(0xECA, 9);
                bone.MoveToWorld(new Point3D(x, y, z), map);
            }
        }
        public DeedCollectors(Serial serial) : base(serial)
        {
        }
        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int)0);
        }
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();
        }
    }
}
 
Back