RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Runuo Problem

madman17745

Wanderer
Runuo Problem

when i go to start up the server it askes me for the dictory path and i don't know where to change it can some one tell me where to chane this at
 

Sythen

Sorceror
Try Editing the DataPath.cs file

Directory Path For The Following Code: Scripts\Misc\DataPath.cs


Code:
using System;
using System.IO;
using Microsoft.Win32;
using Server;

namespace Server.Misc
{
	public class DataPath
	{
		/* If you have not installed Ultima Online,
		 * or wish the server to use a separate set of datafiles,
		 * change the 'CustomPath' value, example:
		 * 
		 * private const string CustomPath = @"C:\Program Files\Ultima Online";
		 */

#region Custom Path For The Ultima Online Client

		private static string CustomPath = @"[COLOR="Lime"]C:\Program Files\Ultima Online\[/COLOR]"; [COLOR="DarkOrchid"]<---- [/COLOR][COLOR="Red"]put your custom directory in this line[/COLOR]
		//private static string CustomPath = null;

#endregion Custom Path For The Ultima Online Client

		/* The following is a list of files which a required for proper execution:
		 * 
		 * Multi.idx
		 * Multi.mul
		 * VerData.mul
		 * TileData.mul
		 * Map*.mul
		 * StaIdx*.mul
		 * Statics*.mul
		 * MapDif*.mul
		 * MapDifL*.mul
		 * StaDif*.mul
		 * StaDifL*.mul
		 * StaDifI*.mul
		 */

		public static void Configure()
		{
			string pathReg = GetExePath( "Ultima Online" );
			string pathTD = GetExePath( "Ultima Online Third Dawn" );	//These refer to 2D & 3D, not the Third Dawn expansion

			if ( CustomPath != null ) 
				Core.DataDirectories.Add( CustomPath ); 

			if ( pathReg != null ) 
				Core.DataDirectories.Add( pathReg ); 

			if ( pathTD != null ) 
				Core.DataDirectories.Add( pathTD ); 

			if ( Core.DataDirectories.Count == 0 )
			{
				Console.WriteLine( "Enter the Ultima Online directory:" );
				Console.Write( "> " );

				Core.DataDirectories.Add( Console.ReadLine() );
			}
		}

		private static string GetExePath( string subName )
		{
			try
			{
				String keyString;

				if( Core.Is64Bit )
					keyString = @"SOFTWARE\Wow6432Node\Origin Worlds Online\{0}\1.0";
				else
					keyString = @"SOFTWARE\Origin Worlds Online\{0}\1.0";

				using( RegistryKey key = Registry.LocalMachine.OpenSubKey( String.Format( keyString, subName ) ) )
				{
					if( key == null )
						return null;

					string v = key.GetValue( "ExePath" ) as string;

					if( v == null || v.Length <= 0 )
						return null;

					if( !File.Exists( v ) )
						return null;

					v = Path.GetDirectoryName( v );

					if( v == null )
						return null;

					return v;
				}
			}
			catch
			{
				return null;
			}
		}
	}
}
 

madman17745

Wanderer
this is what my script and i still don't know where to put the directory path at

using System;
using System.IO;
using Microsoft.Win32;
using Server;

namespace Server.Misc
{
public class DataPath
{
/* If you have not installed Ultima Online,
* or wish the server to use a separate set of datafiles,
* change the 'CustomPath' value, example:
*
* private const string CustomPath = @"C:\Program Files\Ultima Online";
*/
private static string CustomPath = null;

/* The following is a list of files which a required for proper execution:
*
* Multi.idx
* Multi.mul
* VerData.mul
* TileData.mul
* Map*.mul
* StaIdx*.mul
* Statics*.mul
* MapDif*.mul
* MapDifL*.mul
* StaDif*.mul
* StaDifL*.mul
* StaDifI*.mul
*/

public static void Configure()
{
string pathReg = GetExePath( "Ultima Online" );
string pathTD = GetExePath( "Ultima Online Third Dawn" ); //These refer to 2D & 3D, not the Third Dawn expansion

if ( CustomPath != null )
Core.DataDirectories.Add( CustomPath );

if ( pathReg != null )
Core.DataDirectories.Add( pathReg );

if ( pathTD != null )
Core.DataDirectories.Add( pathTD );

if ( Core.DataDirectories.Count == 0 && !Core.Service )
{
Console.WriteLine( "Enter the Ultima Online directory:" );
Console.Write( "> " );

Core.DataDirectories.Add( Console.ReadLine() );
}
}

private static string GetExePath( string subName )
{
try
{
String keyString;

if( Core.Is64Bit )
keyString = @"SOFTWARE\Wow6432Node\Origin Worlds Online\{0}\1.0";
else
keyString = @"SOFTWARE\Origin Worlds Online\{0}\1.0";

using( RegistryKey key = Registry.LocalMachine.OpenSubKey( String.Format( keyString, subName ) ) )
{
if( key == null )
return null;

string v = key.GetValue( "ExePath" ) as string;

if( v == null || v.Length <= 0 )
return null;

if( !File.Exists( v ) )
return null;

v = Path.GetDirectoryName( v );

if( v == null )
return null;

return v;
}
}
catch
{
return null;
}
}
}
}​
 

Sythen

Sorceror
No Worries Man. Maybe You're Tired...

Look at the example I posted... Its IDENTICAL to yours... Now Find The Purple And Red Label.

We're getting closer... cool! Where the 'arrow: <-----' points to is where you put your data path.

Look for the Florescent GREEN and simply type that line in your script and umm where its green... type in your own path.

----------------------------------------

Ironically I too can't see the obvious sometimes so you're not alone. All this file modification and creation gets ones eyes into that dreadful blurry state of "WTF am I tryin to do here again?!"
 
Top