Good afternoon all - im a little confused why im getting this issue. Champion spawns work quite well on the server: the white skulls appear/disapra and the red skull increase one by one as mobs are killed. but at the last level, the altar gets stuck and no longer updates the white skulls. it stops here

1595699778296.png

Oddly, the mobs continue spawning (the mobs for the 4th level) but because the skulls aren't updated the champion can never spawn.
I'm compared my championspawn.cs to runuo 2.6 (non modified) and its completely stock. I can't see what is wrong here (scripts attached to the files)

note: the spawn is in trammel not felucca in the event that makes a difference.

any help is greatly appreciated!
Post automatically merged:

in case its a configuration error... heres the [props
1595700033096.png
Post automatically merged:

additional info: kills are being recorded properly. e.g. kills in that instance was 280 from a max of 200 or so.

this should have kicked in but didn't
C#:
                if ( m_Kills > kills )
                    InvalidateProperties();

                double n = m_Kills / (double)MaxKills;
                int p = (int)(n * 100);

                if( p >= 90 )
                    AdvanceLevel();
                else if( p > 0 )
                    SetWhiteSkullCount( p / 20 );

                if( DateTime.Now >= m_ExpireTime )
                    Expire();

                Respawn();
 

Attachments

  • ChampionSpawn.cs
    28.7 KB · Views: 2
  • ChampionSpawnType.cs
    7.5 KB · Views: 1
Last edited:
What happens if you manually set the level to 14?

Grasping at straws really, because as you said, the code is basically unchanged from what it was a decade ago.
 
thanks for the reply - i can update it manually and it shows the red skull, but the white skulls don't advance

Here's the progression:

Onslice has
C#:
                if ( m_Kills > kills )
                    InvalidateProperties();

                double n = m_Kills / (double)MaxKills;
                int p = (int)(n * 100);

                if( p >= 90 )
                    AdvanceLevel();
                else if( p > 0 )
                    SetWhiteSkullCount( p / 20 );

                if( DateTime.Now >= m_ExpireTime )
                    Expire();

                Respawn();

assuming total kills is 100, then once you hit 90 kills it sends a setwhiteskullcount(4), which doesn't happen

C#:
        public void SetWhiteSkullCount( int val )
        {
            for( int i = m_WhiteSkulls.Count - 1; i >= val; --i )
            {
                m_WhiteSkulls[i].Delete();
                m_WhiteSkulls.RemoveAt( i );
            }

            for( int i = m_WhiteSkulls.Count; i < val; ++i )
            {
                Item skull = new Item( 0x1854 );

                skull.Movable = false;
                skull.Light = LightType.Circle150;

                skull.MoveToWorld( GetWhiteSkullLocation( i ), Map );

                m_WhiteSkulls.Add( skull );

                Effects.PlaySound( skull.Location, skull.Map, 0x29 );
                Effects.SendLocationEffect( new Point3D( skull.X + 1, skull.Y + 1, skull.Z ), skull.Map, 0x3728, 10 );
            }
        }

for exmaple, if i manually set the level to 15, it updates the red skulls.
there is something in the whiteskullcount update that isn't ticking past level 13

meanwhile the altar just keeps spawning the last level mobs, regardless how many you kill white skulls don't go up.
 
If the p (percentage) is 90% of maxkills then it should advancelevel which sets whiteskulls to 0. I assume we do reach that one for level 13 since there are no white skulls in your screen shot.

And then it stops. I assume p stops incrementing because it no longer triggers the
Code:
                if( p >= 90 )
                    AdvanceLevel();

or the

Code:
                else if( p > 0 )
                    SetWhiteSkullCount( p / 20 );

checks and the white skulls just stop coming. It's like p=0 and never changes again.
 
exactly.

I think i just figured it out... the total kill count is the only thing i lowered (low population shard). I think i've unbalanced the system and they way each kill is added/calculated. I will try bringing this back to its original to see if that fixes it.
Post automatically merged:

heres the issue i think...

public int MaxKills
{
get
{
return 150 - (Level * 12);
}
}

level 13 is 150-156...

thanks for allowing me to talking it through falkor :D
 
Back