The last question
where I will add the code RSB cooldown
which??
StartsWith(?))
where I will add the code RSB cooldown
which??
StartsWith(?))
else if(packetHeader == "S|ROB")
{
if (this.Ship.HP == this.Ship.maxHP)
{
Send("0|A|RS|0");
Send("0|A|HPT|" + this.Ship.HP + "|" + this.Ship.maxHP);
{
if (this.Ship.HP < this.Ship.maxHP)
Send("0|A|RS|1");
long hp = this.Ship.HP + 10000;
Send("0|A|HPT|" + hp + "|" + this.Ship.maxHP);
if (this.Ship.HP >= this.Ship.maxHP)
this.Ship.HP = this.Ship.maxHP;
Send("0|A|RS|0");
}
}
}
Your error is this " if (this.Ship.HP == this.Ship.maxHP)"Quote:
i have paste this on emulator
and this d'ont work O_o ? where is my error pliz :)PHP Code:else if(packetHeader == "S|ROB")
{
if (this.Ship.HP == this.Ship.maxHP)
{
Send("0|A|RS|0");
Send("0|A|HPT|" + this.Ship.HP + "|" + this.Ship.maxHP);
{
if (this.Ship.HP < this.Ship.maxHP)
Send("0|A|RS|1");
long hp = this.Ship.HP + 10000;
Send("0|A|HPT|" + hp + "|" + this.Ship.maxHP);
if (this.Ship.HP >= this.Ship.maxHP)
this.Ship.HP = this.Ship.maxHP;
Send("0|A|RS|0");
}
}
}
else if (packetHeader.StartsWith("S"))
{
string packetSubHeader = packetParser.getString();
if (packetSubHeader.StartsWith("ROB"))
{
this.Ship.repair = true;
if (this.Ship.HP == this.Ship.maxHP)
{
this.Send("0|A|RS|0");
this.Send("0|A|HPT|" + this.Ship.HP + "|" + this.Ship.maxHP);
this.Ship.repair = false;
return;
}
else if (this.Ship.HP < this.Ship.maxHP)
{
this.Send("0|A|RS|1");
uint newhp = this.Ship.HP + 500;
this.Ship.HP += 500;
this.Send("0|A|HPT|" + newhp + "|" + this.Ship.maxHP);
}
else if (this.Ship.HP > this.Ship.maxHP)
{
this.Ship.HP = this.Ship.maxHP;
this.Send("0|A|HPT|" + this.Ship.HP + "|" + this.Ship.maxHP);
this.Send("0|A|RS|0");
this.Ship.repair = false;
}
this.Send("0|A|RS|0");
}
}