Send("0|A|TX|ELA|" + this.userId);
Armut piş ağzıma düş oh ne güzel. :facepalm:Quote:
requi
I did not translate this code to C # or
if(packet.substring(0, 5).equals("S|ROB"))
{
if(_user.getHp() == _user.getHpMax())
{
SocketManager.send(_user, "0|A|RS|0");
SocketManager.send(_user, "0|A|HPT|"+_user.getHp()+"|"+_user.getHpMax()) ;
return;
}
SocketManager.send(_user, "0|A|RS|1");
long hp = _user.getHp()+500;
_user.setHp(hp);
SocketManager.send(_user, "0|A|HPT|"+hp+"|"+_user.getHpMax());
if(_user.getHp() >= _user.getHpMax())
{
_user.setHp(_user.getHpMax());
SocketManager.send(_user, "0|A|RS|0");
}
Please write me a C # version of this code? :D
Quote:
requi
I did not translate this code to C # or
if(packet.substring(0, 5).equals("S|ROB"))
{
if(_user.getHp() == _user.getHpMax())
{
SocketManager.send(_user, "0|A|RS|0");
SocketManager.send(_user, "0|A|HPT|"+_user.getHp()+"|"+_user.getHpMax()) ;
return;
}
SocketManager.send(_user, "0|A|RS|1");
long hp = _user.getHp()+500;
_user.setHp(hp);
SocketManager.send(_user, "0|A|HPT|"+hp+"|"+_user.getHpMax());
if(_user.getHp() >= _user.getHpMax())
{
_user.setHp(_user.getHpMax());
SocketManager.send(_user, "0|A|RS|0");
}
Please write me a C # version of this code? :D
elseif(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);
}
Send("0|A|RS|1");
long hp = this.ship.hp + 500;
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|ROB"))
{
if(this.Ship.HP == this.Ship.maxHP)
{
Send("0|A|RS|0");
Send("0|A|HPT|" + this.Ship.HP + "|" + this.Ship.maxHP);
{
this.Send("0|A|RS|1");
long hp = this.Ship.HP + 500;
this.Send("0|A|HPT|" + hp + "|" + this.Ship.maxHP);
if(this.Ship.HP >= this.Ship.maxHP)
this.Ship.HP = this.Ship.maxHP;
this.Send("0|A|RS|0");
}
Hey nckrnckr.Quote:
I wrote code editing
but it did not work :(Code:else if (packetHeader.StartsWith("S|ROB")) { if(this.Ship.HP == this.Ship.maxHP) { Send("0|A|RS|0"); Send("0|A|HPT|" + this.Ship.HP + "|" + this.Ship.maxHP); { this.Send("0|A|RS|1"); long hp = this.Ship.HP + 500; this.Send("0|A|HPT|" + hp + "|" + this.Ship.maxHP); if(this.Ship.HP >= this.Ship.maxHP) this.Ship.HP = this.Ship.maxHP; this.Send("0|A|RS|0"); }
problem fixed :)Quote:
Hey nckrnckr.
Should it be if it's NOT equal to max hp?
Did what I say resolve that issue?Quote:
problem fixed :)
------------------------------------------
I've added BRB
HP is adding 100,000
But,
100.000 but the screen does not appear when you add
What should I do to show how much been added to the screen?
sorry english poor :)