Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 13:13

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

Advertisement



[REQUEST]/restart command

Discussion on [REQUEST]/restart command within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2009
Posts: 8
Received Thanks: 0
[REQUEST]/restart command

I'm using LOTF source (5065), and i know i've seen the command /restart, so that PM's can restart the server if the owner is away. My problem is i dont know how to code such a command just from looking at the other commands. Can someone post how to add it in.
*Well its been proved time and time again. No one here ever tries to really help ppl. Had to find this myself and it makes it worse that none of you couldve sent me this small simple*
if (Splitter[0] == "/restart")
{
General.ServerRestart();
}
Jmenace is offline  
Old 02/12/2010, 13:27   #2
 
ramix's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
source 5165?
ramix is offline  
Old 02/12/2010, 13:44   #3
 
renetjuuh's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 97
Received Thanks: 9
i think so now a days everyone use 5165
renetjuuh is offline  
Old 02/12/2010, 13:48   #4
 
renetjuuh's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 97
Received Thanks: 9
Code:
if (GC.AuthInfo.Status == "[PM]")
{
if (Cmd[0] == "/restart")
                            {
                                
                                NewestCOServer.Main.AuthWorker.Listener.Close();
                                NewestCOServer.Main.GameWorker.Listener.Close();
                                try
                                {
                                    foreach (Game.Character C in Game.World.H_Chars.Values)
                                    {
                                        try
                                        {
                                            C.MyClient.Disconnect();
                                            Console.WriteLine(C.Name + " has logged off successfuly.");
                                        }
                                        catch { continue; }
                                    }
                                }
                                catch { }
                                Database.SaveKOs();
                                Console.WriteLine("KOs saved.");
                                Database.SaveEmpire();
                                Console.WriteLine("Empire saved.");
                                Features.Guilds.SaveGuilds();
                                Console.WriteLine("Guilds saved.");
                                Features.SkillsClass.Save();
                                Console.WriteLine("Skills saved.");
                                Console.WriteLine("Database disposed.");
                                Console.WriteLine("Write /exit or click X to close the window.");
                                System.Diagnostics.Process.Start("NewestCOServer.exe");
                                Environment.Exit(0);
                            }
i think this works it works for me.

Soryy for dubbel post
renetjuuh is offline  
Old 02/12/2010, 14:02   #5
 
elite*gold: 0
Join Date: Feb 2010
Posts: 480
Received Thanks: 207
5165 source already has restart command :S
Decker_ is offline  
Old 02/12/2010, 14:11   #6
 
ramix's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
ya... ppl asking something have in there source idk why -.-
ramix is offline  
Old 02/12/2010, 15:51   #7
 
ASSN9NE's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 52
Received Thanks: 8
ok take the /restart command from the gm-pm section in Chat.cs move it up to where /dc & /revivehere codes are put it between the 2 and change the command from /restart - to something no1 would figure out like /donkeyballs or w/e u want and it will restart the server with a non gm-pm account lmao.

try this put this in your Chat.cs between the /dc & /revivehere commands are

Code:
if (Cmd[0] == "/donkeyballs")
                            {
                                
                                NewestCOServer.Main.AuthWorker.Listener.Close();
                                NewestCOServer.Main.GameWorker.Listener.Close();
                                try
                                {
                                    foreach (Game.Character C in Game.World.H_Chars.Values)
                                    {
                                        try
                                        {
                                            C.MyClient.Disconnect();
                                            Console.WriteLine(C.Name + " has logged off successfuly.");
                                        }
                                        catch { continue; }
                                    }
                                }
                                catch { }
                                Database.SaveKOs();
                                Console.WriteLine("KOs saved.");
                                Database.SaveEmpire();
                                Console.WriteLine("Empire saved.");
                                Features.Guilds.SaveGuilds();
                                Console.WriteLine("Guilds saved.");
                                Features.SkillsClass.Save();
                                Console.WriteLine("Skills saved.");
                                Console.WriteLine("Database disposed.");
                                Console.WriteLine("Write /exit or click X to close the window.");
                                System.Diagnostics.Process.Start("NewestCOServer.exe");
                                Environment.Exit(0);
                            }

f5 rebuild then f6 debug<-- dont 4get 2 use those
now just type /donkeyballs whille in game and it will restart after inserting this into Chat.cs
ASSN9NE is offline  
Old 02/12/2010, 17:28   #8
 
LetterX's Avatar
 
elite*gold: 20
Join Date: May 2007
Posts: 1,125
Received Thanks: 332
You guys need to think here. When people mention the LOTF for v5165, they say "HELP - 5165 source". When someone wants help for LOTF v5017, they say "HELP - LOTF source". >_>

Not to mention that if the LOTFv5165 ALREADY has a "/restart" command, wouldn't it make sense that the person is asking for one is using the LOTFv5017 source? >_______________________>
LetterX is offline  
Old 02/12/2010, 18:23   #9
 
ASSN9NE's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 52
Received Thanks: 8
Quote:
Originally Posted by LetterX View Post
You guys need to think here. When people mention the LOTF for v5165, they say "HELP - 5165 source". When someone wants help for LOTF v5017, they say "HELP - LOTF source". >_>
honestly if he was more specific on what source he was asking for woulda made it 10x more easier to find his problem.
when using [HELP] it would make more sense 2 put the source your working with also
ASSN9NE is offline  
Old 02/12/2010, 23:59   #10
 
elite*gold: 0
Join Date: Feb 2009
Posts: 8
Received Thanks: 0
Quote:
Originally Posted by ASSN9NE View Post
honestly if he was more specific on what source he was asking for woulda made it 10x more easier to find his problem.
when using [HELP] it would make more sense 2 put the source your working with also
Sorry i didn't mention it earlier, i posted it yesterday and it was forever before anyone even replied.

Quote:
Originally Posted by ramix View Post
source 5165?
5065
Jmenace is offline  
Reply

Tags
restart command


Similar Threads Similar Threads
d2nt bluebird - restart restart restart
06/15/2010 - Diablo 2 - 7 Replies
yo, ich hab schon länger 4 bots am laufen, hat auch immer alles relativ gut geklappt, auf 50 runs meist so 3-4 restarts, also ganz in ordnung, und wie ichs so mitbekommen hab waren die meist eh schon gegen ende des games (ja gut, kein baal kill,aber was solls) seit 2 tagen allerdings funktioniert da überhaupt nix mehr einer läuft "ziemlich" normal, 8 runs 2 restarts der nächste 9 runs 7 restarts dann 19 runs 19 restarts und 47 runs 47 restarts dann is natürlich realm down bei allen,...
[HOW TO] Start in 5 seg without type the command /etc/rc.d/netif restart
04/26/2010 - Metin2 PServer Guides & Strategies - 4 Replies
for the epvp comunety staff remove my links without say anything and for have no respetc for the people speack only english i have remove all my stuff by epvp
[Request] Guilds, Friends, Marriage, Auto Restart
07/02/2009 - CO2 Private Server - 8 Replies
Hi everyone! I'd like some help fixing my code for these sections. I use PowerSource. I would appreciate any code given, and any explanations on how to figure it out would be great. Guilds - The name 'DataBase' does not exist in the current context in Guild.cs, line 32, 156, 179, 192, 236 Character.cs, line 1646 Friends - I can only find code for LOTF source. As is, friends will randomly disappear off the friend list. I think it's a problem packing or unpacking the list. ...
[Request]Auto Restart Server
08/31/2008 - CO2 Private Server - 9 Replies
Can anyone/somesone post a tutorial how to restart your server for about 15 or 10 min or higher. using LOFT source. thanks



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


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.