Register for your free account! | Forgot your password?

You last visited: Today at 08:39

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

Advertisement



Weather in 5520+

Discussion on Weather in 5520+ within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
abdeen's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
Weather in 5520+

Okay , so i am trying to make its night , i coded it to Rain , Snow , Rain Wind and Blowing Cotton and its working fine , but i don't know how to make it`s Night

any help ?
abdeen is offline  
Old 11/03/2011, 23:45   #2
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,219
Received Thanks: 4,122
That's not the weather system, that's the sky color system.
Spirited is offline  
Thanks
1 User
Old 11/03/2011, 23:52   #3
 
abdeen's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
Quote:
Originally Posted by Fаng View Post
That's not the weather system, that's the sky color system.
oh , you are right , i forgot about that. Lol

how to make its night tho bro ?
abdeen is offline  
Old 11/04/2011, 00:19   #4
 
Sp!!ke's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 380
Received Thanks: 58
night it's just a screen color...if you will search here will got night ^ day system released
Sp!!ke is offline  
Old 11/04/2011, 00:25   #5
 
-Sensei-'s Avatar
 
elite*gold: 0
Join Date: Oct 2011
Posts: 267
Received Thanks: 59
Code:
        public void Nighttime()
        {
            ScreenColor = 5855577;

            Network.GamePackets.Data Packet = new Network.GamePackets.Data(true);
            Packet.UID = Entity.UID;
            Packet.ID = 104;
            Packet.dwParam = ScreenColor;
            foreach (GameState pclient in ServerBase.Kernel.GamePool.Values)
            {
                pclient.Send(Packet);
            }
        }
-Sensei- is offline  
Thanks
1 User
Old 11/04/2011, 01:17   #6
 
abdeen's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
thanks -Sensei- , i`ll try it .
Edit :

what the property stub for screencolor , and

an object reference is required for the nonstatic field method or property
for Entity.UID

Edit :

i made it :

PHP Code:
public uint ScreenColor getset; } 
is this correct ?


now i am getting this

an object reference is required for the nonstatic field method or property
for Entity.UID
abdeen is offline  
Old 11/04/2011, 01:44   #7
 
-Sensei-'s Avatar
 
elite*gold: 0
Join Date: Oct 2011
Posts: 267
Received Thanks: 59
Quote:
Originally Posted by abdeen View Post
thanks -Sensei- , i`ll try it .
Edit :

what the property stub for screencolor , and

an object reference is required for the nonstatic field method or property
for Entity.UID

Edit :

i made it :

PHP Code:
public uint ScreenColor getset; } 
is this correct ?


now i am getting this

an object reference is required for the nonstatic field method or property
for Entity.UID
Hey that wont work.

Set a time when will be night. like;
Code:
                    if (DateTime.Now.Hour == 00 && DateTime.Now.Minute == 0)
                    {
                        foreach (Client.GameState clients in ServerBase.Kernel.GamePool.Values)
                        {

                            try
                            {
                                clients.Nighttime();
-Sensei- is offline  
Thanks
1 User
Old 11/04/2011, 01:54   #8
 
abdeen's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
Quote:
Originally Posted by -Sensei- View Post
Hey that wont work.

Set a time when will be night. like;
Code:
                    if (DateTime.Now.Hour == 00 && DateTime.Now.Minute == 0)
                    {
                        foreach (Client.GameState clients in ServerBase.Kernel.GamePool.Values)
                        {

                            try
                            {
                                clients.Nighttime();
thanks , that`s what i did .

but i have these 4 errors
abdeen is offline  
Old 11/04/2011, 02:03   #9
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,219
Received Thanks: 4,122
You can't copy and paste it....
**** dude... think =|

You need to implement it using your own general data packet. It's not that difficult.
Spirited is offline  
Thanks
1 User
Old 11/04/2011, 02:06   #10
 
abdeen's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
Quote:
Originally Posted by Fаng View Post
You can't copy and paste it....
**** dude... think =|

You need to implement it using your own general data packet. It's not that difficult.
Lol , i edited it already look here :



but this problem i cant fix it without any help :P
abdeen is offline  
Old 11/04/2011, 02:24   #11
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,219
Received Thanks: 4,122
You must not understand the code...
So let's go over it.

So you started by assigning ScreenColor with the integer 5855577. On the next line, you declared and assigned a new general data packet called Packet. Below that, you have your error. That line should assign the UID parameter in the packet with the character's uid (identity number). Let's get back to that later though and read on for now. So below the error line, you assign the type (id) with 104 (which is for Sky Color). After that line, you assign ScreenColor to dwParam (which is the first value parameter in the general data packet).

Then, you have the foreach loop. It states, for each client (which we'll name pclient) in the GamePool (a dictionary with all of your players in it), it will execute what's in brackets. Let's look at what's in the brackets:

So inside the brackets, you see that the server is sending the packet to the player's screen. So.... why are you trying to send the character's id up on the error line when you get the character's info down in the foreach statement?
Spirited is offline  
Thanks
1 User
Old 11/04/2011, 02:31   #12
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
Abden Use it like that ..Client.Entity.UID; and Error will be removed
shadowman123 is offline  
Old 11/04/2011, 02:32   #13
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,219
Received Thanks: 4,122
Quote:
Originally Posted by shadowman123 View Post
Abden Use it like that ..Client.Entity.UID; and Error will be removed
That would fix the syntax problem but it would create a very large semantic problem.
Spirited is offline  
Old 11/04/2011, 03:27   #14
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,377
I weep....

Fang explained it properly. You should be assigning the uid for the packet based on the loop not based on a single player...
pro4never is offline  
Thanks
3 Users
Old 11/04/2011, 12:07   #15
 
nTL3fTy's Avatar
 
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
Quote:
Originally Posted by pro4never View Post
I weep....

Fang explained it properly. You should be assigning the uid for the packet based on the loop not based on a single player...
Unless the method is inside of his player class, which he would then loop through the ingame players calling said method to change the map color.

Code:
public class Player
{
    public void ChangeToNightTime()
    {
        const uint COLOR_NIGHT = 0x595959;

        var packet = new Network.GamePackets.Data(true);
        packet.UID = Entity.UID;
        packet.ID = 104;
        packet.dwParam = COLOR_NIGHT;
        Send(Packet);
    }
}

...

foreach (var player in ServerBase.Kernel.GamePool.Values)
{
    player.ChangeToNightTime();
}
nTL3fTy is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
how i can upgrade 5375 to 5520 ?
10/19/2011 - CO2 Private Server - 8 Replies
how i can upgrade 5375 to 5520 ? plz can any one help me and very thanks can any one help me my source phoenix can any one help me my source phoenix
Question in 5520 source
09/23/2011 - CO2 Private Server - 4 Replies
I've solved every bug in the source except one, that when I wear any garment it decrease my battle power. So where is the problem ?! Edit:ROFL, 60 views and 0 replies 0.o, is my problem hard? okay, anybody guess any solution lol. anyway if you don't know the problem solving reply to give me hope :D
i need all pleas SpwanPacket 5520
09/19/2011 - CO2 Private Server - 7 Replies
ples all i need spewanPacket 5520 and Packet Level for 5520 plese chrg level is read 0
5520 help with this error source
08/25/2011 - CO2 Private Server - 3 Replies
hi all thanks for releasing your fang work but NEED help with this connection error please help thanks god bless you all http://img72.xooimage.com/files/1/5/9/condones-2c 0f3f2.jpg
spawn name Packet 5520
08/21/2011 - CO2 Private Server - 11 Replies
hellos Evert Body this pic http://img832.imageshack.us/img832/7425/44423762.j pg that when i try to upgrade my sourse from 5375 to 5520 i upgrade the spawn to see the monsters and other chars but i can't see the names of them and the char is visble?? so i need spawn packet make it fully working



All times are GMT +2. The time now is 08:41.


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.