Ryandor.com

Forums
It is currently Sun Jul 06, 2025 4:04 pm

All times are UTC - 7 hours [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: grrr maps!
PostPosted: Sat Feb 07, 2004 3:25 pm 
I am trying to add a map to a server (that isnt on my puter i have to tell the guy how to put it in the server) what all do i need to do to make a new map (other then have the map) to get it to work? i am really new with the hole map stuf


Top
  
 
 Post subject:
PostPosted: Mon Feb 09, 2004 2:46 am 
Offline
Not your daddy
Not your daddy

Joined: Mon Nov 18, 2002 2:18 am
Posts: 1224
Location: Oregon State
That is a prety vague question.. Are you asking how to actually Create a new map? Or how do you actually start the shard using that new map?

_________________
Forget what you know, know what you forget.


Top
 Profile  
 
PostPosted: Tue Aug 03, 2004 7:48 pm 
Offline
Young
Young

Joined: Tue Aug 03, 2004 7:35 pm
Posts: 5
Hello, i have read numerous forums and this is one of the best for answering problems, but i am new and need to be pointed in the right direction. I have a premade custom map consisting of : map2.mul staidx2.mul statics2.mul files and i do not know what to do next. I tried some things ive read in the forums but i cant seem to get it to work.

Here is what i have done so far.

Installed all programs needed (including a AOS 2d installation just for the runou server to use) I have put the 3 map files in the base uo directory (overwriting the original ishnar map2* files. And i pointed runou to the uo directory i have for it. Now, hehe on my other computer i put the exact same 3 map files in the uo folder and executed the client. I am in tram so i unfreeze and clear facet. I also do the same for fel and malas, Since i only want to use my custom map which is the same size, etc of the ishnar map. After doing those things i am in my custom map, which the server thinks is really ishnar and i can see npc's and stuff underneath my map. Ug im really spent alot of time and im ready to just start over again.

My question is do i need to start over? Am i going in the right direction. What else do i need to do. Sorry for the long post but im trying to be descriptive and im lost :P.
--thx


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 03, 2004 10:00 pm 
Offline
Master of Dian
Master of Dian

Joined: Sat Jan 18, 2003 2:37 pm
Posts: 118
Location: Oregon
Dian will be home soon to answer your question if noone else gets to it. But I know you shouldnt overwrite files for UO. You should take the old out and then place the new in. From experience doing that seems to corrupt the files. Have you tried that? Just taking the old out and putting the new in?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 04, 2004 2:11 am 
Offline
Not your daddy
Not your daddy

Joined: Mon Nov 18, 2002 2:18 am
Posts: 1224
Location: Oregon State
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." );
         }
      }
   }
}

_________________
Forget what you know, know what you forget.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 04, 2004 4:37 pm 
Offline
Young
Young

Joined: Tue Aug 03, 2004 7:35 pm
Posts: 5
Thanks Dian, I am new to this whole thing and also sharpc# :) but i will have fun learning in the process! I had a couple?'s about the script. Im assuming since the server recompiles itself each run that anything dropped in the scipts folder will compile. I put your file into mobiles. I hope thats right, and i read the script and the docs after i generated it and i dont see anything different. Does this command execute the [clearfacet is executed or is there a specific command, thanx


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 05, 2004 2:03 am 
Offline
Not your daddy
Not your daddy

Joined: Mon Nov 18, 2002 2:18 am
Posts: 1224
Location: Oregon State
Yes, any C# ( *.cs) script you put within the RunUO/Scripts directory will be compiled each time you start the server.

Hm, you ran the command [docgen and the new commands were not in your Commands.html file? odd..

Well, anyways these commands have nothing to do with the command [clearfacet, they are individual commands completly independent of the other. They are just each a bit different as to what mobiles they will look for, and wipe out.

Look for the line Server.Commands.Register( "WipePreTame" .......

the following text will be the actual command you would use in game.. so in game you would use, [WipePreTame commands are not case sensitive.

_________________
Forget what you know, know what you forget.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 05, 2004 3:37 pm 
Offline
Young
Young

Joined: Tue Aug 03, 2004 7:35 pm
Posts: 5
Thanks Dian for some reson i forgot to save the file thats why it didnt generate, hehe opps. Thanks for you help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group