#W# Initial Commit: Avatars Conquest
This commit is contained in:
commit
8eae46895e
7512 changed files with 416187 additions and 0 deletions
45
Scripts/Engines/Spawner/PSCount.cs
Normal file
45
Scripts/Engines/Spawner/PSCount.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using Server;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Commands;
|
||||
|
||||
namespace Server.Commands
|
||||
{
|
||||
public class PSpawnerCount
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
Register( "pscount", AccessLevel.Administrator, new CommandEventHandler( Clearall_OnCommand ) );
|
||||
}
|
||||
|
||||
public static void Register( string command, AccessLevel access, CommandEventHandler handler )
|
||||
{
|
||||
CommandSystem.Register( command, access, handler );
|
||||
}
|
||||
|
||||
[Usage( "pscount" )]
|
||||
[Description( "Count PremiumSpawners." )]
|
||||
public static void Clearall_OnCommand( CommandEventArgs e )
|
||||
{
|
||||
Mobile from = e.Mobile;
|
||||
DateTime time = DateTime.Now;
|
||||
|
||||
List<Item> pspawnerlist = new List<Item>();
|
||||
|
||||
foreach ( Item pspawner in World.Items.Values )
|
||||
{
|
||||
if ( pspawner.Parent == null && pspawner is PremiumSpawner)
|
||||
{
|
||||
pspawnerlist.Add( pspawner );
|
||||
}
|
||||
}
|
||||
|
||||
from.SendMessage( "Premium Spawners: {0}", pspawnerlist.Count );
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue