Register for your free account! | Forgot your password?

You last visited: Today at 22:15

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

Advertisement



[Release] Day & Night!!

Discussion on [Release] Day & Night!! within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Closed Thread
 
Old   #1
 
felipeboladao's Avatar
 
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
[Release] Day & Night!!

Open Genera.cs search For

Code:
public static System.IO.StreamWriter sw = new System.IO.StreamWriter(Application.StartupPath + @"\ServerLog.ini", true);
Add Under

Code:
public bool DayTime = true;
Search for

Code:
public static System.Timers.Timer Thetimer;
Add Below

Code:
        public static System.Timers.Timer DayLight;
        public static System.Timers.Timer NightLight;
Search for

Code:
Auth = new System.Timers.Timer();
                Auth.Interval = 300000;
                Auth.Elapsed += new ElapsedEventHandler(Auth_Elapsed);
                Auth.Start();
add Below

Code:
                DayLight = new System.Timers.Timer();
                DayLight.Interval = 3600000;
                DayLight.Elapsed += new ElapsedEventHandler(DayLight_Elapsed);
                DayLight.Start();

                NightLight = new System.Timers.Timer();
                NightLight.Interval = 1800000;
                NightLight.Elapsed += new ElapsedEventHandler(NightLight_Elapsed);
                NightLight.Stop();
Search For

Code:
void Auth_Elapsed(object sender, ElapsedEventArgs e)
        {
            Auth.Stop();
            AuthServer.Enabled = false;
            AuthServer.Enabled = true;
            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine("Auth Checked And Fixed");
            Console.ResetColor();
            Auth.Start();
        }
Add Below

Code:
        public void Day()
        {
            foreach (DictionaryEntry DE in World.AllChars)
            {
                Character Charrr = (Character)DE.Value;
                Charrr.MyClient.SendPacket(General.MyPackets.Color(Charrr, 0));
            }
            NightLight.Stop();
            DayLight.Start();
            World.SendMsgToAll("Day has come.", "SYSTEM", 2005);
            DayTime = true;
        }
        public void Night()
        {
            foreach (DictionaryEntry DE in World.AllChars)
            {
                Character Charrr = (Character)DE.Value;
                Charrr.MyClient.SendPacket(General.MyPackets.Color(Charrr, 5855577));
            }
            NightLight.Stop();
            DayLight.Start();
            World.SendMsgToAll("Night has come.", "SYSTEM", 2005);
            DayTime = false;
        }
        void NightLight_Elapsed(object sender, ElapsedEventArgs e)
        {
            Day();
        }

        void DayLight_Elapsed(object sender, ElapsedEventArgs e)
        {
            Night();
        }
Open Client.cs Search for

Code:
public void GetIPE()
        {
            IPE = (IPEndPoint)ListenSock.WinSock.RemoteEndPoint;
        }
Add Below

Code:
public bool DayTime = true;
        public void Day()
        {
            foreach (DictionaryEntry DE in World.AllChars)
            {
                Character Charrr = (Character)DE.Value;
                Charrr.MyClient.SendPacket(General.MyPackets.Color(Charrr, 0));
            }
            General.NightLight.Stop();
            General.DayLight.Start();
            World.SendMsgToAll("Day has come.", "SYSTEM", 2005);
            DayTime = true;
        }
        public void Night()
        {
            foreach (DictionaryEntry DE in World.AllChars)
            {
                Character Charrr = (Character)DE.Value;
                Charrr.MyClient.SendPacket(General.MyPackets.Color(Charrr, 5855577));
            }
            General.NightLight.Stop();
            General.DayLight.Start();
            World.SendMsgToAll("Night has come.", "SYSTEM", 2005);
            DayTime = false;
        }
Open Packts.cs Search for

Code:
public byte[] GuildInfo(Guild TheGuild, Character Player)
add Under

Code:
        //Color
        public byte[] Color(Character Char, uint Color)
        {
            byte[] Packet = new byte[24];
            fixed (byte* p = Packet)
            {
                *((ushort*)p) = (ushort)Packet.Length;
                *((ushort*)(p + 2)) = (ushort)1010;
                *(uint*)(p + 8) = Char.UID;
                *(uint*)(p + 12) = Color;
                *(uint*)(p + 22) = 0x68;

            }
            return Packet;
        }
open Client search for

Code:
if (Splitter[0] == "/skill")
add Under

Code:
                                        if (Splitter[0] == "/night")
                                        {
                                            Night();
                                        }
                                        if (Splitter[0] == "/day")
                                        {
                                            Day();
                                        }
felipeboladao is offline  
Thanks
12 Users
Old 10/24/2008, 01:03   #2
 
elite*gold: 0
Join Date: Apr 2008
Posts: 470
Received Thanks: 264
Nice release added to my [All-in-1] thread
XxArcherMasterxX is offline  
Thanks
1 User
Old 10/24/2008, 01:05   #3
 
felipeboladao's Avatar
 
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
felipeboladao is offline  
Thanks
1 User
Old 10/24/2008, 01:07   #4
 
elite*gold: 0
Join Date: Apr 2008
Posts: 470
Received Thanks: 264
Quote:
Originally Posted by felipeboladao View Post
btw if you want to thank me like you did in your other release press the thanks button
XxArcherMasterxX is offline  
Thanks
2 Users
Old 10/24/2008, 01:11   #5
 
felipeboladao's Avatar
 
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
Tranks Archer Master .. =P
felipeboladao is offline  
Old 10/24/2008, 01:14   #6
 
felipeboladao's Avatar
 
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
archer Master, my Entities.cs error is 3 to complete the Summoner Guard, help me?
felipeboladao is offline  
Old 10/24/2008, 01:16   #7
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
You should credit Haydz, I highly doubt you got that packet structure yourself.
tao4229 is offline  
Old 10/24/2008, 01:17   #8
 
elite*gold: 0
Join Date: Apr 2008
Posts: 470
Received Thanks: 264
Quote:
Originally Posted by felipeboladao View Post
archer Master, my Entities.cs error is 3 to complete the Summoner Guard, help me?
sure i pm you my msn
XxArcherMasterxX is offline  
Thanks
2 Users
Old 10/24/2008, 01:32   #9
 
lostsolder05's Avatar
 
elite*gold: 20
Join Date: Jan 2006
Posts: 890
Received Thanks: 240
nice, prolly gonna use this

anywayz rain,snow,etc:
lostsolder05 is offline  
Old 10/24/2008, 01:37   #10
 
felipeboladao's Avatar
 
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
show me Code Lost Solder05...

Tranks!!
felipeboladao is offline  
Old 10/24/2008, 01:38   #11
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Quote:
Originally Posted by lostsolder05 View Post
nice, prolly gonna use this

anywayz rain,snow,etc:
I have that too =P
Too lazy to SS it though... I'll MSN you my packet if you don't believe me(Ultimatum told me the base of it, although i got uuuuber confused until I realized he wasn't using pointers x.x).
tao4229 is offline  
Old 10/24/2008, 01:38   #12
 
lostsolder05's Avatar
 
elite*gold: 20
Join Date: Jan 2006
Posts: 890
Received Thanks: 240
Quote:
Originally Posted by felipeboladao View Post
show me Code Lost Solder05...

Tranks!!
soz not mine (Y)

credits orignally go out to lostsolder, korv <--- real lostsolder got smthing off pb's i believe and went off that

Quote:
Originally Posted by tao4229 View Post
I have that too =P
Too lazy to SS it though... I'll MSN you my packet if you don't believe me(Ultimatum told me the base of it, although i got uuuuber confused until I realized he wasn't using pointers x.x).
lol cool :P

and naw i believe ya =x
lostsolder05 is offline  
Old 10/24/2008, 02:00   #13
 
felipeboladao's Avatar
 
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
Hahaha,
Also on my must, if I do not mistake me this is the packts?

Code:
        
//Weather Effects (rain, snow, leaves, confetti, etc) [probobly wrong]
        public byte[] Packet0x3f8(uint UID, uint dwParam, ushort wParam1, ushort wParam2, ushort wParam3, ushort ID)
        {
            byte[] Buffer = new byte[24];
            fixed (byte* lpBuffer = Buffer)
            {
                *((ushort*)(lpBuffer)) = 24;
                *((ushort*)(lpBuffer + 2)) = 0x3f8;
                *((uint*)(lpBuffer + 4)) = (uint)Environment.TickCount;
                *((uint*)(lpBuffer + 8)) = UID;
                *((uint*)(lpBuffer + 12)) = dwParam;
                *((ushort*)(lpBuffer + 16)) = wParam1;
                *((ushort*)(lpBuffer + 18)) = wParam2;
                *((ushort*)(lpBuffer + 20)) = wParam3;
                *((ushort*)(lpBuffer + 22)) = ID;
            }
            return Buffer;
        }

        //Color v.2
        public byte[] Packet0x3f2(uint UID, uint dwParam, ushort wParam1, ushort wParam2, ushort wParam3, ushort ID)
        {
            byte[] Buffer = new byte[24];
            fixed (byte* lpBuffer = Buffer)
            {
                *((ushort*)(lpBuffer)) = 24;
                *((ushort*)(lpBuffer + 2)) = 0x3f2;
                *((uint*)(lpBuffer + 4)) = (uint)Environment.TickCount;
                *((uint*)(lpBuffer + 8)) = UID;
                *((uint*)(lpBuffer + 12)) = dwParam;
                *((ushort*)(lpBuffer + 16)) = wParam1;
                *((ushort*)(lpBuffer + 18)) = wParam2;
                *((ushort*)(lpBuffer + 20)) = wParam3;
                *((ushort*)(lpBuffer + 22)) = ID;
            }
            return Buffer;
        }
felipeboladao is offline  
Old 10/24/2008, 05:07   #14
 
lolex's Avatar
 
elite*gold: 0
Join Date: May 2007
Posts: 46
Received Thanks: 0
lol
lolex is offline  
Old 10/24/2008, 17:09   #15

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 924
uhm about the first half of the guide...

all the things that i need to search are not in there... (i used the original LOTF source)

nvm you had it called "Auth" but it was The_TImer or something in this source
Kiyono is offline  
Closed Thread


Similar Threads Similar Threads
[Release] Night Devil and Dance Skill books
07/15/2009 - CO2 PServer Guides & Releases - 10 Replies
I think its nothing all the important right now. but i wanted to contribute in some way. Side Notes:Not sure if the Night Devil skill even work, Since the XP skill isnt coded. Dance 4 gives you dance 7 =/ Not to sure why either. Since. The Skill ID and Item ID is for dance 4. but if anyone knows why and can fix it. please do. :p Credits: scottdavey for the skill book structural idea Go into Handler/Useitem.cs case 725016: //Night Devil { ...
[Re][Release]Day And Night.
07/13/2009 - CO2 PServer Guides & Releases - 18 Replies
I do not take any credit for this guide. All i did was change how u searched because not all lotf sources are the same. Oringinal Released Post. http://www.elitepvpers.com/forum/co2-pserver-discu ssions-questions/178273-release-day-night.html Ok Now Open General.cs And Search For. Code:



All times are GMT +2. The time now is 22:15.


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.