Request Server Listing ?

06/04/2011 23:47 sarkoplata#1
Trying to find out hpmp update packets .. see [Only registered and activated users can see links. Click Here To Register...]
06/04/2011 23:59 benco#2
hi,

before posting something like that,
Please search in forum threads. there's source code of your request ;)
06/05/2011 11:22 Kraizy​#3
In the login screen is a button to choose the server u want to play on. If u click on it u will receive your A101. Before receiving it, you will get the 6101 (S->C). Now, just send C->S 6101 (without data) and u will get the A101 as response.
Not hard at all, hm? Just need to know how to use an analyzer.
06/07/2011 23:04 sarkoplata#4
I didnt want to create a new topic and cause spam.
Now im trying to find how hpmp update packets are built
i tried already but couldn't find anywhere and there is no any clear guide for it.
Thank you , sarkolata
06/08/2011 09:36 kevin_owner#5
You can take lesderid's login server documentation that should do the trick it's stickied btw.

Owh and something which isn't told in his documentation. the server list of isro (idk if it's also in another version) is a bit different since the amount of players is in a float so 0.00 = server empty 0.50 = half full and 1 = server full.
in some other version or older ones the capacity was a word or dword I can't remember and there are 2 of them so the first one is the current amount of players and the second one the max amount of players.

Keep this in mind if you get strange values:)
06/08/2011 14:16 Kraizy​#6
Quote:
Trying to find out hpmp update packets .. see Request Server Listing ?
Code:
HP/MP Update

AD 8A 4E 00		object id
04			type 1
02			type 2
FC 00 00 00		new value 

If type 2 = 3 or 5, then a trailing dword is added for MP value.


Type 1:

10			increase
01			hp decrease
04			mp decrease

Type 2:

01			hp
02			mp
03			hp & mp
04			?
05			mob hp & mp
From SREmu...
06/08/2011 14:38 sarkoplata#7
Quote:
Originally Posted by xKraizy View Post
Code:
HP/MP Update

AD 8A 4E 00		object id
04			type 1
02			type 2
FC 00 00 00		new value 

If type 2 = 3 or 5, then a trailing dword is added for MP value.


Type 1:

10			increase
01			hp decrease
04			mp decrease

Type 2:

01			hp
02			mp
03			hp & mp
04			?
05			mob hp & mp
From SREmu...
I have the same. I couldn't understand it from there..
06/08/2011 16:14 kevin_owner#8
Owh sorry I thought your were talking about the server list xD
kinda confusing title.

but if you want the hp and mp of your character and follow the updates you need to parse the 0x3013 or 0x34e5 packet if i am correct at least the big character data packet. one of the first bytes is the hp and mp and the stats packet which comes a bit after that one (idk the opcode) contains the current hp and mp.

now you need to do something which changes your hp like casting a pot and check the packets you logged to find the correct one which contains the hp and mp and with edx silkroad loader it'll already be parsed so all you need to do is read the packet.
06/08/2011 18:51 Kraizy​#9
Well, I didn't test it yet so there could be some mistakes, but you could try something like that (no C&P-Code):
PHP Code:
int objectid packet.read_dword
byte type1 
packet.read_byte //increase or decrease, unnecessary atm...
byte type2 packet.read_byte //hp or mp or hp&mp

switch type2
{
case 
//hp
if objectid me.objectid then
me
.currenthp packet.read_dword
elseif moblist.contains(objectidthen
moblist
(objectid).currenthp packet.read_dword
end 
if
case 
//mp
if objectid me.objectid then
me
.currentmp packet.read_dword
end 
if
case 
//hp & mp
if objectid me.objectid then
me
.currenthp packet.read_dword
me
.currentmp packet.read_dword
end 
if

06/08/2011 19:05 sarkoplata#10
Quote:
Originally Posted by kevin_owner View Post
Owh sorry I thought your were talking about the server list xD
kinda confusing title.

but if you want the hp and mp of your character and follow the updates you need to parse the 0x3013 or 0x34e5 packet if i am correct at least the big character data packet. one of the first bytes is the hp and mp and the stats packet which comes a bit after that one (idk the opcode) contains the current hp and mp.

now you need to do something which changes your hp like casting a pot and check the packets you logged to find the correct one which contains the hp and mp and with edx silkroad loader it'll already be parsed so all you need to do is read the packet.
Pservers doesnt support edx loader :(
@xKraizy
I will check it out. thanks
06/21/2011 12:23 sarkoplata#11
Fixed it finally... Here if it helps you ;
PHP Code:
  Dim ms As New MemoryStream(data)
        
Dim bn As New BinaryReader(ms)
        
Dim objectid As UInt32 bn.ReadUInt32
        Dim i 
As Byte bn.ReadByte
        Dim type 
As Byte bn.ReadByte

        Select 
Case CByte((type 1))
            Case 
0
                hpcur 
bn.ReadUInt32
                
Exit Select
            
Case 1
                mpcur 
bn.ReadUInt32
                
Exit Select
            
Case 2
                hpcur 
bn.ReadUInt32
                mpcur 
bn.ReadUInt32
                
Exit Select
            
Case 3
                Dim b 
As Byte bn.ReadByte
                
Exit Select
        End Select 
06/22/2011 11:59 Kraizy​#12
Why do u do type -1? Just do type and:
1: Char.HP
2: Char.MP
3: Char.HP & Char.MP
4: dunno
5: Mob.HP (u will need it later if u r gonna make a bot)