Register for your free account! | Forgot your password?

You last visited: Today at 13:33

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release]Fix LOTF Crash (Somehow)

Discussion on [Release]Fix LOTF Crash (Somehow) within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
[Release]Fix LOTF Crash (Somehow)

Here is a release for LOTF (5017) that can fix your crashes some how. What is it?? Well is just an auto restart every XX:00

First find (in general.cs):
PHP Code:
Thetimer = new System.Timers.Timer(); 
Under paste:
PHP Code:
                //Restart Server
                
System.Timers.Timer RSATimer = new System.Timers.Timer(1000.0);
                
RSATimer.Start();
                
RSATimer.Elapsed += delegate AutoRestartMSG(); };
                
System.Timers.Timer RSBTimer = new System.Timers.Timer(1000.0);
                
RSBTimer.Start();
                
RSBTimer.Elapsed += delegate AutoRestart(); }; 
Now find (in general.cs):
PHP Code:
public static void DoStuff() 
Above it put:
PHP Code:
                public static void AutoRestartMSG()
                {
                    if (
DateTime.Now.Minute == 00)
                    {
                        
World.RSMSG1 true;
                        
World.SendMsgToAll("Server AutoRestart starts in 2minutes.""SYSTEM"2011);
                    }
                }       
        
        public static 
void AutoRestart()
                {
                    foreach (
DictionaryEntry DE in World.AllChars)
                    {
                        
Character Char = (Character)DE.Value;

                        if (
DateTime.Now.Minute == 52 && World.RSMSG1 == true)
                        {
                            
General.MyPackets.Vital(Char.UID12ulong.Parse(Char.Avatar.ToString() + Char.Model.ToString()));
                            
Char.LastSave DateTime.Now;
                            
Char.Save();
                            
World.UpdateSpawn(Char);
                            
World.SendMsgToAll("Server Restart in 10seconds. All Characters have been saved.""SYSTEM"2011);
                            
Thread.Sleep(1000);
                            
World.RSMSG1 false;
                            
ServerRestart();
                        }
                    }
                } 
Now open Database.cs
and search for:
PHP Code:
public static Hashtable GWScores = new Hashtable(); 
under it paste:
PHP Code:
public static bool RSMSG1 false
Done, your server will now restart every hour & your server will fix crashes automatical since it just need to be restarted. This will not fix login freeze some how, but it can help on it
If i helped you press thanks ;D
Fish* is offline  
Old 04/01/2010, 18:23   #2
 
CompacticCo's Avatar
 
elite*gold: 0
Join Date: Aug 2009
Posts: 424
Received Thanks: 108
You didn't code this, this is stolen from the PazeCo source. All you did was remove some of the pop up messages.
CompacticCo is offline  
Old 04/01/2010, 18:39   #3
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Okay i really stole it LMAO you can visit my server and see i can code ****, want a screenshot of my source?? my source is build out of the original lotf source, so i doubt you can talk **** i didnt steal anything......
I doubt that you have started from the start and coded everything self x.x

Dont be jealous cuz i know you wished you could make it.
Fish* is offline  
Old 04/01/2010, 18:49   #4

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 924
You can't say that he stole it unless all the names are the same too.
Kiyono is offline  
Old 04/01/2010, 18:51   #5
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Quote:
Originally Posted by Kiyono View Post
You can't say that he stole it unless all the names are the same too.
He cant say i stoled it, when he cant prove it ^^
And im sure this is highly different XD
Fish* is offline  
Old 04/01/2010, 19:50   #6
 
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 505
Quote:
Originally Posted by grillmad View Post
Okay i really stole it LMAO you can visit my server and see i can code ****, want a screenshot of my source?? my source is build out of the original lotf source, so i doubt you can talk **** i didnt steal anything......
I doubt that you have started from the start and coded everything self x.x

Dont be jealous cuz i know you wished you could make it.
This code doesn't solve anything, all it does is restart the crashed server, so it can crash again, I doubt this will make anyone happy.
Oh BTW, no offence but this isn't anything to be proud of code wise.
And yes, I also think you stole this.
Basser is offline  
Old 04/01/2010, 20:20   #7
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Quote:
Originally Posted by Hepatitis X View Post
This code doesn't solve anything, all it does is restart the crashed server, so it can crash again, I doubt this will make anyone happy.
Oh BTW, no offence but this isn't anything to be proud of code wise.
And yes, I also think you stole this.
lotf crash circa after alittle over a hour. This restarts server alittle before wich makes it wont crash. I have got it on test all day now and i havent got 1 crash yet ^^
Fish* is offline  
Old 04/01/2010, 20:42   #8
 
CompacticCo's Avatar
 
elite*gold: 0
Join Date: Aug 2009
Posts: 424
Received Thanks: 108
Oh man, let me make this out in a nice way.

You can't even speak English fluently and you're white.. You have little to 0 Conquer knowledge.. You didn't know what Visual Basic was until someone felt sorry for you and connected remotely to your computer to change the default "Welcome to PazeCo"

So I highly doubt this is your own work.
CompacticCo is offline  
Old 04/01/2010, 20:44   #9
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
I used the first release of lotf (the original) and coded everything i got in my server. I can take some screenshot so you can see i ain't lying. And cuz im white, dosn't mean i have to speak proper english, cuz im not from uk or usa. And little kid go home k?
Fish* is offline  
Old 04/01/2010, 21:04   #10
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
shouldn't need to restart every hour.. you shouldn't even need to restart every day.. techinally you should restart it every week on like a monday at 8PM but if you want every day do it when no one is on .. usually 5AM in the morning =]] server maint ftw.
PeTe Ninja is offline  
Old 04/01/2010, 21:11   #11
 
elite*gold: 0
Join Date: Apr 2010
Posts: 13
Received Thanks: 11
This does not solve the crashing. It's a cycle of crashing. It's like this:

Server Started --> Crashes ---> Server Restarts ---> Crashes Again

This will make players annoyed. I believe this was already released before. I'm sorry to say, but this technically does not help the server at all.

Might as well modify it to a Full Ini database system and the crashes would be gone.

P.S. I would be using the 5165 source by now which is a Full Ini Database Source.
iLikeSkittles is offline  
Old 04/01/2010, 21:14   #12
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Quote:
Originally Posted by PeTe Ninja View Post
shouldn't need to restart every hour.. you shouldn't even need to restart every day.. techinally you should restart it every week on like a monday at 8PM but if you want every day do it when no one is on .. usually 5AM in the morning =]] server maint ftw.
The restart takes about 30seconds ^^

Quote:
Originally Posted by iLikeSkittles View Post
This does not solve the crashing. It's a cycle of crashing. It's like this:

Server Started --> Crashes ---> Server Restarts ---> Crashes Again

This will make players annoyed. I believe this was already released before. I'm sorry to say, but this technically does not help the server at all.
Wrong, i have not got one crash yet. The crash were used to come always around 1hour. Now i putted restart auto, so the crash dont come. I have not seen the crash now. Also this is good to save for rollbacks XD
Fish* is offline  
Old 04/01/2010, 21:16   #13
 
elite*gold: 0
Join Date: Apr 2010
Posts: 13
Received Thanks: 11
The crashes do not come at a certain period of time. It crashes faster if there are more players in the server roaming around killing mobs etc. Also there would be no rollbacks if you make it save the characters each time they log out or save it each time something is changed/updated.
iLikeSkittles is offline  
Old 04/01/2010, 21:19   #14
 
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 505
Quote:
Originally Posted by grillmad View Post
The restart takes about 30seconds ^^


Wrong, i have not got one crash yet. The crash were used to come always around 1hour. Now i putted restart auto, so the crash dont come. I have not seen the crash now. Also this is good to save for rollbacks XD
Haha, I just noticed every sentence you say is wrong.
1) You always have to spell i with an capital if you mean I as in yourself.
2) The crash doesn't come around a certain time, he can hop in at any moment. *Sarcasm, just in case you didn't realize.
3) But the crash never comes, the crash crashes.
4) You cannot see crashes, however you can make it write things down in the console.
5) Why do you save a rollback?!
Basser is offline  
Thanks
1 User
Old 04/01/2010, 21:23   #15
 
elite*gold: 0
Join Date: Apr 2010
Posts: 13
Received Thanks: 11
Quote:
Originally Posted by Hepatitis X View Post
Haha, I just noticed every sentence you say is wrong.
1) You always have to spell i with an capital if you mean I as in yourself.
2) The crash doesn't come around a certain time, he can hop in at any moment. *Sarcasm, just in case you didn't realize.
3) But the crash never comes, the crash crashes.
4) You cannot see crashes, however you can make it write things down in the console.
5) Why do you save a rollback?!
Well said.
iLikeSkittles is offline  
Closed Thread


Similar Threads Similar Threads
[LOTF RELEASE] Ip Ban!!
05/18/2009 - CO2 PServer Guides & Releases - 22 Replies
Ip Ban! Credits to Ultimatum First...Search this ( It is in General.cs ) public static System.IO.StreamWriter sw = new System.IO.StreamWriter(Application.StartupPath + @"\ServerLog.txt", true);
[Release] Those still using LOTF
04/17/2009 - CO2 PServer Guides & Releases - 23 Replies
Help yourself be a better coder and listen to what the community is trying to say. One day you will understand why some are trying to encourage people still using LOTF to move to a more stable source and only use LOFT as a basis of learning and how you can improve (A LOT) on the LOTF coding. There's a lot of GREAT coding examples in InfamousNoone's source which you can actually learn from and gain a greater understanding of how a PROPER server operates. After all why do you think...



All times are GMT +2. The time now is 13:33.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.