|
You last visited: Today at 14:08
Advertisement
Private Server Info and Support Thread
Discussion on Private Server Info and Support Thread within the DarkOrbit forum part of the Browsergames category.
07/17/2014, 20:07
|
#841
|
elite*gold: 0
Join Date: Sep 2013
Posts: 8
Received Thanks: 0
|
Hiho, I got problem to connect to server on files by Elieaz.
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
|
#842
|
elite*gold: 0
Join Date: Jul 2014
Posts: 8
Received Thanks: 0
|
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
|
#843
|
elite*gold: 15
Join Date: Dec 2012
Posts: 1,236
Received Thanks: 1,411
|
Quote:
Originally Posted by dopvpfan
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
|
#844
|
elite*gold: 0
Join Date: Jul 2014
Posts: 8
Received Thanks: 0
|
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
|
|
|
07/20/2014, 12:54
|
#845
|
elite*gold: 0
Join Date: Jan 2012
Posts: 1,996
Received Thanks: 3,420
|
I'm not sure if it's the problem but you should re-send the RDY Packets.
|
|
|
07/20/2014, 14:15
|
#846
|
elite*gold: 0
Join Date: Jul 2014
Posts: 8
Received Thanks: 0
|
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
|
#847
|
elite*gold: 0
Join Date: Jan 2012
Posts: 1,996
Received Thanks: 3,420
|
Quote:
Originally Posted by dopvpfan
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
|
#848
|
elite*gold: 0
Join Date: Jul 2014
Posts: 8
Received Thanks: 0
|
Quote:
Originally Posted by NoCheatImPGM
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
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
|
#849
|
elite*gold: 0
Join Date: Jan 2012
Posts: 1,996
Received Thanks: 3,420
|
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
|
#850
|
elite*gold: 3800
Join Date: Dec 2012
Posts: 13,039
Received Thanks: 8,243
|
Quote:
Originally Posted by NoCheatImPGM
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
|
#851
|
elite*gold: 0
Join Date: Jan 2012
Posts: 1,996
Received Thanks: 3,420
|
Quote:
Originally Posted by Requi
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
|
#852
|
elite*gold: 3800
Join Date: Dec 2012
Posts: 13,039
Received Thanks: 8,243
|
Quote:
Originally Posted by NoCheatImPGM
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
|
#853
|
elite*gold: 0
Join Date: Jul 2014
Posts: 8
Received Thanks: 0
|
Quote:
Originally Posted by NoCheatImPGM
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
|
#854
|
elite*gold: 0
Join Date: Jan 2012
Posts: 1,996
Received Thanks: 3,420
|
Quote:
Originally Posted by Requi
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
|
#855
|
elite*gold: 3800
Join Date: Dec 2012
Posts: 13,039
Received Thanks: 8,243
|
Quote:
Originally Posted by dopvpfan
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
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
|
|
|
Similar Threads
|
Private private server :P READ FOR MORE INFO
12/01/2010 - SRO Private Server - 12 Replies
hey guys im wondering if there is anyway to make a real private server like ZSZC or SWSRO or MYSRO but to where i can only play and level a character and as if it was a real private server. but just for me, not like an emulator where im already lvl 90 or 120 or whatever. i mean one where i set the rates and i level. if not then ok u can close this. but i was just wondering.
|
All times are GMT +2. The time now is 14:08.
|
|