Thats prety easy, really.. On the new map (ilshenar custom) run the command [clearfacet and you will get a warning gump asking if you really want to do that. This will wipe all items on that map (facet).
For the mobiles, I have a couple commands I made for that..
The commands are described wihtin the script for further explanation, also run [docgen to recunstruct your commands.html file in RunUO/docs
Code:
/* Created by: Dian Talshani
* Ancient Legends UO
* http://al.talshani.com
* Dian@talsnani.com
*/
using System;
using System.Collections;
using Server;
using Server.Gumps;
using Server.Mobiles;
namespace Server.Scripts.Commands
{
public class WipePreTame
{
public static void Initialize()
{
Server.Commands.Register( "WipePreTame", AccessLevel.Administrator, new CommandEventHandler( WipePreTame_OnCommand ) );
}
[Usage( "WipePreTame" )]
[Description( "Removes all mobiles from current map that have been tamed and released at least once." )]
public static void WipePreTame_OnCommand( CommandEventArgs e )
{
Map map = e.Mobile.Map;
if ( map == null || map == Map.Internal )
{
e.Mobile.SendMessage( "You may not run that command here." );
return;
}
ArrayList list = new ArrayList();
foreach ( Mobile m in World.Mobiles.Values )
{
if ( m.Map == map && !m.Player )
{
if( m is BaseCreature )
{
if( !((BaseCreature)m).Controled && ((BaseCreature)m).Owners.Count >= 1 && !((BaseCreature)m).IsStabled == true )
list.Add( m );
}
}
}
if ( list.Count > 0 )
{
CommandLogging.WriteLine( e.Mobile, "{0} {1} starting facet clear of {2} ({3} unwanted mobiles)", e.Mobile.AccessLevel, CommandLogging.Format( e.Mobile ), map, list.Count );
e.Mobile.SendGump(
new WarningGump( 1060635, 30720,
String.Format( "There is {0} pre-tamed creature{1} in this facet. Continuing with this command will completly delete them from this facet you are in. Do you really wish to continue?",
list.Count, list.Count == 1 ? "" : "s" ),
0xFFC000, 360, 260, new WarningGumpCallback( DelList_Callback ), list ) );
}
else
{
e.Mobile.SendMessage( "There were no mobiles found to delete." );
}
}
public static void DelList_Callback( Mobile from, bool okay, object state )
{
if ( okay )
{
ArrayList list = (ArrayList)state;
CommandLogging.WriteLine( from, "{0} {1} deleting {2} pre-tamed creatures", from.AccessLevel, CommandLogging.Format( from ), list.Count );
for ( int i = 0; i < list.Count; ++i )
{
object obj = list[i];
if ( obj is Item )
((Item)obj).Delete();
else if ( obj is Mobile )
((Mobile)obj).Delete();
}
from.SendMessage( "You have deleted {0} pre-tamed creature{1}.", list.Count, list.Count == 1 ? "" : "s" );
}
else
{
from.SendMessage( "You have chosen not to delete those creatures." );
}
}
}
public class WipeMobiles
{
public static void Initialize()
{
Server.Commands.Register( "WipeMobiles", AccessLevel.Administrator, new CommandEventHandler( WipeMobiles_OnCommand ) );
}
[Usage( "WipeMobiles" )]
[Description( "Removes all mobiles from the current map that are not tame or stabled." )]
public static void WipeMobiles_OnCommand( CommandEventArgs e )
{
Map map = e.Mobile.Map;
if ( map == null || map == Map.Internal )
{
e.Mobile.SendMessage( "You may not run that command here." );
return;
}
ArrayList list = new ArrayList();
foreach ( Mobile m in World.Mobiles.Values )
{
if ( m.Map == map && !m.Player )
{
if( m is BaseCreature )
{
if( !((BaseCreature)m).Controled && !((BaseCreature)m).IsStabled == true )
list.Add( m );
}
}
}
if ( list.Count > 0 )
{
CommandLogging.WriteLine( e.Mobile, "{0} {1} starting facet clear of {2} ({3} mobiles. )", e.Mobile.AccessLevel, CommandLogging.Format( e.Mobile ), map, list.Count );
e.Mobile.SendGump(
new WarningGump( 1060635, 30720,
String.Format( "There is {0} mobile{1} in this facet. Continuing with this command will completly delete them from this facet you are in. After deletion, only mobiles that were spawned from a spawn item will be replaced. Do you really wish to continue?",
list.Count, list.Count == 1 ? "" : "s" ),
0xFFC000, 360, 260, new WarningGumpCallback( DelList_Callback ), list ) );
}
else
{
e.Mobile.SendMessage( "There were no mobiles found to delete." );
}
}
public static void DelList_Callback( Mobile from, bool okay, object state )
{
if ( okay )
{
ArrayList list = (ArrayList)state;
CommandLogging.WriteLine( from, "{0} {1} deleting {2} mobiles", from.AccessLevel, CommandLogging.Format( from ), list.Count );
for ( int i = 0; i < list.Count; ++i )
{
object obj = list[i];
if ( obj is Item )
((Item)obj).Delete();
else if ( obj is Mobile )
((Mobile)obj).Delete();
}
from.SendMessage( "You have deleted {0} mobile{1}.", list.Count, list.Count == 1 ? "" : "s" );
}
else
{
from.SendMessage( "You have chosen not to delete those mobiles." );
}
}
}
public class WipeVendors
{
public static void Initialize()
{
Server.Commands.Register( "WipeVendors", AccessLevel.Administrator, new CommandEventHandler( WipeVendors_OnCommand ) );
}
[Usage( "WipeVendors" )]
[Description( "Removes all Vendors from the current map." )]
public static void WipeVendors_OnCommand( CommandEventArgs e )
{
Map map = e.Mobile.Map;
if ( map == null || map == Map.Internal )
{
e.Mobile.SendMessage( "You may not run that command here." );
return;
}
ArrayList list = new ArrayList();
foreach ( Mobile m in World.Mobiles.Values )
{
if ( m.Map == map && !m.Player )
{
if( m is BaseVendor )
{
// if( !((BaseCreature)m).Controled && ((BaseCreature)m).Owners.Count >= 1 && !((BaseCreature)m).IsStabled == true )
list.Add( m );
}
}
}
if ( list.Count > 0 )
{
CommandLogging.WriteLine( e.Mobile, "{0} {1} starting facet clear of {2} ({3} vendors. )", e.Mobile.AccessLevel, CommandLogging.Format( e.Mobile ), map, list.Count );
e.Mobile.SendGump(
new WarningGump( 1060635, 30720,
String.Format( "There are {0} vendor{1} in this facet. Continuing with this command will completly delete them from this facet you are in. After deletion, only vendors that were spawned from a spawn item will be replaced. Do you really wish to continue?",
list.Count, list.Count == 1 ? "" : "s" ),
0xFFC000, 360, 260, new WarningGumpCallback( DelList_Callback ), list ) );
}
else
{
e.Mobile.SendMessage( "There were no vendors found to delete." );
}
}
public static void DelList_Callback( Mobile from, bool okay, object state )
{
if ( okay )
{
ArrayList list = (ArrayList)state;
CommandLogging.WriteLine( from, "{0} {1} deleting {2} vendors", from.AccessLevel, CommandLogging.Format( from ), list.Count );
for ( int i = 0; i < list.Count; ++i )
{
object obj = list[i];
if ( obj is Item )
((Item)obj).Delete();
else if ( obj is Mobile )
((Mobile)obj).Delete();
}
from.SendMessage( "You have deleted {0} vendor{1}.", list.Count, list.Count == 1 ? "" : "s" );
}
else
{
from.SendMessage( "You have chosen not to delete those vendors." );
}
}
}
}