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!

freeze problem

Admin Poison

Wanderer
freeze problem

i tried to make a new path in the datapath.cs so i can freeze stuff but it still doesnt work. if somone sees what i did wrong or didnt do plz let me know..i will put arrows by what i added

[code:1]
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 seperate 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 <---------------
* Statics*.mul <--------------
* Staidx*.mul
*/

public static void Configure()
{
string pathReg = GetExePath( "Ultima Online" );
string pathTD = GetExePath( "Ultima Online Third Dawn" );

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
{
using ( RegistryKey key = Registry.LocalMachine.OpenSubKey( String.Format( @"SOFTWARE\Origin Worlds Online\{0}\1.0", 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;
}
}
}
}
[/code:1]
 

Admin Poison

Wanderer
oooops i arrowed one of the wrong additions i will redo it

[code:1]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 seperate 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
* Statics*.mul <--------------
* Staidx*.mul <---------------
*/

public static void Configure()
{
string pathReg = GetExePath( "Ultima Online" );
string pathTD = GetExePath( "Ultima Online Third Dawn" );

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
{
using ( RegistryKey key = Registry.LocalMachine.OpenSubKey( String.Format( @"SOFTWARE\Origin Worlds Online\{0}\1.0", 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;
}
}
}
}[/code:1]
 

Phantom

Knight
string pathReg = GetExePath( "Ultima Online" );
string pathTD = GetExePath( "Ultima Online Third Dawn" );


This is wrong read the comments

/* If you have not installed Ultima Online,
* or wish the server to use a seperate set of datafiles,
* change the 'CustomPath' value, example:
*
* private const string CustomPath = @"C:\Program Files\Ultima Online"; */
private static string CustomPath = null;
 

UOT

Knight
You are just adding comments. That is a list of the files you need to have in a seperate folder for only the server to use. Copy all those files that were listed into a folder then change[code:1]private static string CustomPath = null;[/code:1]to point to that folder following the example of the commented line above that one.
 

Admin Poison

Wanderer
i tried everything, i made a folder but i wasnt to sure what to put in the folder, ya said something bout copy those files to the folder but that just dropped my intelligance to bout -100000000, so if its not to much of a hassle could ya show me a simple example
 

UOT

Knight
[code:1] /* 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[/code:1]Those are the files you need to copy to a different folder, then set the path of that folder as your CustomPath.
 

Admin Poison

Wanderer
that i understood, but do i put them into a notepad file or make new folders named after them like a folder named "Staidx*.mul"
 

Admin Poison

Wanderer
can i name the folder anything
i made a folder called "Custompath" and then where it says
[code:1]private static string CustomPath = null;[/code:1]
i changed null to "C:\Custompath
will that work?[/quote]
 

CraZy_NooB

Wanderer
[code:1]private const string CustomPath = @"C:\CustomPath";
[/code:1]
sorry forgot thta part, it should work with that fix
 

Admin Poison

Wanderer
its still not working i did that fix but it is still giving me that b/s bout not being able to open output data and that i need to make the server and data on seperate paths or somethin like that
 

CraZy_NooB

Wanderer
you can check what paths those came from, by any chance, do you have aos, 2d and 3d installed, or more than one version of uo, because that could be auto finding your 3d files and mistaking them for 2d animations, etc. if you have both installed, your going to have to direct the paths to where they are in the uo folder, because perhaps they are in different folders/locations in the client files for a reason...
 

CraZy_NooB

Wanderer
ok well check the locations of where they originally came from, and just kind of make a "clone" folder, but with just that file in it, or files, because it looks like they have a problem being read while they are in same folders.
 

Admin Poison

Wanderer
lamens terms plz, 1st things, u want me to make a clone file of the uo files? and to what do i do with it when i have made a clone file?
 

CraZy_NooB

Wanderer
easier way....find the correct paths to the files in c:\program files\ultima online aos(im guessing)

and just use the commented out line

[code:1]
private const string CustomPath = @"C:\Program Files\Ultima Online";
[/code:1]
 

Phantom

Knight
<sigh>

Don't comment that line. YOU MUST NOT USE THE SAME FILES AS THE CLIENT IF YOU WANT TO FREEZE YOUR WORLD.

YOU MUST MAKE A FOLDER FOR THE REQUIRED FILES AND TELL RUNUO TO LOOK THERE.

WHICH IS EXACTLY WHAT THE COMMENTS TELL YOU TO DO, AND WHAT OTHER PEOPLE IN THIS THREAD OF TOLD YOU

CraZy_NooB, Please watch your answers your not on a good streak of "right' answers ;)
 

CraZy_NooB

Wanderer
i had it right the first time to make a folder for the files, i just stopped thinking after taht but....

yea i got stupid today :(
 

Admin Poison

Wanderer
ok i will post my script how i have it

[code:1]
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 seperate set of datafiles,
* change the 'CustomPath' value, example:
*
* private const string CustomPath = @"C:\Program Files\Ultima Online";
*/
private static string CustomPath = @"C:\Documents and Settings\Administrator\Desktop\chris' stuff stay out\RunUO-Beta-32\Scripts\Misc\Custompath";

/* 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" );

if ( CustomPath != @"C:\Documents and Settings\Administrator\Desktop\chris' stuff stay out\RunUO-Beta-32\Scripts\Misc\Custompath" )
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
{
using ( RegistryKey key = Registry.LocalMachine.OpenSubKey( String.Format( @"SOFTWARE\Origin Worlds Online\{0}\1.0", 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;
}
}
}
}
[/code:1]


and i have a folder sitting in the misc folder named CustomPath
 
Top