Go Back   RunUO - Ultima Online Emulation > RunUO > Custom Script Release Archive

Custom Script Release Archive This is a pre-script database archive of what our users had released.

 
 
Thread Tools Display Modes
Old 07-25-2005, 08:12 PM   #1 (permalink)
Forum Novice
 
Deraj_88's Avatar
 
Join Date: Mar 2004
Location: Austin, T.X.
Age: 23
Posts: 186
Send a message via ICQ to Deraj_88 Send a message via AIM to Deraj_88 Send a message via MSN to Deraj_88 Send a message via Yahoo to Deraj_88
Post ServerList.cs 2.2

Just put this together to make it easyer to list multiple servers that are hosted by the same ip and keep the features of mr fixits serverlist.


I DO NOT SUPPORT THIS RELEASE ANYMORE

Ive made changes to make it even more simple to add multiple servers.
This Submission is a ServerList 2.2 Pack.

CONTAINS:
Packs for 3 different types of installations:
2 Servers
3 Servers
4 Servers
And other resources:
READ ME!
ServerList 2.2 src folder with Original ServerList.cs 2.2


Please do enjoy
I might put together alittle webpage to show working examples of the script but this should be good enough.
Attached Files
File Type: zip ServerList 2.2 Pack.zip (47.3 KB, 803 views)

Last edited by Deraj_88; 07-20-2006 at 03:12 AM.
Deraj_88 is offline  
Old 07-25-2005, 08:40 PM   #2 (permalink)
Forum Expert
 
LordHogFred's Avatar
 
Join Date: Jan 2004
Location: UK, Essex
Age: 20
Posts: 1,166
Default

do I need to have both my servers using this server list?
And also there was a bug where if you used one server but then logged out and went to use the other the slient crashed. Has this been fixed?

Also could you please provide a bit more info on how to set this up correctly?

Thanks, this could be what I've been looking for for ages


EDIT: Ok I've got it setup to show more than one server entry. There are a couple of problems already. One is that I can't log in to the server over my LAN the other is that the sixth char slot doesn't show up.
__________________
It is not the hand that creates worlds,
It is the mind controlling it !

The New Dawn Network
LordHogFred is offline  
Old 07-25-2005, 10:37 PM   #3 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

1) You have to enable the 6th slot
2) Don't use this script use Fixit's if you can't connect to your server over your lan network.

Please note the only reason I say just use Fixit's Serverlist.cs is because it does what you need to do automaticly. The directions are clear and unless you have more then one sever ( which I doubt ) there isn't really a valid reason to use this.
Phantom is offline  
Old 07-25-2005, 10:40 PM   #4 (permalink)
Forum Expert
 
LordHogFred's Avatar
 
Join Date: Jan 2004
Location: UK, Essex
Age: 20
Posts: 1,166
Default

Quote:
Originally Posted by Phantom
1) You have to enable the 6th slot
2) Don't use this script use Fixit's if you can't connect to your server over your lan network.
1. Does this mean I have to enable the 6th slot in the serverlist.cs?

2. It said that this script is supposed to keep Fixits features. I thought he should know because it's not working.
__________________
It is not the hand that creates worlds,
It is the mind controlling it !

The New Dawn Network
LordHogFred is offline  
Old 07-26-2005, 12:22 AM   #5 (permalink)
Forum Novice
 
Deraj_88's Avatar
 
Join Date: Mar 2004
Location: Austin, T.X.
Age: 23
Posts: 186
Send a message via ICQ to Deraj_88 Send a message via AIM to Deraj_88 Send a message via MSN to Deraj_88 Send a message via Yahoo to Deraj_88
Default

yes both your servers need the serverlist.cs i left instructions inside it.
thoe im sorry if there not clear enough. I havent had any prob. logging in over my LAN.
also i didnt really find the 6th char slot prob. cause i usally just have three chars if not just one it might have to do with one server has it on and other doesnt. *shrugs*
I agree that only people with more than one server use this other wise you really have no use for it unless you have a test server that you only want up when you need it to be and mr fixit's features still work just fine.
Deraj_88 is offline  
Old 07-26-2005, 12:59 AM   #6 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
Originally Posted by LordHogFred
1. Does this mean I have to enable the 6th slot in the serverlist.cs?

2. It said that this script is supposed to keep Fixits features. I thought he should know because it's not working.
1) My first response was very clear.

2) It can only auto-detect one serve's ip which is why I said just use the original code since you don't seem to understand it.
Phantom is offline  
Old 07-26-2005, 10:04 AM   #7 (permalink)
Newbie
 
Join Date: Dec 2003
Location: Usa Oregon
Age: 20
Posts: 20
Send a message via AIM to Tikisnot Send a message via MSN to Tikisnot Send a message via Yahoo to Tikisnot
Default lol

*Smiles*
__________________
Dragons Bane!
Tikisnot is offline  
Old 07-26-2005, 09:00 PM   #8 (permalink)
Forum Novice
 
Deraj_88's Avatar
 
Join Date: Mar 2004
Location: Austin, T.X.
Age: 23
Posts: 186
Send a message via ICQ to Deraj_88 Send a message via AIM to Deraj_88 Send a message via MSN to Deraj_88 Send a message via Yahoo to Deraj_88
Default

wrong if both servers are using the serverlist.cs it check both ips.
thoe if you mean the uog ping then that is true.
Deraj_88 is offline  
Old 07-27-2005, 03:43 AM   #9 (permalink)
Newbie
 
nick912's Avatar
 
Join Date: Jun 2004
Age: 28
Posts: 87
Default

This thread should be closed it was stolen for the person who made it ...
nick912 is offline  
Old 07-28-2005, 12:22 AM   #10 (permalink)
 
Join Date: Aug 2004
Age: 19
Posts: 188
Default

How would you know if it was stolen?
Viper23 is offline  
Old 07-28-2005, 01:31 PM   #11 (permalink)
Forum Novice
 
Deraj_88's Avatar
 
Join Date: Mar 2004
Location: Austin, T.X.
Age: 23
Posts: 186
Send a message via ICQ to Deraj_88 Send a message via AIM to Deraj_88 Send a message via MSN to Deraj_88 Send a message via Yahoo to Deraj_88
Default

I dont understand that statement. who am i stealing from?
i really wouldnt care if you took it and posted it again under your name....*shrugs*
w/e floats your boat. i just wanted to share this not inflate my ego.
Deraj_88 is offline  
Old 07-28-2005, 03:33 PM   #12 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

This is lack saying, you stole my Mega Weapon of Death script.

This script although does something helpful, isn't that special, the only code he wrote is the packet.

Guess what he looked at the core to be able to write it, most likely.

Either way, who cares if he "Stole" it, its not worth fighting over so drop that lame act.

This community is based on sharing, if people won't even share a simple script like this whats the point.
Phantom is offline  
Old 07-30-2005, 06:30 AM   #13 (permalink)
Forum Novice
 
WanderingRage's Avatar
 
Join Date: Jun 2005
Location: Anniston, Alabama
Posts: 158
Send a message via ICQ to WanderingRage Send a message via AIM to WanderingRage Send a message via Yahoo to WanderingRage
Exclamation Having problems

I tried to add 2 sever's and i still seem to have problems i do not understand it how he wrote it and i have tried to get help but no one seems to answer i was woundering if someone out there could help me if you can please email me at turleysnake@yahoo.com or talk to me at turleysnake1@aol.com.Thank you
WanderingRage is offline  
Old 07-30-2005, 07:41 AM   #14 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
Originally Posted by WanderingRage
I tried to add 2 sever's and i still seem to have problems i do not understand it how he wrote it and i have tried to get help but no one seems to answer i was woundering if someone out there could help me if you can please email me at turleysnake@yahoo.com or talk to me at turleysnake1@aol.com.Thank you
How about you just use the forum.

Post your Serverlist.cs so the author can help you.
Phantom is offline  
Old 07-31-2005, 04:18 PM   #15 (permalink)
Silverblade runs me
 
Join Date: Nov 2003
Location: Dallas,tx
Age: 33
Posts: 55
Send a message via ICQ to Rockrat Send a message via AIM to Rockrat
Default

did you get permission from fixit to use his list??? Considering all you did was edit his list
Rockrat is offline  
Old 07-31-2005, 10:29 PM   #16 (permalink)
 
Join Date: Aug 2004
Age: 19
Posts: 188
Default

It wouldn't matter really. All he did was add to it.
Viper23 is offline  
Old 08-03-2005, 07:11 AM   #17 (permalink)
Forum Expert
 
Admin God's Avatar
 
Join Date: Mar 2005
Location: South Bend, Indiana
Age: 23
Posts: 1,588
Send a message via AIM to Admin God Send a message via MSN to Admin God Send a message via Yahoo to Admin God
Red face

Now is it possible to make it display two servers on login, that are on seperate computers, on different networks? Or i guess how would i go about doing this? Just a point in the right direction would be appreciated :-) Thanks.
Admin God is offline  
Old 08-03-2005, 08:07 AM   #18 (permalink)
 
Join Date: Jul 2004
Location: UO99 Shard
Age: 21
Posts: 149
Send a message via AIM to Zaroff Send a message via MSN to Zaroff
Default

Yep its possible.

Its programming, these programs were made with programming. Anything is theoretically possible.

This is more than theoretically possible though.

Just have 2 listings in serverlist.cs to your main shard, and have the other point to different servers' IP addresses.

-Zaroff
Zaroff is offline  
Old 08-05-2005, 03:29 PM   #19 (permalink)
 
Join Date: Jul 2003
Location: USA
Age: 30
Posts: 34
Send a message via ICQ to dwaynelm
Exclamation Help

I have 2 servers going on the same ip and cant get both to show in the list when I log in. I need to know how do you exactly edit this serverlist to work?
dwaynelm is offline  
Old 08-05-2005, 06:29 PM   #20 (permalink)
Forum Novice
 
Deraj_88's Avatar
 
Join Date: Mar 2004
Location: Austin, T.X.
Age: 23
Posts: 186
Send a message via ICQ to Deraj_88 Send a message via AIM to Deraj_88 Send a message via MSN to Deraj_88 Send a message via Yahoo to Deraj_88
Default

post your code so i can see what you have wrong.
ill be leaving in less than a week (The Internet) so if i dont see it in time im sorry.

also ive tryed using just the script to connect two different IPs (Without 3rd Party Program)....Doesnt work!
itd prob work if you used some server programming but ive bearly tap't the start of my studys so im of no use in this department.


p.s. yuk i think the area im moving to only has dial-up if i return
Deraj_88 is offline  
Old 08-05-2005, 11:43 PM   #21 (permalink)
 
Join Date: Jul 2003
Location: USA
Age: 30
Posts: 34
Send a message via ICQ to dwaynelm
Arrow

Code:
// ==================================================================================
		// YOUR SERVERS NAME
		// ==================================================================================
		public const string ServerName = "Test1"; //Home Server's Name
                                /*//Server A
		public const string ServerNameA = "Test"; //Server A's Name*/
                                /*//Server B
		public const string ServerNameB = "Server B"; //Server B's Name*/
                                /*//Server C
		public const string ServerNameC = "Server C"; //Server C's Name*/
		// ==================================================================================
		// YOUR INTERNET IP OR DNS NAME
		// Here you can select to autodetect your internet ip, or manualy specify
		// Examples:
		// public static string Address = "12.34.56.78";
		// public static string Address = "shard.host.com";
		// ==================================================================================
		public const bool InternetIPAutodetect = true;
		public const int MinutesBetweenIPAutodetect = 1440;
		public static string Address = null;  //Home Server's IP
                                /*//Server A
		public static string AddressA = "196.1xx.x.xxx";  //Server A's IP
		public const int PortA = 259x;  //Server A's Port*/
                                /*//Server B
		public static string AddressB = "###.###.#.###"; //Server B's IP
		public const int PortB = ####;  //Server B's Port*/
                                /*//Server C
		public static string AddressB = "###.###.#.###"; //Server C's IP
		public const int PortB = ####;  //Server C's Port*/
Is there any other place I need to edit besides this area and does it look alright for both.
dwaynelm is offline  
Old 08-08-2005, 03:27 AM   #22 (permalink)
Forum Novice
 
Deraj_88's Avatar
 
Join Date: Mar 2004
Location: Austin, T.X.
Age: 23
Posts: 186
Send a message via ICQ to Deraj_88 Send a message via AIM to Deraj_88 Send a message via MSN to Deraj_88 Send a message via Yahoo to Deraj_88
Default

yes further on down in the script you have to delete the "/*" and "*/"
Code:
                                // ----------------------------------------------------
				// Send serverlist
				// ----------------------------------------------------
				if ( Resolve( Address != null && !IsLocalMachine( e.State ) ? Address : Dns.GetHostName(), out ipAddr ) )
				{
					e.AddServer( ServerName, new IPEndPoint( ipAddr, Listener.Port ) );
					e.AddServer( ServerNameA, new IPEndPoint( ipAddr, PortA ) );
					/*e.AddServer( ServerNameB, new IPEndPoint( ipAddr, PortB ) );*/
					/*e.AddServer( ServerNameC, new IPEndPoint( ipAddr, PortC ) );*/
				} else {
					e.Rejected = true;
				}
			}
			catch
			{
				e.Rejected = true;
			}
		}
Deraj_88 is offline  
Old 08-09-2005, 05:08 AM   #23 (permalink)
Forum Expert
 
RoninGT's Avatar
 
Join Date: Oct 2002
Location: Evansville, IN
Age: 27
Posts: 943
Send a message via ICQ to RoninGT
Default

Looks like a cool script but when i tested it i keep loging into the same server lol. From any login, (I have 3 test centers) had them all going all on the serverlist.cs and all add the new serverlist.cs but any one i picked keep logging me into the same server as the Listener.Port. I was always told in order to pull this one off you would have to make a login server with a database to pull this one off. But again i could be doing something wrong.

Ronin
__________________
Let me out i am stuck in your pocket!
RoninGT is offline  
Old 08-09-2005, 03:00 PM   #24 (permalink)
Forum Newbie
 
Join Date: Jul 2004
Age: 18
Posts: 33
Unhappy i dont get this

hey i dont get this im trying to get this im trying to set it up but when i do it it dont show if i do it a different way i get errors plz help me and tell me what lines and stufff i need to changed to make it work




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

namespace Server.Misc
{
public class ServerList
{

// ================================================== ================================
// YOUR SERVERS NAME
// ================================================== ================================
public const string ServerName = "Home Server"; //Home Server's Name
/*//Server A
public const string ServerNameA = "Pre Osi"; //Server A's Name*/
/*//Server B
public const string ServerNameB = "Pure Osi"; //Server B's Name*/
/*//Server C
public const string ServerNameC = "Gm Land"; //Server C's Name*/
// ================================================== ================================
// YOUR INTERNET IP OR DNS NAME
// Here you can select to autodetect your internet ip, or manualy specify
// Examples:
// public static string Address = "12.34.56.78";
// public static string Address = "shard.host.com";
// ================================================== ================================
public const bool InternetIPAutodetect = true;
public const int MinutesBetweenIPAutodetect = 1440;
public static string Address = null; //Home Server's IP
/*//Server A
public static string AddressA = "68.203.171.184"; //Server A's IP
public const int PortA = 2593; //Server A's Port*/
/*//Server B
public static string AddressB = "68.203.171.184"; //Server B's IP
public const int PortB = 2593; //Server B's Port*/
/*//Server C
public static string AddressB = "68.203.171.184"; //Server C's IP
public const int PortB = 2593; //Server C's Port*/
// ================================================== ================================
// Here are some values stored
// ================================================== ================================
private static LocalLanIPRange[] LocalLanIPRanges = new LocalLanIPRange[10];
private static UInt32 LocalLanIPRangesCount;
private static AutoIPMirror[] AutoIPMirrors = new AutoIPMirror[10];
private static UInt32 AutoIPMirrorsCount;
private static DateTime InternetIPAutodetectLast;


// ================================================== ================================
// Initialization
// ================================================== ================================
public static void Initialize()
{
// ----------------------------------------------------
// Select what home port to use
// ----------------------------------------------------
Listener.Port = 2593; //Home Server's Port

// ----------------------------------------------------
// Load the local LAN ip ranges
// ----------------------------------------------------
AddLocalLANIPRange("10.0.0.0", "10.255.255.255");
AddLocalLANIPRange("192.168.0.0", "192.168.255.255");
AddLocalLANIPRange("172.16.0.0", "172.32.255.255");
AddLocalLANIPRange("169.254.0.0", "169.254.255.255");

// ----------------------------------------------------
// Load the Auto IP mirros
// ----------------------------------------------------
AddAutoIPMirror("http://www.findmyip.com/", "Your IP address is:<br>", "</FONT>");
AddAutoIPMirror("http://www.ipaddy.com/", "Your IP address is: ", "<br>");
AddAutoIPMirror("http://checkip.dyndns.org/", "Current IP Address: ", "</body>");
AddAutoIPMirror("http://ipid.shat.net/iponly/", "<title>", "</title>");
AddAutoIPMirror("http://www.edpsciences.com/htbin/ipaddress", "Your IP address is <B> ", " </B>");
AddAutoIPMirror("http://www2.simflex.com/ip.shtml", "Your IP address is <BR>", "<BR>");

// ----------------------------------------------------
// Create the event
// ----------------------------------------------------
EventSink.ServerList += new ServerListEventHandler( EventSink_ServerList );

// ----------------------------------------------------
// Show info in console
// ----------------------------------------------------
Console.WriteLine("ServerList 2.2");
Console.WriteLine("Welcome to SERVERS NAME");

// ----------------------------------------------------
// Lets find internet ip
// ----------------------------------------------------
DetectInternetIP();


}


// ================================================== ================================
// Add a range of local lan ips
// ================================================== ================================
private static void AddLocalLANIPRange(string RangeFrom, string RangeTo)
{
LocalLanIPRanges[LocalLanIPRangesCount] = new LocalLanIPRange();
LocalLanIPRanges[LocalLanIPRangesCount].RangeFrom = StringIPToUInt32IP(RangeFrom);
LocalLanIPRanges[LocalLanIPRangesCount].RangeTo = StringIPToUInt32IP(RangeTo);
LocalLanIPRangesCount = LocalLanIPRangesCount + 1;
}


// ================================================== ================================
// Convert a ip string to a binary unsigned int
// ================================================== ================================
private static UInt32 StringIPToUInt32IP(string addr)
{
byte[] byteArray1 = IPAddress.Parse(addr).GetAddressBytes();
byte[] byteArray2 = IPAddress.Parse(addr).GetAddressBytes();
byteArray1[0] = byteArray2[3];
byteArray1[1] = byteArray2[2];
byteArray1[2] = byteArray2[1];
byteArray1[3] = byteArray2[0];
return BitConverter.ToUInt32( byteArray1, 0);
}


// ================================================== ================================
// Used to store the local lan ip ranges
// ================================================== ================================
private class LocalLanIPRange
{
public UInt32 RangeFrom;
public UInt32 RangeTo;
}


// ================================================== ================================
// Add a AutoIP mirror
// ================================================== ================================
private static void AddAutoIPMirror(string sURL, string sStart, string sEnd)
{
AutoIPMirrors[AutoIPMirrorsCount] = new AutoIPMirror();
AutoIPMirrors[AutoIPMirrorsCount].sURL = sURL;
AutoIPMirrors[AutoIPMirrorsCount].sStart = sStart;
AutoIPMirrors[AutoIPMirrorsCount].sEnd = sEnd;
AutoIPMirrorsCount = AutoIPMirrorsCount + 1;
}


// ================================================== ================================
// Used to store the Auto IP mirrors
// ================================================== ================================
private class AutoIPMirror
{
public string sURL;
public string sStart;
public string sEnd;
public UInt32 iFailures;
}


// ================================================== ================================
// Detect ip
// ================================================== ================================
public static void DetectInternetIP()
{

// ----------------------------------------------------
// Autodetect the Internet IP
// ----------------------------------------------------
if (InternetIPAutodetect) {
DateTime UpdateTime = InternetIPAutodetectLast;
UpdateTime = UpdateTime.AddMinutes(MinutesBetweenIPAutodetect);
if (UpdateTime<DateTime.Now) {
string NewAddress = null;
NewAddress = FindInternetIP();
InternetIPAutodetectLast = DateTime.Now;
if (NewAddress!=null)
{
Address = NewAddress;
}
}
}

}

// ================================================== ================================
// The serverlist event
// ================================================== ================================
public static void EventSink_ServerList( ServerListEventArgs e )
{
try
{

// ----------------------------------------------------
// Lets find internet ip
// ----------------------------------------------------
DetectInternetIP();

// ----------------------------------------------------
// Find the server ip to use for this user
// ----------------------------------------------------
IPAddress ipAddr = FindMachineIP(e);

// ----------------------------------------------------
// Send serverlist
// ----------------------------------------------------
if ( Resolve( Address != null && !IsLocalMachine( e.State ) ? Address : Dns.GetHostName(), out ipAddr ) )
{
e.AddServer( ServerName, new IPEndPoint( ipAddr, Listener.Port ) );
*e.AddServer( ServerNameA, new IPEndPoint( ipAddr, PortA ) );
*e.AddServer( ServerNameB, new IPEndPoint( ipAddr, PortB ) );
*e.AddServer( ServerNameC, new IPEndPoint( ipAddr, PortC ) );
} else {
e.Rejected = true;
}
}
catch
{
e.Rejected = true;
}
}


// ================================================== ================================
// Connects to a webserver that gives you your internet ip
// ================================================== ================================
public static string FindInternetIP( )
{

// ----------------------------------------------------
// Pick a random mirror
// ----------------------------------------------------
Random rnd = new Random();
int UseMirror = (int)( rnd.NextDouble() * AutoIPMirrorsCount);
string MyIP = "";

// ----------------------------------------------------
// Catch if the mirror is down
// ----------------------------------------------------
try
{
// ----------------------------------------------------
// Get the webpage
// ----------------------------------------------------
WebClient client = new WebClient();
byte[] pageData = client.DownloadData(AutoIPMirrors[UseMirror].sURL);
MyIP = System.Text.Encoding.ASCII.GetString(pageData);

// ----------------------------------------------------
// Find the string
// ----------------------------------------------------
int iStart = MyIP.LastIndexOf(AutoIPMirrors[UseMirror].sStart);
int iEnd = MyIP.IndexOf(AutoIPMirrors[UseMirror].sEnd, iStart+AutoIPMirrors[UseMirror].sStart.Length);
MyIP = MyIP.Substring(iStart+AutoIPMirrors[UseMirror].sStart.Length, iEnd-iStart-AutoIPMirrors[UseMirror].sStart.Length );
MyIP = MyIP.Trim();

// ----------------------------------------------------
// Return value
// ----------------------------------------------------
Console.WriteLine("Internet IP: {0} ({1})", MyIP, AutoIPMirrors[UseMirror].sURL);
return MyIP;
}
catch
{
Console.WriteLine("Unable to autoupdate the Internet IP from {0}!", AutoIPMirrors[UseMirror].sURL);
Console.WriteLine("----------------------------------------------------------------------");
Console.WriteLine(MyIP);
Console.WriteLine("----------------------------------------------------------------------");
return null;
}
}


// ================================================== ================================
// Calculates what server IP to use
// ================================================== ================================
public static IPAddress FindMachineIP( ServerListEventArgs e )
{
// ----------------------------------------------------
// Find the IP of the connecting user
// ------------------------------