Game Elites is offering you all kind of Hacks, Bots, Tips and Tools.
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 [Release] Day & Night

View previous topic View next topic Go down 
AuthorMessage
LeGend
NOOB!
NOOB!
avatar

Posts : 18
Join date : 2009-05-09
Age : 24
Location : California

PostSubject: [Release] Day & Night   Sat May 09, 2009 5:52 pm

open client.cs search for

Code:

                            if (World.AllChars.Contains(MyChar.UID))
                                World.AllChars.Remove(MyChar.UID);                         
                        }
                        catch (Exception Exc) { General.WriteLine(Exc.ToString()); }

Add below

Code:

                        Console.WriteLine("Account: " + Account + " Character " + MyChar.Name + " has logged off.");
                        World.SaveAllChars();

open General.cs search for

Code:

                GameServer = new ServerSocket();
                GameServer.Port = 5816;
                GameServer.MaxPacketSize = 4096;
                GameServer.MaxThreads = 300;
                GameServer.OnClientDisconnect += new SocketDisconnectEvent(GameDisconnectionHandler);
                GameServer.OnReceivePacket += new SocketEvent(GamePacketHandler);
                GameServer.Enabled = true;

                Console.WriteLine("");

Add below

Code:

                Thetimer = new System.Timers.Timer();
                Thetimer.Interval = 300000;
                Thetimer.Elapsed += new          ElapsedEventHandler(Thetimer_Elapsed);
                Thetimer.Start();

and Search for

Code:

public static void DoStuff()

add under

Code:

        public static void Thetimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            World.SendMsgToAll("Your account has been saved", "SYSTEM", 2005);
            World.SaveAllChars();
        }

Add in timers

Code:

public static System.Timers.Timer Thetimer;

open Word.cs search for

Code:

public static void PlayersOffLottery()

add under

Code:

        public static void SaveAllChars()
        {
            try
            {
                foreach (DictionaryEntry DE in AllChars)
                {
                    Character Charr = (Character)DE.Value;
                    DataBase.SaveChar(Charr);
                }
                Guilds.SaveAllGuilds();
            }
            catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
        }
open DataBase.cs search for

public static void GetCharInfo(Character Charr, string UserName)


add under

Code:

        public static void SaveChar(Character Charr)
        {
            try
            {
                Charr.PackInventory();
                Charr.PackEquips();
                Charr.PackSkills();
                Charr.PackProfs();
                Charr.PackWarehouses();
                Charr.PackEnemies();
                Charr.PackFriends();

                MySqlCommand Command = null;
                Command = new MySqlCommand("UPDATE `Characters` SET `CharName` = '" + Charr.Name + "', `Level` = " + Charr.Level + ",`Exp` = " + Charr.Exp + ",`GuildDonation` = " + Charr.GuildDonation + ",`Strength` = " + Charr.Str + ",`Agility` = " + Charr.Agi + ",`Vitality` = " + Charr.Vit + ",`Spirit` = " + Charr.Spi + ",`Job` = " + Charr.Job + ",`Model` = " + Charr.Model + ",`Money` = " + Charr.Silvers + ",`CPs` = " + Charr.CPs + ",`CurrentHP` = " + Charr.CurHP + ",`CurrentMP` = " + Charr.CurMP + ",`StatPoints` = " + Charr.StatP + ",`MyGuild` = " + Charr.GuildID + ",`GuildPos` = " + Charr.GuildPosition + ",`LocationMap` = " + Charr.LocMap + ",`LocationX` = " + Charr.LocX + ",`LocationY` = " + Charr.LocY + ",`Hair` = " + Charr.Hair + ",`Equipment` = '" + Charr.PackedEquips + "',`Inventory` = '" + Charr.PackedInventory + "',`PKPoints` = " + Charr.PKPoints + ",`PrevMap` = " + Charr.PrevMap + ", `Skills` = '" + Charr.PackedSkills + "', `Profs` = '" + Charr.PackedProfs + "',`RBCount` = " + Charr.RBCount + ",`Avatar` = " + Charr.Avatar + ",`WHMoney` = " + Charr.WHSilvers + ",`VP` = " + Charr.VP + ",`Warehouses` = '" + Charr.PackedWHs + "',`Friends` = '" + Charr.PackedFriends + "',`dexp` = '" + Charr.dexp + "',`dexptime` = '" + Charr.dexptime + "',`Enemies` = '" + Charr.PackedEnemies + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", DataBase.Connection);
                Command.ExecuteNonQuery();
            }
            catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
        }
Back to top Go down
View user profile
 
[Release] Day & Night
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Adidas: Night with Dwight Sweepstakes *US and District of Columbia* ends 12/24/11
» Slow release pain medication not interfering with triptans...
» Same nightmare every night, for 2.5 years now
» Has anyone tried staying awake all night?
» Watermelon Studios Aims For A January 2nd Release of Pier Solar: HD For The Wii U eshop!

Permissions in this forum:You cannot reply to topics in this forum
Game-Elites :: Conquer Online 2 :: CO2 Programming-
Jump to: