Update Server name in Realtime?

06/30/2019 17:46 hoangphan7#1
Hello epvpers!
Im looking for a way to update server name in realtime :D
I like Sro Stats in vSroMax and i want to make something like this.
I using A101 pck to update server name But it's only update onetime in login progess. Wait a few min, server status goes to check ^^
[Only registered and activated users can see links. Click Here To Register...]
06/30/2019 17:50 B1Q#2
use a filter
06/30/2019 18:03 hoangphan7#3
Quote:
Originally Posted by B1Q View Post
use a filter
Yep. I using filter to replace A101 packet. But it's n't change @@~
06/30/2019 18:08 B1Q#4
Quote:
Originally Posted by hoangphan7 View Post
Yep. I using filter to replace A101 packet. But it's n't change @@~
show code
06/30/2019 22:07 JellyBitz#5
Quote:
Originally Posted by hoangphan7 View Post
Hello epvpers!
Im looking for a way to update server name in realtime :D
I'm not sure what you are asking about "realtime" but this is an example how to change that server name with the player count :

PHP Code:
// packet = the original packet (0xA101)
// newPacket = the new one with your edit
Packet newPacket = new Packet(packet.Opcodepacket.Encrypted,packet.Massive);
while (
packet.ReadUInt8() == 1)
{
    
newPacket.WriteUInt8(1); // while flag
    
newPacket.WriteUInt8(packet.ReadUInt8()); // farm id
    
newPacket.WriteAscii(packet.ReadAscii()); // farm name
}
while (
packet.ReadUInt8() == 1)
{
    
newPacket.WriteUInt8(1); // while flag
    
newPacket.WriteUInt16(packet.ReadUInt16()); // server id
    
string serverName packet.ReadAscii();
    
ushort online packet.ReadUInt16();
    
ushort capacity packet.ReadUInt16();
    
newPacket.WriteAscii(serverName+" ("online "/"capacity ")"); // server name
    
newPacket.WriteUInt16(online); // online
    
newPacket.WriteUInt16(capacity); // capacity
    
newPacket.WriteUInt8(packet.ReadUInt8()); // is available
    
newPacket.WriteUInt8(packet.ReadUInt8()); // server -> farm id
}
// Send the edited packet, not the original
this.Send(newPacket); // or whatever you use.. 
07/01/2019 06:21 sarkoplata#6
It should work live. Server sends A101 when it's requested, so it will even change without having to restart the client. Whenever you click list, it's requested, and i think it's requested every x seconds as well.
07/01/2019 09:31 hoangphan7#7
Quote:
Originally Posted by JellyBitz View Post
I'm not sure what you are asking about "realtime" but this is an example how to change that server name with the player count :

PHP Code:
// packet = the original packet (0xA101)
// newPacket = the new one with your edit
Packet newPacket = new Packet(packet.Opcodepacket.Encrypted,packet.Massive);
while (
packet.ReadUInt8() == 1)
{
    
newPacket.WriteUInt8(1); // while flag
    
newPacket.WriteUInt8(packet.ReadUInt8()); // farm id
    
newPacket.WriteAscii(packet.ReadAscii()); // farm name
}
while (
packet.ReadUInt8() == 1)
{
    
newPacket.WriteUInt8(1); // while flag
    
newPacket.WriteUInt16(packet.ReadUInt16()); // server id
    
string serverName packet.ReadAscii();
    
ushort online packet.ReadUInt16();
    
ushort capacity packet.ReadUInt16();
    
newPacket.WriteAscii(serverName+" ("online "/"capacity ")"); // server name
    
newPacket.WriteUInt16(online); // online
    
newPacket.WriteUInt16(capacity); // capacity
    
newPacket.WriteUInt8(packet.ReadUInt8()); // is available
    
newPacket.WriteUInt8(packet.ReadUInt8()); // server -> farm id
}
// Send the edited packet, not the original
this.Send(newPacket); // or whatever you use.. 
yes i using this method but not realtime ^^ restart client required :D

HTML Code:
Packet capacity = new Packet(0xA101, true);
capacity.WriteUInt8(0x01); //flag
capacity.WriteUInt8(0x14); //unk
capacity.WriteAscii("SRO_Vietnam_TestLocal [F] 0");
capacity.WriteUInt8(0x00); //flag

capacity.WriteUInt8(0x01); //flag
capacity.WriteUInt16(FilterMain.ShardID); //shardID
capacity.WriteAscii("Thien Vuong" + " (" + players + "/" + max_players + ")"); //name
capacity.WriteUInt16(players); //online
capacity.WriteUInt16(max_players); //maxplayers
capacity.WriteUInt8(0x01); //Status
capacity.WriteUInt8(0x14); //unk
capacity.WriteUInt8(0x00); //flag
Quote:
Originally Posted by sarkoplata View Post
It should work live. Server sends A101 when it's requested, so it will even change without having to restart the client. Whenever you click list, it's requested, and i think it's requested every x seconds as well.
Restart client required :D
07/01/2019 10:50 JellyBitz#8
Hmm.. By server, the only option I can see is keeping a reference from that client about his last packet opcode sent and using the ping opcode as refresh, AND maybe a datetime or counter to not overload sending too much "refresh" on every client ping .. Just put this data on website and problem solved, better visualization :rollsafe:
07/01/2019 13:26 sarkoplata#9
Yeah I tried, the name does not update.
Interesting, then you'll manually have to do with a dll. Send your own info packet and change that text by yourself..
07/01/2019 13:27 Raw..#10
there is a certification, released here in the forum that can update the server name directly through SMC

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