|
||
|
|||||||
| Server Support on Windows Get (and give) support on general questions related to the RunUO server itself. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Hello everyone.. Well i have read most of the posts about how to make my own shard, But i'm still having a problem i can't get any of my friends on, And when i tried to make it public on UOG it says it has 0 uptime which i read is because of the ip i used so i then downloaded what it told me to and tried the other possibilities, However now i'm stuck and don't know what to do.. Please someone Help me THX!!!
__________________
BLAH BLAH BLAH BLAH BLAH POOP! |
|
|
|
|
|
|
#5 (permalink) |
|
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 const string Address = null; public const string ServerName = "Hidden Valley PVP"; 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 ) { try { outValue = IPAddress.Parse( addr ); return true; } catch { try { IPHostEntry iphe = Dns.Resolve( 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.Resolve( Dns.GetHostName() ); for ( int i = 0; !contains && i < iphe.AddressList.Length; ++i ) contains = theirAddress.Equals( iphe.AddressList[i] ); return contains; } } }
__________________
BLAH BLAH BLAH BLAH BLAH POOP! |
|
|
|
|
|
|
#6 (permalink) |
|
ok here is whats wrong
[code:1]public const string Address = null;[/code:1] Change to [code:1]public const string Address = "your ip or dns name";[/code:1] if you dont know ur ip go to www.whatismyip.com and if u want a dns name go to www.no-ip.com ![]()
__________________
The Angel of Fire |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|