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!

your instructions for setting up connectivity dont work

alex916

Sorceror
your instructions for setting up connectivity dont work

your instructions for setting up connectivity don't work and theres a problem with the instructions given it says to look for these lines in the serverlist.cs file

public const string Address = null;

public const string ServerName = "RunUO Test Center";


the first line doesn't exist but the second one does whats the deal with that?

my file looks like this can anyone please spot the line i need changed because to me it doesn't look like it exists in here what so ever and its frustrating me so much

using System;
using System.Net;
using System.Net.Sockets;
using Server;
using Server.Network;

namespace Server.Misc
{
public class ServerList
{
/* Address:
*
* The default setting, a value of 'null', will attempt to detect your IP address automatically:
* private const string Address = null;
*
* This detection, however, does not work for servers behind routers. If you're running behind a router, put in your IP:
* private const string Address = "12.34.56.78";
*
* If you need to resolve a DNS host name, you can do that too:
* private const string Address = "shard.host.com";
*/

public static readonly string Address = null;

public const string ServerName = "RunUO TC";

public static void Initialize()
{
Listener.Port = 2593;

EventSink.ServerList += new ServerListEventHandler( EventSink_ServerList );
}

public static void EventSink_ServerList( ServerListEventArgs e )
{
try
{
IPAddress ipAddr;

if ( Resolve( Address != null && !IsLocalMachine( e.State ) ? Address : Dns.GetHostName(), out ipAddr ) )
e.AddServer( ServerName, new IPEndPoint( ipAddr, Listener.Port ) );
else
e.Rejected = true;
}
catch
{
e.Rejected = true;
}
}

public static bool Resolve( string addr, out IPAddress outValue )
{

if ( IPAddress.TryParse( addr, out outValue ) )
return true;

try
{
IPHostEntry iphe = Dns.GetHostEntry( addr );

if ( iphe.AddressList.Length > 0 )
{
outValue = iphe.AddressList[iphe.AddressList.Length - 1];
return true;
}
}
catch
{
}

outValue = IPAddress.None;
return false;
}

private static bool IsLocalMachine( NetState state )
{
Socket sock = state.Socket;

IPAddress theirAddress = ((IPEndPoint)sock.RemoteEndPoint).Address;

if ( IPAddress.IsLoopback( theirAddress ) )
return true;

bool contains = false;

IPHostEntry iphe = Dns.GetHostEntry( Dns.GetHostName() );

for ( int i = 0; !contains && i < iphe.AddressList.Length; ++i )
contains = theirAddress.Equals( iphe.AddressList );

return contains;
}
}
}
 

Fokus

Wanderer
alex916;720390 said:
your instructions for setting up connectivity don't work and theres a problem with the instructions given it says to look for these lines in the serverlist.cs file

public const string Address = null;

public const string ServerName = "RunUO Test Center";


the first line doesn't exist but the second one does whats the deal with that?

my file looks like this can anyone please spot the line i need changed because to me it doesn't look like it exists in here what so ever and its frustrating me so much

using System;
using System.Net;
using System.Net.Sockets;
using Server;
using Server.Network;

namespace Server.Misc
{
public class ServerList
{
/* Address:
*
* The default setting, a value of 'null', will attempt to detect your IP address automatically:
* private const string Address = null;
*
* This detection, however, does not work for servers behind routers. If you're running behind a router, put in your IP:
* private const string Address = "12.34.56.78";
*
* If you need to resolve a DNS host name, you can do that too:
* private const string Address = "shard.host.com";
*/

public static readonly string Address = null;

public const string ServerName = "RunUO TC";

public static void Initialize()
{
Listener.Port = 2593;

EventSink.ServerList += new ServerListEventHandler( EventSink_ServerList );
}

public static void EventSink_ServerList( ServerListEventArgs e )
{
try
{
IPAddress ipAddr;

if ( Resolve( Address != null && !IsLocalMachine( e.State ) ? Address : Dns.GetHostName(), out ipAddr ) )
e.AddServer( ServerName, new IPEndPoint( ipAddr, Listener.Port ) );
else
e.Rejected = true;
}
catch
{
e.Rejected = true;
}
}

public static bool Resolve( string addr, out IPAddress outValue )
{

if ( IPAddress.TryParse( addr, out outValue ) )
return true;

try
{
IPHostEntry iphe = Dns.GetHostEntry( addr );

if ( iphe.AddressList.Length > 0 )
{
outValue = iphe.AddressList[iphe.AddressList.Length - 1];
return true;
}
}
catch
{
}

outValue = IPAddress.None;
return false;
}

private static bool IsLocalMachine( NetState state )
{
Socket sock = state.Socket;

IPAddress theirAddress = ((IPEndPoint)sock.RemoteEndPoint).Address;

if ( IPAddress.IsLoopback( theirAddress ) )
return true;

bool contains = false;

IPHostEntry iphe = Dns.GetHostEntry( Dns.GetHostName() );

for ( int i = 0; !contains && i < iphe.AddressList.Length; ++i )
contains = theirAddress.Equals( iphe.AddressList );

return contains;
}
}
}


First off try to use code tag's around the script so we can read it better =).
Second this
Code:
public const string ServerName = [COLOR="Red"]"RunUO TC";[/COLOR]
Will be the name of you're shard.

Second:
Code:
public static readonly string Address = [COLOR="red"]null[/COLOR];

I would put in my ipaddress there. Try that and see if you're problem is fixed.
 

alex916

Sorceror
one other thing when its asking for my ip address for things like portworwarding do i use the one i get from doing ipconfig /all in the command promt or the one i get from WhatIsMyIsp.com
 

Fokus

Wanderer
Either Or should work, they shouldn't be any different but if they are try it from you ipconfig first and if that fails go to whatismyip =)
 

stormwolff

Knight
alex916;720539 said:
one other thing when its asking for my ip address for things like portworwarding do i use the one i get from doing ipconfig /all in the command promt or the one i get from WhatIsMyIsp.com

In your router setup for port forwarding you need to put in the Local IP, usually something like 192.168.1.100 of the computer hosting your shard. You can get this from the ipconfig /all.

In your Serverlist.cs file you need to use your external IP address, the one from what is my ip.
 
Actually Try Downloading this Serverlist.cs Script I added Below as an Attachment:

It finds the internet IP for you.

It came from UOGateway and I use it for my shard and It works great for me.

Here is where you changes the Server Name:

Code:
// ==================================================================================
		// YOUR SERVERS NAME
		// ==================================================================================
		public const string ServerName = "RunUO Test Center";


And when you load up your Server, Remember to look for this IP Address on the Black Screen which is your RunUO Core:

Code:
Serverlist.cs: 2.0
[COLOR="Red"]Internet IP: 18.202.62.251 (http://www.ipaddy.com/)[/COLOR]
Address: 127.0.0.1:2593
Address: 18.202.62.251:2593

The IP Address I highlighted in Red in the IP you look for to put in your Server IP Address.

*NOTE* I edited the IP Address Matters Of Privacy Security.


Download the Serverlist.CS Script Below and Overwrite it with your Origional Serverlist.cs Located in your RunUO/Scripts/Misc folder:
 

Attachments

  • ServerList.cs
    14.2 KB · Views: 18

alex916

Sorceror
ok well i got the connection working and my friend is now able to log onto my server but when he does he imediatly freezes up his health bar doesnt show any color and he can take about 3 steps before he freezes up totally and has to log out and back in again but then it just happens again any ideas on how to fix this??
 
alex916;720574 said:
ok well i got the connection working and my friend is now able to log onto my server but when he does he imediatly freezes up his health bar doesnt show any color and he can take about 3 steps before he freezes up totally and has to log out and back in again but then it just happens again any ideas on how to fix this??

Did he Patch Wrong?

Remember you shouldnt ever Patch Passed 6.0.17 because it can ruin your client. Pretty much 6.0 is to a new level on UO.

Tell him to make sure he's not patched past 6.0.17.

Also make sure he's atleast patched to 5.0.8 or something like that.
 

alex916

Sorceror
ok but that whole patching thing is a problem cause we also play on the demise server and i dont know if not patching fully is going to effect us being able to play on there? any thoughts?
 
Top