Game-Elites
Would you like to react to this message? Create an account in a few clicks or log in to continue.


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

 

 [Release] Day & Night

Go down 
AuthorMessage
LeGend
NOOB!
NOOB!
LeGend


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

[Release] Day & Night Empty
PostSubject: [Release] Day & Night   [Release] Day & Night EmptySat 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
 
[Release] Day & Night
Back to top 
Page 1 of 1
 Similar topics
-
» [Release] Nobility
» [Release] Free Cps by Npc
» [Release] Lucytime aka BlessSkill
» [Release]Console Commands
» [RELEASE] GUILD CONTROLLER

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