Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 12:02

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

Advertisement



[Help] Weather Packet (My First Packet)

Discussion on [Help] Weather Packet (My First Packet) within the CO2 Private Server forum part of the Conquer Online 2 category.

Closed Thread
 
Old 05/11/2010, 16:37   #76

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Well I got it working thanks to impulse's packet.

//edit The shitty command I used:
Code:
 if (Cmd[0] == "/weather")
                        {
                            foreach (Game.Character C in Game.World.H_Chars.Values)
                            {
                                switch (Cmd[1])
                                {
                                    case "none": C.MyClient.AddSend(Packets.Weather(Features.WeatherType.Nothing, byte.Parse(Cmd[2]), byte.Parse(Cmd[3]))); break;
                                    case "rain": C.MyClient.AddSend(Packets.Weather(Features.WeatherType.Rain, byte.Parse(Cmd[2]), byte.Parse(Cmd[3]))); break;
                                    case "snow": C.MyClient.AddSend(Packets.Weather(Features.WeatherType.Snow, byte.Parse(Cmd[2]), byte.Parse(Cmd[3]))); break;
                                    case "rain2": C.MyClient.AddSend(Packets.Weather(Features.WeatherType.RainWind, byte.Parse(Cmd[2]), byte.Parse(Cmd[3]))); break;
                                    case "leaves": C.MyClient.AddSend(Packets.Weather(Features.WeatherType.AutumnLeaves, byte.Parse(Cmd[2]), byte.Parse(Cmd[3]))); break;
                                    case "cherry": C.MyClient.AddSend(Packets.Weather(Features.WeatherType.CherryBlossomPetals, byte.Parse(Cmd[2]), byte.Parse(Cmd[3]))); break;
                                    case "herry22": C.MyClient.AddSend(Packets.Weather(Features.WeatherType.CherryBlossomPetalsWind, byte.Parse(Cmd[2]), byte.Parse(Cmd[3]))); break;
                                    case "cotten": C.MyClient.AddSend(Packets.Weather(Features.WeatherType.BlowingCotten, byte.Parse(Cmd[2]), byte.Parse(Cmd[3]))); break;
                                    case "atoms": C.MyClient.AddSend(Packets.Weather(Features.WeatherType.Atoms, byte.Parse(Cmd[2]), byte.Parse(Cmd[3]))); break;
                                }
                            }
                        }
Kiyono is offline  
Old 05/11/2010, 18:14   #77


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Im working on a weather system for 5165 which will randomly change the weather every now and again (the exact time varies between 5 - 30 minute intervals), with random intensity and direction. So far its working great, it just started raining.
Korvacs is offline  
Thanks
1 User
Old 05/11/2010, 18:51   #78
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
Well Korv, the last two pages has been an argument or discussion with you and Spirit/Arco if you had or had not the right version on the wiki, is that so important for the community, couldn't you keep that to PM?

And besides, isn't the wiki a project of yours, why is a thread not closened after request just to get more/correct information to your project, I hardly believe you would keep another thread open if it was for somebody else, not moderator.


Anyhow, what you do now is clean up this thread and only leave the important posts left, such as Alex's correct packet. Then close the thread, and everybody will be happy.
_Emme_ is offline  
Old 05/11/2010, 19:01   #79


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Quote:
Originally Posted by EmmeTheCoder View Post
Well Korv, the last two pages has been an argument or discussion with you and Spirit/Arco if you had or had not the right version on the wiki, is that so important for the community, couldn't you keep that to PM?

And besides, isn't the wiki a project of yours, why is a thread not closened after request just to get more/correct information to your project, I hardly believe you would keep another thread open if it was for somebody else, not moderator.

Anyhow, what you do now is clean up this thread and only leave the important posts left, such as Alex's correct packet. Then close the thread, and everybody will be happy.
Actually Emme, what i do is what i choose to do, this thread is not left open for my benefit, this thread demonstrates where problems can arrise when implemented the weather system and packets, and also demonstrates the importance of getting the packet correct to begin with, in my oppinion it is a good example, and beneficial to the community if they wish to implement the weather system themselves.

Also spirits has made a formal complaint about this thread, so for the time being it will remain as it is untill the complaint is resolved.
Korvacs is offline  
Old 05/11/2010, 21:28   #80
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
He just cannot take it that other people will get the weather too.
MonstersAbroad is offline  
Old 05/11/2010, 22:48   #81
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Quote:
Originally Posted by MonstersAbroad View Post
He just cannot take it that other people will get the weather too.
Too much selfishness?

Everyone who tried to help and posted some packets didn't just try to help a single person to be unique. This is a whole community so, if we'd just want all servers be unique probably we wouldn't post here packets.

And if -Spirits- really wanted his server to be unique having weather and this thread removed he surely should be banned from this community as he doesn't even try to improve the community.
-impulse- is offline  
Thanks
2 Users
Old 05/12/2010, 17:11   #82
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Agreed 100%
MonstersAbroad is offline  
Old 06/07/2014, 03:55   #83
 
mejo33's Avatar
 
elite*gold: 0
Join Date: Sep 2007
Posts: 370
Received Thanks: 117
So..... i know about this thread create at 2010 years but i need weater system in Hellmuth (albetros) source 5518+, any one can help me? Thanks..
mejo33 is offline  
Old 06/07/2014, 04:10   #84
 
InsomniacPro's Avatar
 
elite*gold: 0
Join Date: Feb 2014
Posts: 397
Received Thanks: 205
Quote:
Originally Posted by mejo33 View Post
So..... i know about this thread create at 2010 years but i need weater system in Hellmuth (albetros) source 5518+, any one can help me? Thanks..
The weather packet is publicly available. Find it, structure it in your source, then use it.
InsomniacPro is offline  
Old 06/07/2014, 12:20   #85
 
mejo33's Avatar
 
elite*gold: 0
Join Date: Sep 2007
Posts: 370
Received Thanks: 117
Quote:
Originally Posted by InsomniacPro View Post
The weather packet is publicly available. Find it, structure it in your source, then use it.
I using this source:
mejo33 is offline  
Old 06/07/2014, 13:27   #86
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,655
Received Thanks: 706
Quote:
Originally Posted by mejo33 View Post
I using this source:
And how is that relevant to the post InsomniacPro posted?
turk55 is offline  
Old 06/07/2014, 14:02   #87
 
mejo33's Avatar
 
elite*gold: 0
Join Date: Sep 2007
Posts: 370
Received Thanks: 117
Quote:
Originally Posted by turk55 View Post
And how is that relevant to the post InsomniacPro posted?
There is no structure for weather system...
mejo33 is offline  
Old 06/07/2014, 14:08   #88


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Quote:
Originally Posted by mejo33 View Post
There is no structure for weather system...
Make one, chances are this structure is unchanged -
Korvacs is offline  
Thanks
1 User
Old 06/07/2014, 14:08   #89
 
abdoumatrix's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 239
Quote:
Originally Posted by mejo33 View Post
There is no structure for weather system...
PHP Code:
// * Created by CptSky
// * Copyright © 2011
// * COPS v6 Emulator - Project

using System;
using System.Runtime.InteropServices;

namespace 
COServer.Network
{
    public 
unsafe class MsgWeather Msg
    
{
        public const 
Int16 Id _MSG_WEATHER;

        public 
enum Type
        
{
            
None 1,
            
Rain 2,
            
Snow 3,
            
RainWind 4,
            
AutumnLeaves 5,
            
CherryBlossomPetals 7,
            
CherryBlossomPetalsWind 8,
            
BlowingCotten 9,
            
Atoms 10,
        }

        [
StructLayout(LayoutKind.Sequential)]
        public 
struct MsgInfo
        
{
            public 
MsgHeader Header;
            public 
Int32 Type;
            public 
Int32 Intensity;
            public 
Int32 Direction;
            public 
Int32 Color;
        };

        public static 
Byte[] Create(Map Map)
        {
            try
            {
                
MsgInfopMsg stackalloc MsgInfo[1];
                
pMsg->Header.Length = (Int16)sizeof(MsgInfo);
                
pMsg->Header.Type Id;

                
pMsg->Type Map.Weather;
                
pMsg->Intensity MyMath.Generate(125150);
                
pMsg->Direction MyMath.Generate(4585);
                
pMsg->Color 0;

                
Byte[] Out = new Byte[pMsg->Header.Length];
                
Marshal.Copy((IntPtr)pMsgOut0Out.Length);

                return 
Out;
            }
            catch (
Exception Exc) { Program.WriteLine(Exc); return null; }
        }
    }

check this
abdoumatrix is offline  
Thanks
1 User
Old 06/07/2014, 15:01   #90
 
elite*gold: 0
Join Date: Sep 2013
Posts: 197
Received Thanks: 141
Quote:
Originally Posted by abdoumatrix View Post
PHP Code:
// * Created by CptSky
// * Copyright © 2011
// * COPS v6 Emulator - Project

using System;
using System.Runtime.InteropServices;

namespace 
COServer.Network
{
    public 
unsafe class MsgWeather Msg
    
{
        public const 
Int16 Id _MSG_WEATHER;

        public 
enum Type
        
{
            
None 1,
            
Rain 2,
            
Snow 3,
            
RainWind 4,
            
AutumnLeaves 5,
            
CherryBlossomPetals 7,
            
CherryBlossomPetalsWind 8,
            
BlowingCotten 9,
            
Atoms 10,
        }

        [
StructLayout(LayoutKind.Sequential)]
        public 
struct MsgInfo
        
{
            public 
MsgHeader Header;
            public 
Int32 Type;
            public 
Int32 Intensity;
            public 
Int32 Direction;
            public 
Int32 Color;
        };

        public static 
Byte[] Create(Map Map)
        {
            try
            {
                
MsgInfopMsg stackalloc MsgInfo[1];
                
pMsg->Header.Length = (Int16)sizeof(MsgInfo);
                
pMsg->Header.Type Id;

                
pMsg->Type Map.Weather;
                
pMsg->Intensity MyMath.Generate(125150);
                
pMsg->Direction MyMath.Generate(4585);
                
pMsg->Color 0;

                
Byte[] Out = new Byte[pMsg->Header.Length];
                
Marshal.Copy((IntPtr)pMsgOut0Out.Length);

                return 
Out;
            }
            catch (
Exception Exc) { Program.WriteLine(Exc); return null; }
        }
    }

check this
Quote:
Code:
// * Created by CptSky
// * Copyright © 2011
// * COPS v6 Emulator - Project
...
SteveRambo is offline  
Thanks
1 User
Closed Thread


Similar Threads Similar Threads
[help]weather packet
11/25/2009 - CO2 Private Server - 2 Replies
staff, I need the packet of the weather, someone has?



All times are GMT +1. The time now is 12:03.


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.