Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Guides & Templates
You last visited: Today at 16:14

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

Advertisement



[Guide] Autopatch server explained

Discussion on [Guide] Autopatch server explained within the CO2 Guides & Templates forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
MushyPeas's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 800
Received Thanks: 89
Post [Guide] Autopatch server explained

If for some reason you want to set up your own autopatch server to go with your private conquer server, the following info should be all you need to get you going.

Update: Included an example of a working, but by no means complete autopatch server C# script, you can download it from the attachment, it's merely a demonstration to get you started.


[Client - Server communication]

All you need is a simple tcp/ip connection to the autopatch server.
(TQ's official server: 69.59.148.97 on port 9528)

Client already up to date
Code:
Client: 5057
Server: READY
So if you code your own autopatch server you will have to check the client's version against the latest version and if he's up to date all you have to send back is "READY".

Client not up to date?
Code:
Client: 5056
Server: UPDATE 64.151.87.40 enzf/5057.exe
If he's not up to date you send back "UPDATE 64.151.87.40 enzf/5057.exe" which consist of:
- The Red part is the text "UPDATE".
- The Green part is the IP address of the server where you host your updates / patches, so this is NOT the same as your autopatch server IP unless you also host the actual patch files on that machine.
- The Blue part is the folder and file name of the update / patch.


[Editing SocketConfig.ini]

After you set up your own autopatch server (you have all the info you need now) make sure you edit your \AutoPatch\SocketConfig.ini and possibly autopatch.dat (not sure if this is even used) to point to your server instead of TQ's.

The important part in the default file looks like this (it points to tq's servers)

Quote:
[Server]
count=3
Server1=U1 69.59.148.97 9528 69.59.148.97 9528
Server2=U2 69.59.146.45 9528 69.59.146.45 9528
Server3=U3 121.207.249.53 9528 121.207.249.53 9528
Since we want to put in our own server we have to replace it with our own IP (66.666.66.666 in this example) and autopatch server port (9528 in this example) like this.

Quote:
[Server]
count=1
Server1=U1 66.666.66.666 9528 66.666.66.666 9528

[Optional: Editing config.ini]

Additionally you can also edit \AutoPatch\config.ini so that in case your Auto update server is down for some reason, players can still click the "manual" button to go to your own patch download webpage.

Edit this to your own webpage
Quote:
manualupdate = http://co.91.com/downloads/patch.shtml

If you have any questions, feel free to ask, but preferably only after you have actually read and tried what's in my post already.
Attached Files
File Type: zip AutoPatchServ.zip (1.1 KB, 820 views)
MushyPeas is offline  
Thanks
7 Users
Old 09/03/2008, 15:28   #2
 
elite*gold: 0
Join Date: Feb 2008
Posts: 668
Received Thanks: 160
Nice, But.. I don't really Understand what to do, .. .May you can better explain that?
YukiXian is offline  
Old 09/03/2008, 15:48   #3
 
MushyPeas's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 800
Received Thanks: 89
Quote:
Originally Posted by YukiXian View Post
Nice, But.. I don't really Understand what to do, .. .May you can better explain that?
Have a look at this tutorial with example code (In C# since I assume that's what you're used to).


You can practically just copy that code and read the short accompanying text, it will take a little bit of effort but it'll leave you with a good insight into how servers work

Once you have this code in your project you should be able to fit in the few packets I posted earlier with ease, good luck.

Edit: Also found a possibly easier to use code base.
Code:
/*
C# Network Programming 
by Richard Blum

Publisher: Sybex 
ISBN: 0782141765
*/
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;

public class ThreadedTcpSrvr {
   private TcpListener client;

   public ThreadedTcpSrvr()
   {
      client = new TcpListener(9050);
      client.Start();

      Console.WriteLine("Waiting for clients...");
      while(true)
      {
         while (!client.Pending())
         {
            Thread.Sleep(1000);
         }

         ConnectionThread newconnection = new ConnectionThread();
         newconnection.threadListener = this.client;
         Thread newthread = new Thread(new
                   ThreadStart(newconnection.HandleConnection));
         newthread.Start();
      }
   }

   public static void Main()
   {
      ThreadedTcpSrvr server = new ThreadedTcpSrvr();
   }
}

class ConnectionThread
{
   public TcpListener threadListener;
   private static int connections = 0;

   public void HandleConnection()
   {
      int recv;
      byte[] data = new byte[1024];

      TcpClient client = threadListener.AcceptTcpClient();
      NetworkStream ns = client.GetStream();
      connections++;
      Console.WriteLine("New client accepted: {0} active connections",
                        connections);

      string welcome = "Welcome to my test server";
      data = Encoding.ASCII.GetBytes(welcome);
      ns.Write(data, 0, data.Length);

      while(true)
      {
         data = new byte[1024];
         recv = ns.Read(data, 0, data.Length);
         if (recv == 0)
            break;
      
         ns.Write(data, 0, recv);
      }
      ns.Close();
      client.Close();
      connections--;
      Console.WriteLine("Client disconnected: {0} active connections",
                         connections);
   }
}
MushyPeas is offline  
Old 09/04/2008, 01:16   #4
 
MushyPeas's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 800
Received Thanks: 89
Update: Included an example of a working, but by no means complete autopatch server C# script, you can download it from , it's merely a demonstration to get you started.
MushyPeas is offline  
Old 09/04/2008, 01:25   #5
 
nTL3fTy's Avatar
 
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
Quote:
Originally Posted by MushyPeas View Post
manualupdate = is what you should edit to match your own
It auto-parsed the link..

Spiffy guide.
nTL3fTy is offline  
Old 09/04/2008, 01:31   #6
 
MushyPeas's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 800
Received Thanks: 89
Quote:
Originally Posted by nTL3fTy View Post
It auto-parsed the link..

Spiffy guide.
Fixed that too
Should be all set now! *crosses fingers*
MushyPeas is offline  
Old 09/04/2008, 14:22   #7
 
elite*gold: 0
Join Date: Feb 2008
Posts: 668
Received Thanks: 160
Were to player you AutoPatchServ file? And how I can see its working?
YukiXian is offline  
Old 09/04/2008, 15:14   #8
 
MushyPeas's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 800
Received Thanks: 89
Quote:
Originally Posted by YukiXian View Post
Were to player you AutoPatchServ file? And how I can see its working?
Make a new C# > Windows > Console Application project and put it in there.
MushyPeas is offline  
Old 09/04/2008, 16:18   #9
 
elite*gold: 0
Join Date: Feb 2008
Posts: 668
Received Thanks: 160
Can u also make it with an Windows Form Application? Would be alot easyr...
YukiXian is offline  
Old 09/04/2008, 17:39   #10
 
MushyPeas's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 800
Received Thanks: 89
Quote:
Originally Posted by YukiXian View Post
Can u also make it with an Windows Form Application? Would be alot easyr...
I don't really see the added value plus this is only a proof of concept to show everyone how it works, I'll leave it up to others to tinker with as they want.
MushyPeas is offline  
Old 09/04/2008, 17:42   #11
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
Form is better i think :P
~Yuki~ is offline  
Old 09/04/2008, 17:51   #12
 
MushyPeas's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 800
Received Thanks: 89
Quote:
Originally Posted by lolmaster123 View Post
Form is better i think :P
What superior functionality does a form offer?
MushyPeas is offline  
Old 09/04/2008, 21:24   #13
 
elite*gold: 0
Join Date: Feb 2008
Posts: 668
Received Thanks: 160
Quote:
Originally Posted by MushyPeas View Post
I don't really see the added value plus this is only a proof of concept to show everyone how it works, I'll leave it up to others to tinker with as they want.

Well, I won't get ur Autopatcher work, I changed the port to my port and Ip to my Ip, I can't run my server and that programm at the same time, ...
YukiXian is offline  
Old 09/04/2008, 22:49   #14
 
MushyPeas's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 800
Received Thanks: 89
Quote:
Originally Posted by YukiXian View Post
Well, I won't get ur Autopatcher work, I changed the port to my port and Ip to my Ip, I can't run my server and that programm at the same time, ...
Then don't use the same port for 2 seperate programs.. that's just asking for problems.
The whole reason ports (plural) even exist is to allow us to have more than a single connection to a remote application at a time, so if you want to run 2 servers (game server + autopatch server) you are going to have to use 2 ports.
MushyPeas is offline  
Old 09/05/2008, 12:52   #15
 
elite*gold: 0
Join Date: Feb 2008
Posts: 668
Received Thanks: 160
Quote:
Originally Posted by MushyPeas View Post
Then don't use the same port for 2 seperate programs.. that's just asking for problems.
The whole reason ports (plural) even exist is to allow us to have more than a single connection to a remote application at a time, so if you want to run 2 servers (game server + autopatch server) you are going to have to use 2 ports.
Explain me that 2 ports, And.. I mean with the Form Application, When you Start your Private Server client, It will open the Autopatcher, Patch it and close. After closing the Client will be started...

You know how to make that?
YukiXian is offline  
Reply


Similar Threads Similar Threads
[Guide] Autopatch
09/21/2023 - EO PServer Guides & Releases - 24 Replies
hey all, a lot of people ask me about auto patches and patches so heres a guide for you all :) first the auto patch server http://i230.photobucket.com/albums/ee313/hio77/au topatchv3.jpg ok how to use this ....
[Guide(s)] Autopatch,Fixing MSg server prob,Changing music to your server.
10/17/2009 - EO PServer Guides & Releases - 5 Replies
Alright first of all i'm sure someone posted these but i see threads of people looking for help so i'm going to explain in great detail how to do such things... i will add more when i see fit. or i see them posted and add them. #please sticky Forcers autopatch2.exe setup.... First put the autopatch and config.ini wherever, and if your on a router open port 9528 tcp/udp i think thats the only one you need i'm not sure.
Honor hack for private server (Explained guide)
11/19/2008 - Cabal Guides & Templates - 3 Replies
Working only on private servers 1.Start cheat engine (i use 5.4) 2.Click on that computer in top left corner 3.Look for aplication called "Cabalmain.exe" 4.Press "OK" 5.Look in game for you honor ammount 6.In cheat engine at value enter you honor ammount (ex. if you have 17445 write 17445) 7.Click on "First Scan" 8.In the right box will appear some adress and values double click on first one
SERVER PROBLEMS EXPLAINED
10/20/2007 - Conquer Online 2 - 0 Replies
Hi , just found this post from shaheen on the conquer forum;he says its due to the expire date , but according to me expiration got nothing to do with the server downtime because the domain is not needed to connect to either the login server. Can anyone confirm this or am i wrong about this i send that Thread and i know it will be close or move to Recycle Bin But i want tell all players The true of problem of ( Connecting Failed Due To Server Maintenance Or Internet Congestion...



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


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.