ServUO Version
Publish 57
Ultima Expansion
Time Of Legends
UPDATE 3: SOLVED in post reply!
UPDATE: Tryed too:
C#:
if (bc is ChampionSpawn)
in covert and checkconvert.
UPDATE 2:Tryed in checkconvert chance value:

C#:
double chance = 1 / Math.Round(20.0 - (fame / 3200));
          
            if (bc is ChampionSpawn)
               chance = 0;
Hello!I activated paragon creatures in all facets,all working good.Now i want to get paragons not spawning in champion region,tryed this in Paragon.cs:
Code is loading well without issues,but spawns still born converted in paragon creatures.
Modified bools:
A)
C#:
public static bool CheckConvert(BaseCreature bc, Point3D location, Map m)
B)
C#:
public static void Convert(BaseCreature bc)
Here the mods:
A)
C#:
 public static bool CheckConvert(BaseCreature bc, Point3D location, Map m)
        {
            if (!Core.AOS)
                return false;

            //Custom check paragon in champion region.
            Map map = bc.Map;
            ChampionSpawnRegion region = Region.Find(bc.Home, map) as ChampionSpawnRegion;

            if (region != null)
                {
                    ChampionSpawn spawn = region.ChampionSpawn;

                    if (spawn != null && spawn.IsChampionSpawn(bc))
                    {
                        return false;
                    }
                }
            //Custom check paragon in champion region.
B)

C#:
public static void Convert(BaseCreature bc)
        {
            if (bc.IsParagon ||
                !bc.CanBeParagon)
                return;

            //Custom check paragon in champion region.
            Map map = bc.Map;
            ChampionSpawnRegion region = Region.Find(bc.Home, map) as ChampionSpawnRegion;

            if (region != null)
                {
                    ChampionSpawn spawn = region.ChampionSpawn;

                    if (spawn != null && spawn.IsChampionSpawn(bc))
                    {
                        return;
                    }
                }
            //Custom check paragon in champion region.
Any tip?Thanks in advance!
 
Last edited:
The way i solved this(i know this is not a great solution,and a bit tryhard mode,but i tryed a lot of paragon checkers without results),and now i can get champions without paragon creatures.
In BaseCreature.cs
OnThink method,just at method start:

C#:
public virtual void OnThink()
{
Map map = this.Map;
ChampionSpawnRegion region = Region.Find(this.Home, map) as ChampionSpawnRegion;

if (region != null && this.IsParagon == true)
   {
     ChampionSpawn spawn = region.ChampionSpawn;
       if (spawn != null)
          {
            this.Delete();
          }
    }
...etc
 
Last edited:
C#:
public static bool CheckConvert(BaseCreature bc, Point3D location, Map m)
        {
            if (!Core.AOS)
                return false;

            if (Array.IndexOf(Maps, m) == -1)
                return false;
            
            //EDIT
            if (bc.IsChampionSpawn)
                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());
        }

Try this to prevent championspawn from generating Paragon types when producing monsters

I've tested it
 
C#:
public static bool CheckConvert(BaseCreature bc, Point3D location, Map m)
        {
            if (!Core.AOS)
                return false;

            if (Array.IndexOf(Maps, m) == -1)
                return false;
            
            //EDIT
            Region reg = Region.Find(location, m);
            if (reg.IsPartOf<ChampionSpawnRegion>())
                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());
        }

Try this

Don't forget to add [using Server.Engines.CannedEvil;]
 
The way i solved this(i know this is not a great solution,and a bit tryhard mode,but i tryed a lot of paragon checkers without results),and now i can get champions without paragon creatures.
In BaseCreature.cs
OnThink method,just at method start:

C#:
public virtual void OnThink()
{
Map map = this.Map;
ChampionSpawnRegion region = Region.Find(this.Home, map) as ChampionSpawnRegion;

if (region != null && this.IsParagon == true)
   {
     ChampionSpawn spawn = region.ChampionSpawn;
       if (spawn != null)
          {
            this.Delete();
          }
    }
...etc
So helpful thank you!
 
Back