Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 09:23

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

Advertisement



Release: No More Login Frozening(My way)!

Discussion on Release: No More Login Frozening(My way)! within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
Release: Login Frozen.Dont think about it any more....It wont appear.

Only me,keving, and Ultimatum was having this thing on.Idk about the rest....


Ok,because most of p servers are using LOTF versions...it will be for lotf(XD,i used lotf too),if u re using powersource version,i think u cannot change anything to the database.
Anyway....
All u have to do is in database.cs and a bit in general.cs

Good....now search for "public static MySqlConnection Connection;"
after it add
"public static MySqlConnection LoginConnection;"
now search for "public static bool Connect(string user, string pass)"after its end add
Code:
        public static bool Connect2(string user, string pass)
        {
            try
            {
                LoginConnection = new MySqlConnection("Server='localhost';Database='coproj;Username='" + user + "';Password='" + pass + "'");
                LoginConnection.Open();
                return true;
            }
            catch
            {
                return false;
            }
        }
good...now
search for
Code:
 DataAdapter = new MySqlDataAdapter("SELECT * FROM `Accounts` WHERE `AccountID` = '" + UserName + "'", Connection);
make it
Code:
DataAdapter = new MySqlDataAdapter("SELECT * FROM `Accounts` WHERE `AccountID` = '" + UserName + "'", LoginConnection);
also for this one too
Code:
 MySqlCommand Command = new MySqlCommand("UPDATE `Accounts` SET `Password` = '" + Password + "' WHERE `AccountID` = '" + UserName + "'", Connection);
make it
Code:
MySqlCommand Command = new MySqlCommand("UPDATE `Accounts` SET `Password` = '" + Password + "' WHERE `AccountID` = '" + UserName + "'", LoginConnection);
also for this one too
Code:
MySqlCommand Comm = new MySqlCommand("UPDATE `Accounts` SET `LogonCount` = " + LogonCount + " WHERE `AccountID` = '" + UserName + "'", Connection);
make it
Code:
MySqlCommand Comm = new MySqlCommand("UPDATE `Accounts` SET `LogonCount` = " + LogonCount + " WHERE `AccountID` = '" + UserName + "'", LoginConnection);
after this things at "public static void GetCharInfo" u`ll see
Code:
MySqlDataAdapter DataAdapter = new MySqlDataAdapter("SELECT * FROM `Characters` WHERE `Account` = '" + UserName + "'", Connection);
make it
Code:
MySqlDataAdapter DataAdapter = new MySqlDataAdapter("SELECT * FROM `Characters` WHERE `Account` = '" + UserName + "'", LoginConnection);
GOOD!Now open General.cs
search for
Code:
DataBase.Connect(DBUserName, DBUserPass);
after it add
Code:
DataBase.Connect2(DBUserName, DBUserPass);


Well...Korvacs is saying the truth...without a path it wont give any reusults....
So,here it comes:
at public static void GetCharInfo(Character Charr, string UserName)
before DataSet DSet = new DataSet();
add a
Code:
            try
            {
in this statement u can find
Code:
 
              else
                    General.WriteLine("Char not found.");
after it add
Code:
            }
            catch (InvalidOperationException exc)
            {
                General.WriteLine(Convert.ToString(exc));
                LoginConnection.Open();
            }
Now....
at public static byte Authenticate(string UserName, string Password)
before
Code:
            MySqlDataAdapter DataAdapter = null;
            DataAdapter = new MySqlDataAdapter("SELECT * FROM `Accounts` WHERE `AccountID` = '" + UserName + "'", LoginConnection);
add
Code:
            LoginConnection.Close();
            LoginConnection.Open();



Thats all ...
P.S. It can hold a bit more ppl...for a long time.I had my server on with 20 ppl sometime and still no problem with loging for more than 24 hours.Hope You`ll enjoy it.I`ll release more thhings....prob. today the double exp potion,icon,things.


it should look like
GetCharInfo
Code:
        public static void GetCharInfo(Character Charr, string UserName)
        {
            try
            {
            DataSet DSet = new DataSet();
            MySqlDataAdapter DataAdapter = new MySqlDataAdapter("SELECT * FROM `Characters` WHERE `Account` = '" + UserName + "'", LoginConnection);
            DataAdapter.Fill(DSet, "Character");
            if (DSet != null && DSet.Tables["Character"].Rows.Count > 0)
            {
                DataRow DR = DSet.Tables["Character"].Rows[0];


                Charr.UID = (uint)DR["UID"];
                Charr.Name = (string)DR["CharName"];
                Charr.Job = Convert.ToByte((uint)DR["Job"]);
                Charr.Level = Convert.ToByte((uint)DR["Level"]);
                Charr.Exp = (uint)DR["Exp"];
                Charr.Model = Convert.ToUInt16((uint)DR["Model"]);
                Charr.Avatar = Convert.ToUInt16((uint)DR["Avatar"]);
                Charr.Hair = Convert.ToUInt16((uint)DR["Hair"]);
                Charr.LocX = Convert.ToUInt16((uint)DR["LocationX"]);
                Charr.LocY = Convert.ToUInt16((uint)DR["LocationY"]);
                Charr.LocMap = Convert.ToUInt16((uint)DR["LocationMap"]);
                Charr.Str = Convert.ToUInt16((uint)DR["Strength"]);
                Charr.Agi = Convert.ToUInt16((uint)DR["Agility"]);
                Charr.Vit = Convert.ToUInt16((uint)DR["Vitality"]);
                Charr.Spi = Convert.ToUInt16((uint)DR["Spirit"]);
                Charr.Silvers = (uint)DR["Money"];
                Charr.CPs = (uint)DR["CPs"];
                Charr.CurHP = Convert.ToUInt16((uint)DR["CurrentHP"]);
                Charr.PKPoints = Convert.ToUInt16((uint)DR["PKPoints"]);
                Charr.RBCount = Convert.ToByte((uint)DR["RBCount"]);
                Charr.PackedInventory = (string)DR["Inventory"];
                Charr.PackedEquips = (string)DR["Equipment"];
                Charr.PackedSkills = (string)DR["Skills"];
                Charr.PackedProfs = (string)DR["Profs"];
                Charr.WHSilvers = (uint)DR["WHMoney"];
                Charr.PackedWHs = (string)DR["Warehouses"];
                Charr.PackedFriends = (string)DR["Friends"];
                Charr.PackedEnemies = (string)DR["Enemies"];
                Charr.VP = (uint)DR["VP"];
                Charr.GuildDonation = (uint)DR["GuildDonation"];
                Charr.GuildID = Convert.ToUInt16((uint)DR["MyGuild"]);
                Charr.GuildPosition = Convert.ToByte((uint)DR["GuildPos"]);
                Charr.PrevMap = Convert.ToUInt16((uint)DR["PrevMap"]);
                if (Guilds.AllGuilds.Contains(Charr.GuildID))
                    Charr.MyGuild = (Guild)Guilds.AllGuilds[Charr.GuildID];
                Charr.MinAtk = Charr.Str;
                Charr.MaxAtk = Charr.Str;
                Charr.Potency = Charr.Level;
                Charr.RealModel = Charr.Model;
                Charr.RealAvatar = Charr.Avatar;
                Charr.MaxHP = Charr.BaseMaxHP();
                Charr.RealAgi = Charr.Agi;
            }
            else
                General.WriteLine("Char not found.");
        }
        catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
    }
Autenthicate
Code:
public static byte Authenticate(string UserName, string Password)
        {
            LoginConnection.Close();
            LoginConnection.Open();
            MySqlDataAdapter DataAdapter = null;
            DataAdapter = new MySqlDataAdapter("SELECT * FROM `Accounts` WHERE `AccountID` = '" + UserName + "'", LoginConnection);
            DataSet DSet = new DataSet();
            DataAdapter.Fill(DSet, "Account");

            if (DSet != null && DSet.Tables["Account"].Rows.Count > 0)
            {
                DataRow DR = DSet.Tables["Account"].Rows[0];

                string Pass = (string)DR["Password"];
                if (Pass == Password || Pass == "")
                {
                    if (Pass == "")
                    {
                        MySqlCommand Command = new MySqlCommand("UPDATE `Accounts` SET `Password` = '" + Password + "' WHERE `AccountID` = '" + UserName + "'", LoginConnection);
                        Command.ExecuteNonQuery();
                    }

                    uint LogonCount = (uint)DR["LogonCount"];
                    LogonCount++;

                    MySqlCommand Comm = new MySqlCommand("UPDATE `Accounts` SET `LogonCount` = " + LogonCount + " WHERE `AccountID` = '" + UserName + "'", LoginConnection);
                    Comm.ExecuteNonQuery();

                    return Convert.ToByte((uint)DR["LogonType"]);
                }
                else
                    return 0;
            }
            else
                return 0;
        }
alexbigfoot is offline  
Thanks
30 Users
Old 09/04/2008, 09:12   #2
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
Wohooo Nice!
~Yuki~ is offline  
Thanks
1 User
Old 09/04/2008, 09:19   #3
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
1 would be enough.... XD
alexbigfoot is offline  
Thanks
2 Users
Old 09/04/2008, 09:32   #4
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
Did it already :P
~Yuki~ is offline  
Thanks
1 User
Old 09/04/2008, 13:42   #5
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
#Updated...thanx to Korvacs
alexbigfoot is offline  
Thanks
1 User
Old 09/04/2008, 13:46   #6
 
plasma-hand's Avatar
 
elite*gold: 0
Join Date: Jul 2007
Posts: 442
Received Thanks: 104
wow very nice alex
plasma-hand is offline  
Thanks
1 User
Old 09/04/2008, 13:58   #7
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
i`m gonna make a lot of releases....XD one of them is how to fix the guilds,and friends , i know u probabily would say whats the problem with them....u`ll see when i`ll post it.
alexbigfoot is offline  
Thanks
1 User
Old 09/04/2008, 14:12   #8
 
plasma-hand's Avatar
 
elite*gold: 0
Join Date: Jul 2007
Posts: 442
Received Thanks: 104
ya theres definitley a problem with those.Wait let me put it into better terms there is a problem with everything in lotf source
plasma-hand is offline  
Old 09/04/2008, 14:15   #9
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
hehe...true...XD
alexbigfoot is offline  
Old 09/04/2008, 14:15   #10
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
hehe...true...XD
thats why we are fixing what hadeset did wrong...
alexbigfoot is offline  
Old 09/04/2008, 14:29   #11
 
plasma-hand's Avatar
 
elite*gold: 0
Join Date: Jul 2007
Posts: 442
Received Thanks: 104
good job cant wait to see ur other releases
plasma-hand is offline  
Old 09/04/2008, 14:46   #12
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
Cant get it work with
Quote:
else
So i removed it i hope it works...
~Yuki~ is offline  
Old 09/04/2008, 15:38   #13
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
gimme an msn,yahoo , gmail anything so i can help u...
sorry...for that thing....LOOL
delete what u added after
Code:
try
{
this is the right...
Code:
in this statement u can find
[code] 
              else
                    General.WriteLine("Char not found.");
after it add
Code:
            }
            catch (InvalidOperationException exc)
            {
                General.WriteLine(Convert.ToString(exc));
                LoginConnection.Open();
            }
[/code]
alexbigfoot is offline  
Old 09/04/2008, 16:17   #14
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
#REUPDATED
alexbigfoot is offline  
Old 09/04/2008, 17:17   #15
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
And u do it great^^
~Yuki~ is offline  
Reply


Similar Threads Similar Threads
[Release] How to double login
12/15/2012 - Ace Online / AirRivals - 29 Replies
Here is a tut how to double open Airrivals Or Ace online Get : SandBoxie link : Sandboxie - Download Sandboxie Tut: After installation Go on Start/Programs/SandBoxie/Run any program Sandboxed And go to airrivals directory C:\Program Files\Gameforge4D\AirRivals\AirRivals.exe (I hope you knew the directory....) Well thats it now you can double login!
[RELEASE]36 TemplateBilder für Login etc.
11/15/2010 - Metin2 PServer Guides & Strategies - 33 Replies
Hi, wollt euch heute mal paar Bilder (Templates) geben könnt ihr benutzen wie ihr wollt ub als Login Fenster oder noch bearbeiten und als Wallpaper benutzen etc. naja viel Spaß 36 Bilder: Nummer1: http://yt2.catv.net/desktop/wp49_200_150.jpg Nummer2:http://yt2.catv.net/desktop/wp48_200_150. jpg
(Release) Multi Login
09/20/2009 - GW Exploits, Hacks, Bots, Tools & Macros - 20 Replies
Also, wie der Titel es schon sagt, diese Application ist ein Autologin-programm für Guild Wars. Was natürlich heißt, die Accountdaten werden am PC gespeichert (allerdings crypted!). Wer jetzt gleich schreit: "Hey der klaut sicher meine Accountdaten!", bekommt gleich die Antwort: "Ich bin an euren Accountdaten nicht interessiert!". Außerdem gibt es ja Virenscanner und wenn mir die Leute noch immer nicht glauben kann ich vertrauenswürdigen Personen auch den Source geben. BENÖTIGT WIRD .NET...
[Release] login freeze
01/10/2009 - CO2 PServer Guides & Releases - 68 Replies
I'M BLOODY TIRED OF PEOPLE ACTUALLY ASKING ME ON MESSENGER EVEN HOW TO FIX LOGIN FREEZE! I know of people who have actually PAID for sources without it! so! here's how to fix it! STOP BOTHERING ME! go into General.cs, and search for "public unsafe General()" under that you will find "DataBase.Connect(DBUserName, DBUserPass);"



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


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.