I dont want to bring up an old topic, but I have started to use this system, and it is perfect. Was easy to use, easy to install, and over 3 months, I have not found a bug with it, a crash or anything. So thank you to the author! Well done!
One little problem I am having though, it only shows the top 3 in each section. I want it to show the top 6. But I seem to muff it. I am confused as to how I would go about it. Here is what I tried but didnt work
Code:
ArrayList mobs = new ArrayList( World.Mobiles.Values );
PlayerMobile Top = null;
PlayerMobile MidTop = null;
PlayerMobile Mid = null;
PlayerMobile MidLow = null;
PlayerMobile Low = null;
PlayerMobile Bot = null;
foreach ( Mobile check1 in mobs )
{
if ( check1 is PlayerMobile )
{
PlayerMobile pvper = (PlayerMobile)check1;
if ( Top == null )
Top = pvper;
if ( pvper.TotalLoses > Top.TotalLoses && pvper.AccessLevel == AccessLevel.Player )
Top = pvper;
}
}
foreach ( Mobile check2 in mobs )
{
if ( check2 is PlayerMobile )
{
PlayerMobile pvper2 = (PlayerMobile)check2;
if ( MidTop == null )
MidTop = pvper2;
if ( pvper2.TotalLoses > MidTop.TotalLoses && pvper2 != Top && pvper2.AccessLevel == AccessLevel.Player )
MidTop = pvper2;
}
}
foreach ( Mobile check3 in mobs )
{
if ( check3 is PlayerMobile )
{
PlayerMobile pvper3 = (PlayerMobile)check3;
if ( Mid == null )
Mid = pvper3;
if ( pvper3.TotalLoses > Mid.TotalLoses && pvper3 != Top && pvper3 != MidTop && pvper3.AccessLevel == AccessLevel.Player )
Mid = pvper3;
}
}
foreach ( Mobile check4 in mobs )
{
if ( check4 is PlayerMobile )
{
PlayerMobile pvper4 = (PlayerMobile)check4;
if ( MidLow == null )
MidLow = pvper4;
if ( pvper4.TotalLoses > MidLow.TotalLoses && pvper4 != Top && pvper4 != Mid && MidTop && pvper4.AccessLevel == AccessLevel.Player )
MidLow = pvper4;
}
}
foreach ( Mobile check5 in mobs )
{
if ( check5 is PlayerMobile )
{
PlayerMobile pvper5 = (PlayerMobile)check5;
if ( Low == null )
Low = pvper5;
if ( pvper5.TotalLoses > Low.TotalLoses && pvper5 != Top && pvper5 != MidLow && Mid && MidTop && pvper5.AccessLevel == AccessLevel.Player )
Low = pvper5;
}
}
foreach ( Mobile check6 in mobs )
{
if ( check6 is PlayerMobile )
{
PlayerMobile pvper6 = (PlayerMobile)check6;
if ( Bot == null )
Bot = pvper6;
if ( pvper6.TotalLoses > Bot.TotalLoses && pvper6 != Top && pvper6 != Low && MidLow && Mid && MidTop && pvper6.AccessLevel == AccessLevel.Player )
Bot = pvper6;
}
}