Private Server Info and Support Thread

07/17/2014 20:07 monte321#841
Hiho, I got problem to connect to server on files by Elieaz.

[Only registered and activated users can see links. Click Here To Register...]

This is screenshot, which I have after login. Server is running correctly. I got this on linux and I have no idea what's wrong.
07/19/2014 21:18 dopvpfan#842
Hi...

I tried very hard my config code does not work properly :(

my code:
Code:
if (packetSubHeader.StartsWith("CFG"))
                                {
                                    if (this.Ship.config == 1)
                                    {
                                        if (this.Ship.CanUseConfig)
                                        {
                                            this.Ship.CanUseConfig = false;
                                            this.Send("0|S|CFG|2");
                                            this.Ship.config = 2;
                                            this.Ship.damage = this.Ship.damage2;
                                            this.Ship.shield = this.Ship.shield2;
                                            this.Ship.maxShield = this.Ship.maxShield2;
                                        }
                                        SetConfig(5000);
                                    }
                                    if (this.Ship.config == 2)
                                    {
                                        if (this.Ship.CanUseConfig)
                                        {
                                            this.Ship.CanUseConfig = false;
                                            this.Send("0|S|CFG|1");
                                            this.Ship.config = 1;
                                            this.Ship.shield2 = this.Ship.shield;
                                            this.Ship.damage2 = this.Ship.olddamage;
                                            this.Ship.maxShield2 = this.Ship.maxShield;
                                        }
                                        SetConfig(5000);
                                    }
                                }
where is the problem ? :S :S
07/20/2014 11:21 «Ice.Shock™#843
Quote:
Originally Posted by dopvpfan View Post
Hi...

I tried very hard my config code does not work properly :(

my code:
Code:
if (packetSubHeader.StartsWith("CFG"))
                                {
                                    if (this.Ship.config == 1)
                                    {
                                        if (this.Ship.CanUseConfig) // == true
                                        {
                                            this.Ship.CanUseConfig = false;
                                            this.Send("0|S|CFG|2");
                                            this.Ship.config = 2;
                                            this.Ship.damage = this.Ship.damage2;
                                            this.Ship.shield = this.Ship.shield2;
                                            this.Ship.maxShield = this.Ship.maxShield2;
                                        }
                                        SetConfig(5000); // Original time is 3000
                                    }
                                    if (this.Ship.config == 2)
                                    {
                                        if (this.Ship.CanUseConfig) // == true
                                        {
                                            this.Ship.CanUseConfig = false;
                                            this.Send("0|S|CFG|1");
                                            this.Ship.config = 1;
                                            this.Ship.shield2 = this.Ship.shield;
                                            this.Ship.damage2 = this.Ship.olddamage;
                                            this.Ship.maxShield2 = this.Ship.maxShield;
                                        }
                                        SetConfig(5000);
                                    }
                                }
where is the problem ? :S :S
And maybe you would like to share with us SetConfig
07/20/2014 12:32 dopvpfan#844
Code:
public async void SetConfig(int ms)
        {
            this.Send("0|A|STD|wait 5 second");
            await Task.Delay(ms);
            this.Ship.CanUseConfig = true;
        }
very simple code :D :)
07/20/2014 12:54 NoCheatImPGM#845
I'm not sure if it's the problem but you should re-send the RDY Packets.
07/20/2014 14:15 dopvpfan#846
I tried to send packets in this way.

Code:
else if (packetHeader.StartsWith("S|CFG|1"))
                            {
                                this.Send("0|S|CFG|1");
                            }
                            else if (packetHeader.StartsWith("S|CFG|2"))
                            {
                                this.Send("0|S|CFG|2");
                            }
but this does not work :(
I do not know why it did not work
07/20/2014 14:56 NoCheatImPGM#847
Quote:
Originally Posted by dopvpfan View Post
I tried to send packets in this way.

Code:
else if (packetHeader.StartsWith("S|CFG|1"))
                            {
                                this.Send("0|S|CFG|1");
                            }
                            else if (packetHeader.StartsWith("S|CFG|2"))
                            {
                                this.Send("0|S|CFG|2");
                            }
but this does not work :(
I do not know why it did not work
I told you to re-send the RDY Packet:
Code:
        public void updateShip()
        {
           Send("RDY|I|" + userId + "|" + Ship.Username + "|" + Ship.Id + "|" + Ship.speed + "|" + Ship.shield + "|" + Ship.maxShield + "|" + Ship.HP + "|" + Ship.maxHP + "|" + Ship.Cargo + "|" + Ship.Cargo + "|" + Ship.x + "|" + Ship.y + "|" + mapId + "|" + Ship.factionId + "|" + Ship.clanID + "|" + AmmoManager.Ammo + "|" + RocketManager.Rocket + "|" + Ship.Lf3OnShip + "|" + Ship.Premium + "|" + Ship.exp + "|" + Ship.honor + "|" + Ship.level + "|" + Ship.cred + "|" + Ship.uri + "|" + Ship.Jackpot + "|" + Ship.rank + "|" +  Ship.clantag + "|7|1|" + Ship.iscloak);
        }
Send this void when you changed your config to update your infos.
07/20/2014 15:16 dopvpfan#848
Quote:
Originally Posted by NoCheatImPGM View Post
I told you to re-send the RDY Packet:
Code:
        public void updateShip()
        {
           Send("RDY|I|" + userId + "|" + Ship.Username + "|" + Ship.Id + "|" + Ship.speed + "|" + Ship.shield + "|" + Ship.maxShield + "|" + Ship.HP + "|" + Ship.maxHP + "|" + Ship.Cargo + "|" + Ship.Cargo + "|" + Ship.x + "|" + Ship.y + "|" + mapId + "|" + Ship.factionId + "|" + Ship.clanID + "|" + AmmoManager.Ammo + "|" + RocketManager.Rocket + "|" + Ship.Lf3OnShip + "|" + Ship.Premium + "|" + Ship.exp + "|" + Ship.honor + "|" + Ship.level + "|" + Ship.cred + "|" + Ship.uri + "|" + Ship.Jackpot + "|" + Ship.rank + "|" +  Ship.clantag + "|7|1|" + Ship.iscloak);
        }
Send this void when you changed your config to update your infos.
I send RDY..
but that was just updated my shield and damage (config 2)
I again come back to config1
My shield and the damage is not updated..

To better understand me.
this code You should try the azure 5.0 server :) :o

Code:
if (packetSubHeader.StartsWith("CFG"))
                                {
                                    if (this.Ship.config == 1)
                                    {
                                        if (this.Ship.CanUseConfig == true)
                                        {
                                            this.Ship.CanUseConfig = false;
                                            this.Send("0|S|CFG|2");
                                            this.Ship.config = 2;
                                            this.Ship.damage = this.Ship.damage2;
                                            this.Ship.shield = this.Ship.shield2;
                                            this.Ship.maxShield = this.Ship.maxShield2;
                                        }
                                        SetConfig(3000);
                                        updateShip();
                                    }
                                    if (this.Ship.config == 2)
                                    {
                                        if (this.Ship.CanUseConfig == true)
                                        {
                                            this.Ship.CanUseConfig = false;
                                            this.Send("0|S|CFG|1");
                                            this.Ship.config = 1;
                                            this.Ship.shield2 = this.Ship.shield;
                                            this.Ship.damage2 = this.Ship.olddamage;
                                            this.Ship.maxShield2 = this.Ship.maxShield;
                                        }
                                        SetConfig(3000);
                                        updateShip();
                                    }
                                }
07/20/2014 15:26 NoCheatImPGM#849
Not my code, but it should works:
Code:
   else if (packet_special.StartsWith("CFG"))
   {
         if (this.cooldownCFG == false)
         {
               ChangeCFG(packetParser.GetUInt());
         }
         else
         {
               this.Send("0|A|STM|config_change_failed_time");
         }
   }
Code:
        public async void ChangeCFG(uint cfg)
        {
            try
            {
                this.cooldownCFG = true;
                if (cfg == 1)
                {
                    this.Send("0|S|CFG|1");
                    this.selectedcfg = 1;
                    this.Ship.shield2 = this.Ship.shield;
                    this.Ship.shield = this.Ship.shield1;
                    this.Ship.damage = this.Ship.damage1;
                    this.Ship.maxShield = this.Ship.maxShield1;
                    this.Ship.speed = this.Ship.speed1;
                    this.Send("0|A|SHD|" + this.Ship.shield + "|" + this.Ship.maxShield);
                    this.Send("0|A|v|" + this.Ship.speed);
                }
                else if (cfg == 2)
                {
                    this.Send("0|S|CFG|2");
                    this.selectedcfg = 2;
                    this.Ship.shield1 = this.Ship.shield;
                    this.Ship.shield = this.Ship.shield2;
                    this.Ship.damage = this.Ship.damage2;
                    this.Ship.maxShield = this.Ship.maxShield2;
                    this.Ship.speed = this.Ship.speed2;
                    this.Send("0|A|SHD|" + this.Ship.shield + "|" + this.Ship.maxShield);
                    this.Send("0|A|v|" + this.Ship.speed);
                }
                await Task.Delay(5000);
                this.cooldownCFG = false;
            }
            catch
            { }
        }
If you need more information or any kind of help, contact me on skype.
07/20/2014 15:42 Requi#850
Quote:
Originally Posted by NoCheatImPGM View Post
Not my code, but it should works:
Code:
   else if (packet_special.StartsWith("CFG"))
   {
         if (this.cooldownCFG == false)
         {
               ChangeCFG(packetParser.GetUInt());
         }
         else
         {
               this.Send("0|A|STM|config_change_failed_time");
         }
   }
Code:
        public async void ChangeCFG(uint cfg)
        {
            try
            {
                this.cooldownCFG = true;
                if (cfg == 1)
                {
                    this.Send("0|S|CFG|1");
                    this.selectedcfg = 1;
                    this.Ship.shield2 = this.Ship.shield;
                    this.Ship.shield = this.Ship.shield1;
                    this.Ship.damage = this.Ship.damage1;
                    this.Ship.maxShield = this.Ship.maxShield1;
                    this.Ship.speed = this.Ship.speed1;
                    this.Send("0|A|SHD|" + this.Ship.shield + "|" + this.Ship.maxShield);
                    this.Send("0|A|v|" + this.Ship.speed);
                }
                else if (cfg == 2)
                {
                    this.Send("0|S|CFG|2");
                    this.selectedcfg = 2;
                    this.Ship.shield1 = this.Ship.shield;
                    this.Ship.shield = this.Ship.shield2;
                    this.Ship.damage = this.Ship.damage2;
                    this.Ship.maxShield = this.Ship.maxShield2;
                    this.Ship.speed = this.Ship.speed2;
                    this.Send("0|A|SHD|" + this.Ship.shield + "|" + this.Ship.maxShield);
                    this.Send("0|A|v|" + this.Ship.speed);
                }
                await Task.Delay(5000);
                this.cooldownCFG = false;
            }
            catch
            { }
        }
If you need more information or any kind of help, contact me on skype.
1. Don't try catch without doing something in the catch -> Not efficient
2. There is no try catch needed, because nothing can cause an error here.
07/20/2014 15:44 NoCheatImPGM#851
Quote:
Originally Posted by Requi View Post
1. Don't try catch without doing something in the catch -> Not efficient
2. There is no try catch needed, because nothing can cause an error here.
You should read the whole post... It's not my code.
07/20/2014 16:01 Requi#852
Quote:
Originally Posted by NoCheatImPGM View Post
You should read the whole post... It's not my code.
But still, you could improve it, that he doesn't learn it wrong ;)
07/20/2014 16:04 dopvpfan#853
Quote:
Originally Posted by NoCheatImPGM View Post
You should read the whole post... It's not my code.
It works great
I have edited this code :

Code:
if (packetSubHeader.StartsWith("CFG"))
                                {
                                    if (this.Ship.CanUseConfig == false)
                                    {
                                        ChangeCFG(packetParser.getUInt());
                                    }
                                    else
                                    {
                                        this.Send("0|A|STM|config_change_failed_time");
                                    }
                                }
Code:
public async void ChangeCFG(uint cfg)
        {
            try
            {
                this.Ship.CanUseConfig = true;
                if (cfg == 1)
                {
                    this.Send("0|S|CFG|1");
                    this.Ship.config = 1;
                    this.Ship.shield2 = this.Ship.shield;
                    this.Ship.damage2 = this.Ship.damage;
                    this.Ship.shield = this.Ship.shield1;
                    this.Ship.damage = this.Ship.damage1;
                    this.Ship.maxShield = this.Ship.maxShield1;
                    //this.Ship.speed = this.Ship.speed1;
                    this.Send("0|A|SHD|" + this.Ship.shield + "|" + this.Ship.maxShield);
                    //this.Send("0|A|v|" + this.Ship.speed);
                }
                else if (cfg == 2)
                {
                    this.Send("0|S|CFG|2");
                    this.Ship.config = 2;
                    this.Ship.shield1 = this.Ship.shield;
                    this.Ship.shield = this.Ship.shield2;
                    this.Ship.damage = this.Ship.damage2;
                    this.Ship.maxShield = this.Ship.maxShield2;
                    //this.Ship.speed = this.Ship.speed2;
                    this.Send("0|A|SHD|" + this.Ship.shield + "|" + this.Ship.maxShield);
                    //this.Send("0|A|v|" + this.Ship.speed);
                }
                await Task.Delay(5000);
                this.Ship.CanUseConfig = false;
            }
            catch
            { }
        }
There is only one problem

My damage is not updated.. (config1)
What do I need to update the damage?
07/20/2014 16:05 NoCheatImPGM#854
Quote:
Originally Posted by Requi View Post
But still, you could improve it, that he doesn't learn it wrong ;)
I'm not using this code, I told him that if he need anything more, he can contact me on skype.

Edit: @dopvpfan
I don't know the configuration of your Ship.cs, contact me on skype to reduce spam please.
07/20/2014 16:09 Requi#855
Quote:
Originally Posted by dopvpfan View Post
It works great
I have edited this code :

Code:
if (packetSubHeader.StartsWith("CFG"))
                                {
                                    if (this.Ship.CanUseConfig == false)
                                    {
                                        ChangeCFG(packetParser.getUInt());
                                    }
                                    else
                                    {
                                        this.Send("0|A|STM|config_change_failed_time");
                                    }
                                }
Code:
public async void ChangeCFG(uint cfg)
        {
            try
            {
                this.Ship.CanUseConfig = true;
                if (cfg == 1)
                {
                    this.Send("0|S|CFG|1");
                    this.Ship.config = 1;
                    this.Ship.shield2 = this.Ship.shield;
                    this.Ship.damage2 = this.Ship.damage;
                    this.Ship.shield = this.Ship.shield1;
                    this.Ship.damage = this.Ship.damage1;
                    this.Ship.maxShield = this.Ship.maxShield1;
                    //this.Ship.speed = this.Ship.speed1;
                    this.Send("0|A|SHD|" + this.Ship.shield + "|" + this.Ship.maxShield);
                    //this.Send("0|A|v|" + this.Ship.speed);
                }
                else if (cfg == 2)
                {
                    this.Send("0|S|CFG|2");
                    this.Ship.config = 2;
                    this.Ship.shield1 = this.Ship.shield;
                    this.Ship.shield = this.Ship.shield2;
                    this.Ship.damage = this.Ship.damage2;
                    this.Ship.maxShield = this.Ship.maxShield2;
                    //this.Ship.speed = this.Ship.speed2;
                    this.Send("0|A|SHD|" + this.Ship.shield + "|" + this.Ship.maxShield);
                    //this.Send("0|A|v|" + this.Ship.speed);
                }
                await Task.Delay(5000);
                this.Ship.CanUseConfig = false;
            }
            catch
            { }
        }
There is only one problem

My damage is not updated.. (config1)
What do I need to update the damage?
I would rather change the whole code and use one Config Class and work object oriented and not like this.

Quote:
Originally Posted by NoCheatImPGM View Post
I'm not using this code, I told him that if he need anything more, he can contact me on skype.

Edit: @dopvpfan
I don't know the configuration of your Ship.cs, contact me on skype to reduce spam please.
Improve it for him, but nevermind. This conversation is senseless.

btw: This is not spam. It could help other people who have the same problem ;)