Register for your free account! | Forgot your password?

You last visited: Today at 12:43

  • 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 11/04/2011, 12:28   #16


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Its pretty obvious that you dont understand even the simplest aspects of C# or even logical methodology. Go and learn the basics, then learn how to write a server for conquer.

I mean you dont even know how to use the tools your using correctly, the error being thrown if you right click on it in the error list and click show error help it will take you to a webpage which in 95% of cases explains to you why the error is occuring and how to avoid it.
Korvacs is offline  
Thanks
5 Users
Old 11/04/2011, 16:48   #17
 
abdeen's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
Quote:
Originally Posted by Korvacs View Post
Its pretty obvious that you dont understand even the simplest aspects of C# or even logical methodology. Go and learn the basics, then learn how to write a server for conquer.

I mean you dont even know how to use the tools your using correctly, the error being thrown if you right click on it in the error list and click show error help it will take you to a webpage which in 95% of cases explains to you why the error is occuring and how to avoid it.
that`s what i am doing , an i learned more .

now i am working on a huge system none worked on it before me , doesn't that mean i am learning anything ?
## Edited
i added it and fixed all issue`s i got. but it`s public void , not public static void , so how to start it from program.cs ?
abdeen is offline  
Old 11/04/2011, 16:56   #18
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,214
Received Thanks: 4,118
Quote:
Originally Posted by nTL3fTy View Post
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();
}
You can't declare a constant inside of a method...
also, style rules state that they should be declared first (before variables).
Spirited is offline  
Thanks
1 User
Old 11/04/2011, 16:56   #19
 
abdeen's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
========================

here is my code .

PHP Code:
        public void Nighttime(Client.GameState GC)
        {
            const 
uint COLOR_NIGHT 0x595959;

            
Network.GamePackets.Data Packet = new Network.GamePackets.Data(true);
            foreach (
Client.GameState client in ServerBase.Kernel.GamePool.Values)
            
Packet.UID client.Entity.UID;
            
Packet.ID 104;
            
Packet.dwParam COLOR_NIGHT;
            foreach (
Client.GameState pclient in ServerBase.Kernel.GamePool.Values)
            {
                
pclient.Send(Packet);
            }
        }

        public 
uint ScreenColor getset; }

        }
    } 


and this code for start it when server starts
PHP Code:
AutoInvite.Nighttime();
            
Console.WriteLine("Its Night Now."); 
but its doesn`t worked
abdeen is offline  
Old 11/04/2011, 16:56   #20
 
hyperco's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 112
Received Thanks: 12
well ,

he could just change the "Entity.UID" to according to his source code, for me would be something like:

Code:
client.Entity.UID
well i dont know more than pro4never or Fang but i know such things like this....
hyperco is offline  
Old 11/04/2011, 16:59   #21
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,214
Received Thanks: 4,118
Quote:
Originally Posted by abdeen View Post
========================

here is my code .

PHP Code:
        public void Nighttime(Client.GameState GC)
        {
            const 
uint COLOR_NIGHT 0x595959;

            
Network.GamePackets.Data Packet = new Network.GamePackets.Data(true);
            foreach (
Client.GameState client in ServerBase.Kernel.GamePool.Values)
            
Packet.UID client.Entity.UID;
            
Packet.ID 104;
            
Packet.dwParam COLOR_NIGHT;
            foreach (
Client.GameState pclient in ServerBase.Kernel.GamePool.Values)
            {
                
pclient.Send(Packet);
            }
        }

        public 
uint ScreenColor getset; }

        }
    } 
I'm heart-broken. You didn't read what I said and you chose to read the guy that was very wrong. =[
Spirited is offline  
Thanks
1 User
Old 11/04/2011, 17:03   #22
 
hyperco's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 112
Received Thanks: 12
i cant understand he..

Code:
        public void Nighttime(Client.GameState GC)
        {
            const uint COLOR_NIGHT = 0x595959;

            Network.GamePackets.Data Packet = new Network.GamePackets.Data(true);
            foreach (Client.GameState client in ServerBase.Kernel.GamePool.Values)
            Packet.UID = client.Entity.UID;
            Packet.ID = 104;
            Packet.dwParam = COLOR_NIGHT;
            foreach (Client.GameState pclient in ServerBase.Kernel.GamePool.Values)
            {
                pclient.Send(Packet);
            }
        }

        public uint ScreenColor { get; set; }

        }
    }
What is that "public uint ScreenColor { get; set; } " for?
hyperco is offline  
Old 11/04/2011, 17:08   #23
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Quote:
Originally Posted by abdeen View Post
that`s what i am doing , an i learned more .

now i am working on a huge system none worked on it before me , doesn't that mean i am learning anything ?
## Edited
i added it and fixed all issue`s i got. but it`s public void , not public static void , so how to start it from program.cs ?
I could start build a computer from scratch, does that mean I know wtf I'm doing?
BaussHacker is offline  
Old 11/04/2011, 17:09   #24
 
abdeen's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
well i edited it to

PHP Code:
        public static void Nighttime()
        {
            const 
uint COLOR_NIGHT 0x595959;

            
Network.GamePackets.Data Packet = new Network.GamePackets.Data(true);
            foreach (
Client.GameState client in ServerBase.Kernel.GamePool.Values)
                
Packet.UID client.Entity.UID;
            
Packet.ID 104;
            
Packet.dwParam COLOR_NIGHT;
            foreach (
Client.GameState client in ServerBase.Kernel.GamePool.Values)
                
client.Send(Packet);
            
Console.WriteLine("Its Night Now."); 
and i made it start when server start.

but its still wont work for me when i log into game , dose its shall work with time , and changes become when i am in game ?


Quote:
Originally Posted by hyperco View Post
i cant understand he..

Code:
        public void Nighttime(Client.GameState GC)
        {
            const uint COLOR_NIGHT = 0x595959;

            Network.GamePackets.Data Packet = new Network.GamePackets.Data(true);
            foreach (Client.GameState client in ServerBase.Kernel.GamePool.Values)
            Packet.UID = client.Entity.UID;
            Packet.ID = 104;
            Packet.dwParam = COLOR_NIGHT;
            foreach (Client.GameState pclient in ServerBase.Kernel.GamePool.Values)
            {
                pclient.Send(Packet);
            }
        }

        public uint ScreenColor { get; set; }

        }
    }
What is that "public uint ScreenColor { get; set; } " for?

lol i deleted it .

Quote:
Originally Posted by Fаng View Post
I'm heart-broken. You didn't read what I said and you chose to read the guy that was very wrong. =[
Ops ... i am sorry Fang , didn't meant to hurt your heart . :S
abdeen is offline  
Old 11/04/2011, 18:34   #25
 
Lateralus's Avatar
 
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 918
Code:
public void Nighttime(Client.GameState GC)
{
using System.Diagnostics;
     GC.Collect();
     const uint COLOR_NIGHT = 0x595959;
     GC.ChangeMapColor(ScreenColor = COLOR_NIGHT);
     foreach (client.ONLINE in GamePool.onlineCharacters)
	  SeNDPAKET(aVariable);
}

public uint ScreenColor { get; set; }
public byte aVariable { get; protected set; }
Lateralus is offline  
Old 11/04/2011, 18:38   #26
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,377
Quote:
Originally Posted by Lateralus View Post
Code:
public void Nighttime(Client.GameState GC)
{
     GC.Collect();
     const uint COLOR_NIGHT = 0x595959;
     GC.ChangeMapColor(ScreenColor = COLOR_NIGHT);
     foreach (client.ONLINE in GamePool.onlineCharacters)
	  SeNDPAKET(aVariable);
}

public uint ScreenColor { get; set; }
public byte aVariable { get; protected set; }
now you're just being mean.
pro4never is offline  
Old 11/04/2011, 18:44   #27
 
Lateralus's Avatar
 
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 918
In all seriousness, to correct some of these posts, the "UID" field isn't processed by the client (at least on 4267; i doubt it's changed), and you can declare consts wherever, since they get compiled to the value they hold anyway.
Lateralus is offline  
Old 11/04/2011, 20:16   #28
 
abdeen's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
well i edited it to

PHP Code:
        public static void Nighttime()
        {
            const 
uint COLOR_NIGHT 0x595959;

            
Network.GamePackets.Data Packet = new Network.GamePackets.Data(true);
            foreach (
Client.GameState client in ServerBase.Kernel.GamePool.Values)
                
Packet.UID client.Entity.UID;
            
Packet.ID 104;
            
Packet.dwParam COLOR_NIGHT;
            foreach (
Client.GameState client in ServerBase.Kernel.GamePool.Values)
                
client.Send(Packet);
            
Console.WriteLine("Its Night Now."); 
and i made it start when server start.

but its still wont work for me when i log into game , dose its shall work with time , and changes become when i am in game ?
abdeen is offline  
Old 11/04/2011, 20:58   #29
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,214
Received Thanks: 4,118
Quote:
Originally Posted by abdeen View Post
well i edited it to

PHP Code:
        public static void Nighttime()
        {
            const 
uint COLOR_NIGHT 0x595959;

            
Network.GamePackets.Data Packet = new Network.GamePackets.Data(true);
            foreach (
Client.GameState client in ServerBase.Kernel.GamePool.Values)
                
Packet.UID client.Entity.UID;
            
Packet.ID 104;
            
Packet.dwParam COLOR_NIGHT;
            foreach (
Client.GameState client in ServerBase.Kernel.GamePool.Values)
                
client.Send(Packet);
            
Console.WriteLine("Its Night Now."); 
and i made it start when server start.

but its still wont work for me when i log into game , dose its shall work with time , and changes become when i am in game ?
Wtf... you still haven't read what I said. I explained it in full detail... how hard is it to move a line of code and change 1 name... damn dude.
Spirited is offline  
Thanks
1 User
Old 11/04/2011, 21:10   #30
 
abdeen's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
Quote:
Originally Posted by Fаng View Post
Wtf... you still haven't read what I said. I explained it in full detail... how hard is it to move a line of code and change 1 name... **** dude.
hey Fang , i like you LOL

i edited it and now i have no errors , but its don't work correctly .
abdeen is offline  
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 12:43.


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.